From c0d336a8e0a7bc408771ac67c79d05a1781aff49 Mon Sep 17 00:00:00 2001 From: frederikpyt Date: Thu, 20 Aug 2020 14:56:11 +0200 Subject: [PATCH] v0.10.11 - Collapse-able admin menu --- .idea/encodings.xml | 4 + skolehjem/public/css/admin.css | 13 ++- skolehjem/public/images/icons/Menuplan.svg | 10 ++- .../public/images/icons/Vejledninger.svg | 80 +------------------ skolehjem/public/images/icons/feedback.svg | 55 +++++++++++++ skolehjem/public/images/icons/location.svg | 49 ++++++++++++ skolehjem/public/images/icons/news.svg | 3 + skolehjem/public/images/icons/phone.svg | 54 +++++++++++++ skolehjem/public/images/icons/role.svg | 1 + skolehjem/public/images/icons/wash.svg | 1 + skolehjem/public/images/icons/wash_res.svg | 12 +++ skolehjem/resources/sass/admin/nav/nav.scss | 13 ++- .../views/admin/layout/base.blade.php | 75 ++++++++++++++--- 13 files changed, 269 insertions(+), 101 deletions(-) create mode 100644 skolehjem/public/images/icons/feedback.svg create mode 100644 skolehjem/public/images/icons/location.svg create mode 100644 skolehjem/public/images/icons/news.svg create mode 100644 skolehjem/public/images/icons/phone.svg create mode 100644 skolehjem/public/images/icons/role.svg create mode 100644 skolehjem/public/images/icons/wash.svg create mode 100644 skolehjem/public/images/icons/wash_res.svg diff --git a/.idea/encodings.xml b/.idea/encodings.xml index f826775..648e66d 100644 --- a/.idea/encodings.xml +++ b/.idea/encodings.xml @@ -3,8 +3,12 @@ + + + + \ No newline at end of file diff --git a/skolehjem/public/css/admin.css b/skolehjem/public/css/admin.css index d2faecf..5bc1a23 100644 --- a/skolehjem/public/css/admin.css +++ b/skolehjem/public/css/admin.css @@ -6656,7 +6656,8 @@ main { .nav { width: 15%; height: 100%; - min-width: 194px; + min-width: calc(1.5em + 4rem); + transition: width 0.5s; } .segment > h3 { @@ -6669,14 +6670,18 @@ main { .segment > h3 > a { padding: 1rem 2rem; - display: block; + display: flex; +} + +.segment > h3 > a > img { + width: 1.5em; } .segment > div { - padding: 0 1.25rem 0 1.25rem; + /*padding: 0 1.25rem 0 1.25rem; width: calc(100% - 2.5rem); align-items: center; - margin-bottom: 0.5rem; + margin-bottom: .5rem;*/ } .segment > h3:hover { diff --git a/skolehjem/public/images/icons/Menuplan.svg b/skolehjem/public/images/icons/Menuplan.svg index 5fdc5a0..643334e 100644 --- a/skolehjem/public/images/icons/Menuplan.svg +++ b/skolehjem/public/images/icons/Menuplan.svg @@ -1 +1,9 @@ -Artboard 2 \ No newline at end of file + + + + + Artboard 2 + + + diff --git a/skolehjem/public/images/icons/Vejledninger.svg b/skolehjem/public/images/icons/Vejledninger.svg index d6fc7ff..76483d1 100644 --- a/skolehjem/public/images/icons/Vejledninger.svg +++ b/skolehjem/public/images/icons/Vejledninger.svg @@ -1,79 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/skolehjem/public/images/icons/feedback.svg b/skolehjem/public/images/icons/feedback.svg new file mode 100644 index 0000000..ffe8847 --- /dev/null +++ b/skolehjem/public/images/icons/feedback.svg @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/skolehjem/public/images/icons/location.svg b/skolehjem/public/images/icons/location.svg new file mode 100644 index 0000000..6587466 --- /dev/null +++ b/skolehjem/public/images/icons/location.svg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/skolehjem/public/images/icons/news.svg b/skolehjem/public/images/icons/news.svg new file mode 100644 index 0000000..fb9ee37 --- /dev/null +++ b/skolehjem/public/images/icons/news.svg @@ -0,0 +1,3 @@ + diff --git a/skolehjem/public/images/icons/phone.svg b/skolehjem/public/images/icons/phone.svg new file mode 100644 index 0000000..45bb6c9 --- /dev/null +++ b/skolehjem/public/images/icons/phone.svg @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/skolehjem/public/images/icons/role.svg b/skolehjem/public/images/icons/role.svg new file mode 100644 index 0000000..549dae0 --- /dev/null +++ b/skolehjem/public/images/icons/role.svg @@ -0,0 +1 @@ + diff --git a/skolehjem/public/images/icons/wash.svg b/skolehjem/public/images/icons/wash.svg new file mode 100644 index 0000000..b0e800d --- /dev/null +++ b/skolehjem/public/images/icons/wash.svg @@ -0,0 +1 @@ + diff --git a/skolehjem/public/images/icons/wash_res.svg b/skolehjem/public/images/icons/wash_res.svg new file mode 100644 index 0000000..e07384e --- /dev/null +++ b/skolehjem/public/images/icons/wash_res.svg @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/skolehjem/resources/sass/admin/nav/nav.scss b/skolehjem/resources/sass/admin/nav/nav.scss index b540528..f0ea747 100644 --- a/skolehjem/resources/sass/admin/nav/nav.scss +++ b/skolehjem/resources/sass/admin/nav/nav.scss @@ -1,7 +1,8 @@ .nav { width: 15%; height: 100%; - min-width: 194px; + min-width: calc(1.5em + 4rem); + transition: width .5s; } .segment > h3 { @@ -14,14 +15,18 @@ .segment > h3 > a { padding: 1rem 2rem; - display: block; + display: flex; +} + +.segment > h3 > a > img { + width: 1.5em; } .segment > div { - padding: 0 1.25rem 0 1.25rem; + /*padding: 0 1.25rem 0 1.25rem; width: calc(100% - 2.5rem); align-items: center; - margin-bottom: .5rem; + margin-bottom: .5rem;*/ } .segment > h3:hover { diff --git a/skolehjem/resources/views/admin/layout/base.blade.php b/skolehjem/resources/views/admin/layout/base.blade.php index 4cf45e2..901b49e 100644 --- a/skolehjem/resources/views/admin/layout/base.blade.php +++ b/skolehjem/resources/views/admin/layout/base.blade.php @@ -11,41 +11,47 @@ @yield("header")