Mercurial > libervia-templates
changeset 61:f76ec90e0e1e
base: menus handling, first draft:
this is a very basic way to handle menu (big buttons on the top), just a first draft to be able to navigate.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 11 Nov 2017 00:16:35 +0100 |
parents | f3c0447b8b4c |
children | e7b62f6980a1 |
files | default/base/base.html default/input/field.html default/static/login.css default/static/styles.css default/static/ticket.css |
diffstat | 5 files changed, 60 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/default/base/base.html Sat Nov 11 00:14:23 2017 +0100 +++ b/default/base/base.html Sat Nov 11 00:16:35 2017 +0100 @@ -36,16 +36,30 @@ </head> <body> - {% if confirm %} - {# confirmation message used when post data has been handled correctly #} - {% block confirm %} - <div class="box post_confirm"> - {% block confirm_message %} - {% trans %}Your data has been sent correctly.{% endtrans %} - {% endblock confirm_message %} - </div> - {% endblock confirm %} - {% endif %} + <header> + {% if confirm %} + {# confirmation message used when post data has been handled correctly #} + {% block confirm %} + <div class="box post_confirm"> + {% block confirm_message %} + {% trans %}Your data has been sent correctly.{% endtrans %} + {% endblock confirm_message %} + </div> + {% endblock confirm %} + {% endif %} + + {% if menus %} + {% block menu %} + <nav class="menu"> + <ul> + {% for url,label,cls in menus %} + <li><a class="menu_item button {{cls}}" {{ {'href': url}|xmlattr }}>{{ label }}</a></li> + {% endfor %} + </ul> + </nav> + {% endblock menu %} + {% endif %} + </header> <div id="body"> {% block body %}
--- a/default/input/field.html Sat Nov 11 00:14:23 2017 +0100 +++ b/default/input/field.html Sat Nov 11 00:16:35 2017 +0100 @@ -45,5 +45,5 @@ {% endmacro %} {% macro submit(text=_("Send")) %} - <input class="form_submit" type="submit" value="{{text}}"> + <input class="form_submit button" type="submit" value="{{text}}"> {% endmacro %}
--- a/default/static/login.css Sat Nov 11 00:14:23 2017 +0100 +++ b/default/static/login.css Sat Nov 11 00:16:35 2017 +0100 @@ -82,11 +82,6 @@ margin-top: 30px; } -#login_form .form_submit:hover, -#logged .form_submit:hover { - background-color: #bc0000; -} - #login_error { position: absolute; margin: -90px 0 0;
--- a/default/static/styles.css Sat Nov 11 00:14:23 2017 +0100 +++ b/default/static/styles.css Sat Nov 11 00:16:35 2017 +0100 @@ -53,6 +53,40 @@ margin: 1.5em auto; } +/* generic */ + +.button:hover { + background-color: #bc0000; +} + +/* Menus */ + +.menu ul { + display: flex; + justify-content: center; + margin-top: 8px; + padding: 0; + list-style: none; +} + +.menu li { + margin: 0.5em; + text-align: center; +} + +.menu a { + color: inherit; + text-decoration: none; + border: solid 1px; + padding: 0.5em; + font-variant: small-caps; + border-radius: 1em; + background: #eee; +} + +.menu a:hover { +} + /* Forms */ .form_submit {