on master help sign in
Merge pull request #252 from urbit/feat/mp-docs-nextup

Feature: Docs template tweaks, adds automated "next up" pagination

commitd037b749655e43c35a5192015da918b86b1c5598 authorMatilde Park <matilde@tlon.io> dateWed 23 Oct 2019, 10:25 (7 years ago) parentced7c0dd5658e0
5 files changed+17−5
templates/doc.html+3−1 templates/partials/navigation-docs.html+2−2 templates/partials/pagination-docs.html+10 templates/sections/docs.html+1−1 templates/sections/docs/chapters.html+1−1
templates/doc.html+3−1
@@ -12,10 +12,12 @@
1212<!-- header -->
1313<!-- content -->
1414{% include "partials/navigation-docs.html" %}
15−<article class="mt4 mb6 full c5-10-md c4-10-lg">
15+<article class="mt4 mb6 full c4-12-lg measure-wide">
1616 <!-- header -->
1717 <h1>{{ page.title }}</h1>
1818 <!-- body -->
1919 {{ page.content | safe }}
20+
21+ {% include "partials/pagination-docs.html" %}
2022</article>
2123{% endblock content %}
templates/partials/navigation-docs.html+2−2
@@ -1,6 +1,6 @@
11<!-- First nav is desktop-specific. Second nav is dropdown version for mobile. -->
22{% block content %}
3−<nav class="bg-gray5 dn db-l db-xl pt4 full-left no-break docs pr4">
3+<nav class="bg-gray5 dn db-xl pt4 full-left no-break docs pr4">
44 <a class="gray3" href="{{config.base_url}}">Urbit</a>
55 <span class="gray3"> / </span>
66 <a href="{{config.base_url}}/docs/">
@@ -76,7 +76,7 @@
7676 </ul>
7777</nav>
7878
79−<nav class="dn-l mobile dn-xl db pt4 no-break docs full">
79+<nav class="mobile dn-xl db pt4 no-break docs full">
8080 <a class="gray3" href="{{config.base_url}}">Urbit</a>
8181 <span class="gray3"> / </span>
8282 <a href="{{config.base_url}}/docs/">
templates/partials/pagination-docs.htmlnew file+10
@@ -0,0 +1,10 @@
1+<footer class="relative mt4">
2+ {% if page.heavier %}
3+ <nav class="previous absolute right-1 t-right">
4+ <a class="bb-0" href="{{page.heavier.permalink}}">
5+ <p class="mb0 f5">Next up:</p>
6+ <p class="mt0 mb0 fw6 f5">{{page.heavier.title}}</p>
7+ </a>
8+ </nav>
9+ {% endif %}
10+</footer>
templates/sections/docs.html+1−1
@@ -12,7 +12,7 @@
1212<!-- header -->
1313<!-- content -->
1414{% include "partials/navigation-docs.html" %}
15−<article class="mt4 mb6 full c5-10-md c4-10-lg">
15+<article class="mt4 mb6 full c4-12-lg measure-wide">
1616 <!-- header -->
1717 <h1>{{ section.title }}</h1>
1818 <!-- body -->
templates/sections/docs/chapters.html+1−1
@@ -11,7 +11,7 @@
1111<!-- header -->
1212<!-- content -->
1313{% include "partials/navigation-docs.html" %}
14−<article class="mt4 mb6 full c5-10-md c4-10-lg">
14+<article class="mt4 mb6 full c4-12-lg measure-wide">
1515<!-- header -->
1616<h1>{{ section.title }}</h1>
1717<!-- body -->