From 9e4ebf4e04274c0f6d2662c4f375cfab708d3fd2 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Tue, 25 Dec 2018 03:39:22 -0400 Subject: [PATCH] New sidebar layout Update UI code to display a fixed location sidebar. The sidebar is also of a fixed width instead of being a certain number columns wide. The action dropdown is also now in a fixed location. Signed-off-by: Roberto Rosario --- .../appearance/static/appearance/css/base.css | 71 +++++++++++---- .../appearance/templates/appearance/base.html | 88 +++++++++---------- .../templates/appearance/menu_main.html | 12 +-- .../templates/appearance/menu_topbar.html | 4 +- .../appearance/templates/appearance/root.html | 2 +- .../forms/widgets/document_page_carousel.html | 4 +- 6 files changed, 102 insertions(+), 79 deletions(-) diff --git a/mayan/apps/appearance/static/appearance/css/base.css b/mayan/apps/appearance/static/appearance/css/base.css index 3e7d71667c..c18c9a370d 100644 --- a/mayan/apps/appearance/static/appearance/css/base.css +++ b/mayan/apps/appearance/static/appearance/css/base.css @@ -67,7 +67,7 @@ } #carousel-container { - overflow-x: scroll; height: 500px; + overflow: scroll; height: 100%; } #carousel-container img { @@ -356,22 +356,23 @@ body { */ /* Hide for mobile, show later */ -.sidebar { +#menu-main { display: none; + background-color: #2c3e50; + border-right: 1px solid #18bc9c; + bottom: 0; + left: 0; + overflow-x: hidden; + overflow-y: auto; + padding-top: 10px; + position: fixed; + top: 51px; + width: 210px; + z-index: 1000; } @media (min-width: 768px) { - .sidebar { - position: fixed; - top: 51px; - bottom: 0; - left: 0; - z-index: 1000; + #menu-main { display: block; - padding-top: 10px; - overflow-x: hidden; - overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */ - background-color: #2c3e50; - border-right: 1px solid #18bc9c; } .navbar-brand { @@ -399,10 +400,6 @@ body { margin-top: 0; } -.sidebar { - width: 210px; -} - .navbar-brand { } @@ -487,3 +484,43 @@ body { .td-container-thumbnail { height: 100px; } + + +/* Side bar */ +#menu-actions { + position: fixed; + right: 5px; + top: 65px; + z-index: 1020; +} + +#viewport { + width: 100%; +} + +.has-sidebar { + padding-right: 0px; +} + +#sidebar { + display: none; +} + +@media (min-width: 768px) { + #sidebar { + bottom: 0; + display: block; + overflow-x: visible; + overflow-y: auto; + padding-top: 10px; + position: fixed; + right: 0; + top: 100px; + width: 150px; + z-index: 1000; + } + + .has-sidebar { + padding-right: 150px; + } +} diff --git a/mayan/apps/appearance/templates/appearance/base.html b/mayan/apps/appearance/templates/appearance/base.html index e983c5cc1b..c1db3d4374 100644 --- a/mayan/apps/appearance/templates/appearance/base.html +++ b/mayan/apps/appearance/templates/appearance/base.html @@ -37,55 +37,53 @@ - {% get_menus_links names='object,sidebar,secondary' sort_results=True as links %} - {% get_menus_links names='facet,list facet' sort_results=True as form_navigation_links %} + {% get_menus_links names='facet,list facet' sort_results=True as links_facet %} + + +
- {% if links or form_navigation_links %} -
- {% else %} -
- {% endif %} + - {% if links or form_navigation_links %} -
- {% endif %} - - {% if links %} -
- - -
-
- {% endif %} - - {% if form_navigation_links %} -
- {% if form_navigation_links %} - {% for object_navigation_links in form_navigation_links %} + {% if links_facet %} +
{% endif %}
diff --git a/mayan/apps/appearance/templates/appearance/menu_main.html b/mayan/apps/appearance/templates/appearance/menu_main.html index 9a8d3b9c8d..af9132bc75 100644 --- a/mayan/apps/appearance/templates/appearance/menu_main.html +++ b/mayan/apps/appearance/templates/appearance/menu_main.html @@ -11,12 +11,8 @@ {% get_menu_links name='main' as menu_links %} {% for link_set in menu_links %} {% for link in link_set %} - {% with 'true' as as_li %} - {% with 'true' as hide_active_anchor %} {% with 'active' as li_class_active %} - {% with 'first' as li_class_first %} {% with ' ' as link_classes %} - {% if link|get_type == "" %}
{% else %} -
- {% endif %} - - {% endwith %} - {% endwith %} - {% endwith %} {% endwith %} {% endwith %} {% endfor %} diff --git a/mayan/apps/appearance/templates/appearance/menu_topbar.html b/mayan/apps/appearance/templates/appearance/menu_topbar.html index f4ed933c7d..99d0890501 100644 --- a/mayan/apps/appearance/templates/appearance/menu_topbar.html +++ b/mayan/apps/appearance/templates/appearance/menu_topbar.html @@ -7,7 +7,7 @@