Merge branch 'zmsp-master'

This commit is contained in:
Michael Rose 2017-07-05 12:09:54 -04:00
commit 99ce8ed421
6 changed files with 211 additions and 189 deletions

View file

@ -9,6 +9,7 @@
- Toggle close button on `mouseleave`. [#975](https://github.com/mmistakes/minimal-mistakes/issues/975) - Toggle close button on `mouseleave`. [#975](https://github.com/mmistakes/minimal-mistakes/issues/975)
- Remove extraneous `</a>` and `</li>` tags from `paginator.html` include. [#1038](https://github.com/mmistakes/minimal-mistakes/pull/1038) - Remove extraneous `</a>` and `</li>` tags from `paginator.html` include. [#1038](https://github.com/mmistakes/minimal-mistakes/pull/1038)
- Fix Google+ comments provider includes. [#1092](https://github.com/mmistakes/minimal-mistakes/issues/1092)
### Maintenance ### Maintenance

View file

@ -1,18 +1,16 @@
{% if site.comments.provider and page.comments %} {% if site.comments.provider and page.comments %}
{% case site.comments.provider %}
{% case site.comments.provider %} {% when "disqus" %}
{% when "disqus" %} {% include /comments-providers/disqus.html %}
{% include /comments-providers/disqus.html %} {% when "discourse" %}
{% when "discourse" %} {% include /comments-providers/discourse.html %}
{% include /comments-providers/discourse.html %} {% when "facebook" %}
{% when "facebook" %} {% include /comments-providers/facebook.html %}
{% include /comments-providers/facebook.html %} {% when "google-plus" %}
{% when "google-plus" %} {% include /comments-providers/google-plus.html %}
{% include /comments-providers/google-plus.html %} {% when "staticman" %}
{% when "staticman" %} {% include /comments-providers/staticman.html %}
{% include /comments-providers/staticman.html %} {% when "custom" %}
{% when "custom" %} {% include /comments-providers/custom.html %}
{% include /comments-providers/custom.html %} {% endcase %}
{% endcase %}
{% endif %} {% endif %}

View file

@ -1,83 +1,95 @@
<div class="page__comments"> <div class="page__comments">
{% capture comments_label %}{{ site.data.ui-text[site.locale].comments_label | default: "Comments" }}{% endcapture %} {% capture comments_label %}{{ site.data.ui-text[site.locale].comments_label | default: "Comments" }}{% endcapture %}
{% case site.comments.provider %} {% case site.comments.provider %}
{% when "discourse" %} {% when "discourse" %}
<h4 class="page__comments-title">{{ comments_label }}</h4> <h4 class="page__comments-title">{{ comments_label }}</h4>
<section id="discourse-comments"></section> <section id="discourse-comments"></section>
{% when "disqus" %} {% when "disqus" %}
<h4 class="page__comments-title">{{ comments_label }}</h4> <h4 class="page__comments-title">{{ comments_label }}</h4>
<section id="disqus_thread"></section> <section id="disqus_thread"></section>
{% when "facebook" %} {% when "facebook" %}
<h4 class="page__comments-title">{{ comments_label }}</h4> <h4 class="page__comments-title">{{ comments_label }}</h4>
<section class="fb-comments" data-href="{{ page.url | absolute_url }}" data-mobile="true" data-num-posts="{{ site.comments.facebook.num_posts | default: 5 }}" data-width="100%" data-colorscheme="{{ site.comments.facebook.colorscheme | default: 'light' }}"></section> <section class="fb-comments" data-href="{{ page.url | absolute_url }}" data-mobile="true" data-num-posts="{{ site.comments.facebook.num_posts | default: 5 }}" data-width="100%" data-colorscheme="{{ site.comments.facebook.colorscheme | default: 'light' }}"></section>
{% when "google-plus" %} {% when "google-plus" %}
<h4 class="page__comments-title">{{ comments_label }}</h4> <h4 class="page__comments-title">{{ comments_label }}</h4>
<section class="g-comments" data-href="{{ page.url | absolute_url }}" data-first_party_property="BLOGGER" data-view_type="FILTERED_POSTMOD">Loading Google+ Comments ...</section> <section id="g-comments" class="g-comments">Loading Google+ Comments ...</section>
{% when "staticman" %} <script>
<section id="static-comments"> function initComment() {
{% if site.repository and site.staticman.branch %} gapi.comments.render("g-comments", {
<!-- Start static comments --> href: "{{ page.url | absolute_url }}",
<div class="js-comments"> width: "624",
{% if site.data.comments[page.slug] %} first_party_property: "BLOGGER",
<h4 class="page__comments-title">{{ site.data.ui-text[site.locale].comments_title | default: "Comments" }}</h4> view_type: "FILTERED_POSTMOD"
{% assign comments = site.data.comments[page.slug] | sort %} })
}
</script>
<script async type="text/javascript" src="https://apis.google.com/js/plusone.js" onload="initComment()" />
<noscript>Please enable JavaScript to view the <a href="https://plus.google.com/">comments powered by Google+.</a></noscript>-->
{% when "staticman" %}
<section id="static-comments">
{% if site.repository and site.staticman.branch %}
<!-- Start static comments -->
<div class="js-comments">
{% if site.data.comments[page.slug] %}
<h4 class="page__comments-title">{{ site.data.ui-text[site.locale].comments_title | default: "Comments" }}</h4>
{% assign comments = site.data.comments[page.slug] | sort %}
{% for comment in comments %} {% for comment in comments %}
{% assign email = comment[1].email %} {% assign email = comment[1].email %}
{% assign name = comment[1].name %} {% assign name = comment[1].name %}
{% assign url = comment[1].url %} {% assign url = comment[1].url %}
{% assign date = comment[1].date %} {% assign date = comment[1].date %}
{% assign message = comment[1].message %} {% assign message = comment[1].message %}
{% include comment.html index=forloop.index email=email name=name url=url date=date message=message %} {% include comment.html index=forloop.index email=email name=name url=url date=date message=message %}
{% endfor %} {% endfor %}
{% endif %}
</div>
<!-- End static comments -->
<!-- Start new comment form -->
<h4 class="page__comments-title">{{ site.data.ui-text[site.locale].comments_label | default: "Leave a Comment" }}</h4>
<p class="small">{{ site.data.ui-text[site.locale].comment_form_info | default: "Your email address will not be published. Required fields are marked" }} <span class="required">*</span></p>
<form id="new_comment" class="page__comments-form js-form form" method="post" action="https://api.staticman.net/v1/entry/{{ site.repository }}/{{ site.staticman.branch }}">
<div class="form__spinner">
<i class="fa fa-spinner fa-spin fa-3x fa-fw"></i>
<span class="sr-only">{{ site.data.ui-text[site.locale].loading_label | default: "Loading..." }}</span>
</div>
<fieldset>
<label for="comment-form-message">{{ site.data.ui-text[site.locale].comment_form_comment_label | default: "Comment" }} <small class="required">*</small></label>
<textarea type="text" rows="3" id="comment-form-message" name="fields[message]" tabindex="1"></textarea>
<div class="small help-block"><a href="https://daringfireball.net/projects/markdown/">{{ site.data.ui-text[site.locale].comment_form_md_info | default: "Markdown is supported." }}</a></div>
</fieldset>
<fieldset>
<label for="comment-form-name">{{ site.data.ui-text[site.locale].comment_form_name_label | default: "Name" }} <small class="required">*</small></label>
<input type="text" id="comment-form-name" name="fields[name]" tabindex="2" />
</fieldset>
<fieldset>
<label for="comment-form-email">{{ site.data.ui-text[site.locale].comment_form_email_label | default: "Email address" }} <small class="required">*</small></label>
<input type="email" id="comment-form-email" name="fields[email]" tabindex="3" />
</fieldset>
<fieldset>
<label for="comment-form-url">{{ site.data.ui-text[site.locale].comment_form_website_label | default: "Website (optional)" }}</label>
<input type="url" id="comment-form-url" name="fields[url]" tabindex="4"/>
</fieldset>
<fieldset class="hidden" style="display: none;">
<input type="hidden" name="options[slug]" value="{{ page.slug }}">
<label for="comment-form-location">Not used. Leave blank if you are a human.</label>
<input type="text" id="comment-form-location" name="fields[hidden]" autocomplete="off"/>
</fieldset>
<!-- Start comment form alert messaging -->
<p class="hidden js-notice">
<strong class="js-notice-text"></strong>
</p>
<!-- End comment form alert messaging -->
<fieldset>
<button type="submit" id="comment-form-submit" tabindex="5" class="btn btn--large">{{ site.data.ui-text[site.locale].comment_btn_submit | default: "Submit Comment" }}</button>
</fieldset>
</form>
<!-- End new comment form -->
{% endif %} {% endif %}
</div> </section>
<!-- End static comments --> {% when "custom" %}
<section id="custom-comments"></section>
<!-- Start new comment form -->
<h4 class="page__comments-title">{{ site.data.ui-text[site.locale].comments_label | default: "Leave a Comment" }}</h4>
<p class="small">{{ site.data.ui-text[site.locale].comment_form_info | default: "Your email address will not be published. Required fields are marked" }} <span class="required">*</span></p>
<form id="new_comment" class="page__comments-form js-form form" method="post" action="https://api.staticman.net/v1/entry/{{ site.repository }}/{{ site.staticman.branch }}">
<div class="form__spinner">
<i class="fa fa-spinner fa-spin fa-3x fa-fw"></i>
<span class="sr-only">{{ site.data.ui-text[site.locale].loading_label | default: "Loading..." }}</span>
</div>
<fieldset>
<label for="comment-form-message">{{ site.data.ui-text[site.locale].comment_form_comment_label | default: "Comment" }} <small class="required">*</small></label>
<textarea type="text" rows="3" id="comment-form-message" name="fields[message]" tabindex="1"></textarea>
<div class="small help-block"><a href="https://daringfireball.net/projects/markdown/">{{ site.data.ui-text[site.locale].comment_form_md_info | default: "Markdown is supported." }}</a></div>
</fieldset>
<fieldset>
<label for="comment-form-name">{{ site.data.ui-text[site.locale].comment_form_name_label | default: "Name" }} <small class="required">*</small></label>
<input type="text" id="comment-form-name" name="fields[name]" tabindex="2" />
</fieldset>
<fieldset>
<label for="comment-form-email">{{ site.data.ui-text[site.locale].comment_form_email_label | default: "Email address" }} <small class="required">*</small></label>
<input type="email" id="comment-form-email" name="fields[email]" tabindex="3" />
</fieldset>
<fieldset>
<label for="comment-form-url">{{ site.data.ui-text[site.locale].comment_form_website_label | default: "Website (optional)" }}</label>
<input type="url" id="comment-form-url" name="fields[url]" tabindex="4"/>
</fieldset>
<fieldset class="hidden" style="display: none;">
<input type="hidden" name="options[slug]" value="{{ page.slug }}">
<label for="comment-form-location">Not used. Leave blank if you are a human.</label>
<input type="text" id="comment-form-location" name="fields[hidden]" autocomplete="off"/>
</fieldset>
<!-- Start comment form alert messaging -->
<p class="hidden js-notice">
<strong class="js-notice-text"></strong>
</p>
<!-- End comment form alert messaging -->
<fieldset>
<button type="submit" id="comment-form-submit" tabindex="5" class="btn btn--large">{{ site.data.ui-text[site.locale].comment_btn_submit | default: "Submit Comment" }}</button>
</fieldset>
</form>
<!-- End new comment form -->
{% endif %}
</section>
{% when "custom" %}
<section id="custom-comments"></section>
{% endcase %} {% endcase %}
</div> </div>

View file

@ -4,7 +4,7 @@ permalink: /docs/history/
excerpt: "Change log of enhancements and bug fixes made to the theme." excerpt: "Change log of enhancements and bug fixes made to the theme."
sidebar: sidebar:
nav: docs nav: docs
last_modified_at: 2017-05-30T08:13:43-04:00 last_modified_at: 2017-07-05T12:09:11-04:00
--- ---
## Unreleased ## Unreleased
@ -18,6 +18,7 @@ last_modified_at: 2017-05-30T08:13:43-04:00
- Toggle close button on `mouseleave`. [#975](https://github.com/mmistakes/minimal-mistakes/issues/975) - Toggle close button on `mouseleave`. [#975](https://github.com/mmistakes/minimal-mistakes/issues/975)
- Remove extraneous `</a>` and `</li>` tags from `paginator.html` include. [#1038](https://github.com/mmistakes/minimal-mistakes/pull/1038) - Remove extraneous `</a>` and `</li>` tags from `paginator.html` include. [#1038](https://github.com/mmistakes/minimal-mistakes/pull/1038)
- Fix Google+ comments provider includes. [#1092](https://github.com/mmistakes/minimal-mistakes/issues/1092)
### Maintenance ### Maintenance

View file

@ -1,18 +1,16 @@
{% if site.comments.provider and page.comments %} {% if site.comments.provider and page.comments %}
{% case site.comments.provider %}
{% case site.comments.provider %} {% when "disqus" %}
{% when "disqus" %} {% include /comments-providers/disqus.html %}
{% include /comments-providers/disqus.html %} {% when "discourse" %}
{% when "discourse" %} {% include /comments-providers/discourse.html %}
{% include /comments-providers/discourse.html %} {% when "facebook" %}
{% when "facebook" %} {% include /comments-providers/facebook.html %}
{% include /comments-providers/facebook.html %} {% when "google-plus" %}
{% when "google-plus" %} {% include /comments-providers/google-plus.html %}
{% include /comments-providers/google-plus.html %} {% when "staticman" %}
{% when "staticman" %} {% include /comments-providers/staticman.html %}
{% include /comments-providers/staticman.html %} {% when "custom" %}
{% when "custom" %} {% include /comments-providers/custom.html %}
{% include /comments-providers/custom.html %} {% endcase %}
{% endcase %}
{% endif %} {% endif %}

View file

@ -1,83 +1,95 @@
<div class="page__comments"> <div class="page__comments">
{% capture comments_label %}{{ site.data.ui-text[site.locale].comments_label | default: "Comments" }}{% endcapture %} {% capture comments_label %}{{ site.data.ui-text[site.locale].comments_label | default: "Comments" }}{% endcapture %}
{% case site.comments.provider %} {% case site.comments.provider %}
{% when "discourse" %} {% when "discourse" %}
<h4 class="page__comments-title">{{ comments_label }}</h4> <h4 class="page__comments-title">{{ comments_label }}</h4>
<section id="discourse-comments"></section> <section id="discourse-comments"></section>
{% when "disqus" %} {% when "disqus" %}
<h4 class="page__comments-title">{{ comments_label }}</h4> <h4 class="page__comments-title">{{ comments_label }}</h4>
<section id="disqus_thread"></section> <section id="disqus_thread"></section>
{% when "facebook" %} {% when "facebook" %}
<h4 class="page__comments-title">{{ comments_label }}</h4> <h4 class="page__comments-title">{{ comments_label }}</h4>
<section class="fb-comments" data-href="{{ page.url | absolute_url }}" data-mobile="true" data-num-posts="{{ site.comments.facebook.num_posts | default: 5 }}" data-width="100%" data-colorscheme="{{ site.comments.facebook.colorscheme | default: 'light' }}"></section> <section class="fb-comments" data-href="{{ page.url | absolute_url }}" data-mobile="true" data-num-posts="{{ site.comments.facebook.num_posts | default: 5 }}" data-width="100%" data-colorscheme="{{ site.comments.facebook.colorscheme | default: 'light' }}"></section>
{% when "google-plus" %} {% when "google-plus" %}
<h4 class="page__comments-title">{{ comments_label }}</h4> <h4 class="page__comments-title">{{ comments_label }}</h4>
<section class="g-comments" data-href="{{ page.url | absolute_url }}" data-first_party_property="BLOGGER" data-view_type="FILTERED_POSTMOD">Loading Google+ Comments ...</section> <section id="g-comments" class="g-comments">Loading Google+ Comments ...</section>
{% when "staticman" %} <script>
<section id="static-comments"> function initComment() {
{% if site.repository and site.staticman.branch %} gapi.comments.render("g-comments", {
<!-- Start static comments --> href: "{{ page.url | absolute_url }}",
<div class="js-comments"> width: "624",
{% if site.data.comments[page.slug] %} first_party_property: "BLOGGER",
<h4 class="page__comments-title">{{ site.data.ui-text[site.locale].comments_title | default: "Comments" }}</h4> view_type: "FILTERED_POSTMOD"
{% assign comments = site.data.comments[page.slug] | sort %} })
}
</script>
<script async type="text/javascript" src="https://apis.google.com/js/plusone.js" onload="initComment()" />
<noscript>Please enable JavaScript to view the <a href="https://plus.google.com/">comments powered by Google+.</a></noscript>-->
{% when "staticman" %}
<section id="static-comments">
{% if site.repository and site.staticman.branch %}
<!-- Start static comments -->
<div class="js-comments">
{% if site.data.comments[page.slug] %}
<h4 class="page__comments-title">{{ site.data.ui-text[site.locale].comments_title | default: "Comments" }}</h4>
{% assign comments = site.data.comments[page.slug] | sort %}
{% for comment in comments %} {% for comment in comments %}
{% assign email = comment[1].email %} {% assign email = comment[1].email %}
{% assign name = comment[1].name %} {% assign name = comment[1].name %}
{% assign url = comment[1].url %} {% assign url = comment[1].url %}
{% assign date = comment[1].date %} {% assign date = comment[1].date %}
{% assign message = comment[1].message %} {% assign message = comment[1].message %}
{% include comment.html index=forloop.index email=email name=name url=url date=date message=message %} {% include comment.html index=forloop.index email=email name=name url=url date=date message=message %}
{% endfor %} {% endfor %}
{% endif %}
</div>
<!-- End static comments -->
<!-- Start new comment form -->
<h4 class="page__comments-title">{{ site.data.ui-text[site.locale].comments_label | default: "Leave a Comment" }}</h4>
<p class="small">{{ site.data.ui-text[site.locale].comment_form_info | default: "Your email address will not be published. Required fields are marked" }} <span class="required">*</span></p>
<form id="new_comment" class="page__comments-form js-form form" method="post" action="https://api.staticman.net/v1/entry/{{ site.repository }}/{{ site.staticman.branch }}">
<div class="form__spinner">
<i class="fa fa-spinner fa-spin fa-3x fa-fw"></i>
<span class="sr-only">{{ site.data.ui-text[site.locale].loading_label | default: "Loading..." }}</span>
</div>
<fieldset>
<label for="comment-form-message">{{ site.data.ui-text[site.locale].comment_form_comment_label | default: "Comment" }} <small class="required">*</small></label>
<textarea type="text" rows="3" id="comment-form-message" name="fields[message]" tabindex="1"></textarea>
<div class="small help-block"><a href="https://daringfireball.net/projects/markdown/">{{ site.data.ui-text[site.locale].comment_form_md_info | default: "Markdown is supported." }}</a></div>
</fieldset>
<fieldset>
<label for="comment-form-name">{{ site.data.ui-text[site.locale].comment_form_name_label | default: "Name" }} <small class="required">*</small></label>
<input type="text" id="comment-form-name" name="fields[name]" tabindex="2" />
</fieldset>
<fieldset>
<label for="comment-form-email">{{ site.data.ui-text[site.locale].comment_form_email_label | default: "Email address" }} <small class="required">*</small></label>
<input type="email" id="comment-form-email" name="fields[email]" tabindex="3" />
</fieldset>
<fieldset>
<label for="comment-form-url">{{ site.data.ui-text[site.locale].comment_form_website_label | default: "Website (optional)" }}</label>
<input type="url" id="comment-form-url" name="fields[url]" tabindex="4"/>
</fieldset>
<fieldset class="hidden" style="display: none;">
<input type="hidden" name="options[slug]" value="{{ page.slug }}">
<label for="comment-form-location">Not used. Leave blank if you are a human.</label>
<input type="text" id="comment-form-location" name="fields[hidden]" autocomplete="off"/>
</fieldset>
<!-- Start comment form alert messaging -->
<p class="hidden js-notice">
<strong class="js-notice-text"></strong>
</p>
<!-- End comment form alert messaging -->
<fieldset>
<button type="submit" id="comment-form-submit" tabindex="5" class="btn btn--large">{{ site.data.ui-text[site.locale].comment_btn_submit | default: "Submit Comment" }}</button>
</fieldset>
</form>
<!-- End new comment form -->
{% endif %} {% endif %}
</div> </section>
<!-- End static comments --> {% when "custom" %}
<section id="custom-comments"></section>
<!-- Start new comment form -->
<h4 class="page__comments-title">{{ site.data.ui-text[site.locale].comments_label | default: "Leave a Comment" }}</h4>
<p class="small">{{ site.data.ui-text[site.locale].comment_form_info | default: "Your email address will not be published. Required fields are marked" }} <span class="required">*</span></p>
<form id="new_comment" class="page__comments-form js-form form" method="post" action="https://api.staticman.net/v1/entry/{{ site.repository }}/{{ site.staticman.branch }}">
<div class="form__spinner">
<i class="fa fa-spinner fa-spin fa-3x fa-fw"></i>
<span class="sr-only">{{ site.data.ui-text[site.locale].loading_label | default: "Loading..." }}</span>
</div>
<fieldset>
<label for="comment-form-message">{{ site.data.ui-text[site.locale].comment_form_comment_label | default: "Comment" }} <small class="required">*</small></label>
<textarea type="text" rows="3" id="comment-form-message" name="fields[message]" tabindex="1"></textarea>
<div class="small help-block"><a href="https://daringfireball.net/projects/markdown/">{{ site.data.ui-text[site.locale].comment_form_md_info | default: "Markdown is supported." }}</a></div>
</fieldset>
<fieldset>
<label for="comment-form-name">{{ site.data.ui-text[site.locale].comment_form_name_label | default: "Name" }} <small class="required">*</small></label>
<input type="text" id="comment-form-name" name="fields[name]" tabindex="2" />
</fieldset>
<fieldset>
<label for="comment-form-email">{{ site.data.ui-text[site.locale].comment_form_email_label | default: "Email address" }} <small class="required">*</small></label>
<input type="email" id="comment-form-email" name="fields[email]" tabindex="3" />
</fieldset>
<fieldset>
<label for="comment-form-url">{{ site.data.ui-text[site.locale].comment_form_website_label | default: "Website (optional)" }}</label>
<input type="url" id="comment-form-url" name="fields[url]" tabindex="4"/>
</fieldset>
<fieldset class="hidden" style="display: none;">
<input type="hidden" name="options[slug]" value="{{ page.slug }}">
<label for="comment-form-location">Not used. Leave blank if you are a human.</label>
<input type="text" id="comment-form-location" name="fields[hidden]" autocomplete="off"/>
</fieldset>
<!-- Start comment form alert messaging -->
<p class="hidden js-notice">
<strong class="js-notice-text"></strong>
</p>
<!-- End comment form alert messaging -->
<fieldset>
<button type="submit" id="comment-form-submit" tabindex="5" class="btn btn--large">{{ site.data.ui-text[site.locale].comment_btn_submit | default: "Submit Comment" }}</button>
</fieldset>
</form>
<!-- End new comment form -->
{% endif %}
</section>
{% when "custom" %}
<section id="custom-comments"></section>
{% endcase %} {% endcase %}
</div> </div>