wvuweb / hammer

A tool for CleanSlate theme development
https://cleanslate.wvu.edu
4 stars 2 forks source link

Implement <r:page:next_sibling> & <r:page:previous_sibling> #4

Closed adamjohnson closed 10 years ago

adamjohnson commented 10 years ago

The projectme-v2 theme uses these tags in the story.html template. Here's the markup:

<ul class="story-arrows">
  <r:page:previous_sibling>
    <li><a class="story-arrow__previous" href="<r:page:url />"><span class="story-arrow__text"><r:page:name /></span> <img class="story-arrow__icon story-arrow__icon--previous" src="<r:image_url name="story-arrow__previous.svg" />" alt="Go to previous student" /></a></li>
  </r:page:previous_sibling>

  <r:page:next_sibling>
    <li><a class="story-arrow__next" href="<r:page:url />"><img class="story-arrow__icon story-arrow__icon--next" src="<r:image_url name="story-arrow__next.svg" />" alt="Go to previous student" /> <span class="story-arrow__text story-arrow__text--next"><r:page:name /></span></a></li>
  </r:page:next_sibling>
</ul>

Docs for these tags:

https://github.com/wvuweb/cleanslate-toolkit/wiki/r%3Apage%3Anext_sibling and https://github.com/wvuweb/cleanslate-toolkit/wiki/r%3Apage%3Anext_sibling

Honestly, hammer could almost just ignore them and output whatever markup they're wrapping.