# HG changeset patch # User Goffi # Date 1517294841 -3600 # Node ID 5d9e2270ceb45800600b3e5fbad281f50010e655 # Parent 1d0ddeb79903e317aa1db60b1f61ece89e5d1f16 blog/articles, input/navigation: moved navigation template in a dedicated macro diff -r 1d0ddeb79903 -r 5d9e2270ceb4 default/blog/articles.html --- a/default/blog/articles.html Fri Jan 26 07:52:41 2018 +0100 +++ b/default/blog/articles.html Tue Jan 30 07:47:21 2018 +0100 @@ -2,6 +2,7 @@ {% set single = items|length == 1 %} {% set dates_format='relative' if single else 'short' %} {% import 'blog/macros.html' as blog with context %} +{% import 'input/navigation.html' as navigation with context %} {% block title scoped -%} {%- if single -%} @@ -18,24 +19,6 @@
{{ blog.show_items(items, expanded=single) }}
- + +{{ navigation.prev_next(_("newer articles"), _("older articles")) }} {% endblock body %} diff -r 1d0ddeb79903 -r 5d9e2270ceb4 default/input/navigation.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/default/input/navigation.html Tue Jan 30 07:47:21 2018 +0100 @@ -0,0 +1,22 @@ +{% macro prev_next(prev_label=_("newer"), next_label=_("older")) %} + +{% endmacro %} diff -r 1d0ddeb79903 -r 5d9e2270ceb4 default/static/blog.css --- a/default/static/blog.css Fri Jan 26 07:52:41 2018 +0100 +++ b/default/static/blog.css Tue Jan 30 07:47:21 2018 +0100 @@ -87,48 +87,6 @@ margin: 0; } -/** navigation links **/ - -.bottom_links ul { - list-style: none; - display: flex; - padding: 0 2em; - margin: 0; -} - -.bottom_links li { - flex: 1; -} - -.bottom_links li.older_items { - text-align: right; -} - -.bottom_links img { - display: block; -} - -.bottom_links .older_items img { - display: block; - margin-left: auto; - margin-right: 0; -} - -.bottom_links a { - display: inline-block; - margin-top: 1em; - padding: 0.2em; - text-decoration: None; - color: inherit; - font-variant: small-caps; - background: rgba(200,200,200,0.6); - border-radius: 0.5em; -} - -.bottom_links a:hover { - background-color: #ddd; -} - /** reduce/expand buttons **/ .expand_box { @@ -311,10 +269,6 @@ padding: 0.5em; } - .bottom_links ul { - padding: 0 6em; - } - footer span { background: rgba(200,200,200,0.6); border-radius: 0.5em 0.5em 0 0; diff -r 1d0ddeb79903 -r 5d9e2270ceb4 default/static/styles.css --- a/default/static/styles.css Fri Jan 26 07:52:41 2018 +0100 +++ b/default/static/styles.css Tue Jan 30 07:47:21 2018 +0100 @@ -12,7 +12,7 @@ } #main_side_bar { - + } #main_area { @@ -221,6 +221,48 @@ display: block; } +/*** Navigation ***/ + +.prev_next_links ul { + list-style: none; + display: flex; + padding: 0 2em; + margin: 0; +} + +.prev_next_links li { + flex: 1; +} + +.prev_next_links li.older_items { + text-align: right; +} + +.prev_next_links img { + display: block; +} + +.prev_next_links .older_items img { + display: block; + margin-left: auto; + margin-right: 0; +} + +.prev_next_links a { + display: inline-block; + margin-top: 1em; + padding: 0.2em; + text-decoration: None; + color: inherit; + font-variant: small-caps; + background: rgba(200,200,200,0.6); + border-radius: 0.5em; +} + +.prev_next_links a:hover { + background-color: #ddd; +} + /*** XMLUI ***/ .xmlui_cont_vertical>* { @@ -297,4 +339,9 @@ flex-direction: column; padding-left: 2em; } + + .prev_next_links ul { + padding: 0 6em; + } + }