diff --git a/app/components/DocumentPreview/components/PublishingInfo.js b/app/components/DocumentPreview/components/PublishingInfo.js
index b8a55321..0b233b0e 100644
--- a/app/components/DocumentPreview/components/PublishingInfo.js
+++ b/app/components/DocumentPreview/components/PublishingInfo.js
@@ -5,6 +5,7 @@ import Collection from 'models/Collection';
import Document from 'models/Document';
import Flex from 'shared/components/Flex';
import Time from 'shared/components/Time';
+import Breadcrumb from 'shared/components/Breadcrumb';
const Container = styled(Flex)`
color: ${props => props.theme.textTertiary};
@@ -75,7 +76,10 @@ function PublishingInfo({ collection, showPublished, document }: Props) {
{content}
{collection && (
- in {isDraft ? 'Drafts' : collection.name}
+ in
+
+ {isDraft ? 'Drafts' : }
+
)}
diff --git a/app/scenes/Document/components/Header.js b/app/scenes/Document/components/Header.js
index a81dc6cd..c69aec18 100644
--- a/app/scenes/Document/components/Header.js
+++ b/app/scenes/Document/components/Header.js
@@ -14,7 +14,7 @@ import { documentEditUrl } from 'utils/routeHelpers';
import { meta } from 'utils/keyboard';
import Flex from 'shared/components/Flex';
-import Breadcrumb from './Breadcrumb';
+import Breadcrumb from 'shared/components/Breadcrumb';
import DocumentMenu from 'menus/DocumentMenu';
import NewChildDocumentMenu from 'menus/NewChildDocumentMenu';
import DocumentShare from 'scenes/DocumentShare';
diff --git a/app/scenes/Document/components/Breadcrumb.js b/shared/components/Breadcrumb.js
similarity index 80%
rename from app/scenes/Document/components/Breadcrumb.js
rename to shared/components/Breadcrumb.js
index 61496c26..9f094436 100644
--- a/app/scenes/Document/components/Breadcrumb.js
+++ b/shared/components/Breadcrumb.js
@@ -14,15 +14,30 @@ import Flex from 'shared/components/Flex';
type Props = {
document: Document,
collections: CollectionsStore,
+ onlyText: boolean,
};
-const Breadcrumb = observer(({ document, collections }: Props) => {
+const Breadcrumb = observer(({ document, collections, onlyText }: Props) => {
const path = document.pathToDocument.slice(0, -1);
if (!document.collection) return null;
const collection =
collections.data.get(document.collection.id) || document.collection;
+ if (onlyText === true) {
+ return (
+
+ {collection.name}
+ {path.map(n => (
+
+
+ {n.title}
+
+ ))}
+
+ );
+ }
+
return (
@@ -54,6 +69,13 @@ const Wrapper = styled(Flex)`
`};
`;
+const SmallSlash = styled(GoToIcon)`
+ width: 15px;
+ height: 10px;
+ flex-shrink: 0;
+ opacity: 0.25;
+`;
+
const Slash = styled(GoToIcon)`
flex-shrink: 0;
opacity: 0.25;