Porting all CSS to SCSS for easier maintainance, checking on all best practices.

This commit is contained in:
Adsooi 2021-07-14 00:18:53 +02:00
parent 4f5089655b
commit bdded822bd
Signed by: Ad5001
GPG key ID: EF45F9C6AFE20160
37 changed files with 1115 additions and 424 deletions

View file

@ -0,0 +1,52 @@
/**
* Omegamma - Hugo theme for ad5001.eu and related websites.
* Copyright (C) 2021 Ad5001
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
// Cards used on main website
.card {
--angle: 0deg;
transition: box-shadow 0.2s;
box-shadow: 0px 0px 2px 0px #000000;
// Specifiying gradient orientation
&.topleft2bottomright {
--angle: 135deg;
}
&.topright2bottomleft {
--angle: 225deg;
}
&.top2bottom {
--angle: 180deg;
}
// Gradient colors
&.yellow {
background: linear-gradient(var(--angle, 0deg), rgba(255,255,204,1) 0%, rgba(255,242,107,1) 100%);
}
&.blue {
background: linear-gradient(var(--angle, 0deg), rgba(204,253,255,1) 0%, rgba(107,250,255,1) 100%);
}
&.red {
background: linear-gradient(var(--angle, 0deg), rgba(255,204,204,1) 0%, rgba(255,107,107,1) 100%);
}
&.green {
background: linear-gradient(var(--angle, 0deg), rgba(206,255,204,1) 0%, rgba(124,255,107,1) 100%);
}
&.purple {
background: linear-gradient(var(--angle, 0deg), rgba(229,181,255,1) 0%, rgba(210,114,255,1) 100%);
}
}

View file

@ -0,0 +1,64 @@
/**
* Omegamma - Hugo theme for ad5001.eu and related websites.
* Copyright (C) 2021 Ad5001
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
// Preview blocks used in the apps main page.
.block-preview {
box-shadow: 0px 0px 2px 0px #000000;
width: Min(25em, calc(100vw - 2em));
height: 20em;
background-size: cover;
background-repeat: no-repeat;
// Base label setting
.label {
transition: max-height 0.15s ease-in;
max-height: 20%;
overflow: hidden;
bottom: 0;
background-color: #FFFFFFDD;
padding: 0.5em;
bottom: 0;
// Hide this information by default
.show-on-hover {
display: none;
transition: opacity 0.15s;
opacity: 0;
max-height: 0;
background: none;
}
}
// Used when the block is hovered/toggled
&:hover, &.toggled {
box-shadow: 0px 0px 4px 0px #000000;
// Take full height
.label {
max-height: 100%;
height: calc(100% - 1em);
// Show previously hidden text
.show-on-hover {
display: block;
opacity: 1;
max-height: 100%;
}
}
}
}

View file

@ -0,0 +1,46 @@
/**
* Omegamma - Hugo theme for ad5001.eu and related websites.
* Copyright (C) 2021 Ad5001
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
a[role=button] {
text-decoration: none;
color: black;
cursor: pointer;
&.primary, &.secondary {
padding: 0.5em;
text-transform: uppercase;
font-size: larger;
box-shadow: 0px 0px 2px 0px #000000;
transition: box-shadow 0.15s ease-in-out, filter 0.15s ease-in-out;
line-height: 3em;
filter: brightness(100%);
&:active {
box-shadow: 0px 0px 8px 0px #000000;
filter: brightness(80%);
}
&:hover {
box-shadow: 0px 0px 8px 0px #000000;
filter: brightness(90%);
}
}
&.primary {
}
}

View file

@ -0,0 +1,91 @@
/**
* Omegamma - Hugo theme for ad5001.eu and related websites.
* Copyright (C) 2021 Ad5001
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
// All columns related rules.
.columns-container {
display: flex;
}
.column {
&.col1 {
&:not(.col1-fill) {
width: 50%;
margin-right: auto !important;
margin-left: auto !important;
}
&.col1-fill {
width: 100%;
}
}
&.col2 {
width: 50%;
}
&.col3 {
width: 33%;
}
&.col2-3 {
width: 66%;
}
&.col4 {
width: 25%;
}
&.col3-4 {
width: 75%;
}
&.col5 {
width: 20%;
}
}
@media screen and (max-width: 700px) {
.padding-container-3 {
padding-left: 0.5em;
padding-right: 0.5em;
}
:not(footer) > .columns-container {
display: block;
}
.column {
width: 100%;
& :not(p).text-right, &.text-right :not(p), & :not(p).text-left, &.text-left :not(p) {
text-align: center;
}
.flex-right {
justify-content: center;
}
}
.section-header .column > img {
width: 100%;
}
.col1:not(.col1-fill) {
width: 100%;
}
}

View file

@ -0,0 +1,38 @@
/**
* Omegamma - Hugo theme for ad5001.eu and related websites.
* Copyright (C) 2021 Ad5001
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
section.section-header {
height: calc(100vh + 3em);
& > div.columns-container {
padding-top: 3em !important;
height: calc(100% - 6em);
}
}
@media screen and (max-width: 700px) {
section.section-header {
height: auto;
min-height: calc(100vh + 3em);
& > div.columns-container {
min-height: calc(100vh - 3em);
}
}
}

View file

@ -0,0 +1,37 @@
/**
* Omegamma - Hugo theme for ad5001.eu and related websites.
* Copyright (C) 2021 Ad5001
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
section.section1 {
background-size: cover;
background-repeat: no-repeat;
color: black;
padding-left: 1em;
padding-top: 1em;
padding-right: 1em;
}
.section-end-triangle {
width: 0;
height: 0;
border-top-width: 3em;
border-top-style: solid;
border-top-color: transparent;
border-right-width: 100vw;
border-right-style: solid;
border-right-color: #FFFFFF;
}

View file

@ -0,0 +1,32 @@
/**
* Omegamma - Hugo theme for ad5001.eu and related websites.
* Copyright (C) 2021 Ad5001
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
section.section-skewed {
--angle: 2deg;
transform: skewY(var(--angle));
background: #D2D2D2;
background: linear-gradient(170deg, rgba(238,238,238,1) 0%, rgba(210,210,210,1) 49%, rgba(238,238,238,1) 100%);
padding-top: 3em;
padding-bottom: 3em;
margin-bottom: 2em;
}
section.section-skewed > * {
transform: skewY(calc(0deg - var(--angle)));
}