diff --git a/frappe/patches/v5_0/style_settings_to_website_theme.py b/frappe/patches/v5_0/style_settings_to_website_theme.py index 0325079032..392d734898 100644 --- a/frappe/patches/v5_0/style_settings_to_website_theme.py +++ b/frappe/patches/v5_0/style_settings_to_website_theme.py @@ -9,15 +9,19 @@ def execute(): frappe.delete_doc("website", "doctype", "style_settings") def migrate_style_settings(): - style_settings = frappe.get_doc("Style Settings", "Style Settings") + style_settings = frappe.db.get_singles_dict("Style Settings") standard_website_theme = frappe.get_doc("Website Theme", "Standard") website_theme = frappe.copy_doc(standard_website_theme) website_theme.custom = 1 website_theme.theme = _("Custom") - map_color_fields(style_settings, website_theme) - map_other_fields(style_settings, website_theme) + if style_settings: + map_color_fields(style_settings, website_theme) + map_other_fields(style_settings, website_theme) + + website_settings = frappe.get_doc("Website Settings", "Website Settings") + website_theme.no_sidebar = website_settings.no_sidebar website_theme.save() website_theme.use_theme() @@ -28,8 +32,6 @@ def map_color_fields(style_settings, website_theme): "page_links": "link_color", "top_bar_background": "top_bar_color", "top_bar_foreground": "top_bar_text_color", - "page_header_background": "page_header_color", - "page_header_color": "page_header_text_color", "footer_background": "footer_color", "footer_color": "footer_text_color", } diff --git a/frappe/public/build.json b/frappe/public/build.json index 0d69b8ee74..b78eab29ad 100644 --- a/frappe/public/build.json +++ b/frappe/public/build.json @@ -1,6 +1,7 @@ { "css/frappe-web.css": [ "public/css/font-awesome.css", + "public/css/octicons/octicons.css", "public/css/nprogress.css", "public/css/website.css" ], diff --git a/frappe/public/css/desk.css b/frappe/public/css/desk.css index 460f712ae5..b73325874c 100644 --- a/frappe/public/css/desk.css +++ b/frappe/public/css/desk.css @@ -1,20 +1,3 @@ -html { - min-height: 100%; -} -body { - height: 100%; - margin: 0px; - padding: 0px !important; -} -html, -body { - overflow-x: hidden; - /* Prevent scroll on narrow devices */ -} -.desk-main-section-overlay { - display: none; - cursor: pointer; -} a, a:hover, a:active, diff --git a/frappe/public/css/form.css b/frappe/public/css/form.css index c8abfdd6fa..f66b01670d 100644 --- a/frappe/public/css/form.css +++ b/frappe/public/css/form.css @@ -146,3 +146,8 @@ padding-right: 15px; } } +select.form-control { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} diff --git a/frappe/public/css/mobile.css b/frappe/public/css/mobile.css index 08a773f486..ab0af7edc1 100644 --- a/frappe/public/css/mobile.css +++ b/frappe/public/css/mobile.css @@ -1,3 +1,54 @@ +html, +body { + height: 100%; + /* The html and body elements cannot have any padding or margin. */ + overflow-x: hidden; + /* Prevent scroll on narrow devices */ + margin: 0px; + padding: 0px !important; +} +.offcanvas-main-section-overlay { + display: none; + cursor: pointer; + opacity: 0.5; +} +.sidebar-padding { + padding: 12px 14px; +} +.offcanvas .sidebar .sidebar-menu > li > a, +.offcanvas .sidebar .dropdown-menu > li > a { + padding: 12px 14px; + display: block; + whitespace: nowrap; + transition: 0.2s; + text-decoration: none !important; +} +.offcanvas .sidebar .dropdown-menu { + padding: 0px; + font-size: inherit; +} +.offcanvas .sidebar .dropdown-menu > li > a { + padding-left: 28px; +} +.offcanvas .sidebar .divider { + height: 1px; + overflow: hidden; + background-color: #ebeff2; + width: 100%; + margin: 0px; +} +.offcanvas .sidebar .badge { + right: 15px !important; + top: 11px !important; +} +.offcanvas .sidebar .sidebar-menu > li > a:hover, +.offcanvas .sidebar .dropdown-menu > li > a:hover, +.offcanvas .sidebar .sidebar-menu > li > a:focus, +.offcanvas .sidebar .dropdown-menu > li > a:focus, +.offcanvas .sidebar .sidebar-menu > li > a:active, +.offcanvas .sidebar .dropdown-menu > li > a:active { + background-color: #f0f4f7; +} @media (max-width: 767px) { .modal .modal-dialog { margin: 0px; @@ -21,6 +72,25 @@ .modal .modal-body .form-layout { margin: -15px; } + .modal .file-upload .input-upload { + width: 100%; + text-align: center; + } + .modal .file-upload .input-upload .btn-browse { + width: 100%; + } + .modal .file-upload .web-link-wrapper { + display: block; + width: 100% !important; + text-align: center; + } + .modal .file-upload .web-link-wrapper .file-upload-or { + display: block; + margin: 15px 24px; + } + .modal .file-upload .web-link-wrapper .input-link { + width: 100% !important; + } .layout-main-section-wrapper { padding: 0px; } @@ -249,13 +319,13 @@ .offcanvas { transition: 0.25s; } - .desk-main-section-overlay { + .offcanvas-main-section-overlay { bottom: 0; position: fixed; } - .desk-container, + .offcanvas-container, .offcanvas, - .desk-main-section { + .offcanvas-main-section { position: absolute; left: 0; right: 0; @@ -266,8 +336,8 @@ .offcanvas.active-right { position: fixed; } - .offcanvas.active-left .desk-main-section-overlay, - .offcanvas.active-right .desk-main-section-overlay { + .offcanvas.active-left .offcanvas-main-section-overlay, + .offcanvas.active-right .offcanvas-main-section-overlay { z-index: 1031; display: block; bottom: 0; diff --git a/frappe/public/css/offcanvas.css b/frappe/public/css/offcanvas.css new file mode 100644 index 0000000000..07849066f7 --- /dev/null +++ b/frappe/public/css/offcanvas.css @@ -0,0 +1,51 @@ +html, +body { + height: 100%; + /* The html and body elements cannot have any padding or margin. */ + overflow-x: hidden; + /* Prevent scroll on narrow devices */ + margin: 0px; + padding: 0px !important; +} +.offcanvas-main-section-overlay { + display: none; + cursor: pointer; + opacity: 0.5; +} +.sidebar-padding { + padding: 12px 14px; +} +.offcanvas .sidebar .sidebar-menu > li > a, +.offcanvas .sidebar .dropdown-menu > li > a { + padding: 12px 14px; + display: block; + whitespace: nowrap; + transition: 0.2s; + text-decoration: none !important; +} +.offcanvas .sidebar .dropdown-menu { + padding: 0px; + font-size: inherit; +} +.offcanvas .sidebar .dropdown-menu > li > a { + padding-left: 28px; +} +.offcanvas .sidebar .divider { + height: 1px; + overflow: hidden; + background-color: #ebeff2; + width: 100%; + margin: 0px; +} +.offcanvas .sidebar .badge { + right: 15px !important; + top: 11px !important; +} +.offcanvas .sidebar .sidebar-menu > li > a:hover, +.offcanvas .sidebar .dropdown-menu > li > a:hover, +.offcanvas .sidebar .sidebar-menu > li > a:focus, +.offcanvas .sidebar .dropdown-menu > li > a:focus, +.offcanvas .sidebar .sidebar-menu > li > a:active, +.offcanvas .sidebar .dropdown-menu > li > a:active { + background-color: #f0f4f7; +} diff --git a/frappe/public/css/sidebar.css b/frappe/public/css/sidebar.css index bc144f20d3..95e935322a 100644 --- a/frappe/public/css/sidebar.css +++ b/frappe/public/css/sidebar.css @@ -1,50 +1,77 @@ -.hide-form-sidebar .form-sidebar { - display: none !important; -} -body[data-route=""] .main-menu .desk-sidebar, -body[data-route="desk"] .main-menu .desk-sidebar { - display: block !important; -} -body[data-route=""] .main-menu .form-sidebar, -body[data-route="desk"] .main-menu .form-sidebar { - display: none !important; -} -body[data-route^="List"] .main-menu .list-sidebar { - display: block !important; -} -body[data-route^="List"] .main-menu .form-sidebar { - display: none !important; -} -body[data-route^="Module"] .main-menu .module-sidebar { - display: block !important; -} -body[data-route^="Module"] .main-menu .form-sidebar { - display: none !important; +html, +body { + height: 100%; + /* The html and body elements cannot have any padding or margin. */ + overflow-x: hidden; + /* Prevent scroll on narrow devices */ + margin: 0px; + padding: 0px !important; +} +.offcanvas-main-section-overlay { + display: none; + cursor: pointer; + opacity: 0.5; } .sidebar-padding { padding: 12px 14px; } -.offcanvas .sidebar .sidebar-menu > li > a { +.offcanvas .sidebar .sidebar-menu > li > a, +.offcanvas .sidebar .dropdown-menu > li > a { padding: 12px 14px; display: block; whitespace: nowrap; transition: 0.2s; + text-decoration: none !important; +} +.offcanvas .sidebar .dropdown-menu { + padding: 0px; + font-size: inherit; +} +.offcanvas .sidebar .dropdown-menu > li > a { + padding-left: 28px; } .offcanvas .sidebar .divider { height: 1px; overflow: hidden; background-color: #ebeff2; width: 100%; + margin: 0px; } .offcanvas .sidebar .badge { right: 15px !important; top: 11px !important; } .offcanvas .sidebar .sidebar-menu > li > a:hover, +.offcanvas .sidebar .dropdown-menu > li > a:hover, .offcanvas .sidebar .sidebar-menu > li > a:focus, -.offcanvas .sidebar .sidebar-menu > li > a:active { +.offcanvas .sidebar .dropdown-menu > li > a:focus, +.offcanvas .sidebar .sidebar-menu > li > a:active, +.offcanvas .sidebar .dropdown-menu > li > a:active { background-color: #f0f4f7; } +.hide-form-sidebar .form-sidebar { + display: none !important; +} +body[data-route=""] .main-menu .desk-sidebar, +body[data-route="desk"] .main-menu .desk-sidebar { + display: block !important; +} +body[data-route=""] .main-menu .form-sidebar, +body[data-route="desk"] .main-menu .form-sidebar { + display: none !important; +} +body[data-route^="List"] .main-menu .list-sidebar { + display: block !important; +} +body[data-route^="List"] .main-menu .form-sidebar { + display: none !important; +} +body[data-route^="Module"] .main-menu .module-sidebar { + display: block !important; +} +body[data-route^="Module"] .main-menu .form-sidebar { + display: none !important; +} .layout-side-section { font-size: 12px; padding-right: 0px; diff --git a/frappe/public/css/website.css b/frappe/public/css/website.css index 7b317f9d96..2c9872334c 100644 --- a/frappe/public/css/website.css +++ b/frappe/public/css/website.css @@ -1,7 +1,60 @@ -@media (min-width: 768px) { - .login-wrapper { - border-right: 1px solid #f2f2f2; - } +html, +body { + height: 100%; + /* The html and body elements cannot have any padding or margin. */ + overflow-x: hidden; + /* Prevent scroll on narrow devices */ + margin: 0px; + padding: 0px !important; +} +.offcanvas-main-section-overlay { + display: none; + cursor: pointer; + opacity: 0.5; +} +.sidebar-padding { + padding: 12px 14px; +} +.offcanvas .sidebar .sidebar-menu > li > a, +.offcanvas .sidebar .dropdown-menu > li > a { + padding: 12px 14px; + display: block; + whitespace: nowrap; + transition: 0.2s; + text-decoration: none !important; +} +.offcanvas .sidebar .dropdown-menu { + padding: 0px; + font-size: inherit; +} +.offcanvas .sidebar .dropdown-menu > li > a { + padding-left: 28px; +} +.offcanvas .sidebar .divider { + height: 1px; + overflow: hidden; + background-color: #ebeff2; + width: 100%; + margin: 0px; +} +.offcanvas .sidebar .badge { + right: 15px !important; + top: 11px !important; +} +.offcanvas .sidebar .sidebar-menu > li > a:hover, +.offcanvas .sidebar .dropdown-menu > li > a:hover, +.offcanvas .sidebar .sidebar-menu > li > a:focus, +.offcanvas .sidebar .dropdown-menu > li > a:focus, +.offcanvas .sidebar .sidebar-menu > li > a:active, +.offcanvas .sidebar .dropdown-menu > li > a:active { + background-color: #f0f4f7; +} +html, +body { + height: 100%; + /* The html and body elements cannot have any padding or margin. */ + overflow-x: hidden; + /* Prevent scroll on narrow devices */ } a { cursor: pointer; @@ -152,6 +205,7 @@ img { } } /* the element that this class is applied to, should have a max width for this to work*/ +.text-ellipsis, .ellipsis { white-space: nowrap; overflow: hidden; @@ -197,9 +251,6 @@ fieldset { .page-container { padding: 0px; } -.page-content { - padding-bottom: 30px; -} div[data-html-block="content"] { padding-right: 15px; } @@ -212,33 +263,30 @@ div[data-html-block="content"] { } .page-sidebar { border-left: 1px solid #d1d8dd; - padding-left: 15px; + padding: 0px 15px; + position: relative; + left: -1px; } -.sidebar-item { +.page-sidebar .sidebar-item { margin: 0px; padding: 5px 0px; border: none; color: #8d99a6; font-size: 12px; } -.sidebar-item:first-child { +.page-sidebar .sidebar-item:first-child { padding-top: 10px; } -.sidebar-item:last-child { +.page-sidebar .sidebar-item:last-child { padding-bottom: 10px; } -.sidebar-item a { +.page-sidebar .sidebar-item a { color: #8d99a6; } -.sidebar-item a.active { +.page-sidebar .sidebar-item a.active { color: #000; font-weight: bold; } -html, -body { - height: 100%; - /* The html and body elements cannot have any padding or margin. */ -} .page-footer { padding: 15px 0px; border-top: 1px solid #d1d8dd; @@ -281,12 +329,6 @@ textarea { .post-content img { margin: 10px 0px; } -.assigned-label, -.event-label { - display: inline-block; - padding: .4em .6em .4em; - margin-bottom: 7px; -} a.no-decoration { text-decoration: none; color: inherit; @@ -310,16 +352,6 @@ a.active { .breadcrumb > .active { color: #8d99a6; } -@media (max-width: 767px) { - .page-sidebar { - padding-bottom: 15px; - margin-bottom: 15px; - border-bottom: 1px solid #eee; - } - .page-sidebar .sidebar-item { - margin-left: 17px; - } -} .post:last-child { border-bottom: none; } @@ -363,3 +395,86 @@ a.text-extra-muted:focus { color: inherit; border-bottom: 1px solid #8d99a6; } +.page-content { + min-height: 400px; +} +@media (max-width: 767px) { + .page-content { + min-height: 200px; + border-right: none !important; + } + .offcanvas { + transition: 0.25s; + } + .offcanvas-main-section-overlay { + bottom: 0; + position: fixed; + } + .offcanvas-container, + .offcanvas, + .offcanvas-main-section { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + } + .offcanvas.active-left, + .offcanvas.active-right { + position: fixed; + } + .offcanvas.active-left .offcanvas-main-section-overlay, + .offcanvas.active-right .offcanvas-main-section-overlay { + z-index: 1031; + display: block; + bottom: 0; + } + .offcanvas.active-left { + -webkit-transform: translate3d(75%, 0, 0); + transform: translate3d(75%, 0, 0); + } + .offcanvas.active-right { + -webkit-transform: translate3d(-75%, 0, 0); + transform: translate3d(-75%, 0, 0); + } + .offcanvas .sidebar { + position: fixed; + top: 0; + bottom: 0; + width: 75%; + /* 9 columns */ + overflow-x: hidden; + overflow-y: auto; + font-size: 12px; + } + .offcanvas .sidebar-right { + left: 100%; + border-left: 1px solid #d1d8dd; + } + .offcanvas .sidebar-left { + right: 100%; + border-right: 1px solid #d1d8dd; + } + .offcanvas .sidebar-menu { + margin-bottom: 0; + } + .offcanvas ul { + margin: 0px; + } + .offcanvas .sidebar-page-sidebar { + border-top: 1px solid #d1d8dd; + } + .offcanvas .sidebar-label { + text-transform: uppercase; + color: #8d99a6; + font-size: 85%; + margin: 0px; + font-weight: bold; + padding: 10px 15px 0px; + } +} +@media (min-width: 768px) { + .login-wrapper { + border-right: 1px solid #f2f2f2; + } +} diff --git a/frappe/public/js/frappe/desk.js b/frappe/public/js/frappe/desk.js index 22ded47e9d..92ffc210c2 100644 --- a/frappe/public/js/frappe/desk.js +++ b/frappe/public/js/frappe/desk.js @@ -173,7 +173,7 @@ frappe.Application = Class.extend({ $(".offcanvas").removeClass("active-left active-right"); }); - $(".desk-main-section-overlay").on("click", function() { + $(".offcanvas-main-section-overlay").on("click", function() { $(".offcanvas").removeClass("active-left active-right"); }); }, diff --git a/frappe/public/less/desk.less b/frappe/public/less/desk.less index 3f36b72e25..da1840d702 100644 --- a/frappe/public/less/desk.less +++ b/frappe/public/less/desk.less @@ -1,26 +1,6 @@ @import "variables.less"; @import "mixins.less"; -html { - min-height: 100%; -} - -body { - height: 100%; - margin: 0px; - padding: 0px !important; -} - -html, -body { - overflow-x: hidden; /* Prevent scroll on narrow devices */ -} - -.desk-main-section-overlay { - display: none; - cursor: pointer; -} - a, a:hover, a:active, a:focus { outline: 0; } diff --git a/frappe/public/less/form.less b/frappe/public/less/form.less index 9402db33c5..79b3cb52f6 100644 --- a/frappe/public/less/form.less +++ b/frappe/public/less/form.less @@ -107,9 +107,9 @@ } .timeline-item .reply { - margin-top: 5px; - // padding-left: 24px; - // border-left: 8px solid #d8dfe6; + margin-top: 5px; + // padding-left: 24px; + // border-left: 8px solid #d8dfe6; } .timeline-item h6, .timeline-head h6 { @@ -186,3 +186,9 @@ padding-right: 15px; } } + +select.form-control { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} diff --git a/frappe/public/less/mobile.less b/frappe/public/less/mobile.less index 83c9975f30..dac6110237 100644 --- a/frappe/public/less/mobile.less +++ b/frappe/public/less/mobile.less @@ -1,5 +1,6 @@ @import "variables.less"; @import "mixins.less"; +@import "offcanvas.less"; @media(max-width: 767px) { .modal { @@ -28,6 +29,32 @@ .modal-body .form-layout { margin: -15px; } + + .file-upload { + .input-upload { + width: 100%; + text-align: center; + + .btn-browse { + width: 100%; + } + } + + .web-link-wrapper { + display: block; + width: 100% !important; + text-align: center; + + .file-upload-or { + display: block; + margin: 15px 24px; + } + + .input-link { + width: 100% !important; + } + } + } } .layout-main-section-wrapper { @@ -325,72 +352,7 @@ margin: 0px; } - // Off Canvas - .offcanvas { - transition: 0.25s; - } - - .desk-main-section-overlay { - bottom: 0; - position: fixed; - } - - .desk-container, - .offcanvas, - .desk-main-section { - position: absolute; - left: 0; - right: 0; - top: 0; - bottom: 0; - } - - .offcanvas.active-left, - .offcanvas.active-right { - position: fixed; - } - - .offcanvas.active-left .desk-main-section-overlay, - .offcanvas.active-right .desk-main-section-overlay { - z-index: 1031; - display: block; - bottom: 0; - } - - .offcanvas.active-left { - -webkit-transform: translate3d(75%, 0, 0); - transform: translate3d(75%, 0, 0); - } - - .offcanvas.active-right { - -webkit-transform: translate3d(-75%, 0, 0); - transform: translate3d(-75%, 0, 0); - } - - .offcanvas .sidebar { - position: fixed; - // position: absolute; - top: 0; - bottom: 0; - width: 75%; /* 9 columns */ - overflow-x: hidden; - overflow-y: auto; - font-size: 12px; - } - - .offcanvas .sidebar-right { - left: 100%; - border-left: 1px solid @border-color; - } - - .offcanvas .sidebar-left { - right: 100%; - border-right: 1px solid @border-color; - } - - .offcanvas .sidebar-menu { - margin-bottom: 0; - } + .offcanvas-mobile-mixin(); .sidebar .form-group { margin-bottom: 0px; diff --git a/frappe/public/less/offcanvas.less b/frappe/public/less/offcanvas.less new file mode 100644 index 0000000000..32193d8ac9 --- /dev/null +++ b/frappe/public/less/offcanvas.less @@ -0,0 +1,131 @@ +@import "variables.less"; + +html, +body { + height: 100%; + /* The html and body elements cannot have any padding or margin. */ + overflow-x: hidden; /* Prevent scroll on narrow devices */ + margin: 0px; + padding: 0px !important; + +} + +.offcanvas-main-section-overlay { + display: none; + cursor: pointer; + opacity: 0.5; +} + +.sidebar-padding { + padding: 12px 14px; +} + +.offcanvas .sidebar { + .sidebar-menu > li > a, + .dropdown-menu > li > a { + .sidebar-padding; + display: block; + whitespace: nowrap; + transition: 0.2s; + text-decoration: none !important; + } + + .dropdown-menu { + padding: 0px; + font-size: inherit; + } + + .dropdown-menu > li > a { + padding-left: 28px; + } + + .divider { + height: 1px; + overflow: hidden; + background-color: @navbar-default-border; + width: 100%; + margin: 0px; + } + + .badge { + right: 15px !important; + top: 11px !important; + } +} + +.offcanvas .sidebar .sidebar-menu > li > a&, +.offcanvas .sidebar .dropdown-menu > li > a& { + &:hover, + &:focus, + &:active { + background-color: @btn-bg; + } +} + +.offcanvas-mobile-mixin() { + .offcanvas { + transition: 0.25s; + } + + .offcanvas-main-section-overlay { + bottom: 0; + position: fixed; + } + + .offcanvas-container, + .offcanvas, + .offcanvas-main-section { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + } + + .offcanvas.active-left, + .offcanvas.active-right { + position: fixed; + } + + .offcanvas.active-left .offcanvas-main-section-overlay, + .offcanvas.active-right .offcanvas-main-section-overlay { + z-index: 1031; + display: block; + bottom: 0; + } + + .offcanvas.active-left { + -webkit-transform: translate3d(75%, 0, 0); + transform: translate3d(75%, 0, 0); + } + + .offcanvas.active-right { + -webkit-transform: translate3d(-75%, 0, 0); + transform: translate3d(-75%, 0, 0); + } + + .offcanvas .sidebar { + position: fixed; + // position: absolute; + top: 0; + bottom: 0; + width: 75%; /* 9 columns */ + overflow-x: hidden; + overflow-y: auto; + font-size: 12px; + } + + .offcanvas .sidebar-right { + left: 100%; + border-left: 1px solid @border-color; + } + + .offcanvas .sidebar-left { + right: 100%; + border-right: 1px solid @border-color; + } + + .offcanvas .sidebar-menu { + margin-bottom: 0; + } +} diff --git a/frappe/public/less/sidebar.less b/frappe/public/less/sidebar.less index b727bfba60..fe718e8f14 100644 --- a/frappe/public/less/sidebar.less +++ b/frappe/public/less/sidebar.less @@ -1,5 +1,6 @@ @import "variables.less"; @import "mixins.less"; +@import "offcanvas.less"; .hide-form-sidebar { .form-sidebar { @@ -32,39 +33,6 @@ body[data-route^="Module"] .main-menu { .hide-form-sidebar; } -.sidebar-padding { - padding: 12px 14px; -} - -.offcanvas .sidebar { - .sidebar-menu > li > a { - .sidebar-padding; - display: block; - whitespace: nowrap; - transition: 0.2s; - } - - .divider { - height: 1px; - overflow: hidden; - background-color: @navbar-default-border; - width: 100%; - } - - .badge { - right: 15px !important; - top: 11px !important; - } -} - -.offcanvas .sidebar .sidebar-menu > li > a& { - &:hover, - &:focus, - &:active { - background-color: @btn-bg; - } -} - .layout-side-section { font-size: @text-medium; diff --git a/frappe/public/less/website.less b/frappe/public/less/website.less index c1082faed5..b9f3244597 100644 --- a/frappe/public/less/website.less +++ b/frappe/public/less/website.less @@ -1,21 +1,19 @@ @import "variables.less"; +@import "offcanvas.less"; -@media (min-width: 768px) { - .login-wrapper { - border-right: 1px solid #f2f2f2; - } +html, +body { + height: 100%; + /* The html and body elements cannot have any padding or margin. */ + overflow-x: hidden; /* Prevent scroll on narrow devices */ } -// h1, h2, h3, h4, h5 { -// font-weight: 400; -// } - a { cursor: pointer; } a, a:hover, a:active, a:focus { - outline: 0; + outline: 0; } img { @@ -140,15 +138,15 @@ img { } .carousel-control .icon { - position: absolute; - top: 50%; - left: 50%; - z-index: 5; - display: inline-block; - width: 20px; - height: 20px; - margin-top: -10px; - margin-left: -10px; + position: absolute; + top: 50%; + left: 50%; + z-index: 5; + display: inline-block; + width: 20px; + height: 20px; + margin-top: -10px; + margin-left: -10px; } .hidden-xs-inline, .hidden-xs-inline-block { @@ -179,6 +177,7 @@ img { } /* the element that this class is applied to, should have a max width for this to work*/ +.text-ellipsis, .ellipsis { white-space: nowrap; overflow: hidden; @@ -205,14 +204,14 @@ fieldset { } .message-overlay { - position: fixed; - top: 0; - left: 0; - width: 100%; + position: fixed; + top: 0; + left: 0; + width: 100%; height: 100%; - z-index: 1040; + z-index: 1040; background-color: #fff; - display: table; + display: table; } .message-overlay .content { display: table-cell; @@ -235,7 +234,7 @@ fieldset { } .page-content { - padding-bottom: 30px; + } div[data-html-block="content"] { @@ -250,67 +249,64 @@ div[data-html-block="content"] { .page-content { border-right: 1px solid @border-color; } + .page-sidebar { border-left: 1px solid @border-color; - padding-left: 15px; -} - -.sidebar-item { - margin: 0px; - padding: 5px 0px; - border: none; - color: @text-muted; - font-size: 12px; -} - -.sidebar-item:first-child { - padding-top: 10px; -} -.sidebar-item:last-child { - padding-bottom: 10px; -} + padding: 0px 15px; + position: relative; + left: -1px; + + .sidebar-item { + margin: 0px; + padding: 5px 0px; + border: none; + color: @text-muted; + font-size: 12px; + } -.sidebar-item a { - color: @text-muted; -} + .sidebar-item:first-child { + padding-top: 10px; + } + .sidebar-item:last-child { + padding-bottom: 10px; + } -.sidebar-item a.active { - color: #000; - font-weight: bold; -} + .sidebar-item a { + color: @text-muted; + } -html, -body { - height: 100%; - /* The html and body elements cannot have any padding or margin. */ + .sidebar-item a.active { + color: #000; + font-weight: bold; + } } .page-footer { padding: 15px 0px; - border-top: 1px solid @border-color; + border-top: 1px solid @border-color; } /* post and post list */ .web-list-item { - padding: 15px 0px; + padding: 15px 0px; border-bottom: 1px solid @border-color; margin-right: -30px; padding-right: 30px; h3 { - margin: 0 0 5px 0; + margin: 0 0 5px 0; a { - color: inherit !important; - text-decoration: none; + color: inherit !important; + text-decoration: none; } } } .web-list-item:last-child { - border-bottom: none; + border-bottom: none; } textarea { @@ -340,12 +336,6 @@ textarea { margin: 10px 0px; } -.assigned-label, .event-label { - display: inline-block; - padding: .4em .6em .4em; - margin-bottom: 7px; -} - a.no-decoration { text-decoration: none; color: inherit; @@ -357,7 +347,7 @@ a.active { } :target { - background-color: #ffa; + background-color: #ffa; } .page-breadcrumbs .breadcrumb { @@ -375,18 +365,6 @@ a.active { color: @text-muted; } -@media (max-width: 767px) { - .page-sidebar { - padding-bottom: 15px; - margin-bottom: 15px; - border-bottom: 1px solid #eee; - } - - .page-sidebar .sidebar-item { - margin-left: 17px; - } -} - .post:last-child { border-bottom: none; } @@ -406,13 +384,13 @@ a.active { a.grey, .nav-pills a, .control-value a, .data-row a { color: inherit; - border-bottom: 1px solid transparent; - margin-bottom: 0.4em; + border-bottom: 1px solid transparent; + margin-bottom: 0.4em; } a.grey:hover, .nav-pills a:hover, .control-value a:hover, .data-row a:hover { - border-bottom: 1px solid @grey-link-color; - color: @grey-link-color; + border-bottom: 1px solid @grey-link-color; + color: @grey-link-color; } .text-muted { @@ -435,3 +413,42 @@ a.text-extra-muted:focus { border-bottom: 1px solid @text-muted; } +.page-content { + min-height: 400px; +} + +@media (max-width: 767px) { + .page-content { + min-height: 200px; + border-right: none !important; + } + + .offcanvas-mobile-mixin(); + + .offcanvas { + ul { + margin: 0px; + } + + .sidebar-page-sidebar { + border-top: 1px solid @border-color; + } + + .sidebar-label { + text-transform: uppercase; + color: @text-muted; + font-size: 85%; + margin: 0px; + font-weight: bold; + padding: 10px 15px 0px; + } + } +} + +@media (min-width: 768px) { + .login-wrapper { + border-right: 1px solid #f2f2f2; + } +} + + diff --git a/frappe/templates/base.html b/frappe/templates/base.html index ec57b23203..1fdb4383e0 100644 --- a/frappe/templates/base.html +++ b/frappe/templates/base.html @@ -23,8 +23,6 @@ Built on Frappe.io. Free and Open Source Framework for the Web. https://frappe.i {{ meta_block }} {% endif %} - - {%- for link in web_include_css %} {%- endfor -%} @@ -41,51 +39,66 @@ Built on Frappe.io. Free and Open Source Framework for the Web. https://frappe.i {%- endblock -%} -
- {%- block banner -%} - {% include "templates/includes/banner_extension.html" ignore missing %} - {% if banner_html -%} -
{{ banner_html or "" }}
- {%- endif %} - {%- endblock -%} +
+
+
+
+ {%- block banner -%} + {% include "templates/includes/banner_extension.html" ignore missing %} + {% if banner_html -%} +
{{ banner_html or "" }}
+ {%- endif %} + {%- endblock -%} - {%- block navbar -%}{% include "templates/includes/navbar.html" %}{%- endblock -%} -
- -
-
- -
-
- {%- if header is defined -%}{% if header %}{{ header }}{% endif %}{%- endif -%} -
- -
- {%- block content -%}{{ content or "" }}{%- endblock -%} -
-
-
-
-
-
-
- {%- if footer is defined -%}{{ footer }}{%- endif -%} + {%- block navbar -%}{% include "templates/includes/navbar.html" %}{%- endblock -%} +
+
+
+
+
+ {%- if header is defined -%}{% if header %}{{ header }}{% endif %}{%- endif -%} +
+ +
+ {%- block content -%}{{ content or "" }}{%- endblock -%} +
+
+ +
+
+
+
+
+ {%- if footer is defined -%}{{ footer }}{%- endif -%} +
+
+
+
+ {%- block footer -%}{% include "templates/includes/footer.html" %}{%- endblock -%} +
- -
-
- {%- block footer -%}{% include "templates/includes/footer.html" %}{%- endblock -%} + + +
{%- block script %} diff --git a/frappe/templates/generators/web_page.html b/frappe/templates/generators/web_page.html index c81eb21ff4..f4c5178c76 100644 --- a/frappe/templates/generators/web_page.html +++ b/frappe/templates/generators/web_page.html @@ -1,6 +1,4 @@ -{% if header -%} - {%- block header -%} {{ header }} {%- endblock -%} -{%- endif %} +{%- block header -%} {{ header or "" }} {%- endblock -%} {% block content %}
diff --git a/frappe/templates/includes/navbar.html b/frappe/templates/includes/navbar.html index b21d031e8f..3b610db0a0 100644 --- a/frappe/templates/includes/navbar.html +++ b/frappe/templates/includes/navbar.html @@ -2,62 +2,17 @@ diff --git a/frappe/templates/includes/navbar_items.html b/frappe/templates/includes/navbar_items.html new file mode 100644 index 0000000000..82c64acd8c --- /dev/null +++ b/frappe/templates/includes/navbar_items.html @@ -0,0 +1,44 @@ +{% if top_bar_items -%} + +{%- endif %} + diff --git a/frappe/templates/includes/sidebar.html b/frappe/templates/includes/sidebar.html index 3e92dc1dc7..672c55902d 100644 --- a/frappe/templates/includes/sidebar.html +++ b/frappe/templates/includes/sidebar.html @@ -1,19 +1,22 @@ - {% if children -%} {%- endif %} diff --git a/frappe/templates/includes/website_theme/footer.css b/frappe/templates/includes/website_theme/footer.css index 57409fcc59..3b17c05bf8 100644 --- a/frappe/templates/includes/website_theme/footer.css +++ b/frappe/templates/includes/website_theme/footer.css @@ -1,6 +1,7 @@ +{%- set footer_border_color = get_shade(theme.footer_color, 10) -%} .web-footer { background-color: {{ theme.footer_color }}; - border-top: 1px solid {{ get_shade(theme.footer_color, 10) }}; + border-top: 1px solid {{ footer_border_color }}; } .web-footer, @@ -15,5 +16,5 @@ } .web-footer input { - border: 1px solid {{ get_shade(theme.footer_color, 10) }}; + border: 1px solid {{ footer_border_color }}; } diff --git a/frappe/templates/includes/website_theme/navbar.css b/frappe/templates/includes/website_theme/navbar.css index 8ca5f0651d..9f23836799 100644 --- a/frappe/templates/includes/website_theme/navbar.css +++ b/frappe/templates/includes/website_theme/navbar.css @@ -46,8 +46,8 @@ } .navbar-toggle { - margin-top: 7px; - margin-bottom: 7px; + margin-top: 18px; + margin-bottom: 18px; } .navbar-collapse { @@ -62,8 +62,15 @@ height: auto; } +@media (max-width: 767px) { + .toggle-sidebar { + padding: 25px 15px; + } +} + @media (min-width: 768px) { .navbar-brand { max-width: 300px; } } + diff --git a/frappe/templates/pages/desk.html b/frappe/templates/pages/desk.html index 851f3987dc..c513f7429e 100644 --- a/frappe/templates/pages/desk.html +++ b/frappe/templates/pages/desk.html @@ -21,14 +21,14 @@
{% include "public/images/frappe.svg" %}
-
+
-
+
- +