feat: Color Themes page UI + Hero theme support

pull/166/head
NGPixel 7 years ago committed by Nicolas Giard
parent 247d598edb
commit 6b37797a00

@ -4,31 +4,43 @@
height: 60px; height: 60px;
&-choice { &-choice {
width: 50px; width: 40px;
height: 50px; height: 40px;
border: 1px solid #FFF; border: 0 solid #FFF;
transition: all .2s ease; transition: all .2s ease;
cursor: pointer; cursor: pointer;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin-right: 1px;
&:first-child {
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
}
&:last-child {
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
}
&.is-active, &:hover { &.is-active, &:hover {
border-width: 5px; border-width: 5px;
border-radius: 3px; border-radius: 5px;
width: 60px; width: 55px;
height: 60px; height: 55px;
} }
&.is-active::before { &.is-active::before {
content: 'X'; content: '|';
font-weight: 700; font-weight: 700;
color: rgba(255,255,255,.5); color: rgba(255,255,255,.5);
margin-bottom: 3px;
} }
@each $color, $colorvalue in $material-colors { @each $color, $colorvalue in $material-colors {
&.is-#{$color} { &.is-#{$color} {
background-color: mc($color, '500'); background-color: mc($color, '500');
background-image: linear-gradient(45deg, mc($color, '400'), mc($color, '700'));
border-color: mc($color,'500'); border-color: mc($color,'500');
&.is-active, &:hover { &.is-active, &:hover {

@ -40,7 +40,7 @@
color: #FFF; color: #FFF;
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
justify-items: center; justify-content: center;
padding: 0 15px; padding: 0 15px;
height: 32px; height: 32px;
border: 1px solid mc('light-blue', '600'); border: 1px solid mc('light-blue', '600');
@ -74,3 +74,20 @@
} }
} }
/* THEME OVERRIDE - START */
@each $color, $colorvalue in $material-colors {
.is-primary-#{$color} .hero {
h1 {
color: mc($color, '500');
}
}
.is-alternate-#{$color} .hero {
.pageicon {
color: mc($color, '500');
}
}
}
/* THEME OVERRIDE - END */

@ -8,17 +8,20 @@ block adminContent
.form-sections .form-sections
section section
label.label= t('admin:theme.primarycolor') label.label= t('admin:theme.primarycolor')
color-picker(current-color='indigo') color-picker(current-color=appconfig.theme.primary)
span.desc Used for top navigation bar, headers, links, etc.
section section
label.label= t('admin:theme.altcolor') label.label= t('admin:theme.altcolor')
color-picker(current-color='blue-grey') color-picker(current-color=appconfig.theme.alt)
span.desc Used for the sidebar (in a darker tone)
section section
label.label= t('admin:theme.footercolor') label.label= t('admin:theme.footercolor')
color-picker(current-color='blue-grey') color-picker(current-color=appconfig.theme.footer)
span.desc Used for the foter (in a lighter tone)
section section
label.label= t('admin:theme.codeblock') label.label= t('admin:theme.codeblock')
toggle(current-value='dark', desc='Use Dark Theme') toggle(:current-value=appconfig.theme.code.dark.toString(), desc='Use Dark Theme')
toggle(current-value='dark', desc='Colorize code syntax') toggle(:current-value=appconfig.theme.code.colorize.toString(), desc='Colorize code syntax')
section section
button.button.is-green(@click='saveUser') button.button.is-green(@click='saveUser')
i.nc-icon-outline.ui-1_check i.nc-icon-outline.ui-1_check

Loading…
Cancel
Save