Ability to turn on "go to top" button on regular pages (fixes #115)
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
+++
|
+++
|
||||||
title = "Demo Page"
|
title = "Demo Page"
|
||||||
[extra]
|
[extra]
|
||||||
|
go_to_top = true
|
||||||
styles = ["demo/demo.css"]
|
styles = ["demo/demo.css"]
|
||||||
scripts = ["demo/demo.js"]
|
scripts = ["demo/demo.js"]
|
||||||
katex = true
|
katex = true
|
||||||
|
@ -24,6 +24,11 @@
|
|||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
<main id="main-content">
|
<main id="main-content">
|
||||||
{% block custom %}{% endblock custom %}
|
{% block custom %}{% endblock custom %}
|
||||||
|
{%- if page.extra.go_to_top or section.extra.go_to_top -%}
|
||||||
|
<div id="buttons-container">
|
||||||
|
<a id="go-to-top" href="#top" title="{{ macros_translate::translate(key='go_to_top', default='Go to Top', language_strings=language_strings) }}"><i class="icon"></i></a>
|
||||||
|
</div>
|
||||||
|
{%- endif -%}
|
||||||
{% block content %}{% endblock content %}
|
{% block content %}{% endblock content %}
|
||||||
{% include "partials/extra_features.html" %}
|
{% include "partials/extra_features.html" %}
|
||||||
</main>
|
</main>
|
||||||
|
Reference in New Issue
Block a user