Browse Source

Better slug in sidenote and header image option in post

production
Nathan Bergey 3 years ago
parent
commit
0d7fc0d638
  1. 4
      src/_includes/sidenote.liquid
  2. 6
      src/_layouts/post.liquid

4
src/_includes/sidenote.liquid

@ -1,3 +1,3 @@
{% assign sn_slug = sidenote | strip | strip_html | slice: 0, 50 | downcase | replace: '.', '' |replace: ' ', '-' %}{% capture snid %}sn-{{ sn_slug}}{% endcapture %}<label for="{{ snid }}" class="margin-toggle sidenote-number"></label>
{% assign sn_slug = sidenote | strip | strip_html | strip_newlines | slice: 0, 50 | downcase | remove: '"' | remove: "'" | remove: ' ' | remove: '.' | remove: '-' | remove: '_' %}{% capture snid %}sn-{{ sn_slug}}{% endcapture %}<label for="{{ snid }}" class="margin-toggle sidenote-number"></label>
<input type="checkbox" id="{{ snid }}" class="margin-toggle"> <input type="checkbox" id="{{ snid }}" class="margin-toggle">
<span class="sidenote">{{ sidenote }}</span>
<span class="sidenote">{{ sidenote | strip_newlines }}</span>

6
src/_layouts/post.liquid

@ -29,6 +29,12 @@
<article id="main"> <article id="main">
<section> <section>
{% if page.data.header_image %}
<figure class="fullwidth">
<img style="box-shadow: 1px 6px 14px #ba8" src="{{page.data.header_image}}">
</figure>
{% endif %}
{{ page.content }} {{ page.content }}
</section> </section>
</article > </article >

Loading…
Cancel
Save