Mercurial > libervia-templates
diff default/static/styles.css @ 66:9834106678da
base: menu implementation:
2 menus are now handled: main menu and category menu (for submenus relative to a page).
Main menu is displayed on the side bar on big screen.
Added menu for tickets.
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 01 Dec 2017 00:46:42 +0100 |
parents | f76ec90e0e1e |
children | 94b04fba91c7 |
line wrap: on
line diff
--- a/default/static/styles.css Wed Nov 15 08:52:14 2017 +0100 +++ b/default/static/styles.css Fri Dec 01 00:46:42 2017 +0100 @@ -3,11 +3,23 @@ } body { + margin: 0; + padding: 0; display: flex; height: 100vh; flex-direction: column; box-sizing: border-box; - margin: 0; +} + +#main_side_bar { + +} + +#main_area { + flex: 1; + display: flex; + flex-direction: column; + box-sizing: border-box; } #body { @@ -23,19 +35,7 @@ .box { background-color: #edf2ff; border-radius: 0; -} - -@media (min-width: 500px) { - html { - background-size: auto; - } - body { - padding: 8px; - } - .box { - border-radius: 1em; - box-shadow: 10px 10px 16px -5px rgba(0,0,0,0.5); - } + border-color: silver; } .title { @@ -53,48 +53,164 @@ margin: 1.5em auto; } -/* generic */ +/*** Generic ***/ .button:hover { background-color: #bc0000; } -/* Menus */ +/*** Messages ***/ + +.message_info { + max-width: 500px; + margin: 0 auto; + padding: 1em; + text-align: justify; +} + +.message_info pre { + background: #ddd; + padding: 1em; +} + +/*** Menus ***/ .menu ul { display: flex; - justify-content: center; + padding: 0; margin-top: 8px; - padding: 0; list-style: none; } -.menu li { +.menu a { + display: block; + color: inherit; + text-decoration: none; + font-variant: small-caps; +} + +.main_menu { + min-width: 200px; + /* background-color: #eaeaea; */ + background-color: #333; + color: white; +} + +.main_menu ul { + flex-direction: row; + flex-wrap: wrap; +} + +.main_menu li { + flex: 1; + padding: 0; + margin: 0 1em; +} + +.main_menu a { + display: inline; + white-space: nowrap; +} + +.main_menu a:hover { + background-color: initial; + text-shadow: 1px 1px 2px; + font-weight: bold; +} + +.category_menu ul { + justify-content: center; +} + +.category_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; +.category_menu a { + border: solid 1px; + padding: 0.5em; + border-radius: 0.2em; + background: #eee; +} + +/*** containers ***/ + +/* tabs */ + +.tab_container { + max-width: 1000px; + margin: 0 auto; +} + +.tab_header { + background-color: white; + border-bottom: 1px solid lightgrey; +} + +.tab_header ul { + display: flex; + margin: 0; + padding: 0; + list-style: none; + background-color: white; +} + +.tab_page { + box-sizing: border-box; + padding-top: 2em; + border: 1px solid lightgrey; + border-top: none; + display: None; } -.menu a:hover { +.tab_page.clicked { + display: block; +} + +.tab_button { + display: inline; + color: grey; + background-color: white; + border-top: 1px solid lightgrey; + border-left: 1px solid lightgrey; + border-bottom: 1px solid lightgrey; + padding: 0 1em; + cursor: pointer; + /* we go down by 1px to remove bottom border from .tab_header */ + margin-bottom: -1px; } -/* Forms */ +.tab_button.clicked { + /* background: lightgrey; */ + color: inherit; + border-bottom: none; +} + +li.tab_button:last-child { + border-right: 1px solid lightgrey; +} + +.tab_button input { + display: None; +} + +.tab_button label { + margin: 1em; +} + +.tab_button input:checked + label { + font-weight: bold; +} + +/*** Forms ***/ .form_submit { margin: 1em auto 0; display: block; } -/* XMLUI */ +/*** XMLUI ***/ .xmlui_cont_vertical>* { display: block; @@ -118,3 +234,32 @@ color: inherit; text-decoration: inherit; } + +@media (min-width: 500px) { + html { + background-size: auto; + } + + body { + flex-direction: row; + } + + #main_area { + overflow: auto; + } + + .box { + border-radius: 1em; + box-shadow: 10px 10px 16px -5px rgba(0,0,0,0.5); + } + + .main_menu a { + display: block; + padding: 2em 0; + } + + .main_menu ul { + flex-direction: column; + padding-left: 2em; + } +}