diff --git a/templates/widgets/asidenav.julius b/templates/widgets/asidenav.julius
index de2523547..cc8fb04a8 100644
--- a/templates/widgets/asidenav.julius
+++ b/templates/widgets/asidenav.julius
@@ -84,41 +84,18 @@
document.addEventListener('DOMContentLoaded', function() {
- utils.aside(document.querySelector('.main__aside'));
+ var asidenavEl = document.querySelector('.main__aside');
+ var mainEl = document.querySelector('.main__content');
- // remove me before flight:
- // EXPERIMENTAL
- var selector = document.querySelector('#theme-selector');
- var lsTheme = window.localStorage.getItem('theme');
- setTheme(lsTheme || 'default');
- var options = Array.from(selector.querySelectorAll('option'))
- .reduce(function(acc, optEl) {
- if (!acc.includes(optEl.value)) {
- acc.push(optEl.value);
- }
- return acc;
- },
- []);
+ asidenavEl.style.height = `${mainEl.clientHeight + 75}px`;
- selector.addEventListener('change', function(event) {
- setTheme(event.target.value);
+ window.addEventListener('resize', function() {
+ window.requestAnimationFrame(function() {
+ asidenavEl.style.height = `${mainEl.clientHeight + 75}px`;
});
+ });
- function setTheme(theme) {
- window.localStorage.setItem('theme', theme);
- document.body.className = 'theme--' + theme;
- }
-
- // random theme on loading and again every 20 seconds
- // setInterval(function() {
- // setTheme(randomOption());
- // }, 20000);
-
- // function randomOption() {
- // return options[Math.floor(Math.random() * options.length)];
- // }
-
- // // initial theme
- // setTheme(randomOption());
+ // TODO: make it swipeable on mobile and narrower
+ // utils.aside(asidenavEl);
});
diff --git a/templates/widgets/asidenav.lucius b/templates/widgets/asidenav.lucius
index 330ee6d2c..9dc24f13a 100644
--- a/templates/widgets/asidenav.lucius
+++ b/templates/widgets/asidenav.lucius
@@ -1,39 +1,26 @@
.main__aside {
- position: relative;
+ position: absolute;
background-color: var(--color-dark);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
z-index: 1;
flex: 0 0 300px;
-}
-.main__aside--transitioning {
- transition: flex-basis .2s ease;
-}
-.main__aside--transitioning .asidenav__box{
- transition: opacity .2s ease;
+ min-height: calc(100% - 80px);
+ transition: all .2s ease-out;
+ width: 300px;
+
+ ~ .main__content {
+ padding-left: 300px;
+ transition: padding-left .2s ease-out;
+ }
}
.asidenav {
width: 300px;
color: white;
+}
- .js-show-hide__target {
- overflow: visible;
- }
- .js-show-hide__toggle::before {
- top: 14px;
- right: 12px;
- left: auto !important;
- }
-
- .js-show-hide__toggle:hover::before,
- .js-show-hide--collapsed .js-show-hide__toggle::before {
- top: 10px !important;
- right: 8px !important;
- }
- .js-show-hide--collapsed .js-show-hide__toggle:hover::before {
- top: 14px !important;
- right: 12px !important;
- }
+.asidenav__box {
+ transition: opacity .2s ease;
}
.asidenav__box-title {
@@ -46,7 +33,6 @@
.asidenav__list-item {
position: relative;
color: var(--color-lightwhite);
- margin: 4px 0;
padding-left: 10px;
&:hover {
@@ -69,6 +55,10 @@
width: 200px;
}
}
+
+ + .asidenav__list-item {
+ margin-top: 4px;
+ }
}
.asidenav__list-item--active {
@@ -88,8 +78,8 @@
.asidenav__link-wrapper {
position: relative;
display: flex;
- height: 43px;
align-items: center;
+ padding: 7px 0;
justify-content: flex-start;
color: var(--color-lightwhite);
z-index: 1;
@@ -109,6 +99,7 @@
}
.asidenav__link-label {
+ line-height: 1;
padding-left: 13px;
}
@@ -139,15 +130,8 @@
background-color: white;
color: var(--color-link);
}
-
- .asidenav__nested-list {
- transform: translateX(100%);
- opacity: 1;
- width: 200px;
- }
}
-
- .asidenav__link-wrapper {
+ .asidenav__link-wrapper {
padding-left: 13px;
padding-right: 13px;
border-left: 20px solid white;
@@ -156,100 +140,86 @@
}
}
-.asidenav__toggler {
- position: absolute;
- bottom: 20px;
- height: 50px;
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- transition: background-color .2s ease;
- border-top: 1px solid var(--color-lightwhite);
- border-bottom: 1px solid var(--color-lightwhite);
- cursor: pointer;
+/* STATE COLLAPSED */
+@media (max-width: 768px) {
- &::before {
- content: '\e079';
- display: block;
- font-family: 'Glyphicons Halflings';
- color: var(--color-lightwhite);
- }
-
- &:hover {
- background-color: var(--color-light);
- }
-}
-
-.main__aside--collapsed {
- width: 50px;
- flex-basis: 50px;
- overflow: hidden;
-
- &.pseudo-hover {
- overflow: visible;
- }
-
- .asidenav__toggler::before {
- content: '\e080';
- }
-
- .asidenav__box-title {
+ .main__aside {
width: 50px;
- padding: 1px;
- font-size: 18px;
- text-align: center;
- margin-bottom: 0;
- }
+ flex-basis: 50px;
+ overflow: hidden;
+ min-height: calc(100% - 50px);
- .asidenav__link-shorthand {
- display: flex;
- position: static;
- // TODO: make shorthands in collapsed beautiful *.*
- // background-color: var(--color-dark);
- // color: var(--color-lightwhite);
- height: 50px;
- width: 50px;
- text-align: center;
- opacity: 1;
- font-size: 15px;
- line-height: 1em;
- margin-right: 13px;
- flex-shrink: 0;
- padding: 1px;
- outline: 1px solid white;
- text-transform: uppercase;
- word-break: break-all;
- align-items: center;
- justify-content: center;
- }
-
- .asidenav__list-item {
- padding-left: 0;
- }
-
- .asidenav__list-item:hover {
-
- > .asidenav__link-wrapper {
- color: var(--color-dark);
- background-color: var(--color-lightwhite);
+ ~ .main__content {
+ padding-left: 50px;
}
- }
- .asidenav__link-wrapper {
- color: var(--color-lightwhite);
- // background-color: var(--color-dark);
- }
+ &.pseudo-hover {
+ overflow: visible;
+ flex-basis: 300px;
+ }
- .asidenav__link-label {
- padding-left: 0;
- }
+ .asidenav__box-title {
+ width: 50px;
+ padding: 1px;
+ font-size: 18px;
+ text-align: center;
+ margin-bottom: 0;
+ }
- .asidenav__list-item--active {
+ .asidenav__link-shorthand {
+ display: flex;
+ position: static;
+ // TODO: make shorthands in collapsed beautiful *.*
+ // background-color: var(--color-dark);
+ // color: var(--color-lightwhite);
+ height: 50px;
+ width: 50px;
+ text-align: center;
+ opacity: 1;
+ font-size: 15px;
+ line-height: 1em;
+ margin-right: 13px;
+ flex-shrink: 0;
+ padding: 1px;
+ outline: 1px solid white;
+ text-transform: uppercase;
+ word-break: break-all;
+ align-items: center;
+ justify-content: center;
+ }
+
+ .asidenav__list-item {
+ padding-left: 0;
+
+ + .asidenav__list-item {
+ margin: 0;
+ }
+ }
+
+ .asidenav__list-item:hover {
+
+ > .asidenav__link-wrapper {
+ color: var(--color-dark);
+ background-color: var(--color-lightwhite);
+ }
+ }
.asidenav__link-wrapper {
- background-color: var(--color-lightwhite);
- color: var(--color-dark);
+ color: var(--color-lightwhite);
+ padding: 0;
+ // background-color: var(--color-dark);
+ }
+
+ .asidenav__link-label {
+ padding-left: 0;
+ }
+
+ .asidenav__list-item--active {
+
+ .asidenav__link-wrapper {
+ background-color: var(--color-lightwhite);
+ color: var(--color-dark);
+ }
}
}
}
diff --git a/templates/widgets/breadcrumbs.lucius b/templates/widgets/breadcrumbs.lucius
index c5ada3434..9ac639551 100644
--- a/templates/widgets/breadcrumbs.lucius
+++ b/templates/widgets/breadcrumbs.lucius
@@ -3,9 +3,6 @@
align-self: flex-end;
background-color: var(--color-dark);
color: white;
- margin-left: -40px;
- margin-right: -40px;
- margin-bottom: 20px;
transition: margin-bottom .2s ease;
}
@@ -35,9 +32,6 @@
opacity: 1;
}
- &:first-child {
- padding-left: 50px;
- }
&::after {
content: '';
diff --git a/templates/widgets/form.hamlet b/templates/widgets/form.hamlet
index fdc9d5fb2..7aa75245f 100644
--- a/templates/widgets/form.hamlet
+++ b/templates/widgets/form.hamlet
@@ -5,6 +5,9 @@ $case formLayout
$forall view <- views
$if not (Blaze.null $ fvLabel view)
-