~huyngo/hugo-anubis-fork

6bb97c7ecd28323913b4523ab43ca3aa62f7024a — Ngô Ngọc Đức Huy 3 months ago 5e2a811 custom
Add theme for previous/next post
2 files changed, 18 insertions(+), 0 deletions(-)

M assets/css/main.css
M layouts/_default/single.html
M assets/css/main.css => assets/css/main.css +12 -0
@@ 750,6 750,18 @@ a.site-title::after {
  content: "]";
}

a.prev-link::before {
  content: "←";
}

a.next-link {
  float: right;
}

a.next-link::after {
  content: "→";
}

{{ range site.Params.customCSS }}
    {{ $custom := resources.Get . }}
    {{ $custom.Content }}

M layouts/_default/single.html => layouts/_default/single.html +6 -0
@@ 18,9 18,15 @@
        </div>
        {{ partial "post-info.html" . }}
    </article>
    <hr>
    <nav>
    {{with .Prev}}<a class="prev-link" href="{{.Permalink}}">Previous post</a>{{end}}
    {{with .Next}}<a class="next-link" href="{{.Permalink}}">Next post</a>{{end}}
    </nav>

    {{ if and (.Params.categories) (in .Params.categories "blog") }}
    <hr>

    Would you like to discuss this post?
    <a href="mailto:huyngo@disroot.org?subject=Re: {{ trim .Title " "}}">Email me!</a>
    {{ end }}