/* $news-bg: #fffbeb; $news-accent-bg: #f8e8b1; */ /* @TODO: SCSS conversion - @import becomes more complex */ /* @import './mixins.scss'; */ @layer component { /* /* Components - for complex parts of the UI like search bars or compound buttons */ .phosphor-icon { box-sizing: content-box; width: 22px; height: 22px; display: grid inline; place-content: center; } .material-symbols-outlined { font-family: 'Material Symbols Outlined Variable'; font-weight: normal; font-style: normal; line-height: 1; text-transform: none; letter-spacing: normal; word-wrap: normal; white-space: nowrap; direction: ltr; display: inline-grid; place-content: center; font-size: 24px; font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24; max-width: 32px; } .title { font-family: var(--font-display); font-weight: 700; font-size: 28px; } .search { width: 100%; height: 2.5rem; /* @TODO: SCSS conversion - mixin */ /* @include neo-brutalist-card; */ border: 3px solid #222; border-radius: 6px; box-shadow: 4px 4px 0 0 #222; background: #fff; display: grid; grid-template-columns: 1fr auto; align-items: center; cursor: pointer; &: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; } .material-symbols-outlined, .phosphor-icon { padding: 0 0.5rem; } } .search-results { width: 100%; display: flex; flex-direction: column; gap: 1rem; .search-result { width: 100%; display: grid; grid-template-columns: auto auto 1fr auto; grid-template-areas: 'icon text . right'; align-items: center; gap: 0.5rem; padding: 0.5rem; background: #fff; /* @TODO: SCSS conversion - mixin */ /* @include neo-brutalist-card; */ border: 3px solid #222; border-radius: 6px; box-shadow: 4px 4px 0 0 #222; a { display: contents; } & > .icon { grid-area: icon; display: grid; } & > .text { grid-area: text; display: grid; } & > .right { grid-area: right; display: grid; } } } .appunti-scrollable { display: flex; overflow-x: auto; .appunti-list { padding: 2px; padding-bottom: 1rem; } } .appunti-list { display: grid; grid-auto-flow: column; gap: 3rem; overflow-x: auto; max-width: 100%; } .appunti-item { display: flex; flex-direction: column; gap: 0.25rem; color: #444; & > .thumbnail { width: 10rem; aspect-ratio: 10 / 14; background: #d0d0d0; /* @TODO: SCSS conversion - mixin */ /* @include neo-brutalist-card($hoverable: true); */ border: 3px solid #222; border-radius: 6px; transition: all 64ms linear; &:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 0 #222; } } & > .thumbnail + * { font-weight: 700; padding-top: 0.25rem; } & > .title, & > .course, & > .author, & > .course-year { padding-left: 0.5rem; font-size: 16px; } } .article-list { display: grid; grid-auto-flow: row; max-width: 100%; gap: 2rem; grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr)); grid-auto-rows: auto; .article { display: grid; grid-template-rows: auto auto auto; background: var(--card-bg, var(--project-card-bg)); color: #000e; /* @TODO: SCSS conversion - mixin */ /* @include neo-brutalist-card($size: 3px, $offset: 9px); */ border: 3px solid #222; border-radius: 6px; box-shadow: 9px 9px 0 0 #222; row-gap: 0.5rem; padding: 1rem; .description { font-size: 16px; } .tags { display: flex; gap: 0.5rem; flex-wrap: wrap; font-size: 14px; font-weight: 600; color: #555; } } } .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; } } } */ } .timeline { display: grid; --timeline-track-size: 6rem; --timeline-thickness: 6px; --timeline-color: #333; max-width: 120ch; grid-template-columns: 1fr var(--timeline-track-size) 1fr; @media screen and (max-width: 1024px) { --timeline-track-size: 3rem; grid-template-columns: var(--timeline-track-size) 1fr; } & > .timeline-item { position: relative; display: grid; & > .content { display: grid; grid-template-columns: auto; padding: 2rem 1rem; @media screen and (max-width: 1024px) { padding: 1rem 1rem 1rem 0; } & > .title { font-size: 20px; font-weight: 700; } & > .date { font-size: 32px; font-weight: 400; color: #555; } } /* timeline vertical line */ &::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); width: var(--timeline-thickness); background: var(--timeline-color); } &:first-child::before { top: 50%; } &:last-child::before { bottom: 50%; } /* timeline circle */ &::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 1rem; height: 1rem; border-radius: 50%; background: var(--timeline-color); } &::before, &::after { grid-column: 1 / span 1; } @media screen and (min-width: 1024px) { &:nth-child(odd)::before { grid-column: 2 / span 1; } &:nth-child(even)::before { grid-column: 1 / span 1; } &:nth-child(odd)::after { grid-column: 2 / span 1; } &:nth-child(even)::after { grid-column: 1 / span 1; } } .dropdown { /* @TODO: SCSS conversion - mixin */ /* @include neo-brutalist-card; */ border: 3px solid #222; border-radius: 6px; box-shadow: 3px 3px 0 0 #222; max-width: 15rem; position: absolute; bottom: calc(-10rem - 1px); left: 50%; transform: translateX(calc(-50% - var(--timeline-track-size) / 2)); border-top: none; border-radius: 0 0 0.5rem 0.5rem; @media screen and (max-width: 1024px) { /* @TODO: SCSS conversion - mixin */ /* @include neo-brutalist-card; */ border: 3px solid #222; border-radius: 6px; box-shadow: 3px 3px 0 0 #222; position: static; transform: none; margin-left: auto; margin-right: auto; } } @media screen and (min-width: 1024px) { &:nth-child(odd) { grid-column: 1 / span 2; grid-template-columns: 1fr var(--timeline-track-size); & > .content { grid-column: 1; } .dropdown { left: auto; right: 50%; transform: translateX(calc(50% - var(--timeline-track-size) / 2)); } } &:nth-child(even) { grid-column: 2 / span 2; grid-template-columns: var(--timeline-track-size) 1fr; & > .content { grid-column: 2; } .dropdown { left: 50%; transform: translateX(calc(-50% + var(--timeline-track-size) / 2)); } } } @media screen and (max-width: 1024px) { grid-column: 1 / span 2; grid-template-columns: var(--timeline-track-size) 1fr; & > .content { grid-column: 2; } } } } /* /* Cards */ .card { display: grid; --card-base-internal: var(--card-base, #f8f8f8); background: var(--card-base-internal); color: color-mix(in srgb, var(--card-base-internal), #000 80%); /* @TODO: SCSS conversion - mixin */ /* @include neo-brutalist-card($size: 3px, $offset: 9px); */ border: 3px solid #222; border-radius: 6px; box-shadow: 9px 9px 0 0 #222; row-gap: 0.5rem; padding: 1rem; /* Variants */ &.large { padding: 2rem; /* @TODO: SCSS conversion - mixin */ /* @include neo-brutalist-card($size: 4px, $offset: 8px); */ border: 4px solid #222; border-radius: 8px; box-shadow: 8px 8px 0 0 #222; row-gap: 1rem; & > .title { font-size: 36px; font-weight: 700; } & > .text { font-size: 18px; } } /* Child Items */ & > .title { color: color-mix(in srgb, var(--card-base-internal), #000 75%); font-size: 30px; font-weight: 700; } & > .text { 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%); } } & > .tags { display: flex; gap: 0.5rem; flex-wrap: wrap; font-size: 14px; font-weight: 600; color: #555; a { color: color-mix(in srgb, var(--card-base-internal), #000 60%); font-weight: 600; &:hover { text-decoration: underline solid 2px; } } } a:hover { text-decoration: underline solid 2px; } a.title { &:hover { text-decoration: underline solid 3px; } } .metadata { display: grid; grid-auto-flow: column; justify-content: start; gap: 0.5rem; } @media screen and (max-width: 1024px) { padding: 0.9rem; &.large { padding: 1.25rem; & > .title { font-size: 32px; } & > .text { font-size: 16px; } } } } .chip { user-select: none; display: grid; place-content: center; place-items: center; color: #111; background: #0004; padding: 0 0.25rem; border-radius: 0.25rem; line-height: 1.5; font-size: 16px; font-weight: 500; &.small { font-size: 13px; font-weight: 600; } &.disabled { color: #0004; background: #0002; } } a:has(> .card) { display: contents; } /* /* Card List */ .card-list { display: grid; grid-auto-flow: row; width: 100%; max-width: 100%; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(auto, 25rem)); grid-auto-rows: auto; justify-content: center; & > .card { max-width: 25rem; } } .show-more { place-self: center; } .search-bar { display: grid; grid-template-columns: auto 1fr; width: 100%; gap: 1rem; @media screen and (max-width: 1024px) { grid-template-columns: 1fr; & > .search { grid-row: 1; } } } /* .filter-select { width: 100%; height: 2.5rem; @include neo-brutalist-card; display: grid; align-items: center; grid-auto-flow: column; cursor: pointer; --filter-bg-color-hover: color-mix(in srgb, var(--filter-bg-color, #ddd), #000 10%); background: var(--filter-bg-color, #ddd); &:hover, &:hover select { background: var(--filter-bg-color-hover); } .material-symbols-outlined { padding: 0 0.35rem; } select { border: none; box-shadow: none; outline: none; height: 100%; appearance: none; cursor: pointer; padding: 0; background: var(--filter-bg-color, #ddd); } } */ .combobox { width: 100%; height: 2.5rem; position: relative; padding: 0 0.25rem 0 0.25rem; /* @TODO: SCSS conversion - mixin */ border: 3px solid #222; border-radius: 6px; box-shadow: 4px 4px 0 0 #222; cursor: pointer; --filter-bg-color-hover: color-mix(in srgb, var(--filter-bg-color, #ddd), #000 10%); background: var(--filter-bg-color, #ddd); .material-symbols-outlined, .phosphor-icon { padding: 0 0.35rem; } .selected { height: 100%; gap: 0.25rem; display: grid; grid-auto-flow: column; grid-template-columns: 1fr auto; align-items: center; .content { display: grid; grid-auto-flow: column; align-items: center; justify-content: start; } } .dropdown { position: absolute; z-index: 10; top: calc(100% + 8px); left: -3px; /* @TODO: SCSS conversion - mixin */ border: 3px solid #222; border-radius: 6px; /* box-shadow: 3px 3px 0 0 #222; */ background: #fff; .option { height: 2rem; padding: 0 0.5rem 0 0.25rem; display: grid; grid-auto-flow: column; align-items: center; justify-content: start; &:hover { background: #ddd; } } } @media screen and (max-width: 1024px) { .dropdown { left: 3px; right: 3px; top: calc(100% + 9px); } } } .gallery-collage { /* display: flex; flex-wrap: wrap; width: 64rem; */ width: 100%; max-width: 100%; --cell-size: 6rem; display: grid; grid-template-columns: repeat(auto-fit, calc(var(--cell-size))); grid-auto-rows: calc(var(--cell-size)); grid-auto-flow: dense; gap: 1rem; place-content: center; /* align-items: center; */ @media screen and (max-width: 1024px) { grid-template-columns: auto; grid-template-rows: auto; grid-auto-rows: auto; } & > .card { padding: 3px; overflow: hidden; width: 100%; height: 100%; grid-column: span var(--cols, 1); grid-row: span var(--rows, 1); @media screen and (max-width: 1024px) { max-width: 100%; grid-column: span 1; grid-row: span 1; } img { display: grid; width: 100%; height: 100%; overflow: hidden; border-radius: 3px; object-fit: cover; @media screen and (max-width: 1024px) { max-height: none; width: 25rem; max-width: 100%; } } } } .bubble-array { display: flex; width: 100%; flex-wrap: wrap; justify-content: center; gap: 3rem 0rem; > .bubble { display: grid; gap: 0.5rem; text-align: center; justify-items: center; align-content: start; width: 18rem; .date { display: grid; place-content: center; font-size: 16px; font-weight: 600; padding: 0.25rem 0.5rem; background: #0002; border-radius: 0.25rem; } .founder { display: grid; place-content: center; font-size: 15px; font-weight: 700; /* gold badge */ background: #ffdb12; color: #725306; padding: 0 0.25rem; border: 2px solid #b98c19; border-radius: 0.25rem; box-shadow: 0.125rem 0.125rem 0 0 #664b06; } .description { font-size: 16px; text-wrap: balance; } .social { display: grid; grid-auto-flow: column; gap: 0.5rem; justify-content: center; .phosphor-icon { width: 28px; height: 28px; } } > img { border-radius: 100%; border: 4px solid #333; object-fit: cover; width: 100%; aspect-ratio: 1 / 1; width: 12rem; } } } .wide-card-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(auto, 28rem)); gap: 2rem; padding: 2rem; width: 100%; justify-content: center; /* align-items: start; */ .text > * { max-width: none; } .card { display: grid; grid-template-rows: 1fr auto; } @media screen and (max-width: 1024px) { grid-template-columns: 1fr; padding: 0; gap: 1rem; } } .filter { min-width: 15rem; } .flex-column { display: flex; flex-direction: column; gap: 0.5rem; } .flex-row { display: flex; flex-direction: row; gap: 0.5rem; } .flex-row-wrap { display: flex; flex-direction: row; gap: 0.5rem; flex-wrap: wrap; } .grid-h { display: grid; grid-auto-flow: column; justify-content: start; align-items: center; gap: 0.5rem; } .grid-v { display: grid; justify-items: start; align-content: start; grid-auto-flow: row; gap: 0.5rem; } .grid-center { display: grid; place-content: center; place-items: center; gap: 0.5rem; grid-auto-flow: row; } .clickable { cursor: pointer; } /* just to know for reference */ .fake-masonry { display: grid; grid-template-columns: repeat(var(--columns), 1fr); grid-auto-flow: dense; & > * { grid-row: span var(--masonry-height); } } }