From eb996fa1d2324b5e8dcbea77f3df2f48b3dfacc7 Mon Sep 17 00:00:00 2001 From: moxiegirl Date: Tue, 4 Sep 2018 16:46:28 -0700 Subject: [PATCH] staticman' Signed-off-by: moxiegirl --- _config.yml | 12 +- _includes/comment-form.html | 51 +++++++ _includes/comment.html | 29 ++-- _includes/comment__form.html | 85 +++++++---- _includes/comments.html | 27 ++++ _includes/footer.html | 6 +- _layouts/auth.html | 7 +- _sass/comments/comments.scss | 126 +++++++++++++++ _sass/comments/forms.scss | 113 ++++++++++++++ _sass/comments/reset.scss | 169 +++++++++++++++++++++ _sass/comments/screen-reader.scss | 33 ++++ _sass/comments/visibility.scss | 51 +++++++ _sass/theme/variables.scss | 14 ++ _site/2017/05/25/post63.html | 6 +- _site/404.html | 6 +- _site/android/tutorial.html | 12 +- _site/assets/css/main.css | 2 +- _site/changelog/index.html | 6 +- _site/contact/index.html | 6 +- _site/core/auth/howitworks.html | 89 ++++++++--- _site/core/auth/howtouse.html | 89 ++++++++--- _site/core/auth/overview.html | 103 +++++++++---- _site/core/naming/architecture.html | 12 +- _site/core/naming/comparison.html | 12 +- _site/core/naming/did.html | 12 +- _site/core/naming/forks.html | 12 +- _site/core/naming/introduction.html | 12 +- _site/core/naming/manage.html | 12 +- _site/core/naming/namespaces.html | 12 +- _site/core/naming/pickname.html | 12 +- _site/core/naming/register.html | 12 +- _site/core/naming/resolving.html | 12 +- _site/core/naming/subdomains.html | 12 +- _site/core/naming/tutorial_creation.html | 12 +- _site/core/naming/tutorial_subdomains.html | 12 +- _site/feed.xml | 2 +- _site/index.html | 10 +- _site/ios/tutorial.html | 12 +- _site/news/index.html | 6 +- _site/staticman.yml | 4 +- _site/thanks/index.html | 6 +- assets/css/main.scss | 4 + index.md | 4 +- 43 files changed, 998 insertions(+), 248 deletions(-) create mode 100644 _includes/comment-form.html create mode 100644 _includes/comments.html create mode 100644 _sass/comments/comments.scss create mode 100644 _sass/comments/forms.scss create mode 100644 _sass/comments/reset.scss create mode 100644 _sass/comments/screen-reader.scss create mode 100644 _sass/comments/visibility.scss diff --git a/_config.yml b/_config.yml index eb0ac069..5c6d9733 100644 --- a/_config.yml +++ b/_config.yml @@ -18,6 +18,8 @@ baseurl: "" url: "https://zbabystack.netlify.com" repository: moxiegirl/docs.blockstack +staticman: + branch: "master" github_editme_path: moxiegirl/docs-new/blob/master # if you're using Github, provide the basepath to the branch you've created for reviews, following the sample here. if not, leave this value blank. @@ -62,8 +64,8 @@ footer: copyright: Blockstack # Disqus comments shortname, requires Disqus account https://disqus.com/ -disqus: - shortname: # 1234 +# disqus: +# shortname: # 1234 # Google analytics code, get your code here https://www.google.com/analytics/ google_analytics: @@ -110,6 +112,12 @@ exclude: sass: style: compressed +defaults: + - scope: + path: "" # an empty string here means all files in the project + values: + comments: true + collections: android: output: true diff --git a/_includes/comment-form.html b/_includes/comment-form.html new file mode 100644 index 00000000..8ed51181 --- /dev/null +++ b/_includes/comment-form.html @@ -0,0 +1,51 @@ +{% unless page.comments_locked == true %} + +
+
+

Leave a Comment

+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ + + + +
+
+ + +
+
+
+ + +{% else %} +

Comments are closed. If you have a question concerning the content of this page, please feel free to contact me.

+{% endunless %} diff --git a/_includes/comment.html b/_includes/comment.html index 06ae0599..1821c4ce 100644 --- a/_includes/comment.html +++ b/_includes/comment.html @@ -1,35 +1,36 @@
-
+
{% if include.avatar %} - {{ include.name | escape }} + + {% elsif include.email %} - {{ include.name | escape }} + + {% else %} - {{ include.name | escape }} + + {% endif %}
-

+

{% unless include.url == blank %} - - {% if include.name == site.author.name %} {% endif %}{{ include.name }} - + {{ include.name | strip_html }} {% else %} - {% if include.name == site.author.name %} {% endif %}{{ include.name }} + {{ include.name | strip_html }} {% endunless %}

-
+ -
+
{{ include.message | markdownify }}
{% unless include.replying_to != 0 or page.comments_locked == true %} -
diff --git a/_includes/comment__form.html b/_includes/comment__form.html index 3b39ef0d..45bc2abe 100644 --- a/_includes/comment__form.html +++ b/_includes/comment__form.html @@ -1,29 +1,56 @@ -
-
- - -
-
- - -
-
- - -
-
- - -
- -
- -
-
- +{% if page.comments == true %} +
+ {% if site.repository and site.staticman.branch %} + {% if site.data.comments[page.slug] %} + +
+

Comments

+ {% assign comments = site.data.comments[page.slug] | sort %} + {% for comment in comments %} + {% assign avatar = comment[1].avatar %} + {% 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 avatar=avatar email=email name=name url=url date=date message=message %} + {% endfor %} +
+ + {% endif %} + + +

Leave a Comment

+

Your email address will not be published. Required fields are marked *

+
+
+ + + + +
+
+ + +
+
+ + +
+ + + + +
+ +
+
+ + {% endif %} +
+{% endif %} diff --git a/_includes/comments.html b/_includes/comments.html new file mode 100644 index 00000000..705c5dfd --- /dev/null +++ b/_includes/comments.html @@ -0,0 +1,27 @@ +
+ {% if site.repository and site.staticman.branch %} + {% if site.data.comments[page.slug] %} + +
+
+

{% if site.data.comments[page.slug].size > 1 %}{{ site.data.comments[page.slug] | size | append: ' ' }}{% endif %}Comments

+
+ {% assign comments = site.data.comments[page.slug] | sort | where_exp: 'comment', 'comment[1].replying_to == blank' %} + {% for comment in comments %} + {% assign index = forloop.index %} + {% assign replying_to = comment[1].replying_to | to_integer %} + {% assign avatar = comment[1].avatar %} + {% 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=index replying_to=replying_to avatar=avatar email=email name=name url=url date=date message=message %} + {% endfor %} +
+ + {% endif %} + + {% include comment-form.html %} + {% endif %} +
diff --git a/_includes/footer.html b/_includes/footer.html index 86d5bae1..634327e4 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -1,7 +1,7 @@
-
+ +
diff --git a/_layouts/auth.html b/_layouts/auth.html index b5596386..7b4b7799 100644 --- a/_layouts/auth.html +++ b/_layouts/auth.html @@ -56,11 +56,12 @@ layout: default {% include paginate-doc.html %} - {% include related-auth.html %} + - {% include comment__form.html %} + {% if page.comments == true %} + {% include comments.html %} + {% endif %} - {% include page__comments.html %} +{"description":"Android SDK Tutorial (Pre-release)","author":{"@type":"Person","name":"Blockstack"},"@type":"BlogPosting","url":"http://localhost:4000/android/tutorial.html","headline":"Android SDK Tutorial (Pre-release)","dateModified":"2018-09-04T16:46:07-07:00","datePublished":"2018-09-04T16:46:07-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"http://localhost:4000/android/tutorial.html"},"@context":"http://schema.org"} @@ -151,7 +151,7 @@ -