header.html 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. {% assign date_format = site.date_format | default: "%B %-d, %Y" %}
  2. {% if page.cover-img %}
  3. <div id="header-big-imgs" data-num-img={% if page.cover-img.first %}{{ page.cover-img.size }}{% else %}1{% endif %}
  4. {% for bigimg in page.cover-img %}
  5. {% assign imgnum = forloop.index %}
  6. {% for imginfo in bigimg %}
  7. {% if imginfo[0] %}
  8. data-img-src-{{ imgnum }}="{{ imginfo[0] | absolute_url }}"
  9. data-img-desc-{{ imgnum }}="{{ imginfo[1] }}"
  10. {% else %}
  11. data-img-src-{{ imgnum }}="{{ imginfo | absolute_url }}"
  12. {% endif %}
  13. {% endfor %}
  14. {% endfor %}
  15. ></div>
  16. {% endif %}
  17. <header class="header-section {% if page.cover-img %}has-img{% endif %}">
  18. <div class="intro-header {% if page.cover-img %} big-img {% endif %}">
  19. {% if page.cover-img or page.title %}
  20. <div class="container-md">
  21. <div class="row">
  22. <div class="col-xl-8 offset-xl-2 col-lg-10 offset-lg-1">
  23. <div class="{{ include.type }}-heading">
  24. <h1>{% if page.title %}{{ page.title | strip_html }}{% else %}<br/>{% endif %}</h1>
  25. {% if page.subtitle %}
  26. {% if include.type == "page" %}
  27. <hr class="small">
  28. <span class="{{ include.type }}-subheading">{{ page.subtitle | strip_html }}</span>
  29. {% else %}
  30. <h2 class="{{ include.type }}-subheading">{{ page.subtitle | strip_html }}</h2>
  31. {% endif %}
  32. {% endif %}
  33. {% if include.type == "post" %}
  34. {% if page.author %}
  35. By <strong>{{ page.author | strip_html }}</strong><br>
  36. {% endif%}
  37. <span class="post-meta">Posted on {{ page.date | date: date_format }}</span>
  38. {% if page.last-updated %}
  39. <span class="post-meta">
  40. <span class="d-none d-md-inline middot">&middot;</span>
  41. Last updated {{ page.last-updated | date: date_format }}
  42. </span>
  43. {% endif %}
  44. {% if page.readtime %}
  45. {% include readtime.html %}
  46. {% endif %}
  47. {% endif %}
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. {% endif %}
  53. {% if page.cover-img %}<span class='img-desc'></span>{% endif %}
  54. </div>
  55. {% if page.header-extra %}
  56. {% for file in page.header-extra %}
  57. {% include {{ file }} %}
  58. {% endfor %}
  59. {% endif %}
  60. </header>