~xdavidwu/xdavidwu.link

30ec8e91676e9c9a429731d9e63518c2145d7257 — xdavidwu 4 years ago 7620f44
move comments and related into article>div
2 files changed, 27 insertions(+), 29 deletions(-)

M _layouts/single.html
M _sass/minimal-mistakes/_page.scss
M _layouts/single.html => _layouts/single.html +27 -27
@@ 55,35 55,35 @@ layout: default
      {% if page.share %}{% include social-share.html %}{% endif %}

      {% include post_pagination.html %}
    </div>

    {% if jekyll.environment == 'production' and site.comments.provider and page.comments %}
      {% include comments.html %}
    {% endif %}

    {% comment %}<!-- only show related on a post page when `related: true` -->{% endcomment %}
    {% if page.id and page.related and site.related_posts.size > 0 %}
      <div class="page__related">
        <h4 class="page__related-title">{{ site.data.ui-text[site.locale].related_label | default: "You May Also Enjoy" }}</h4>
        <div class="grid__wrapper">
          {% for post in site.related_posts limit:4 %}
            {% include archive-single.html type="grid" %}
          {% endfor %}
      {% if jekyll.environment == 'production' and site.comments.provider and page.comments %}
        {% include comments.html %}
      {% endif %}
  
      {% comment %}<!-- only show related on a post page when `related: true` -->{% endcomment %}
      {% if page.id and page.related and site.related_posts.size > 0 %}
        <div class="page__related">
          <h4 class="page__related-title">{{ site.data.ui-text[site.locale].related_label | default: "You May Also Enjoy" }}</h4>
          <div class="grid__wrapper">
            {% for post in site.related_posts limit:4 %}
              {% include archive-single.html type="grid" %}
            {% endfor %}
          </div>
        </div>
      </div>
    {% comment %}<!-- otherwise show recent posts if no related when `related: true` -->{% endcomment %}
    {% elsif page.id and page.related %}
      <div class="page__related">
        <h4 class="page__related-title">{{ site.data.ui-text[site.locale].related_label | default: "You May Also Enjoy" }}</h4>
        <div class="grid__wrapper">
          {% for post in site.posts limit:4 %}
            {% if post.id == page.id %}
              {% continue %}
            {% endif %}
            {% include archive-single.html type="grid" %}
          {% endfor %}
      {% comment %}<!-- otherwise show recent posts if no related when `related: true` -->{% endcomment %}
      {% elsif page.id and page.related %}
        <div class="page__related">
          <h4 class="page__related-title">{{ site.data.ui-text[site.locale].related_label | default: "You May Also Enjoy" }}</h4>
          <div class="grid__wrapper">
            {% for post in site.posts limit:4 %}
              {% if post.id == page.id %}
                {% continue %}
              {% endif %}
              {% include archive-single.html type="grid" %}
            {% endfor %}
          </div>
        </div>
      </div>
    {% endif %}
      {% endif %}
    </div>
  </article>
</div>

M _sass/minimal-mistakes/_page.scss => _sass/minimal-mistakes/_page.scss +0 -2
@@ 371,8 371,6 @@ body {
   ========================================================================== */

.page__comments {
  float: left;
  width: 100%;
  clear: both;
}