+
Notizie
+
{
- posts.map(post => (
-
+ news.map(newsItem => (
+
+
+ {newsItem.data.title}
+
+
+ {new Date(newsItem.data.publishDate).toLocaleDateString('it-IT', {
+ year: 'numeric',
+ month: 'long',
+ day: 'numeric',
+ })}
+
+
{newsItem.data.description}
+
))
}
-
\ No newline at end of file
+
diff --git a/src/styles/components.scss b/src/styles/components.scss
index 9fed5d1..4d5bf3f 100644
--- a/src/styles/components.scss
+++ b/src/styles/components.scss
@@ -1,378 +1,428 @@
-$news-bg: #fffbeb;
-$news-accent-bg: #f8e8b1;
+// $news-bg: #fffbeb;
+// $news-accent-bg: #f8e8b1;
@import './mixins.scss';
-//
-// Components - for complex parts of the UI like search bars or compound buttons
-//
-
-.material-symbols-outlined {
- display: inline-grid;
- place-content: center;
-
- font-size: 24px;
- font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
-}
-
-.title {
- font-family: 'Iosevka', monospace;
- font-weight: 700;
- font-size: 28px;
-}
-
-.search {
- width: 100%;
- height: 2.5rem;
-
- @include neo-brutalist-card;
-
- display: grid;
- grid-template-columns: 1fr auto;
- align-items: center;
-
- cursor: pointer;
-
- background: #fff;
-
- &:hover,
- &:hover input[type='text'] {
- background: #f8f8f8;
- }
-
- input[type='text'] {
- border: none;
- box-shadow: none;
- outline: none;
- height: 100%;
-
- padding: 0;
- padding-left: 0.35rem;
- }
+@layer component {
+ //
+ // Components - for complex parts of the UI like search bars or compound buttons
+ //
.material-symbols-outlined {
- padding: 0 0.5rem;
- }
-}
-
-.flex-column {
- display: flex;
- flex-direction: column;
- gap: 1rem;
-}
-
-.flex-row {
- display: flex;
- flex-direction: row;
- gap: 1rem;
-}
-
-// just to know for reference
-.fake-masonry {
- display: grid;
- grid-template-columns: repeat(var(--columns), 1fr);
- grid-auto-flow: dense;
+ display: inline-grid;
+ place-content: center;
- & > * {
- grid-row: span var(--masonry-height);
+ font-size: 24px;
+ font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}
-}
-
-.search-results {
- width: 100%;
- display: flex;
- flex-direction: column;
- gap: 1rem;
+ .title {
+ font-family: 'Iosevka', monospace;
+ font-weight: 700;
+ font-size: 28px;
+ }
- .search-result {
+ .search {
width: 100%;
+ height: 2.5rem;
- display: grid;
- grid-template-columns: auto auto 1fr auto;
- grid-template-areas: 'icon text . right';
+ @include neo-brutalist-card;
+ display: grid;
+ grid-template-columns: 1fr auto;
align-items: center;
- gap: 0.5rem;
-
- padding: 0.5rem;
+ cursor: pointer;
background: #fff;
- @include neo-brutalist-card;
-
- a {
- display: contents;
+ &:hover,
+ &:hover input[type='text'] {
+ background: #f8f8f8;
}
- & > .icon {
- grid-area: icon;
- display: grid;
- }
+ input[type='text'] {
+ border: none;
+ box-shadow: none;
+ outline: none;
+ height: 100%;
- & > .text {
- grid-area: text;
- display: grid;
+ padding: 0;
+ padding-left: 0.35rem;
}
- & > .right {
- grid-area: right;
- display: grid;
+ .material-symbols-outlined {
+ padding: 0 0.5rem;
}
}
-}
-.appunti-scrollable {
- display: flex;
- overflow-x: auto;
-
- .appunti-list {
- padding: 2px;
- padding-bottom: 1rem;
+ .flex-column {
+ display: flex;
+ flex-direction: column;
+ gap: 1rem;
}
-}
-.appunti-list {
- display: grid;
- grid-auto-flow: column;
-
- gap: 3rem;
-
- overflow-x: auto;
+ .flex-row {
+ display: flex;
+ flex-direction: row;
+ gap: 1rem;
+ }
- max-width: 100%;
-}
+ // just to know for reference
+ .fake-masonry {
+ display: grid;
+ grid-template-columns: repeat(var(--columns), 1fr);
+ grid-auto-flow: dense;
-.appunti-item {
- display: flex;
- flex-direction: column;
- gap: 0.25rem;
+ & > * {
+ grid-row: span var(--masonry-height);
+ }
+ }
- color: #444;
+ .search-results {
+ width: 100%;
- & > .thumbnail {
- width: 10rem;
- aspect-ratio: 10 / 14;
- background: #e0e0e0;
+ display: flex;
+ flex-direction: column;
+ gap: 1rem;
- @include neo-brutalist-card($hoverable: true);
- }
+ .search-result {
+ width: 100%;
- & > .thumbnail + * {
- font-weight: 700;
- padding-top: 0.25rem;
- }
+ display: grid;
+ grid-template-columns: auto auto 1fr auto;
+ grid-template-areas: 'icon text . right';
- & > .title,
- & > .course,
- & > .author,
- & > .course-year {
- padding-left: 0.5rem;
- font-size: 16px;
- }
-}
+ align-items: center;
-.article-list {
- display: grid;
- grid-auto-flow: row;
+ gap: 0.5rem;
- max-width: 100%;
+ padding: 0.5rem;
- gap: 2rem;
- grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr));
- grid-auto-rows: auto;
+ background: #fff;
- .article {
- display: grid;
- grid-template-rows: auto auto auto;
+ @include neo-brutalist-card;
- background: var(--card-bg, $project-card-bg);
- color: #000e;
+ a {
+ display: contents;
+ }
- @include neo-brutalist-card($size: 3px, $offset: 9px);
+ & > .icon {
+ grid-area: icon;
+ display: grid;
+ }
- row-gap: 0.5rem;
- padding: 1rem;
+ & > .text {
+ grid-area: text;
+ display: grid;
+ }
- .description {
- font-size: 16px;
+ & > .right {
+ grid-area: right;
+ display: grid;
+ }
}
+ }
- .tags {
- display: flex;
- gap: 0.5rem;
- flex-wrap: wrap;
- font-size: 14px;
- font-weight: 600;
- color: #555;
+ .appunti-scrollable {
+ display: flex;
+ overflow-x: auto;
+
+ .appunti-list {
+ padding: 2px;
+ padding-bottom: 1rem;
}
}
-}
-.news-list {
- display: grid;
- grid-auto-flow: column;
+ .appunti-list {
+ display: grid;
+ grid-auto-flow: column;
- .news-item {
- background: $news-bg;
- color: #111;
+ gap: 3rem;
- @include neo-brutalist-card($size: 3px, $offset: 9px);
+ overflow-x: auto;
+ max-width: 100%;
+ }
+
+ .appunti-item {
display: flex;
flex-direction: column;
+ gap: 0.25rem;
- width: 22rem;
- max-height: 27rem;
+ color: #444;
- overflow: hidden;
+ & > .thumbnail {
+ width: 10rem;
+ aspect-ratio: 10 / 14;
+ background: #e0e0e0;
- ::-webkit-scrollbar {
- width: 10px;
+ @include neo-brutalist-card($hoverable: true);
}
- ::-webkit-scrollbar-thumb {
- background-color: #c67e14;
- border: 2px solid #222;
-
- &:hover {
- background-color: #e69419;
- }
+ & > .thumbnail + * {
+ font-weight: 700;
+ padding-top: 0.25rem;
}
- a {
- font-weight: 600;
- text-decoration: none;
- color: #c67e14;
-
- &:hover {
- text-decoration: underline solid 2px;
- }
+ & > .title,
+ & > .course,
+ & > .author,
+ & > .course-year {
+ padding-left: 0.5rem;
+ font-size: 16px;
}
+ }
- & > .title {
- padding: 1rem;
- background: $news-accent-bg;
- line-height: 1;
- font-size: 26px;
- }
+ .article-list {
+ display: grid;
+ grid-auto-flow: row;
- a.title {
- color: #83530c;
- }
+ max-width: 100%;
- & > .abstract {
- flex-grow: 1;
+ gap: 2rem;
+ grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr));
+ grid-auto-rows: auto;
- padding: 1rem;
+ .article {
+ display: grid;
+ grid-template-rows: auto auto auto;
- overflow-y: auto;
+ background: var(--card-bg, $project-card-bg);
+ color: #000e;
- @extend .text;
- }
+ @include neo-brutalist-card($size: 3px, $offset: 9px);
- & > .content {
- display: flex;
+ row-gap: 0.5rem;
padding: 1rem;
- flex-direction: column;
- gap: 0.5rem;
-
- background: #fff8da;
- & > .continue {
- padding: 1rem;
-
- display: grid;
- align-items: end;
- justify-content: end;
- }
-
- & > .description {
+ .description {
font-size: 16px;
- line-height: 1.5;
-
- flex-grow: 1;
}
- & > .tags {
+ .tags {
display: flex;
gap: 0.5rem;
flex-wrap: wrap;
font-size: 14px;
- color: #555;
- }
-
- & > .date {
- font-size: 14px;
- font-style: italic;
font-weight: 600;
- color: #0008;
- }
-
- & > .author {
- font-weight: 600;
- font-size: 15px;
color: #555;
}
}
}
-}
-//
-// Cards
-//
+ .news-list {
+ display: grid;
+ grid-auto-flow: column;
+
+ // .news-item {
+ // background: $news-bg;
+ // color: #111;
+
+ // @include neo-brutalist-card($size: 3px, $offset: 9px);
+
+ // display: flex;
+ // flex-direction: column;
+
+ // width: 22rem;
+ // max-height: 27rem;
+
+ // overflow: hidden;
+
+ // ::-webkit-scrollbar {
+ // width: 10px;
+ // }
+
+ // ::-webkit-scrollbar-thumb {
+ // background-color: #c67e14;
+ // border: 2px solid #222;
+
+ // &:hover {
+ // background-color: #e69419;
+ // }
+ // }
+
+ // a {
+ // font-weight: 600;
+ // text-decoration: none;
+ // color: #c67e14;
+
+ // &:hover {
+ // text-decoration: underline solid 2px;
+ // }
+ // }
+
+ // & > .title {
+ // padding: 1rem;
+ // background: $news-accent-bg;
+ // line-height: 1;
+ // font-size: 26px;
+ // }
+
+ // a.title {
+ // color: #83530c;
+ // }
+
+ // & > .abstract {
+ // flex-grow: 1;
+
+ // padding: 1rem;
+
+ // overflow-y: auto;
+
+ // @extend .text;
+ // }
+
+ // & > .content {
+ // display: flex;
+ // padding: 1rem;
+ // flex-direction: column;
+ // gap: 0.5rem;
+
+ // background: #fff8da;
+
+ // & > .continue {
+ // padding: 1rem;
+
+ // display: grid;
+ // align-items: end;
+ // justify-content: end;
+ // }
+
+ // & > .description {
+ // font-size: 16px;
+ // line-height: 1.5;
+
+ // flex-grow: 1;
+ // }
+
+ // & > .tags {
+ // display: flex;
+ // gap: 0.5rem;
+ // flex-wrap: wrap;
+ // font-size: 14px;
+ // color: #555;
+ // }
+
+ // & > .date {
+ // font-size: 14px;
+ // font-style: italic;
+ // font-weight: 600;
+ // color: #0008;
+ // }
+
+ // & > .author {
+ // font-weight: 600;
+ // font-size: 15px;
+ // color: #555;
+ // }
+ // }
+ // }
+ }
+
+ //
+ // Cards
+ //
+
+ .card {
+ display: grid;
-.card {
- display: grid;
+ --card-base-internal: var(--card-base, #f8f8f8);
- --card-base-internal: var(--card-base, #f8f8f8);
+ background: var(--card-base-internal);
+ color: color-mix(in srgb, var(--card-base-internal), #000 80%);
- background: var(--card-base-internal);
- color: color-mix(in srgb, var(--card-base-internal), #000 80%);
+ @include neo-brutalist-card($size: 3px, $offset: 9px);
- @include neo-brutalist-card($size: 3px, $offset: 9px);
+ row-gap: 0.5rem;
+ padding: 1rem;
- row-gap: 0.5rem;
- padding: 1rem;
+ // Variants
- // Variants
+ &.large {
+ padding: 2rem;
- &.large {
- padding: 2rem;
+ @include neo-brutalist-card($size: 4px, $offset: 8px);
- @include neo-brutalist-card($size: 4px, $offset: 8px);
+ row-gap: 1rem;
- row-gap: 1rem;
+ & > .title {
+ font-size: 36px;
+ font-weight: 700;
+ }
+
+ & > .text {
+ font-size: 18px;
+ }
+ }
+
+ // Child Items
& > .title {
- font-size: 36px;
+ color: color-mix(in srgb, var(--card-base-internal), #000 75%);
+ font-size: 26px;
font-weight: 700;
}
& > .text {
- font-size: 18px;
+ font-size: 16px;
+
+ &.small {
+ color: color-mix(in srgb, var(--card-base-internal), #000 75%);
+ font-size: 14px;
+ font-weight: 600;
+ }
+
+ &.dimmed {
+ color: color-mix(in srgb, var(--card-base-internal), #000 50%);
+ }
}
- }
- // Child Items
+ & > .tags {
+ display: flex;
+ gap: 0.5rem;
+ flex-wrap: wrap;
+ font-size: 14px;
+ font-weight: 600;
+ color: #555;
- & > .title {
- color: color-mix(in srgb, var(--card-base-internal), #000 75%);
- font-size: 26px;
- font-weight: 700;
- }
+ a {
+ color: color-mix(in srgb, var(--card-base-internal), #000 60%);
+ font-weight: 600;
- & > .text {
- font-size: 16px;
+ &:hover {
+ text-decoration: underline solid 2px;
+ }
+ }
+ }
+
+ a:hover {
+ text-decoration: underline solid 2px;
+ }
+
+ a.title {
+ &:hover {
+ text-decoration: underline solid 3px;
+ }
+ }
}
- & > .tags {
- display: flex;
- gap: 0.5rem;
- flex-wrap: wrap;
- font-size: 14px;
- font-weight: 600;
- color: #555;
+ //
+ // Card List
+ //
+
+ .card-list {
+ display: grid;
+ grid-auto-flow: row;
+
+ max-width: 100%;
+
+ gap: 2rem;
+ grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
+ grid-auto-rows: auto;
+
+ & > .card {
+ max-width: 25rem;
+ }
}
}
diff --git a/src/styles/main.scss b/src/styles/main.scss
index 5e5be41..6afd027 100644
--- a/src/styles/main.scss
+++ b/src/styles/main.scss
@@ -16,77 +16,53 @@ $project-card-bg: #a2d4f3;
$screen-desktop-min: 1024px;
+@layer common, typography, component, page;
+
@import './mixins.scss';
@import './typography.scss';
-*,
-*::before,
-*::after {
- box-sizing: border-box;
- font: inherit;
- margin: 0;
-}
+@layer common {
+ *,
+ *::before,
+ *::after {
+ box-sizing: border-box;
+ font: inherit;
+ margin: 0;
+ }
-html {
- height: 100%;
-}
+ html {
+ height: 100%;
+ }
-html,
-body {
- min-height: 100%;
- margin: 0;
+ html,
+ body {
+ min-height: 100%;
+ margin: 0;
- font-family: 'Open Sans', sans-serif;
- font-size: 18px;
- color: #222;
-}
+ font-family: 'Open Sans', sans-serif;
+ font-size: 18px;
+ color: #222;
+ }
-// html {
-// scroll-snap-type: y proximity;
-// scroll-padding-top: 4rem;
-// }
+ // html {
+ // scroll-snap-type: y proximity;
+ // scroll-padding-top: 4rem;
+ // }
-img {
- display: block;
-}
+ img {
+ display: block;
+ }
-a {
- color: inherit;
- text-decoration: none;
+ a {
+ color: inherit;
+ text-decoration: none;
+ }
}
//
// Typography
//
-.text {
- display: block;
-
- line-height: 1.5;
-
- p + p {
- margin-top: 0.5rem;
- }
-
- em {
- font-style: italic;
- }
-
- strong {
- font-weight: 600;
- }
-
- a,
- a:visited {
- color: #1e6733;
- font-weight: 600;
-
- &:hover {
- text-decoration: underline 2px solid;
- }
- }
-}
-
@import './controls.scss';
@import './components.scss';
diff --git a/src/styles/pages.scss b/src/styles/pages.scss
index d812ce6..867ad67 100644
--- a/src/styles/pages.scss
+++ b/src/styles/pages.scss
@@ -8,593 +8,644 @@
--guide-light: color-mix(in srgb, var(--guide-base), #fff 25%);
--guide-lighter: color-mix(in srgb, var(--guide-base), #fff 50%);
--guide-lightest: color-mix(in srgb, var(--guide-base), #fff 75%);
+
+ --news-base: #f8e8b1;
}
-.homepage {
- header .logo {
- visibility: hidden;
- }
+@layer page {
+ .homepage {
+ header .logo {
+ visibility: hidden;
+ }
- section {
- position: relative;
+ section {
+ position: relative;
- min-height: calc(100vh - 6rem);
+ min-height: calc(100vh - 6rem);
- &:last-of-type {
- min-height: calc(100vh - 10rem);
- }
+ &:last-of-type {
+ min-height: calc(100vh - 10rem);
+ }
- display: flex;
- flex-direction: column;
- align-items: center;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
- gap: 2rem;
+ gap: 2rem;
- scroll-snap-align: start;
+ scroll-snap-align: start;
- & > .title {
- font-size: 48px;
- padding-top: 4rem;
+ & > .title {
+ font-size: 48px;
+ padding-top: 4rem;
+ }
}
- }
- .zig-zag {
- z-index: 5;
+ .zig-zag {
+ z-index: 5;
- position: absolute;
- width: 100%;
+ position: absolute;
+ width: 100%;
- display: flex;
+ display: flex;
- &:first-child {
- bottom: 100%;
+ &:first-child {
+ bottom: 100%;
+ }
}
- }
- section.principal {
- z-index: 2;
-
- min-height: calc(100vh - 7rem);
+ section.principal {
+ z-index: 2;
- flex-direction: row;
- align-items: center;
- justify-content: center;
- gap: 4rem;
+ min-height: calc(100vh - 7rem);
- padding: 3rem 0 6rem;
+ flex-direction: row;
+ align-items: center;
+ justify-content: center;
+ gap: 4rem;
- background: $homepage-principal-bg;
+ padding: 3rem 0 6rem;
- flex-wrap: wrap;
+ background: $homepage-principal-bg;
- position: relative;
+ flex-wrap: wrap;
- .circuit-layer {
- z-index: 1;
- position: absolute;
- left: 0;
- top: 0;
- width: 100%;
- height: 100%;
+ position: relative;
- canvas {
+ .circuit-layer {
+ z-index: 1;
+ position: absolute;
+ left: 0;
+ top: 0;
width: 100%;
height: 100%;
+
+ canvas {
+ width: 100%;
+ height: 100%;
+ }
}
- }
- & > .logo {
- z-index: 2;
- max-width: 640px;
- position: relative;
+ & > .logo {
+ z-index: 2;
+ max-width: 640px;
+ position: relative;
- user-select: none;
+ 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);
+ 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 {
- z-index: 2;
- background: $homepage-whatsphc-bg;
+ & > .whats-phc {
+ z-index: 2;
+ background: $homepage-whatsphc-bg;
- @include neo-brutalist-card($size: 4px, $offset: 8px);
+ @include neo-brutalist-card($size: 4px, $offset: 8px);
- padding: 2rem;
+ padding: 2rem;
- max-width: 37rem;
+ max-width: 37rem;
- display: flex;
- flex-direction: column;
- align-items: center;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
- gap: 1rem;
+ gap: 1rem;
- .title {
- font-size: 40px;
- }
+ .title {
+ font-size: 40px;
+ }
- .content {
- @extend .text;
- line-height: 1.5;
+ .content {
+ @extend .text;
+ line-height: 1.5;
+ }
}
}
- }
- section.news {
- background: $homepage-news-bg;
+ section.news {
+ background: $homepage-news-bg;
- gap: 3rem;
+ gap: 3rem;
- padding-bottom: 6rem;
+ padding-bottom: 6rem;
- & > .news-list {
- display: flex;
- flex-direction: row;
- gap: 3rem;
+ & > .news-list {
+ display: flex;
+ flex-direction: row;
+ gap: 3rem;
- align-items: flex-start;
+ align-items: flex-start;
- padding: 0 3rem;
+ padding: 0 3rem;
- justify-content: center;
- flex-wrap: wrap;
- }
+ justify-content: center;
+ flex-wrap: wrap;
+ }
- [role='button'] {
- padding: 0.5rem 2rem;
+ [role='button'] {
+ padding: 0.5rem 2rem;
- &.primary {
- // background: #824ed4;
- // color: #f0e6ff;
- background: #f8e8b1;
- color: #000d;
+ &.primary {
+ // background: #824ed4;
+ // color: #f0e6ff;
+ background: #f8e8b1;
+ color: #000d;
- // &:hover {
- // // background: #8e5ddd;
- // }
+ // &:hover {
+ // // background: #8e5ddd;
+ // }
+ }
}
}
- }
- section.projects {
- background: $homepage-projects-bg;
+ section.projects {
+ background: $homepage-projects-bg;
- padding-bottom: 6rem;
+ padding-bottom: 6rem;
- .project-list {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
- grid-auto-flow: dense;
+ .project-list {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
+ grid-auto-flow: dense;
- & > * {
- grid-row: span var(--masonry-height);
- }
+ & > * {
+ grid-row: span var(--masonry-height);
+ }
- gap: 1.5rem;
+ gap: 1.5rem;
- padding: 0 6rem;
+ padding: 0 6rem;
- .project {
- height: 100%;
+ .project {
+ height: 100%;
- // background: #fcddff;
- // background: #ffa89c;
- background: var(--card-bg, $project-card-bg);
- color: #000e;
+ // background: #fcddff;
+ // background: #ffa89c;
+ background: var(--card-bg, $project-card-bg);
+ color: #000e;
- @include neo-brutalist-card($size: 3px, $offset: 9px);
+ @include neo-brutalist-card($size: 3px, $offset: 9px);
- padding: 1rem;
+ padding: 1rem;
- display: grid;
- grid-template-columns: auto 1fr;
- grid-template-rows: auto 1fr;
+ display: grid;
+ grid-template-columns: auto 1fr;
+ grid-template-rows: auto 1fr;
- gap: 0.25rem 1rem;
+ gap: 0.25rem 1rem;
- .title {
- font-size: 32px;
- }
+ .title {
+ font-size: 32px;
+ }
- .image {
- grid-row: span 2;
- // place-self: center;
+ .image {
+ grid-row: span 2;
+ // place-self: center;
- .box {
- background: #0003;
- border: 3px solid #0006;
- border-radius: 6px;
- width: 5rem;
- height: 5rem;
- }
+ .box {
+ background: #0003;
+ border: 3px solid #0006;
+ border-radius: 6px;
+ width: 5rem;
+ height: 5rem;
+ }
- img {
- width: 5rem;
- height: 5rem;
+ img {
+ width: 5rem;
+ height: 5rem;
+ }
}
- }
- .description {
- font-size: 16px;
- @extend .text;
- }
+ .description {
+ font-size: 16px;
+ @extend .text;
+ }
- transition: all 128ms ease-out;
+ transition: all 128ms ease-out;
- &:hover {
- transform: translate(0, -4px);
- box-shadow: 9px 13px 0 0 #222;
+ &:hover {
+ transform: translate(0, -4px);
+ box-shadow: 9px 13px 0 0 #222;
+ }
}
}
}
- }
- section.wanna-be-macchinista {
- background: $homepage-macchinisti-bg;
- color: #fdfdfd;
+ section.wanna-be-macchinista {
+ background: $homepage-macchinisti-bg;
+ color: #fdfdfd;
- .content {
- @extend .text;
+ .content {
+ @extend .text;
+ }
}
}
-}
-.utenti {
- main {
- justify-self: center;
+ .utenti {
+ main {
+ justify-self: center;
- display: flex;
- flex-direction: column;
- align-items: center;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
- max-width: 80ch;
- padding: 5rem 0;
+ max-width: 80ch;
+ padding: 5rem 0;
- gap: 5rem;
+ gap: 5rem;
+ }
}
-}
-.appunti {
- main {
- background: #fdfdf0;
+ .appunti {
+ main {
+ background: #fdfdf0;
- justify-self: center;
+ justify-self: center;
- display: grid;
- grid-auto-flow: row;
+ display: grid;
+ grid-auto-flow: row;
- justify-items: center;
+ justify-items: center;
- padding: 3rem;
+ padding: 3rem;
- gap: 3rem;
+ gap: 3rem;
- width: 100%;
+ width: 100%;
- .search {
- max-width: 80ch;
- }
+ .search {
+ max-width: 80ch;
+ }
- .appunti-scrollable {
- justify-self: stretch;
+ .appunti-scrollable {
+ justify-self: stretch;
- &.center {
- justify-self: center;
+ &.center {
+ justify-self: center;
+ }
}
}
}
-}
-.login {
- background: #ddfaff;
+ .login {
+ background: #ddfaff;
- main {
- justify-self: center;
+ main {
+ justify-self: center;
- display: flex;
- flex-direction: column;
- align-items: center;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
- max-width: 80ch;
- padding: 3rem 0;
+ max-width: 80ch;
+ padding: 3rem 0;
- gap: 3rem;
+ gap: 3rem;
- h3 {
- font-size: 28px;
- font-weight: 600;
+ h3 {
+ font-size: 28px;
+ font-weight: 600;
+ }
}
}
-}
-
-.notizie {
- background: #fffced;
-
- main {
- justify-self: center;
-
- display: flex;
- flex-direction: column;
- align-items: center;
- max-width: 80ch;
- padding: 5rem 0;
-
- gap: 5rem;
+ .notizie,
+ .notizia {
+ --card-base: color-mix(in lab, var(--news-base), #fff 25%);
+ --zone-color: color-mix(in lab, var(--news-base), #000 50%);
+ background: color-mix(in lab, var(--news-base), #fff 90%);
}
-}
-.notizia {
- background: #fffced;
- --zone-color: #ac8919;
+ .notizie {
+ main {
+ justify-self: center;
- main {
- margin-top: 3rem;
- margin-bottom: 6rem;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
- background: #fff2c9;
- max-width: calc(46rem + 2rem * 2);
- justify-self: center;
- padding: 3rem 2rem 2rem;
+ padding: 5rem;
+ gap: 5rem;
+ }
}
- @media screen and (min-width: $screen-desktop-min) {
+ .notizia {
main {
- @include neo-brutalist-card($size: 3px, $offset: 9px);
- }
- }
-}
+ --card-base: color-mix(in lab, var(--news-base), #fff 25%);
-.guida {
- background: #f0fdff;
- --zone-color: #2c7c9b;
+ max-width: calc(46rem + 2rem * 2);
+ justify-self: center;
+ padding: 3rem 2rem 2rem;
- &.series {
- h1 {
- margin-bottom: 0;
- }
+ margin-top: 3rem;
+ margin-bottom: 6rem;
+
+ @media screen and (max-width: $screen-desktop-min) {
+ box-shadow: none;
+ border: none;
+ border-radius: 0;
+ max-width: none;
- .series {
- font-size: 20px;
- font-weight: 700;
- text-align: center;
- margin-bottom: 3rem;
+ margin: 0 auto;
+ }
}
}
- main {
- margin-top: 3rem;
- margin-bottom: 6rem;
-
- background: #fff;
- max-width: calc(46rem + 2rem * 2);
- justify-self: center;
- padding: 3rem 2rem 2rem;
+ // .guida {
+ // background: #f0fdff;
+ // --zone-color: #2c7c9b;
+
+ // &.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);
+ // }
+ // }
+ // }
+
+ // .guide {
+ // background: #f0fdff;
+ // --zone-color: #2c8c9b;
+
+ // main {
+ // justify-self: center;
+
+ // display: flex;
+ // flex-direction: column;
+ // align-items: center;
+
+ // max-width: calc(25rem * 3 + 2rem * 2);
+ // padding: 5rem 0;
+
+ // gap: 5rem;
+ // }
+ // }
+
+ .guide,
+ .guida {
+ --card-base: color-mix(in lab, var(--guide-base), #fff 25%);
+ --zone-color: color-mix(in lab, var(--guide-base), #000 50%);
+ background: color-mix(in lab, var(--guide-base), #fff 90%);
}
- @media screen and (min-width: $screen-desktop-min) {
+ .guide {
main {
- @include neo-brutalist-card($size: 3px, $offset: 9px);
+ justify-self: center;
+
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+
+ padding: 5rem;
+ gap: 5rem;
}
}
-}
-.guide {
- background: #f0fdff;
- --zone-color: #2c8c9b;
+ .guida {
+ main {
+ --card-base: color-mix(in lab, var(--guide-base), #fff 50%);
- main {
- justify-self: center;
+ max-width: calc(46rem + 2rem * 2);
+ justify-self: center;
+ padding: 3rem 2rem 2rem;
- display: flex;
- flex-direction: column;
- align-items: center;
+ margin-top: 3rem;
+ margin-bottom: 6rem;
- max-width: calc(25rem * 3 + 2rem * 2);
- padding: 5rem 0;
+ @media screen and (max-width: $screen-desktop-min) {
+ box-shadow: none;
+ border: none;
+ border-radius: 0;
+ max-width: none;
- gap: 5rem;
+ margin: 0 auto;
+ }
+ }
}
-}
-.tag {
- main {
- justify-self: center;
-
- display: flex;
- flex-direction: column;
- align-items: center;
+ .tag {
+ main {
+ justify-self: center;
- max-width: 80ch;
- padding: 5rem 0;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
- gap: 5rem;
+ padding: 5rem 0;
+ gap: 5rem;
+ }
}
-}
-.design {
- grid-template-columns: 2fr 10fr;
+ .design {
+ grid-template-columns: minmax(15rem, 2fr) 10fr;
- @media screen and (max-width: 1400px) {
- grid-template-columns: 1fr;
- }
+ @media screen and (max-width: 1400px) {
+ grid-template-columns: 1fr;
+ }
- aside {
- margin: 1rem;
- padding: 1rem;
+ aside {
+ margin: 1rem;
+ padding: 1rem;
- @include neo-brutalist-card();
+ @include neo-brutalist-card();
- background: #f0f0f0;
+ background: #f0f0f0;
- align-self: start;
- position: sticky;
- top: 7rem;
- height: calc(100dvh - 8rem - 6rem);
-
- nav {
- display: flex;
- flex-direction: column;
- gap: 0.5rem;
-
- ul {
- list-style: none;
- padding: 0;
- margin: 0;
+ align-self: start;
+ position: sticky;
+ top: 7rem;
+ height: calc(100dvh - 8rem - 6rem);
+ nav {
display: flex;
flex-direction: column;
- gap: 0.5rem;
+ gap: 0.25rem;
- li {
- padding-left: calc((var(--depth) - 1) * 1rem);
+ ul {
+ list-style: none;
+ padding: 0;
+ margin: 0;
- a {
- font-size: 16px;
- font-weight: 600;
+ display: flex;
+ flex-direction: column;
+ gap: 0.25rem;
+
+ li {
+ padding-left: calc((var(--depth) - 1) * 1rem);
+
+ display: flex;
+
+ a {
+ display: block;
- color: #444;
+ font-size: 16px;
+ font-weight: 600;
- &:hover {
- color: #666;
- text-decoration: underline;
+ transform: translate(-0.25rem, 0);
+
+ padding: 0.125rem 0.25rem;
+ border-radius: 0.125rem;
+
+ color: #444;
+
+ &:hover {
+ background: #00000018;
+ }
}
}
}
}
- }
- @media screen and (max-width: 1400px) {
- display: none;
+ @media screen and (max-width: 1400px) {
+ display: none;
+ }
}
- }
- footer {
- grid-column: 1 / -1;
- }
+ footer {
+ grid-column: 1 / -1;
+ }
- main {
- justify-self: center;
+ main {
+ justify-self: center;
- // trick to fix anchor links with sticky header
- & > h1,
- & > h2,
- & > h3,
- & > h4 {
- padding-top: 7rem;
- margin-top: -7rem;
+ @media screen and (min-width: $screen-desktop-min) {
+ padding: 3rem 0;
+ }
}
- }
- pre[data-language='astro'] {
- --code-bg: #fff7ef;
+ pre[data-language='astro'] {
+ --code-bg: #fff7ef;
- width: 100%;
- max-width: 46rem;
- }
+ width: 100%;
+ max-width: 46rem;
+ }
- .container {
- margin: 2rem auto;
+ .container {
+ margin: 2rem auto;
- border: 2px dashed #ddd;
+ border: 2px dashed #ddd;
- position: relative;
- z-index: 1;
+ position: relative;
+ z-index: 1;
- &.large {
- min-width: calc(100% - 4rem);
- }
+ &.large {
+ min-width: calc(100% - 4rem);
+ }
- &:not(.large) {
- & > .content {
- display: grid;
- place-content: center;
+ &:not(.large) {
+ & > .content {
+ display: grid;
+ place-content: center;
+ }
}
- }
- & > .content {
- padding: 2rem;
+ & > .content {
+ padding: 2rem;
- overflow: auto;
- }
+ overflow: auto;
+ }
- // label in the top left corner
- &::before {
- content: 'Preview';
- position: absolute;
+ // label in the top left corner
+ &::before {
+ content: 'Preview';
+ position: absolute;
- bottom: 100%;
- left: 0;
+ bottom: 100%;
+ left: 0;
- padding: 0.125rem 0.5rem;
+ padding: 0.125rem 0.5rem;
- background: #eee;
- color: #000;
+ background: #eee;
+ color: #000;
- font-family: 'Iosevka', monospace;
- font-size: 14px;
+ font-family: 'Iosevka', monospace;
+ font-size: 14px;
- border-radius: 0.25rem;
+ border-radius: 0.25rem;
- z-index: -1;
+ z-index: -1;
- transform: translate(-2px, -4px);
+ transform: translate(-2px, -4px);
- opacity: 0;
- transition: opacity 64ms ease-in;
- }
+ opacity: 0;
+ transition: opacity 64ms ease-in;
+ }
- &:hover {
- border-color: #bbb;
+ &:hover {
+ border-color: #bbb;
- &::before {
- opacity: 1;
+ &::before {
+ opacity: 1;
+ }
}
}
- }
- .palette {
- margin: 2rem auto;
+ .palette {
+ margin: 2rem auto;
- display: grid;
- grid-template-columns: auto auto;
+ display: grid;
+ grid-template-columns: auto auto;
- gap: 1rem;
+ gap: 1rem;
- place-content: center;
+ place-content: center;
- & > .color {
- width: 2rem;
- height: 2rem;
- border-radius: 0.25rem;
+ & > .color {
+ width: 2rem;
+ height: 2rem;
+ border-radius: 0.25rem;
- border: 2px solid #000;
- box-shadow: 4px 4px 0 0 #000;
+ border: 2px solid #000;
+ box-shadow: 4px 4px 0 0 #000;
- overflow: hidden;
+ overflow: hidden;
- & > .region {
- width: 100%;
- height: 100%;
+ & > .region {
+ width: 100%;
+ height: 100%;
- border: 2px solid #fff;
+ border: 2px solid #fff;
- border-radius: 4px;
+ border-radius: 4px;
+ }
}
- }
- & > .label {
- display: grid;
- align-content: center;
+ & > .label {
+ display: grid;
+ align-content: center;
- font-family: 'JetBrains Mono', monospace;
- font-size: 16px;
+ font-family: 'JetBrains Mono', monospace;
+ font-size: 16px;
- user-select: all;
+ user-select: all;
+ }
}
}
}
diff --git a/src/styles/typography.scss b/src/styles/typography.scss
index a095080..564b92c 100644
--- a/src/styles/typography.scss
+++ b/src/styles/typography.scss
@@ -24,108 +24,132 @@
margin-bottom: 0.25rem;
}
- p + h#{$i} {
- margin-top: 0.75rem * $factor;
- }
+ // p + h#{$i} {
+ // margin-top: 0.75rem * $factor;
+ // }
}
}
-@include geometric-headings;
+@layer typography {
+ @include geometric-headings;
-.text-content {
- & > * {
- max-width: 46rem;
- }
+ .text-content,
+ .text {
+ line-height: 1.5;
- pre,
- code {
- background: var(--code-bg, #f0f0f0) !important;
+ & > * {
+ max-width: 46rem;
+ }
- font-family: 'Source Code Pro', monospace;
- font-weight: 400;
- font-size: 16px;
- }
+ pre,
+ code {
+ background: color-mix(in lab, var(--card-base-internal, #ededed), #fff 35%) !important;
+ // background: color-mix(in lab, var(--zone-color), #fff 75%) !important;
+ // background: var(--code-bg, #00000022) !important;
- code {
- border-radius: 0.25rem;
- padding: 0.125rem;
- }
+ font-family: 'Source Code Pro', monospace;
+ font-weight: 400;
+ font-size: 16px;
+ }
- pre {
- margin: 2rem auto;
+ code {
+ border-radius: 0.25rem;
+ padding: 0.125rem 0.3rem;
+ }
- padding: 0.5rem 1rem;
+ pre {
+ margin: 2rem auto;
- // width: 100%;
- max-width: 80ch;
+ padding: 0.5rem 1rem;
- width: fit-content;
+ // width: 100%;
+ max-width: 80ch;
- line-height: 1.5;
+ width: fit-content;
- border-radius: 0.25rem;
+ line-height: 1.5;
- box-shadow: 0.25rem 0.25rem 0 0 #333;
- border: 2px solid #333;
+ border-radius: 0.25rem;
- code {
- padding: 0;
+ box-shadow: 0.25rem 0.25rem 0 0 #333;
+ border: 2px solid #333;
+
+ code {
+ padding: 0;
+ }
}
- }
- p {
- line-height: 1.75;
- margin: 1rem auto;
- }
+ p {
+ line-height: 1.75;
+ margin: 0 auto;
+ }
- strong {
- font-weight: 500;
- }
+ p + p {
+ margin-top: 1rem;
+ }
- em {
- font-style: italic;
- }
+ h1 + p,
+ h2 + p,
+ h3 + p,
+ h4 + p {
+ margin-top: 1rem;
+ }
- @include geometric-headings;
+ p:has(+ h1, + h2, + h3, + h4) {
+ margin-bottom: 1rem;
+ }
- h1 {
- margin-bottom: 2rem;
- text-align: center;
- }
+ strong {
+ font-weight: 600;
+ }
- h1,
- h2,
- h3,
- h4 {
- font-weight: 700;
- color: #333;
- }
+ em {
+ font-style: italic;
+ }
- h1,
- h2,
- h3,
- h4,
- ol,
- ul {
- margin-left: auto;
- margin-right: auto;
- }
+ @include geometric-headings;
- a,
- a:visited {
- color: var(--zone-color, #1e6733);
- font-weight: 600;
+ h1 {
+ margin-bottom: 2rem;
+ text-align: center;
+ }
+
+ h1,
+ h2,
+ h3,
+ h4 {
+ font-weight: 700;
+ color: #333;
- &:hover {
- text-decoration: underline 2px solid;
+ // trick to fix anchor links with sticky header
+ padding-top: 7rem;
+ margin-top: -6.5rem;
}
- }
- padding: 2rem 0 3rem;
+ h1,
+ h2,
+ h3,
+ h4,
+ ol,
+ ul {
+ margin-left: auto;
+ margin-right: auto;
+ }
- @media screen and (max-width: 1024px) {
- & > * {
- margin: 0 0.75rem;
+ a,
+ a:visited {
+ color: var(--zone-color, #1e6733);
+ font-weight: 600;
+
+ &:hover {
+ text-decoration: underline 2px solid;
+ }
+ }
+
+ @media screen and (max-width: 1024px) {
+ & > * {
+ margin: 0 0.75rem;
+ }
}
}
}