diff --git a/.gitignore b/.gitignore
index 17106c372..561d888d7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,3 +19,4 @@ node_modules
/lib/jekyll-admin/public
*.gem
.DS_Store
+/vendor/
\ No newline at end of file
diff --git a/spec/fixtures/site/page.md b/spec/fixtures/site/page.md
index c631b3a37..2c67541d9 100644
--- a/spec/fixtures/site/page.md
+++ b/spec/fixtures/site/page.md
@@ -3,3 +3,11 @@ foo: bar
---
# Test Page
+
+test
+
+test
+
+test
+
+toto
diff --git a/src/components/PreviewPanel.js b/src/components/PreviewPanel.js
new file mode 100644
index 000000000..8bc4ee4ab
--- /dev/null
+++ b/src/components/PreviewPanel.js
@@ -0,0 +1,47 @@
+import React from 'react';
+
+export function PreviewPanel({ previewUrl }) {
+ // Note : side effect for preview button, layout, and doctitle class
+ return (
+
+
+
+
Preview
+
+
+
+
+ );
+}
+
+export function PreviewButton({}) {
+ return (
+
+ );
+}
diff --git a/src/containers/views/DocumentEdit.js b/src/containers/views/DocumentEdit.js
index abd24bc5d..b545e6133 100644
--- a/src/containers/views/DocumentEdit.js
+++ b/src/containers/views/DocumentEdit.js
@@ -21,6 +21,7 @@ import { clearErrors } from '../../ducks/utils';
import { preventDefault, getDocumentTitle } from '../../utils/helpers';
import { ADMIN_PREFIX } from '../../constants';
+import { PreviewButton, PreviewPanel } from '../../components/PreviewPanel';
import translations from '../../translations';
const { getLeaveMessage, getDeleteMessage, getNotFoundMessage } = translations;
@@ -123,44 +124,48 @@ export class DocumentEdit extends Component {
return (
-
+
{errors.length > 0 && }
-
-
-
+
+
+
+
-
+
);
diff --git a/src/containers/views/DraftEdit.js b/src/containers/views/DraftEdit.js
index ed4546d25..b6e8becf7 100644
--- a/src/containers/views/DraftEdit.js
+++ b/src/containers/views/DraftEdit.js
@@ -23,6 +23,7 @@ import { clearErrors } from '../../ducks/utils';
import { preventDefault, getDocumentTitle } from '../../utils/helpers';
import { ADMIN_PREFIX } from '../../constants';
+import { PreviewButton, PreviewPanel } from '../../components/PreviewPanel';
import translations from '../../translations';
const {
getLeaveMessage,
@@ -143,49 +144,54 @@ export class DraftEdit extends Component {
return (
-
+
{errors.length > 0 && }
-
-
-
-
-
-
-
-
-
-