updated controller

This commit is contained in:
Vedde 2020-06-22 14:57:11 +02:00
parent 9c3796220f
commit 5dcae7895a
2 changed files with 1052 additions and 0 deletions

547
skolehjem/public/css/admin.css vendored Normal file
View File

@ -0,0 +1,547 @@
@font-face {
font-family: "Titillium Web";
src: url("/fonts/TitilliumWeb-Regular.ttf");
font-weight: normal;
}
@font-face {
font-family: "Titillium Web";
src: url("/fonts/TitilliumWeb-SemiBold.ttf");
font-weight: 600;
}
@font-face {
font-family: "Titillium Web";
src: url("/fonts/TitilliumWeb-Bold.ttf");
font-weight: 700;
}
form {
max-width: 100%;
padding: 0 0.45rem 0 0.45rem;
display: flex;
flex-direction: column;
justify-content: center;
}
.btn {
border: 0;
border-radius: 4px;
padding: 0.5rem;
cursor: pointer;
font-weight: 700;
font-size: 1.05rem;
background-color: white;
color: #333333;
margin-bottom: 0.5rem;
}
.btn-dark {
color: white;
background-color: #333333;
}
.btn-sde-blue {
color: white;
background-color: #00788a;
}
.btn-disabled {
color: white;
background-color: #cccccc;
}
.form-inline {
display: inline-flex;
}
input {
border: grey solid 2px;
border-radius: 4px;
background-color: transparent;
font-size: 1rem;
line-height: 2rem;
margin-bottom: 1rem;
}
input.appinput {
border: none;
border-bottom: white solid 2px;
background-color: transparent;
font-size: 1rem;
color: white;
line-height: 2rem;
margin-bottom: 1rem;
}
.d-flex {
display: flex;
}
.d-none {
display: none !important;
}
.row {
display: flex;
flex-direction: row;
}
.align-items-center {
align-items: center;
}
.col {
display: flex;
flex-direction: column;
}
.cursor-normal {
cursor: default;
}
.cursor-pointer {
cursor: pointer;
}
.text-white {
color: #ffffff;
}
.text-center {
text-align: center;
}
.sde-blue {
color: #00788a;
}
.sde-black-80 {
color: #333333;
}
.sde-black-20 {
color: #cccccc;
}
.regular {
font-weight: 400;
}
.semi-bold {
font-weight: 600;
}
.bold {
font-weight: 700;
}
.toggle__label.sde-blue::before {
border-color: #00788a;
}
.sde-blue.toggle__text::before {
border-color: #00788a;
}
span.toggle__text.sde-blue {
font-size: 5vw;
}
.m-auto {
margin: auto;
}
.mr-auto {
margin-right: auto;
}
.ml-auto {
margin-left: auto;
}
.mt-auto {
margin-top: auto;
}
.mb-auto {
margin-bottom: auto;
}
.ml-0 {
margin-left: 0;
}
.mr-0 {
margin-right: 0;
}
.mb-0 {
margin-bottom: 0;
}
.mt-0 {
margin-top: 0;
}
.ml-1 {
margin-left: 0.75rem;
}
.mr-1 {
margin-right: 0.75rem;
}
.mb-1 {
margin-bottom: 0.75rem;
}
.mt-1 {
margin-top: 0.75rem;
}
.ml-2 {
margin-left: 3rem;
}
.mr-2 {
margin-right: 3rem;
}
.mb-2 {
margin-bottom: 3rem;
}
.mt-2 {
margin-top: 3rem;
}
.ml-3 {
margin-left: 3rem;
}
.mr-3 {
margin-right: 4.75rem;
}
.mb-3 {
margin-bottom: 4.75rem;
}
.mt-3 {
margin-top: 4.75rem;
}
* {
font-family: "Titillium Web";
}
html,
body {
width: 100%;
margin: 0;
padding: 0;
height: 100%;
}
::-moz-placeholder {
opacity: 1;
}
:-ms-input-placeholder {
opacity: 1;
}
::-ms-input-placeholder {
opacity: 1;
}
::placeholder {
opacity: 1;
}
a {
color: #000000;
text-decoration: none;
}
.w-100 {
width: 100%;
}
.w-85 {
width: 85%;
}
.w-75 {
width: 75%;
}
.w-50 {
width: 50%;
}
.w-25 {
width: 25%;
}
.w-15 {
width: 15%;
}
.h-100 {
height: 100%;
}
.h-90 {
height: 90%;
}
.h-10 {
height: 10%;
}
.bg-sde-blue {
background-color: #00788a;
}
.toggle {
--uiToggleSize: var(--toggleSize, 20px);
--uiToggleIndent: var(--toggleIndent, .4em);
--uiToggleBorderWidth: var(--toggleBorderWidth, 2px);
--uiToggleColor: var(--toggleColor, #000);
--uiToggleDisabledColor: var(--toggleDisabledColor, #868e96);
--uiToggleBgColor: var(--toggleBgColor, #fff);
--uiToggleArrowWidth: var(--toggleArrowWidth, 2px);
--uiToggleArrowColor: var(--toggleArrowColor, #fff);
margin-bottom: 1.5rem;
display: inline-block;
position: relative;
}
.toggle__input {
position: absolute;
left: -99999px;
}
.toggle__label {
display: inline-flex;
min-height: var(--uiToggleSize);
padding-left: calc(var(--uiToggleSize) + var(--uiToggleIndent));
}
.toggle__input:not(:disabled) ~ .toggle__label {
cursor: pointer;
}
.toggle__label::before,
.toggle__label::after {
content: "";
box-sizing: border-box;
width: 1em;
height: 1em;
font-size: var(--uiToggleSize);
position: absolute;
left: 0;
top: 0;
}
.toggle__label:before {
border: var(--uiToggleBorderWidth) solid var(--uiToggleColor);
z-index: 2;
}
.toggle__input:disabled ~ .toggle__label::before {
border-color: var(--uiToggleDisabledColor);
}
.toggle__input:focus ~ .toggle__label::before {
box-shadow: 0 0 0 2px var(--uiToggleBgColor), 0 0 0 4px var(--uiToggleColor);
}
.toggle__input:not(:disabled):checked:focus ~ .toggle__label::after {
box-shadow: 0 0 0 2px var(--uiToggleBgColor), 0 0 0 4px var(--uiToggleColor);
}
.toggle__input:not(:disabled) ~ .toggle__label::after {
background-color: var(--uiToggleColor);
opacity: 0;
}
.toggle__input:not(:disabled):checked ~ .toggle__label::after {
opacity: 1;
}
.toggle__text {
margin-top: auto;
margin-bottom: auto;
}
.toggle__text::before {
content: "";
box-sizing: border-box;
width: 0;
height: 0;
font-size: var(--uiToggleSize);
border-left-width: 0;
border-bottom-width: 0;
border-left-style: solid;
border-bottom-style: solid;
border-color: var(--uiToggleArrowColor);
position: absolute;
top: 0.5428em;
left: 0.2em;
z-index: 3;
transform-origin: left top;
transform: rotate(-40deg) skew(10deg);
}
.toggle__input:not(:disabled):checked ~ .toggle__label .toggle__text::before {
width: 0.5em;
height: 0.25em;
border-left-width: var(--uiToggleArrowWidth);
border-bottom-width: var(--uiToggleArrowWidth);
will-change: width, height;
transition: width 0.1s ease-out 0.2s, height 0.2s ease-out;
margin-top: 3px;
}
.toggle__input:disabled ~ .toggle__label {
opacity: 0.24;
cursor: not-allowed;
}
.toggle__label::before,
.toggle__label::after {
border: 2px solid;
border-color: white;
}
.toggle__input:not(:disabled) ~ .toggle__label::before,
.toggle__input:not(:disabled) ~ .toggle__label::after {
opacity: 1;
transform-origin: center center;
margin-top: 3px;
}
.toggle__text::before {
opacity: 0;
}
.toggle__input:not(:disabled):checked ~ .toggle__label .toggle__text::before {
opacity: 1;
transition: opacity 0.1s ease-out 0.3s, width 0.1s ease-out 0.5s, height 0.2s ease-out 0.3s;
}
.toggle {
--toggleColor: transparent;
--toggleBgColor: transparent;
--toggleSize: 1.25rem;
}
header {
height: 4.5rem;
}
.brand {
width: calc(15% - 2rem);
padding: 0 1rem 0 1rem;
min-width: calc(194px - 2rem);
}
main {
min-height: calc(100% - 4.5rem);
background-color: #333333;
}
.nav {
width: 15%;
height: 100%;
min-width: 194px;
}
.segment {
margin-bottom: 1.25rem;
}
.segment > h3 {
margin-left: -1rem;
margin-top: 0;
width: calc(100% + 2rem);
background-color: rgba(0, 0, 0, 0.2);
text-align: center;
}
.segment > div {
padding: 0 1.25rem 0 1.25rem;
width: calc(100% - 2.5rem);
align-items: center;
margin-bottom: 0.5rem;
}
.segment > div:hover {
background-color: rgba(0, 0, 0, 0.2);
}
.segment > div > a > img {
height: 1em;
padding-right: 8px;
}
.directorypath {
border-radius: 2px;
background-color: #333333;
width: calc(96% - 2rem);
padding: 0.5rem 1rem 0.5rem 1rem;
margin-top: 2rem;
margin-bottom: 2rem;
margin-left: auto;
margin-right: auto;
}
.content {
border-radius: 2px;
background-color: #ffffff;
width: calc(96% - 2rem);
min-height: calc(100% - 40.8px - 8rem);
padding: 1rem;
margin: 2rem auto;
}
.tbl {
border-collapse: collapse;
width: 100%;
}
.tbl td,
.tbl th {
border: 1px solid #ddd;
padding: 8px;
}
.tbl tr:nth-child(even) {
background-color: rgba(0, 0, 0, 0.1);
}
.tbl tr:hover {
background-color: #ddd;
}
.tbl th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #00788a;
color: white;
}
.tbl > tbody > tr > td > a {
width: 100%;
display: flex;
}
.tbl > tbody > tr > td > a > img {
width: 1em;
margin: auto;
}

505
skolehjem/public/css/webapp.css vendored Normal file
View File

@ -0,0 +1,505 @@
@font-face {
font-family: "Titillium Web";
src: url("/fonts/TitilliumWeb-Regular.ttf");
font-weight: normal;
}
@font-face {
font-family: "Titillium Web";
src: url("/fonts/TitilliumWeb-SemiBold.ttf");
font-weight: 600;
}
@font-face {
font-family: "Titillium Web";
src: url("/fonts/TitilliumWeb-Bold.ttf");
font-weight: 700;
}
form {
max-width: 100%;
padding: 0 0.45rem 0 0.45rem;
display: flex;
flex-direction: column;
justify-content: center;
}
.btn {
border: 0;
border-radius: 4px;
padding: 0.5rem;
cursor: pointer;
font-weight: 700;
font-size: 1.05rem;
background-color: white;
color: #333333;
margin-bottom: 0.5rem;
}
.btn-dark {
color: white;
background-color: #333333;
}
.btn-sde-blue {
color: white;
background-color: #00788a;
}
.btn-disabled {
color: white;
background-color: #cccccc;
}
.form-inline {
display: inline-flex;
}
input {
border: grey solid 2px;
border-radius: 4px;
background-color: transparent;
font-size: 1rem;
line-height: 2rem;
margin-bottom: 1rem;
}
input.appinput {
border: none;
border-bottom: white solid 2px;
background-color: transparent;
font-size: 1rem;
color: white;
line-height: 2rem;
margin-bottom: 1rem;
}
.d-flex {
display: flex;
}
.d-none {
display: none !important;
}
.row {
display: flex;
flex-direction: row;
}
.align-items-center {
align-items: center;
}
.col {
display: flex;
flex-direction: column;
}
.cursor-normal {
cursor: default;
}
.cursor-pointer {
cursor: pointer;
}
.text-white {
color: #ffffff;
}
.text-center {
text-align: center;
}
.sde-blue {
color: #00788a;
}
.sde-black-80 {
color: #333333;
}
.sde-black-20 {
color: #cccccc;
}
.regular {
font-weight: 400;
}
.semi-bold {
font-weight: 600;
}
.bold {
font-weight: 700;
}
.toggle__label.sde-blue::before {
border-color: #00788a;
}
.sde-blue.toggle__text::before {
border-color: #00788a;
}
span.toggle__text.sde-blue {
font-size: 5vw;
}
.m-auto {
margin: auto;
}
.mr-auto {
margin-right: auto;
}
.ml-auto {
margin-left: auto;
}
.mt-auto {
margin-top: auto;
}
.mb-auto {
margin-bottom: auto;
}
.ml-0 {
margin-left: 0;
}
.mr-0 {
margin-right: 0;
}
.mb-0 {
margin-bottom: 0;
}
.mt-0 {
margin-top: 0;
}
.ml-1 {
margin-left: 0.75rem;
}
.mr-1 {
margin-right: 0.75rem;
}
.mb-1 {
margin-bottom: 0.75rem;
}
.mt-1 {
margin-top: 0.75rem;
}
.ml-2 {
margin-left: 3rem;
}
.mr-2 {
margin-right: 3rem;
}
.mb-2 {
margin-bottom: 3rem;
}
.mt-2 {
margin-top: 3rem;
}
.ml-3 {
margin-left: 3rem;
}
.mr-3 {
margin-right: 4.75rem;
}
.mb-3 {
margin-bottom: 4.75rem;
}
.mt-3 {
margin-top: 4.75rem;
}
* {
font-family: "Titillium Web";
}
html,
body {
width: 100%;
margin: 0;
padding: 0;
height: 100%;
}
::-moz-placeholder {
opacity: 1;
}
:-ms-input-placeholder {
opacity: 1;
}
::-ms-input-placeholder {
opacity: 1;
}
::placeholder {
opacity: 1;
}
a {
color: #000000;
text-decoration: none;
}
.w-100 {
width: 100%;
}
.w-85 {
width: 85%;
}
.w-75 {
width: 75%;
}
.w-50 {
width: 50%;
}
.w-25 {
width: 25%;
}
.w-15 {
width: 15%;
}
.h-100 {
height: 100%;
}
.h-90 {
height: 90%;
}
.h-10 {
height: 10%;
}
.bg-sde-blue {
background-color: #00788a;
}
.toggle {
--uiToggleSize: var(--toggleSize, 20px);
--uiToggleIndent: var(--toggleIndent, .4em);
--uiToggleBorderWidth: var(--toggleBorderWidth, 2px);
--uiToggleColor: var(--toggleColor, #000);
--uiToggleDisabledColor: var(--toggleDisabledColor, #868e96);
--uiToggleBgColor: var(--toggleBgColor, #fff);
--uiToggleArrowWidth: var(--toggleArrowWidth, 2px);
--uiToggleArrowColor: var(--toggleArrowColor, #fff);
margin-bottom: 1.5rem;
display: inline-block;
position: relative;
}
.toggle__input {
position: absolute;
left: -99999px;
}
.toggle__label {
display: inline-flex;
min-height: var(--uiToggleSize);
padding-left: calc(var(--uiToggleSize) + var(--uiToggleIndent));
}
.toggle__input:not(:disabled) ~ .toggle__label {
cursor: pointer;
}
.toggle__label::before,
.toggle__label::after {
content: "";
box-sizing: border-box;
width: 1em;
height: 1em;
font-size: var(--uiToggleSize);
position: absolute;
left: 0;
top: 0;
}
.toggle__label:before {
border: var(--uiToggleBorderWidth) solid var(--uiToggleColor);
z-index: 2;
}
.toggle__input:disabled ~ .toggle__label::before {
border-color: var(--uiToggleDisabledColor);
}
.toggle__input:focus ~ .toggle__label::before {
box-shadow: 0 0 0 2px var(--uiToggleBgColor), 0 0 0 4px var(--uiToggleColor);
}
.toggle__input:not(:disabled):checked:focus ~ .toggle__label::after {
box-shadow: 0 0 0 2px var(--uiToggleBgColor), 0 0 0 4px var(--uiToggleColor);
}
.toggle__input:not(:disabled) ~ .toggle__label::after {
background-color: var(--uiToggleColor);
opacity: 0;
}
.toggle__input:not(:disabled):checked ~ .toggle__label::after {
opacity: 1;
}
.toggle__text {
margin-top: auto;
margin-bottom: auto;
}
.toggle__text::before {
content: "";
box-sizing: border-box;
width: 0;
height: 0;
font-size: var(--uiToggleSize);
border-left-width: 0;
border-bottom-width: 0;
border-left-style: solid;
border-bottom-style: solid;
border-color: var(--uiToggleArrowColor);
position: absolute;
top: 0.5428em;
left: 0.2em;
z-index: 3;
transform-origin: left top;
transform: rotate(-40deg) skew(10deg);
}
.toggle__input:not(:disabled):checked ~ .toggle__label .toggle__text::before {
width: 0.5em;
height: 0.25em;
border-left-width: var(--uiToggleArrowWidth);
border-bottom-width: var(--uiToggleArrowWidth);
will-change: width, height;
transition: width 0.1s ease-out 0.2s, height 0.2s ease-out;
margin-top: 3px;
}
.toggle__input:disabled ~ .toggle__label {
opacity: 0.24;
cursor: not-allowed;
}
.toggle__label::before,
.toggle__label::after {
border: 2px solid;
border-color: white;
}
.toggle__input:not(:disabled) ~ .toggle__label::before,
.toggle__input:not(:disabled) ~ .toggle__label::after {
opacity: 1;
transform-origin: center center;
margin-top: 3px;
}
.toggle__text::before {
opacity: 0;
}
.toggle__input:not(:disabled):checked ~ .toggle__label .toggle__text::before {
opacity: 1;
transition: opacity 0.1s ease-out 0.3s, width 0.1s ease-out 0.5s, height 0.2s ease-out 0.3s;
}
.toggle {
--toggleColor: transparent;
--toggleBgColor: transparent;
--toggleSize: 1.25rem;
}
main {
max-width: 900px;
display: flex;
flex-direction: column;
justify-content: center;
margin: auto;
padding: 0 1.25rem 0 1.25rem;
}
@media only screen and (max-width: 900px) {
main {
max-width: 460px;
display: flex;
flex-direction: column;
justify-content: center;
margin: auto;
padding: 0 1.25rem 0 1.25rem;
}
.brand {
padding: 0 1rem 0 1rem;
margin: 7rem 0 5rem 0;
}
header,
#menu {
padding: 1.25rem 1.75rem 0 1.75rem;
}
#menu {
padding-top: 4rem;
}
#menu > a {
color: white;
font-size: 8vw;
font-weight: 600;
display: flex;
align-items: center;
margin-bottom: 1.5rem;
}
#menu > a > img {
height: 1em;
margin-right: 8px;
}
h1 {
font-size: 12vw;
}
h3 {
font-size: 8vw;
}
span {
font-size: 12px;
}
p {
font-size: 4vw;
}
}