From b22cbe2a18a33d4d7357d5df192776f5e8a00c4c Mon Sep 17 00:00:00 2001 From: jooncco Date: Sat, 16 Mar 2024 17:22:55 +0900 Subject: [PATCH] :art: override facebook comment section style --- _config.yml | 2 +- _includes/comments-providers/facebook.html | 19 +- _includes/comments.html | 449 ++++++++++++++------- _sass/minimal-mistakes/_comment.scss | 3 - 4 files changed, 312 insertions(+), 161 deletions(-) delete mode 100644 _sass/minimal-mistakes/_comment.scss diff --git a/_config.yml b/_config.yml index 04e106d..9676847 100644 --- a/_config.yml +++ b/_config.yml @@ -34,7 +34,7 @@ comments: # https://developers.facebook.com/docs/plugins/comments appid: 278555981041512 num_posts: 5 # 5 (default) - colorscheme: "light" # "light" (default), "dark" + colorscheme: "dark" # "light" (default), "dark" utterances: theme: # "github-light" (default), "github-dark" issue_term: # "pathname" (default) diff --git a/_includes/comments-providers/facebook.html b/_includes/comments-providers/facebook.html index 009dc1c..692c90a 100644 --- a/_includes/comments-providers/facebook.html +++ b/_includes/comments-providers/facebook.html @@ -1,8 +1,13 @@
- \ No newline at end of file + diff --git a/_includes/comments.html b/_includes/comments.html index dbb90d1..3714553 100644 --- a/_includes/comments.html +++ b/_includes/comments.html @@ -1,159 +1,308 @@
- {% capture comments_label %}{{ site.data.ui-text[site.locale].comments_label | default: "Comments" }}{% endcapture %} - {% case site.comments.provider %} - {% when "discourse" %} -

{{ comments_label }}

-
- {% when "disqus" %} -

{{ comments_label }}

-
- {% when "facebook" %} -

{{ comments_label }}

-
- {% when "staticman_v2" %} -
- {% if site.repository and site.comments.staticman.branch %} - -
- {% if site.data.comments[page.slug] %} -

{{ site.data.ui-text[site.locale].comments_title | default: "Comments" }}

- {% assign comments = site.data.comments[page.slug] | sort %} + {% capture comments_label %}{{ site.data.ui-text[site.locale].comments_label | + default: "Comments" }}{% endcapture %} {% case site.comments.provider %} {% + when "discourse" %} +

{{ comments_label }}

+
+ {% when "disqus" %} +

{{ comments_label }}

+
+ {% when "facebook" %} +

{{ comments_label }}

+
+ {% when "staticman_v2" %} +
+ {% if site.repository and site.comments.staticman.branch %} + +
+ {% if site.data.comments[page.slug] %} +

+ {{ site.data.ui-text[site.locale].comments_title | default: "Comments" + }} +

+ {% assign comments = site.data.comments[page.slug] | sort %} {% for + comment in comments %} {% assign email = comment[1].email %} {% assign + name = comment[1].name %} {% assign url = comment[1].url %} {% assign date + = comment[1].date %} {% assign message = comment[1].message %} {% include + comment.html index=forloop.index email=email name=name url=url date=date + message=message %} {% endfor %} {% endif %} +
+ - {% for comment in comments %} - {% assign email = comment[1].email %} - {% assign name = comment[1].name %} - {% assign url = comment[1].url %} - {% assign date = comment[1].date %} - {% assign message = comment[1].message %} - {% include comment.html index=forloop.index email=email name=name url=url date=date message=message %} - {% endfor %} - {% endif %} -
- - - -
-

{{ site.data.ui-text[site.locale].comments_label | default: "Leave a Comment" }}

-

{{ site.data.ui-text[site.locale].comment_form_info | default: "Your email address will not be published. Required fields are marked" }} *

-
-
- - {{ site.data.ui-text[site.locale].loading_label | default: "Loading..." }} -
+ +
+

+ {{ site.data.ui-text[site.locale].comments_label | default: "Leave a + Comment" }} +

+

+ {{ site.data.ui-text[site.locale].comment_form_info | default: "Your + email address will not be published. Required fields are marked" }} + * +

+ +
+ + {{ site.data.ui-text[site.locale].loading_label | default: + "Loading..." }} +
-
- - - -
-
- - -
-
- - -
-
- - -
- - - - - {% if site.reCaptcha.siteKey %} -
-
-
- {% endif %} -
- -
- +
+ + + - - {% if site.reCaptcha.siteKey %}{% endif %} +
+
+ + +
+
+ + +
+
+ + +
+ + + + + {% if site.reCaptcha.siteKey %} +
+
+
{% endif %} -
- {% when "staticman" %} -
- {% if site.repository and site.staticman.branch %} - -
- {% if site.data.comments[page.slug] %} -

{{ site.data.ui-text[site.locale].comments_title | default: "Comments" }}

- {% assign comments = site.data.comments[page.slug] | sort %} +
+ +
+ +
+ + {% if site.reCaptcha.siteKey %} + + {% endif %} {% endif %} +
+ {% when "staticman" %} +
+ {% if site.repository and site.staticman.branch %} + +
+ {% if site.data.comments[page.slug] %} +

+ {{ site.data.ui-text[site.locale].comments_title | default: "Comments" + }} +

+ {% assign comments = site.data.comments[page.slug] | sort %} {% for + comment in comments %} {% assign email = comment[1].email %} {% assign + name = comment[1].name %} {% assign url = comment[1].url %} {% assign date + = comment[1].date %} {% assign message = comment[1].message %} {% include + comment.html index=forloop.index email=email name=name url=url date=date + message=message %} {% endfor %} {% endif %} +
+ - {% for comment in comments %} - {% assign email = comment[1].email %} - {% assign name = comment[1].name %} - {% assign url = comment[1].url %} - {% assign date = comment[1].date %} - {% assign message = comment[1].message %} - {% include comment.html index=forloop.index email=email name=name url=url date=date message=message %} - {% endfor %} - {% endif %} -
- + +
+

+ {{ site.data.ui-text[site.locale].comments_label | default: "Leave a + Comment" }} +

+

+ {{ site.data.ui-text[site.locale].comment_form_info | default: "Your + email address will not be published. Required fields are marked" }} + * +

+
+
+ + {{ site.data.ui-text[site.locale].loading_label | default: + "Loading..." }} +
- -
-

{{ site.data.ui-text[site.locale].comments_label | default: "Leave a Comment" }}

-

{{ site.data.ui-text[site.locale].comment_form_info | default: "Your email address will not be published. Required fields are marked" }} *

- -
- - {{ site.data.ui-text[site.locale].loading_label | default: "Loading..." }} -
- -
- - - -
-
- - -
-
- - -
-
- - -
- - - - -
- -
- +
+ + + - - {% endif %} - - {% when "utterances" %} -

{{ comments_label }}

-
- {% when "custom" %} - {% include /comments-providers/custom.html %} - {% endcase %} +
+
+ + +
+
+ + +
+
+ + +
+ + + + +
+ +
+ +
+ + {% endif %} + + {% when "utterances" %} +

{{ comments_label }}

+
+ {% when "custom" %} {% include /comments-providers/custom.html %} {% endcase + %}
diff --git a/_sass/minimal-mistakes/_comment.scss b/_sass/minimal-mistakes/_comment.scss deleted file mode 100644 index d816305..0000000 --- a/_sass/minimal-mistakes/_comment.scss +++ /dev/null @@ -1,3 +0,0 @@ -.fb-comments { - background: #aaa; -}