no more shorthands in expanded asidenav

This commit is contained in:
Felix Hamann 2018-06-17 22:29:01 +02:00
parent 16681d594e
commit a84b843a03
4 changed files with 28 additions and 16 deletions

View File

@ -9,7 +9,7 @@
<tr> <tr>
<th #description>Beschreibung <th #description>Beschreibung
<td> <td>
<p>#{descr} #{descr}
$maybe link <- courseLinkExternal course $maybe link <- courseLinkExternal course
<tr> <tr>
<th #website>Website <th #website>Website

View File

@ -1,3 +1,12 @@
.course__registration { .course__registration {
margin-top: 20px; margin-top: 20px;
} }
th {
vertical-align: top;
text-align: left;
}
th, td {
padding-bottom: 7px;
}

View File

@ -89,6 +89,8 @@ document.addEventListener('DOMContentLoaded', function() {
// remove me before flight: // remove me before flight:
// EXPERIMENTAL // EXPERIMENTAL
var selector = document.querySelector('#theme-selector'); var selector = document.querySelector('#theme-selector');
var lsTheme = window.localStorage.getItem('theme');
setTheme(lsTheme || 'default');
var options = Array.from(selector.querySelectorAll('option')) var options = Array.from(selector.querySelectorAll('option'))
.reduce(function(acc, optEl) { .reduce(function(acc, optEl) {
if (!acc.includes(optEl.value)) { if (!acc.includes(optEl.value)) {
@ -103,6 +105,7 @@ document.addEventListener('DOMContentLoaded', function() {
}); });
function setTheme(theme) { function setTheme(theme) {
window.localStorage.setItem('theme', theme);
document.body.className = 'theme--' + theme; document.body.className = 'theme--' + theme;
} }

View File

@ -38,7 +38,7 @@
.asidenav__box-title { .asidenav__box-title {
padding: 7px 13px; padding: 7px 13px;
margin-top: 13px; margin-top: 30px;
background-color: transparent; background-color: transparent;
transition: all .2s ease; transition: all .2s ease;
} }
@ -47,6 +47,7 @@
position: relative; position: relative;
color: var(--color-lightwhite); color: var(--color-lightwhite);
margin: 4px 0; margin: 4px 0;
padding-left: 10px;
&:hover { &:hover {
color: var(--color-link); color: var(--color-link);
@ -87,7 +88,7 @@
.asidenav__link-wrapper { .asidenav__link-wrapper {
position: relative; position: relative;
display: flex; display: flex;
height: 50px; height: 43px;
align-items: center; align-items: center;
justify-content: flex-start; justify-content: flex-start;
color: var(--color-lightwhite); color: var(--color-lightwhite);
@ -104,17 +105,7 @@
} }
.asidenav__link-shorthand { .asidenav__link-shorthand {
display: block; display: none;
position: absolute;
color: var(--color-grey);
line-height: 50px;
opacity: 0.2;
right: 10px;
top: 0;
font-size: 40px;
text-transform: uppercase;
transition: transform .2s ease;
text-shadow: 1px 1px 4px rgba(30, 30, 30, 0.8);
} }
.asidenav__link-label { .asidenav__link-label {
@ -214,8 +205,9 @@
.asidenav__link-shorthand { .asidenav__link-shorthand {
display: flex; display: flex;
position: static; position: static;
background-color: var(--color-dark); // TODO: make shorthands in collapsed beautiful *.*
color: var(--color-lightwhite); // background-color: var(--color-dark);
// color: var(--color-lightwhite);
height: 50px; height: 50px;
width: 50px; width: 50px;
text-align: center; text-align: center;
@ -248,4 +240,12 @@
.asidenav__link-label { .asidenav__link-label {
padding-left: 0; padding-left: 0;
} }
.asidenav__list-item--active {
.asidenav__link-wrapper {
background-color: var(--color-lightwhite);
color: var(--color-dark);
}
}
} }