From 58019ab0cd47ef232f592d4be5154c5376e58bb5 Mon Sep 17 00:00:00 2001 From: ppoffice Date: Wed, 3 Jul 2019 23:25:56 -0400 Subject: [PATCH] fix(*): profile widget description overflow & add a gitalk option --- includes/specs/comment.spec.js | 6 ++++++ layout/comment/gitalk.ejs | 3 ++- layout/comment/gitment.ejs | 2 +- layout/widget/profile.ejs | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/includes/specs/comment.spec.js b/includes/specs/comment.spec.js index 9d12260..78784af 100644 --- a/includes/specs/comment.spec.js +++ b/includes/specs/comment.spec.js @@ -58,6 +58,12 @@ const GitmentGitalkSpec = { [type]: 'string', [required]: true } + }, + distraction_free_mode: { + [type]: 'boolean', + [doc]: 'Facebook-like distraction free mode', + [defaultValue]: false, + [requires]: comment => comment.type === 'gitalk' } }; diff --git a/layout/comment/gitalk.ejs b/layout/comment/gitalk.ejs index e49aae9..1817e40 100644 --- a/layout/comment/gitalk.ejs +++ b/layout/comment/gitalk.ejs @@ -15,7 +15,8 @@ id: '<%= md5(page.path) %>', repo: '<%= get_config('comment.repo') %>', owner: '<%= get_config('comment.owner') %>', - admin: <%- JSON.stringify(get_config('comment.admin'))%> + admin: <%- JSON.stringify(get_config('comment.admin'))%>, + distractionFreeMode: <%= get_config('comment.distraction_free_mode', false) %> }) gitalk.render('comment-container') diff --git a/layout/comment/gitment.ejs b/layout/comment/gitment.ejs index e5e3047..1280512 100644 --- a/layout/comment/gitment.ejs +++ b/layout/comment/gitment.ejs @@ -10,7 +10,7 @@