Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
192 changes: 189 additions & 3 deletions app/default-files/default-themes/simple/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -955,15 +955,201 @@
"type": "checkbox"
},

{
"name": "commentSelectServer",
"label": "Server for comments",
"group": "Comments",
"note": "Select a server for your website comments, the use of \"Graphcomment\" is recommended because it has more privacy.",
"value": "graphcomment",
"type": "radio",
"options": [
{
"label": "Graphcomment",
"value": "graphcomment"
},
{
"label": "Disqus",
"value": "disqus"
}
]
},
{
"name": "separator",
"type": "separator",
"label": "Disqus configuration",
"group": "Comments",
"size": "big",
"dependencies": [{
"field": "commentSelectServer",
"value": "disqus"
}]
},
{
"name": "commentDisqusShortname",
"label": "Disqus shortname",
"label": "Shortname",
"group": "Comments",
"placeholder": "Please enter your Disqus shortname",
"note": "A shortname is the unique identifier assigned to a Disqus site. Please visit https://help.disqus.com/ to find more details. <br /><br /><span style=\"background: #fff8d4\">Do not forget to enable comments under Post Options tab.</span>",
"note": "A shortname is the unique identifier assigned to a Disqus site.<br/>Please visit <a href=\"https://help.disqus.com/\" target=\"_blank\" rel=\"nofollow noopener\">help.disqus.com</a> to find more details. <br /><br /><span style=\"background: #fff8d4\">Do not forget to enable comments under Post Options tab.</span>",
"value": "",
"type": "text"
"type": "text",
"dependencies": [{
"field": "commentSelectServer",
"value": "disqus"
}]
},
{
"name": "separator",
"type": "separator",
"label": "Graphcomment configuration",
"group": "Comments",
"size": "big",
"dependencies": [{
"field": "commentSelectServer",
"value": "graphcomment"
}]
},
{
"name": "commentGraphcommentShortname",
"label": "Shortname",
"group": "Comments",
"placeholder": "Please enter your Graphcomment shortname",
"note": "A shortname is the unique identifier assigned to a Graphcomment site.<br/>Please visit <a href=\"https://support.graphcomment.com/\" target=\"_blank\" rel=\"nofollow noopener\">support.graphcomment.com</a> to find more details. <br /><br /><span style=\"background: #fff8d4\">Do not forget to enable comments under Post Options tab.</span>",
"value": "",
"type": "text",
"dependencies": [{
"field": "commentSelectServer",
"value": "graphcomment"
}]
},
{
"name": "commentGraphcommentTheme",
"label": "Theme",
"group": "Comments",
"note": "Select a theme for Graphcomment",
"value": "universal",
"type": "radio",
"options": [
{
"label": "Universal",
"value": "universal"
},
{
"label": "Sidebar",
"value": "sidebar"
}
],
"dependencies": [{
"field": "commentSelectServer",
"value": "graphcomment"
}]
},
{
"name": "separator",
"type": "separator",
"label": "Theme configuration",
"group": "Comments",
"size": "big",
"dependencies": [{
"field": "commentGraphcommentTheme",
"value": "sidebar"
},{
"field": "commentSelectServer",
"value": "graphcomment"
}]
},
{
"name": "commentGraphcommentWidth",
"label": "Panel Width",
"group": "Comments",
"value": 480,
"type": "number",
"dependencies": [{
"field": "commentGraphcommentTheme",
"value": "sidebar"
},
{
"field": "commentSelectServer",
"value": "graphcomment"
}]
},
{
"name": "commentGraphcommentText",
"label": "Button label",
"group": "Comments",
"value": "",
"type": "text",
"dependencies": [{
"field": "commentGraphcommentTheme",
"value": "sidebar"
},
{
"field": "commentSelectServer",
"value": "graphcomment"
}]
},
{
"name": "commentGraphcommentBackgroundColor",
"label": "Button background color",
"group": "Comments",
"value": "#F35B5B",
"type": "colorpicker",
"dependencies": [{
"field": "commentGraphcommentTheme",
"value": "sidebar"
},
{
"field": "commentSelectServer",
"value": "graphcomment"
}]
},
{
"name": "commentGraphcommentTextColor",
"label": "Button text color",
"group": "Comments",
"value": "#FFFFFF",
"type": "colorpicker",
"dependencies": [{
"field": "commentGraphcommentTheme",
"value": "sidebar"
},
{
"field": "commentSelectServer",
"value": "graphcomment"
}]
},
{
"name": "commentGraphcommentVisible",
"group": "Comments",
"label": "Open with page load",
"note": "If this option is activated, the panel will open automatically.",
"value": false,
"type": "checkbox",
"dependencies": [{
"field": "commentGraphcommentTheme",
"value": "sidebar"
},
{
"field": "commentSelectServer",
"value": "graphcomment"
}]
},
{
"name": "commentGraphcommentBubble",
"group": "Comments",
"label": "Show Icon",
"note": "Display an icon for opening the panel at the bottom right of the page.",
"value": false,
"type": "checkbox",
"dependencies": [{
"field": "commentGraphcommentTheme",
"value": "sidebar"
},
{
"field": "commentSelectServer",
"value": "graphcomment"
}]
},

{
"name": "backToTopButton",
"group": "Footer",
Expand Down
20 changes: 20 additions & 0 deletions app/default-files/default-themes/simple/partials/graphcomment.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<div id="graphcomment"></div>

<script type="text/javascript">
window.gc_params = {
graphcomment_id: '{{@config.custom.commentGraphcommentShortname}}'.trim(),
identifier: {{id}},
{{#checkIf @config.custom.commentGraphcommentTheme '===' "universal"}}
fixed_header_height: 0
{{else}}
overlay: {"width":{{@config.custom.commentGraphcommentWidth}},"button":{"background":"{{@config.custom.commentGraphcommentBackgroundColor}}","color":"{{@config.custom.commentGraphcommentTextColor}}","label":"{{@config.custom.commentGraphcommentText}}"},"visible":{{@config.custom.commentGraphcommentVisible}},"bubble":{{@config.custom.commentGraphcommentBubble}},}
{{/checkIf}}
};
(function() {
var gc = document.createElement('script'); gc.type = 'text/javascript'; gc.async = true;
gc.src = 'https://graphcomment.com/js/integration.js?' + Math.round(Math.random() * 1e8);
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(gc);
})();
</script>

<noscript>{{ translate 'partials.graphcomment.noscript1' }}</noscript>
7 changes: 6 additions & 1 deletion app/default-files/default-themes/simple/post.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,12 @@
<h2 class="h5">
{{ translate 'post.comments' }}
</h2>
{{> disqus}}
{{#checkIf @config.custom.commentSelectServer '===' "disqus"}}
{{> disqus}}
{{/checkIf}}
{{#checkIf @config.custom.commentSelectServer '===' "graphcomment"}}
{{> graphcomment}}
{{/checkIf}}
</div>
</div>
{{/if}}
Expand Down
4 changes: 4 additions & 0 deletions app/default-files/default-themes/simple/simple.lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
"noscript2": "comments powered by Disqus."
},

"graphcomment": {
"noscript1": "Please enable JavaScript to view the comments powered by Graphcomment."
},

"menu": {
"label": "Menu"
},
Expand Down