Merge pull request #11584 from netchampfaris/website-enh
This commit is contained in:
commit
e97ce0f4fe
3 changed files with 54 additions and 10 deletions
|
|
@ -19,6 +19,25 @@ $text-muted: $gray-600 !default;
|
|||
$border-color: $gray-300 !default;
|
||||
$headings-color: $gray-900 !default;
|
||||
|
||||
$font-sizes: (
|
||||
"xs": 0.75rem,
|
||||
"sm": 0.875rem,
|
||||
"base": 1rem,
|
||||
"lg": 1.125rem,
|
||||
"xl": 1.25rem,
|
||||
"2xl": 1.5rem,
|
||||
"3xl": 1.875rem,
|
||||
"4xl": 2.25rem,
|
||||
"5xl": 3rem,
|
||||
"6xl": 4rem
|
||||
);
|
||||
|
||||
@each $size, $value in $font-sizes {
|
||||
.font-size-#{$size} {
|
||||
font-size: $value;
|
||||
}
|
||||
}
|
||||
|
||||
$font-size-xs: 0.75rem !default;
|
||||
$font-size-sm: 0.875rem !default;
|
||||
$font-size-base: 1rem !default;
|
||||
|
|
@ -60,12 +79,12 @@ $input-border-radius: 0.375rem;
|
|||
$custom-control-indicator-bg: white;
|
||||
|
||||
$grid-breakpoints: (
|
||||
xs: 0,
|
||||
sm: 576px,
|
||||
md: 768px,
|
||||
lg: 992px,
|
||||
xl: 1200px,
|
||||
2xl: 1440px
|
||||
xs: 0,
|
||||
sm: 576px,
|
||||
md: 768px,
|
||||
lg: 992px,
|
||||
xl: 1200px,
|
||||
2xl: 1440px
|
||||
) !default;
|
||||
|
||||
$spacers: (
|
||||
|
|
@ -93,11 +112,11 @@ $spacers: (
|
|||
48: 12rem,
|
||||
52: 13rem,
|
||||
56: 14rem,
|
||||
64: 16rem,
|
||||
64: 16rem
|
||||
);
|
||||
|
||||
@import '~bootstrap/scss/functions';
|
||||
@import '~bootstrap/scss/variables';
|
||||
@import "~bootstrap/scss/functions";
|
||||
@import "~bootstrap/scss/variables";
|
||||
@import "~bootstrap/scss/mixins";
|
||||
|
||||
$code-color: $purple;
|
||||
|
|
|
|||
|
|
@ -6,5 +6,27 @@ from __future__ import unicode_literals
|
|||
import frappe
|
||||
from frappe.model.document import Document
|
||||
|
||||
|
||||
class WebsiteSidebar(Document):
|
||||
pass
|
||||
def get_items(self):
|
||||
items = frappe.get_all(
|
||||
"Website Sidebar Item",
|
||||
filters={'parent': self.name},
|
||||
fields=["title", "route", "group"],
|
||||
order_by="idx asc",
|
||||
)
|
||||
|
||||
items_by_group = {}
|
||||
items_without_group = []
|
||||
for item in items:
|
||||
if item.group:
|
||||
items_by_group.setdefault(item.group, []).append(item)
|
||||
else:
|
||||
items_without_group.append(item)
|
||||
|
||||
out = []
|
||||
for group, items in items_by_group.items():
|
||||
out.append({"group_title": group, "group_items": items})
|
||||
|
||||
out += items_without_group
|
||||
return out
|
||||
|
|
|
|||
|
|
@ -411,6 +411,9 @@ frappe.setup_search = function (target, search_scope) {
|
|||
let offsetIndex = 0;
|
||||
|
||||
$(document).on('keypress', e => {
|
||||
if ($(e.target).is('textarea, input, select')) {
|
||||
return;
|
||||
}
|
||||
if (e.key === '/') {
|
||||
e.preventDefault();
|
||||
$input.focus();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue