From 6531c9ecaf758b6585012658246e0aa7f7000d1f Mon Sep 17 00:00:00 2001 From: roberto Date: Fri, 29 Nov 2024 17:56:53 +0100 Subject: [PATCH] CSS rework --- assets/static/css/main.css | 139 ++++++++++++++++-- assets/static/css/orig.css | 54 ------- assets/templates/base.tmpl | 8 +- assets/templates/categories/create_title.tmpl | 10 +- assets/templates/categories/list_title.tmpl | 15 +- assets/templates/categories/update_title.tmpl | 10 +- assets/templates/full.tmpl | 2 +- assets/templates/items/all_list_title.tmpl | 5 +- assets/templates/items/create_title.tmpl | 5 +- assets/templates/items/form.tmpl | 8 +- assets/templates/items/list.tmpl | 2 +- assets/templates/items/list_title.tmpl | 21 +-- assets/templates/items/update_title.tmpl | 5 +- assets/templates/items/view.tmpl | 25 +--- assets/templates/notebooks/create_title.tmpl | 10 +- assets/templates/notebooks/list_title.tmpl | 15 +- assets/templates/notebooks/update_title.tmpl | 10 +- assets/templates/pages/home_title.tmpl | 10 +- assets/templates/pages/login.tmpl | 10 +- assets/templates/partials/sidebar.tmpl | 10 +- assets/templates/types/create_title.tmpl | 10 +- assets/templates/types/list_title.tmpl | 16 +- assets/templates/types/update_title.tmpl | 11 +- 23 files changed, 209 insertions(+), 202 deletions(-) diff --git a/assets/static/css/main.css b/assets/static/css/main.css index c093031..241c9fe 100644 --- a/assets/static/css/main.css +++ b/assets/static/css/main.css @@ -84,6 +84,19 @@ body { min-height: 100vh; } +#overlay { + position: fixed; + display: none; + width: 100%; + height: 100%; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.5); + z-index: 4; +} + .modal { z-index: 100; padding-top: 100px; @@ -373,8 +386,16 @@ input[type='text']{ width: 100%; } +#full-main-container:before,#full-main-container:after { + content: ""; + display: table; + clear: both; + padding: 0.01em 4px; +} + #form-login-container { position: relative; + min-height: 400px; } #form-login { @@ -390,10 +411,33 @@ input[type='text']{ padding: 12px 24px !important; } +#form-login img { + height: 50px; + padding-right: 10px; +} + +#form-login h2 { + text-align: center; + display: flex; + align-items: center; + justify-content: center; +} + #form-login input { border: 1px solid #ccc !important } +#form-login button { + text-align: center; + display: block; + width: 100%; + color: var(--primary-color); + background-color: #ffffff; + font-weight: bold; + margin-top: 50px; + margin-bottom: 20px; +} + #main-sidebar { width: 300px; z-index: 5; @@ -456,6 +500,7 @@ input[type='text']{ margin-left: 8px; padding: 0; width: 100%; + display: block; } #page-title-container h5 { @@ -464,22 +509,30 @@ input[type='text']{ } #page-title { - float: left; padding: 4px 4px; font-size: 1.4rem; } -#page-title h5 { +#page-title-title { color: #ffffff; + float: left; +} + +#top-toolbar { + float: right; +} + +#top-toolbar .button, #top-toolbar button { + padding-top: 0px; + padding-bottom: 0px; } #search-bar { float: right; } -#search-bar button { +#search-bar button, #search-bar .button, #top-toolbar .button { color: #ffffff; - margin-top: 2px; } #search-text { @@ -489,7 +542,11 @@ input[type='text']{ } .sidebar-block { - padding: 0.01em 4px; + padding: 4px; +} + +#sidebar-search { + display: none; } .sidebar-menu a { @@ -508,6 +565,10 @@ input[type='text']{ margin-left: 2px !important; } +.types_menu, .settings_menu { + float: right; +} + .item-card { position: relative; background-color: #ffffff; @@ -684,9 +745,9 @@ input[type='text']{ width: 99.99999% } - .ss-main { padding: 3px; + height: 37px; } .ss-value { @@ -794,8 +855,62 @@ input[type='text']{ display: block !important } +#footer-navbar .bar-item:first-child { + padding-left: 0; +} + /* Small */ @media (max-width: 568px) { + .table-all.responsive table, + .table-all.responsive thead, + .table-all.responsive tbody, + .table-all.responsive th, + .table-all.responsive td, + .table-all.responsive tr { + display: block; + } + + .table-all thead tr { + position: absolute; + top: -9999px; + left: -9999px; + } + + .table-all.responsive tr { + margin-bottom: 10px; + border: 1px solid #ddd; + } + + .table-all.responsive td { + border: none; + position: relative; + padding-left: 30%; + } + + .table-all.responsive td.no-label { + padding-left: 6px; + } + + .table-all.responsive td.title { + color: #2b5797; + font-weight: 400; + font-size: 18px; + } + + .table-all.responsive td:before { + position: absolute; + left: 6px; + content: attr(data-label); + font-weight: bold; + } + + .table-all.responsive td.no-label:before { + position: absolute; + left: 6px; + content: ""; + font-weight: bold; + } + .hide-small { display: none !important } @@ -831,7 +946,7 @@ input[type='text']{ } /* Medium */ -@media (max-width: 768px) { +@media (min-width: 768px) { .col.m1 { width: 8.33333% } @@ -841,12 +956,12 @@ input[type='text']{ } .col.m3, - .w3-quarter { + .quarter { width: 24.99999% } .col.m4, - .w3-third { + .third { width: 33.33333% } @@ -855,7 +970,7 @@ input[type='text']{ } .col.m6, - .w3-half { + .half { width: 49.99999% } @@ -864,7 +979,7 @@ input[type='text']{ } .col.m8, - .w3-twothird { + .twothird { width: 66.66666% } @@ -970,4 +1085,4 @@ input[type='text']{ #page-top-bar { padding-right: 300px; } -} \ No newline at end of file +} diff --git a/assets/static/css/orig.css b/assets/static/css/orig.css index 592cdb6..c20cc11 100644 --- a/assets/static/css/orig.css +++ b/assets/static/css/orig.css @@ -857,10 +857,6 @@ table.stickyheader.searchopened thead { width: 250px; } - #form-login { - width: 96%; - } - #searchBar { display: none; } @@ -869,56 +865,6 @@ table.stickyheader.searchopened thead { display: block; } - .w3-table-all.responsive table, - .w3-table-all.responsive thead, - .w3-table-all.responsive tbody, - .w3-table-all.responsive th, - .w3-table-all.responsive td, - .w3-table-all.responsive tr { - display: block; - } - - .w3-table-all thead tr { - position: absolute; - top: -9999px; - left: -9999px; - } - - .w3-table-all.responsive tr { - margin-bottom: 10px; - border: 1px solid #ddd; - } - - .w3-table-all.responsive td { - border: none; - position: relative; - padding-left: 30%; - } - - .w3-table-all.responsive td.no-label { - padding-left: 6px; - } - - .w3-table-all.responsive td.title { - color: #2b5797; - font-weight: 400; - font-size: 18px; - } - - .w3-table-all.responsive td:before { - position: absolute; - left: 6px; - content: attr(data-label); - font-weight: bold; - } - - .w3-table-all.responsive td.no-label:before { - position: absolute; - left: 6px; - content: ""; - font-weight: bold; - } - .w3-modal-full { width: 100vw !important; height: 100vh !important; diff --git a/assets/templates/base.tmpl b/assets/templates/base.tmpl index 6a2e45b..168e852 100644 --- a/assets/templates/base.tmpl +++ b/assets/templates/base.tmpl @@ -23,17 +23,17 @@
- + BrainMinder
{{template "page:title" .}}
-
diff --git a/assets/templates/categories/create_title.tmpl b/assets/templates/categories/create_title.tmpl index 6a09da9..6f100de 100644 --- a/assets/templates/categories/create_title.tmpl +++ b/assets/templates/categories/create_title.tmpl @@ -1,8 +1,6 @@ {{define "page:title"}} -
-
New Category
-
-
- -
+
New Category
+
+ +
{{end}} diff --git a/assets/templates/categories/list_title.tmpl b/assets/templates/categories/list_title.tmpl index d5d89ff..1a724c1 100644 --- a/assets/templates/categories/list_title.tmpl +++ b/assets/templates/categories/list_title.tmpl @@ -1,14 +1,7 @@ {{define "page:title"}} -
-
Categories
-
-
- - +
Categories
+
+ +
{{end}} diff --git a/assets/templates/categories/update_title.tmpl b/assets/templates/categories/update_title.tmpl index 14546de..e1dfad5 100644 --- a/assets/templates/categories/update_title.tmpl +++ b/assets/templates/categories/update_title.tmpl @@ -1,8 +1,6 @@ {{define "page:title"}} -
-
Edit Category
-
-
- -
+
Edit Category
+
+ +
{{end}} diff --git a/assets/templates/full.tmpl b/assets/templates/full.tmpl index e7ea875..a14066b 100644 --- a/assets/templates/full.tmpl +++ b/assets/templates/full.tmpl @@ -15,7 +15,7 @@ }} -
+
{{template "page:content" .}}
{{template "partial:footer" .}} diff --git a/assets/templates/items/all_list_title.tmpl b/assets/templates/items/all_list_title.tmpl index 67bfdc5..77f6637 100644 --- a/assets/templates/items/all_list_title.tmpl +++ b/assets/templates/items/all_list_title.tmpl @@ -1,3 +1,6 @@ {{define "page:title"}} -
All Items
+
All Items
+
+ +
{{end}} \ No newline at end of file diff --git a/assets/templates/items/create_title.tmpl b/assets/templates/items/create_title.tmpl index e671c2b..9477dc8 100644 --- a/assets/templates/items/create_title.tmpl +++ b/assets/templates/items/create_title.tmpl @@ -1,3 +1,6 @@ {{define "page:title"}} -
New {{ .type.Title}}
+
New {{ .type.Title}}
+
+ +
{{end}} \ No newline at end of file diff --git a/assets/templates/items/form.tmpl b/assets/templates/items/form.tmpl index 4bf0d92..e880acf 100644 --- a/assets/templates/items/form.tmpl +++ b/assets/templates/items/form.tmpl @@ -17,7 +17,7 @@
-
+

@@ -26,7 +26,7 @@ {{ widget_select "Type_id" "Type" .item.Type_id .types `style="width: 100%"` }}

-
+

{{ widget_checkboxes "Notebooks" "Notebooks" .item.Notebooks .notebooks `` }}

@@ -51,13 +51,13 @@

{{ end }}
-
+

-
+

{{ widget_slim_select "Categories" "Categories" .item.Categories .categories `multiple="true"` }}

diff --git a/assets/templates/items/list.tmpl b/assets/templates/items/list.tmpl index 6953706..7b1ab0f 100644 --- a/assets/templates/items/list.tmpl +++ b/assets/templates/items/list.tmpl @@ -52,7 +52,7 @@
- + diff --git a/assets/templates/items/list_title.tmpl b/assets/templates/items/list_title.tmpl index 4fc4406..89bbad0 100644 --- a/assets/templates/items/list_title.tmpl +++ b/assets/templates/items/list_title.tmpl @@ -1,19 +1,8 @@ {{define "page:title"}} -
-
{{.type.Title}} Items
-
-
- - - +
{{.type.Title}} Items
+
+ + +
{{end}} \ No newline at end of file diff --git a/assets/templates/items/update_title.tmpl b/assets/templates/items/update_title.tmpl index b731aa9..5d809cb 100644 --- a/assets/templates/items/update_title.tmpl +++ b/assets/templates/items/update_title.tmpl @@ -1,3 +1,6 @@ {{define "page:title"}} -
Edit {{.item.Type_title}}
+
Edit {{.item.Type_title}}
+
+ +
{{end}} \ No newline at end of file diff --git a/assets/templates/items/view.tmpl b/assets/templates/items/view.tmpl index 2c7c0ef..1ad56c0 100644 --- a/assets/templates/items/view.tmpl +++ b/assets/templates/items/view.tmpl @@ -33,13 +33,7 @@ {{ range (stringToArray .item.Categories "|")}} {{ $category_name := index $.categoriesMap .}} {{ end }}
@@ -47,14 +41,7 @@ {{ if gt (len .item.Tags) 0 }} Tags {{ range (stringToArray .item.Tags ",")}} {{ end }} {{ end }} @@ -62,13 +49,7 @@ diff --git a/assets/templates/notebooks/create_title.tmpl b/assets/templates/notebooks/create_title.tmpl index 917b41a..96990ff 100644 --- a/assets/templates/notebooks/create_title.tmpl +++ b/assets/templates/notebooks/create_title.tmpl @@ -1,8 +1,6 @@ {{define "page:title"}} -
-
New Notebook
-
-
- -
+
New Notebook
+
+ +
{{end}} diff --git a/assets/templates/notebooks/list_title.tmpl b/assets/templates/notebooks/list_title.tmpl index 00b1e09..e2a295f 100644 --- a/assets/templates/notebooks/list_title.tmpl +++ b/assets/templates/notebooks/list_title.tmpl @@ -1,14 +1,7 @@ {{define "page:title"}} -
-
Notebooks
-
-
- - +
Notebooks
+
+ +
- {{end}} diff --git a/assets/templates/notebooks/update_title.tmpl b/assets/templates/notebooks/update_title.tmpl index 506221d..b749407 100644 --- a/assets/templates/notebooks/update_title.tmpl +++ b/assets/templates/notebooks/update_title.tmpl @@ -1,8 +1,6 @@ {{define "page:title"}} -
-
Edit Notebook
-
-
- -
+
Edit Notebook
+
+ +
{{end}} diff --git a/assets/templates/pages/home_title.tmpl b/assets/templates/pages/home_title.tmpl index b8e5604..4667ffe 100644 --- a/assets/templates/pages/home_title.tmpl +++ b/assets/templates/pages/home_title.tmpl @@ -1,8 +1,6 @@ {{define "page:title"}} -
-
Dashboard
-
-
- -
+
Dashboard
+
+ +
{{ end }} diff --git a/assets/templates/pages/login.tmpl b/assets/templates/pages/login.tmpl index c12efe4..e312220 100644 --- a/assets/templates/pages/login.tmpl +++ b/assets/templates/pages/login.tmpl @@ -2,20 +2,20 @@ {{define "page:content"}} -
+
-

BrainMinder

+

BrainMinder

- +

- +

- +
diff --git a/assets/templates/partials/sidebar.tmpl b/assets/templates/partials/sidebar.tmpl index 85ac623..2e97e60 100644 --- a/assets/templates/partials/sidebar.tmpl +++ b/assets/templates/partials/sidebar.tmpl @@ -4,16 +4,20 @@
-
+