mirror of https://github.com/onweru/compose.git

weru
11.22.2020 4e2c9e709500229b84798dacfd14b6bbf9140e53
add proper prev next buttons #11
3 files added
1 files modified
77 ■■■■ changed files
layouts/partials/document.html 9 ●●●● patch | view | raw | blame | history
layouts/partials/pager.html 20 ●●●●● patch | view | raw | blame | history
layouts/partials/sprites.html 5 ●●●●● patch | view | raw | blame | history
static/images/next.svg 43 ●●●●● patch | view | raw | blame | history
layouts/partials/document.html
@@ -5,13 +5,6 @@
  <section class="content">
    <h1>{{ .Title }}</h1>
    {{- .Content }}
    <div class="pager">
      {{- with .Next }}
      <a href="{{ .Permalink }}" id="prev"><< {{ .Title }}</a>
      {{ end }}
      {{- with .Prev }}
      <a href="{{ .Permalink }}" id="next">{{ .Title }} >></a>
      {{- end }}
    </div>
    {{ partial "pager" . }}
  </section>
</div>
layouts/partials/pager.html
New file
@@ -0,0 +1,20 @@
<div class="pager{{ if .Next }}{{ else }} pager_lean{{ end }}">
  {{ with .Next }}
  <div class="pager_item prev">
    <span class="pager_meta">PREVIOUS</span>
    <a href="{{ .Permalink }}" class="pager_link button" title="{{ .Title }}">
      <span class="pager_label">{{ .Title }}</span>
    </a>
  </div>
  {{ end }}
  {{ with .Prev }}
  <div class="pager_item next">
    <span class="pager_meta">NEXT</span>
    <a href="{{ .Permalink }}" class="pager_link button" title="{{ .Title }}">
      <span class="pager_label">{{ .Title }}</span>
    </a>
  </div>
  {{ end }}
</div>
{{ partial "sprites" . }}
layouts/partials/sprites.html
New file
@@ -0,0 +1,5 @@
<svg width="0" height="0" class="hidden">
  <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 492.004 492.004" id="next">
    <path d="M484.14 226.886L306.46 49.202c-5.072-5.072-11.832-7.856-19.04-7.856-7.216 0-13.972 2.788-19.044 7.856l-16.132 16.136c-5.068 5.064-7.86 11.828-7.86 19.04 0 7.208 2.792 14.2 7.86 19.264L355.9 207.526H26.58C11.732 207.526 0 219.15 0 234.002v22.812c0 14.852 11.732 27.648 26.58 27.648h330.496L252.248 388.926c-5.068 5.072-7.86 11.652-7.86 18.864 0 7.204 2.792 13.88 7.86 18.948l16.132 16.084c5.072 5.072 11.828 7.836 19.044 7.836 7.208 0 13.968-2.8 19.04-7.872l177.68-177.68c5.084-5.088 7.88-11.88 7.86-19.1.016-7.244-2.776-14.04-7.864-19.12z"></path>
  </symbol>
</svg>
static/images/next.svg
New file
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
     viewBox="0 0 492.004 492.004" style="enable-background:new 0 0 492.004 492.004;" xml:space="preserve" fill="#eee">
<g>
    <g>
        <path d="M484.14,226.886L306.46,49.202c-5.072-5.072-11.832-7.856-19.04-7.856c-7.216,0-13.972,2.788-19.044,7.856l-16.132,16.136
            c-5.068,5.064-7.86,11.828-7.86,19.04c0,7.208,2.792,14.2,7.86,19.264L355.9,207.526H26.58C11.732,207.526,0,219.15,0,234.002
            v22.812c0,14.852,11.732,27.648,26.58,27.648h330.496L252.248,388.926c-5.068,5.072-7.86,11.652-7.86,18.864
            c0,7.204,2.792,13.88,7.86,18.948l16.132,16.084c5.072,5.072,11.828,7.836,19.044,7.836c7.208,0,13.968-2.8,19.04-7.872
            l177.68-177.68c5.084-5.088,7.88-11.88,7.86-19.1C492.02,238.762,489.228,231.966,484.14,226.886z"/>
    </g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>