From 7bc34f97102bdf2e987c7a75d8ff9c6f08f2af21 Mon Sep 17 00:00:00 2001 From: Roman Timashev Date: Mon, 22 May 2017 12:55:52 +0300 Subject: [PATCH] Flexibility changes with App, main.hbs --- src/components/App.js | 14 +++++++++++--- src/lib/component.js | 4 ++-- src/lib/render.js | 11 +++++++++-- src/routes/articles.js | 2 +- src/routes/home.js | 2 +- src/views/main.hbs | 2 +- 6 files changed, 25 insertions(+), 10 deletions(-) diff --git a/src/components/App.js b/src/components/App.js index c649f54b..113b773b 100644 --- a/src/components/App.js +++ b/src/components/App.js @@ -2,7 +2,13 @@ const React = require('react') const Menu = require('./Menu') const Footer = require('./Footer') -const App = ({children, menu}) => ( +const Comments = () => ( +
+
+
+) + +const App = ({children, menu, showAuthor}) => (
@@ -16,10 +22,12 @@ const App = ({children, menu}) => (
{children}
+ + -
) - ctx.body = await render(path, Component, getMeta({title: 'Шлиссельбургская ДХШ'})) + ctx.body = await render(path, Component, getMeta({title: 'Шлиссельбургская ДХШ'}), {showAuthor: true}) }) } diff --git a/src/views/main.hbs b/src/views/main.hbs index 8a833eaa..293caa2d 100644 --- a/src/views/main.hbs +++ b/src/views/main.hbs @@ -87,7 +87,7 @@ script.setAttribute('data-timestamp', Date.now()); (document.head || document.body).appendChild(script); } - const doInitDisqus = false + const doInitDisqus = {{options.commentsEnabled}} if (doInitDisqus) initDisqus()