post.html 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. ---
  2. layout: base
  3. ---
  4. {% include header.html type="post" %}
  5. <main class="{% if page.full-width %} container-fluid {% else %} container-md {% endif %}">
  6. <div class="row">
  7. <div class="{% if page.full-width %} col {% else %} col-xl-8 offset-xl-2 col-lg-10 offset-lg-1 {% endif %}">
  8. {% if page.gh-repo %}
  9. {% assign gh_split = page.gh-repo | split:'/' %}
  10. {% assign gh_user = gh_split[0] %}
  11. {% assign gh_repo = gh_split[1] %}
  12. <div id="header-gh-btns">
  13. {% if page.gh-badge.size > 0 %}
  14. {% for badge in page.gh-badge %}
  15. {% case badge %}
  16. {% when 'star'%}
  17. <iframe src="https://ghbtns.com/github-btn.html?user={{ gh_user }}&repo={{ gh_repo }}&type=star&count=true" frameborder="0" scrolling="0" width="120px" height="20px"></iframe>
  18. {% when 'watch'%}
  19. <iframe src="https://ghbtns.com/github-btn.html?user={{ gh_user }}&repo={{ gh_repo }}&type=watch&v=2&count=true" frameborder="0" scrolling="0" width="120px" height="20px"></iframe>
  20. {% when 'fork'%}
  21. <iframe src="https://ghbtns.com/github-btn.html?user={{ gh_user }}&repo={{ gh_repo }}&type=fork&count=true" frameborder="0" scrolling="0" width="120px" height="20px"></iframe>
  22. {% when 'follow'%}
  23. <iframe src="https://ghbtns.com/github-btn.html?user={{ gh_user }}&type=follow&count=true" frameborder="0" scrolling="0" width="220px" height="20px"></iframe>
  24. {% endcase %}
  25. {% endfor %}
  26. {% endif %}
  27. </div>
  28. {% endif %}
  29. {% if page.before-content %}
  30. <div class="before-content">
  31. {% for file in page.before-content %}
  32. {% include {{ file }} %}
  33. {% endfor %}
  34. </div>
  35. {% endif %}
  36. <div class="blog-post">
  37. {{ content }}
  38. </div>
  39. {% if page.tags.size > 0 %}
  40. <div class="blog-tags">
  41. <span>Tags:</span>
  42. {% for tag in page.tags %}
  43. <a href="{{ '/tags' | relative_url }}#{{- tag -}}">{{- tag -}}</a>
  44. {% endfor %}
  45. </div>
  46. {% endif %}
  47. {% if page.after-content %}
  48. <div class="after-content">
  49. {% for file in page.after-content %}
  50. {% include {{ file }} %}
  51. {% endfor %}
  52. </div>
  53. {% endif %}
  54. {% if page.social-share %}
  55. {% include social-share.html %}
  56. {% endif %}
  57. <ul class="pagination blog-pager">
  58. {% if page.previous.url %}
  59. <li class="page-item previous">
  60. <a class="page-link" href="{{ page.previous.url | relative_url }}" data-toggle="tooltip" data-placement="top" title="{{page.previous.title | strip_html | xml_escape}}">
  61. <i class="fas fa-arrow-left" alt="Previous Post"></i>
  62. <span class="d-none d-sm-inline-block">Previous Post</span>
  63. </a>
  64. </li>
  65. {% endif %}
  66. {% if page.next.url %}
  67. <li class="page-item next">
  68. <a class="page-link" href="{{ page.next.url | relative_url }}" data-toggle="tooltip" data-placement="top" title="{{page.next.title | strip_html | xml_escape}}">
  69. <span class="d-none d-sm-inline-block">Next Post</span>
  70. <i class="fas fa-arrow-right" alt="Next Post"></i>
  71. </a>
  72. </li>
  73. {% endif %}
  74. </ul>
  75. {% include comments.html %}
  76. </div>
  77. </div>
  78. </main>