Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11285 from netchampfaris/aaaa-website-enhancement…
…s-for-redesign
- Loading branch information
Showing
91 changed files
with
1,462 additions
and
534 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
function open_web_template_values_editor(template, current_values = {}) { | ||
return new Promise(resolve => { | ||
frappe.model.with_doc("Web Template", template).then((doc) => { | ||
let d = new frappe.ui.Dialog({ | ||
title: __("Edit Values"), | ||
fields: get_fields(doc), | ||
primary_action(values) { | ||
d.hide(); | ||
resolve(values); | ||
}, | ||
}); | ||
d.set_values(current_values); | ||
d.show(); | ||
|
||
d.sections.forEach((sect) => { | ||
let fields_with_value = sect.fields_list.filter( | ||
(field) => current_values[field.df.fieldname] | ||
); | ||
|
||
if (fields_with_value.length) { | ||
sect.collapse(false); | ||
} | ||
}); | ||
}); | ||
}); | ||
|
||
function get_fields(doc) { | ||
let normal_fields = []; | ||
let table_fields = []; | ||
|
||
let current_table = null; | ||
for (let df of doc.fields) { | ||
if (current_table) { | ||
current_table.fields = current_table.fields || []; | ||
|
||
if (df.fieldtype != 'Table Break') { | ||
current_table.fields.push(df); | ||
} else { | ||
table_fields.push(df); | ||
current_table = df; | ||
} | ||
} else if (df.fieldtype != 'Table Break') { | ||
normal_fields.push(df); | ||
} else { | ||
table_fields.push(df); | ||
current_table = df; | ||
} | ||
} | ||
|
||
let fields = [ | ||
...normal_fields, | ||
...table_fields.map(tf => { | ||
let data = current_values[tf.fieldname] || []; | ||
return { | ||
label: tf.label, | ||
fieldname: tf.fieldname, | ||
fieldtype: 'Table', | ||
fields: tf.fields.map((df, i) => ({ | ||
...df, | ||
in_list_view: i <= 1, | ||
columns: tf.fields.length == 1 ? 10 : 5 | ||
})), | ||
data, | ||
get_data: () => data | ||
}; | ||
}) | ||
]; | ||
|
||
return fields; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
:root { | ||
--gray-50: #{$gray-50}; | ||
--gray-100: #{$gray-100}; | ||
--gray-200: #{$gray-200}; | ||
--gray-300: #{$gray-300}; | ||
--gray-400: #{$gray-400}; | ||
--gray-500: #{$gray-500}; | ||
--gray-600: #{$gray-600}; | ||
--gray-700: #{$gray-700}; | ||
--gray-800: #{$gray-800}; | ||
--gray-900: #{$gray-900}; | ||
|
||
--black: #{$black}; | ||
--primary: #{$primary}; | ||
--primary-light: #{$primary-light}; | ||
--light: #{$light}; | ||
|
||
--font-size-xs: #{$font-size-xs}; | ||
--font-size-sm: #{$font-size-sm}; | ||
--font-size-base: #{$font-size-base}; | ||
--font-size-lg: #{$font-size-lg}; | ||
--font-size-xl: #{$font-size-xl}; | ||
--font-size-2xl: #{$font-size-2xl}; | ||
--font-size-3xl: #{$font-size-3xl}; | ||
--font-size-4xl: #{$font-size-4xl}; | ||
--font-size-5xl: #{$font-size-5xl}; | ||
--font-size-6xl: #{$font-size-6xl}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
.web-footer { | ||
padding: 5rem 0; | ||
min-height: 140px; | ||
} | ||
|
||
.footer-logo { | ||
min-width: 5rem; | ||
height: 1.5rem; | ||
object-fit: contain; | ||
object-position: left; | ||
} | ||
|
||
.footer-child-item { | ||
margin-top: 0.5rem; | ||
} | ||
|
||
.footer-link, .footer-child-item a { | ||
font-size: $font-size-sm; | ||
font-weight: 500; | ||
color: $gray-700; | ||
|
||
&:hover { | ||
color: $primary; | ||
text-decoration: none; | ||
} | ||
} | ||
|
||
.footer-col-right { | ||
@include media-breakpoint-up(sm) { | ||
text-align: right; | ||
} | ||
} | ||
|
||
.footer-col-left, .footer-col-right { | ||
padding-top: 0.8rem; | ||
padding-bottom: 1rem; | ||
line-height: 2; | ||
|
||
&:empty { | ||
padding: 0; | ||
} | ||
} | ||
|
||
.footer-col-left .footer-link { | ||
margin-right: 1rem; | ||
} | ||
|
||
.footer-col-right .footer-link { | ||
margin-right: 1rem; | ||
@include media-breakpoint-up(sm) { | ||
margin-right: 0; | ||
margin-left: 1rem; | ||
} | ||
} | ||
|
||
.footer-group { | ||
margin-top: 2rem; | ||
} | ||
|
||
.footer-group-label { | ||
color: $text-muted; | ||
font-size: $font-size-sm; | ||
margin-bottom: 0.5rem; | ||
} | ||
|
||
.footer-grouped-links { | ||
margin-bottom: 2rem; | ||
} | ||
|
||
.footer-group-links { | ||
display: flex; | ||
flex-direction: column; | ||
flex-wrap: wrap; | ||
max-height: 10rem; | ||
margin-bottom: 0; | ||
} | ||
|
||
.footer-info { | ||
border-top: 1px solid $border-color; | ||
color: $text-muted; | ||
font-size: $font-size-sm; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,10 @@ | |
margin-top: 0; | ||
} | ||
|
||
> :last-child { | ||
margin-bottom: 0; | ||
} | ||
|
||
ul, | ||
ol { | ||
padding-left: 2.5rem; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
.navbar-light { | ||
border-bottom: 1px solid $border-color; | ||
} | ||
|
||
.navbar-brand { | ||
img { | ||
display: inline-block; | ||
max-width: 150px; | ||
max-height: 25px; | ||
} | ||
} | ||
|
||
.navbar-cta { | ||
@include media-breakpoint-up(lg) { | ||
margin-left: 1rem; | ||
} | ||
} | ||
|
||
|
||
.navbar.bg-dark { | ||
.dropdown-menu { | ||
font-size: 0.75rem; | ||
background-color: $dark; | ||
border-radius: 0; | ||
} | ||
|
||
.nav-link { | ||
white-space: nowrap; | ||
color: $light; | ||
|
||
&:hover { | ||
color: $primary; | ||
} | ||
} | ||
|
||
.nav-item { | ||
padding: 0rem 1rem; | ||
} | ||
|
||
.dropdown-item { | ||
color: $light; | ||
|
||
&:hover { | ||
background-color: $dark; | ||
color: $primary; | ||
} | ||
} | ||
} | ||
|
||
.navbar-light .navbar-nav .nav-link { | ||
color: $gray-700; | ||
font-size: $font-size-sm; | ||
font-weight: 500; | ||
|
||
&:hover, | ||
&:focus, &.active { | ||
color: $primary; | ||
} | ||
} |
Oops, something went wrong.