forked from phc/website
1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
website/src/styles/main.scss

501 lines
9.0 KiB
SCSS

$black: #222;
$border-large: 4px solid $black;
$header-bg: #fff;
$footer-bg: #444;
$footer-fg: #fdfdfd;
$homepage-principal-bg: #ecffe3;
$homepage-whatsphc-bg: #e4c5ff;
$homepage-news-bg: #c2a8eb;
$homepage-projects-bg: #f5f2cc;
$homepage-macchinisti-bg: #888;
$project-card-bg: #a2d4f3;
$screen-desktop-min: 1024px;
@import './mixins.scss';
@import './typography.scss';
*,
*::before,
*::after {
box-sizing: border-box;
font: inherit;
margin: 0;
}
html,
body {
min-height: 100%;
height: 100%;
margin: 0;
font-family: 'Open Sans', sans-serif;
font-size: 18px;
color: #222;
}
// html {
// scroll-snap-type: y proximity;
// scroll-padding-top: 4rem;
// }
img {
display: block;
}
a {
color: inherit;
text-decoration: none;
}
//
// Typography
//
.text {
display: block;
line-height: 1.5;
p + p {
margin-top: 0.5rem;
}
}
@import './controls.scss';
@import './components.scss';
//
// Custom Page Styles
//
body {
// for the header spacing
padding-top: 6rem;
display: grid;
grid-template-rows: 1fr auto;
header {
z-index: 10;
height: 6rem;
border-bottom: $border-large;
background: $header-bg;
top: 0;
position: fixed;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
.logo {
padding-left: 0.5rem;
img {
height: 4rem;
}
}
.links {
display: flex;
align-items: center;
gap: 1.5rem;
padding: 0 1.5rem;
a {
font-size: 22px;
font-weight: 600;
}
}
}
main {
width: 100%;
}
footer {
min-height: 6rem;
border-top: $border-large;
background: $footer-bg;
color: $footer-fg;
display: grid;
place-content: center;
font-family: 'Source Sans Pro', sans-serif;
font-size: 20px;
}
}
.homepage {
header .logo {
visibility: hidden;
}
section {
position: relative;
min-height: calc(100vh - 6rem);
&:last-of-type {
min-height: calc(100vh - 10rem);
}
display: flex;
flex-direction: column;
align-items: center;
gap: 2rem;
scroll-snap-align: start;
& > .title {
font-weight: 700;
font-size: 60px;
font-family: 'Source Sans Pro', sans-serif;
padding-top: 4rem;
}
}
.zig-zag {
z-index: 5;
position: absolute;
width: 100%;
display: flex;
&:first-child {
bottom: 100%;
}
}
section.principal {
z-index: -2;
min-height: calc(100vh - 7rem);
flex-direction: row;
align-items: center;
justify-content: center;
gap: 4rem;
padding: 3rem 0 6rem;
background: $homepage-principal-bg;
flex-wrap: wrap;
position: relative;
.circuit-layer {
z-index: -1;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
canvas {
width: 100%;
height: 100%;
}
}
& > .logo {
max-width: 640px;
position: relative;
user-select: none;
img {
width: 100%;
filter: drop-shadow(6px 6px 0 $black) drop-shadow(4px 0 0 $black) drop-shadow(0 4px 0 $black)
drop-shadow(-4px 0 0 $black) drop-shadow(0 -4px 0 $black);
}
}
& > .whats-phc {
background: $homepage-whatsphc-bg;
@include neo-brutalist-card($size: 4px, $offset: 8px);
padding: 2rem;
max-width: 37rem;
display: flex;
flex-direction: column;
align-items: center;
gap: 1rem;
.title {
font-family: 'Source Sans Pro', sans-serif;
font-weight: 700;
font-size: 40px;
}
.content {
@extend .text;
}
}
}
section.news {
background: $homepage-news-bg;
gap: 3rem;
padding-bottom: 6rem;
& > .news-list {
display: flex;
flex-direction: row;
gap: 3rem;
padding: 0 3rem;
justify-content: center;
flex-wrap: wrap;
}
[role='button'] {
padding: 0.5rem 2rem;
&.primary {
// background: #824ed4;
// color: #f0e6ff;
background: #f8e8b1;
color: #000d;
// &:hover {
// // background: #8e5ddd;
// }
}
}
}
section.projects {
background: $homepage-projects-bg;
padding-bottom: 6rem;
.project-list {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
grid-auto-flow: dense;
& > * {
grid-row: span var(--masonry-height);
}
gap: 1.5rem;
padding: 0 6rem;
.project {
height: 100%;
// background: #fcddff;
// background: #ffa89c;
background: var(--card-bg, $project-card-bg);
color: #000e;
@include neo-brutalist-card($size: 3px, $offset: 9px);
padding: 1rem;
display: grid;
grid-template-columns: auto 1fr;
grid-template-rows: auto 1fr;
gap: 0.25rem 1rem;
.title {
font-family: 'Source Sans Pro', sans-serif;
font-weight: 700;
font-size: 32px;
}
.image {
grid-row: span 2;
// place-self: center;
.box {
background: #0003;
border: 3px solid #0006;
border-radius: 6px;
width: 5rem;
height: 5rem;
}
}
.description {
font-size: 16px;
}
transition: all 128ms ease-out;
&:hover {
transform: translate(0, -4px);
box-shadow: 9px 13px 0 0 #222;
}
}
}
}
section.wanna-be-macchinista {
background: $homepage-macchinisti-bg;
color: #fdfdfd;
}
}
.utenti {
main {
justify-self: center;
display: flex;
flex-direction: column;
align-items: center;
max-width: 80ch;
padding: 5rem 0;
gap: 5rem;
}
}
.appunti {
main {
background: #fdfdf0;
justify-self: center;
display: grid;
grid-auto-flow: row;
justify-items: center;
padding: 3rem;
gap: 3rem;
width: 100%;
.search {
max-width: 80ch;
}
.appunti-scrollable {
justify-self: stretch;
&.center {
justify-self: center;
}
}
}
}
.login {
background: #ddfaff;
main {
justify-self: center;
display: flex;
flex-direction: column;
align-items: center;
max-width: 80ch;
padding: 3rem 0;
gap: 3rem;
h3 {
font-size: 28px;
font-weight: 600;
}
}
}
.guide {
background: #f0f0f0;
&.series {
h1 {
margin-bottom: 0;
}
.series {
font-size: 20px;
font-weight: 700;
text-align: center;
margin-bottom: 3rem;
}
}
main {
margin-top: 3rem;
margin-bottom: 6rem;
background: #fff;
max-width: calc(46rem + 2rem * 2);
justify-self: center;
padding: 3rem 2rem 2rem;
}
@media screen and (min-width: $screen-desktop-min) {
main {
@include neo-brutalist-card($size: 3px, $offset: 9px);
}
}
}
//
// Misc
//
::-webkit-scrollbar-track:vertical {
background-color: #f0f0f0;
border-left: 2px solid #222;
border-top: 2px solid #222;
border-bottom: 2px solid #222;
}
::-webkit-scrollbar-track:horizontal {
background-color: #f0f0f0;
border-top: 2px solid #222;
border-left: 2px solid #222;
border-right: 2px solid #222;
}
::-webkit-scrollbar-thumb {
background-color: #1e6733;
border: 2px solid #222;
}
::-webkit-scrollbar-thumb:hover {
background-color: #2b8b47;
}
::-webkit-scrollbar-corner {
background-color: #f0f0f0;
// border-left: 2px solid #222;
// border-top: 2px solid #222;
}
::-webkit-scrollbar {
width: 15px;
}