Porting all CSS to SCSS for easier maintainance, checking on all best practices.
This commit is contained in:
parent
4f5089655b
commit
bdded822bd
37 changed files with 1115 additions and 424 deletions
52
assets/scss/components/blocks/card.scss
Normal file
52
assets/scss/components/blocks/card.scss
Normal 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%);
|
||||
}
|
||||
}
|
64
assets/scss/components/blocks/preview.scss
Normal file
64
assets/scss/components/blocks/preview.scss
Normal 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%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue