*, *::before, *::after { box-sizing: border-box; margin: 0; } body, html { width: 100%; height: 100%; } // Theme :root { --bg-500: #ffffff; --bg-selected-500: #f8f8f8; --bg-highlight-500: #f0f0f0; --border-400: #e8e8e8; --border-500: #d8d8d8; --border-600: #c0c0c0; --border-highlight-500: #b0b0b0; --border-selected-500: #909090; --text-500: #282828; --accent-100: #d6ffc2; --accent-500: #6cc16c; --accent-900: #244624; } body.dark-mode { --bg-500: hsl(269, 24%, 20%); --bg-selected-500: #722da0; --bg-highlight-500: #a64edb; --border-400: hsl(269, 40%, 50%); --border-500: hsl(269, 60%, 60%); --border-600: hsl(269, 80%, 70%); --border-highlight-500: hsl(269, 80%, 78%); --border-selected-500: #b66af6; --text-500: #e6cff6; --accent-100: hsl(269, 50%, 50%); --accent-500: hsl(269, 40%, 70%); --accent-900: hsl(269, 30%, 90%); } $device-s-width: 600px; // Elements a, a:visited { color: var(--text-500); font-weight: 400; } code { font-size: 90%; } sup { display: inline-block; transform: translate(0, -0.25rem); } // Headings $base-font-size: 18px; $heading-scale: 1.25; @function pow($number, $exponent) { $value: 1; @if $exponent > 0 { @for $i from 1 through $exponent { $value: $value * $number; } } @return $value; } @for $i from 1 through 4 { h#{$i} { margin: 0; $factor: pow($heading-scale, 4 - $i); font-size: $base-font-size * $factor; font-weight: 500; &:not(:first-child) { padding-top: 0.5rem * $factor; } line-height: 1; display: flex; align-items: center; gap: 0.5rem; } } button, .button { display: flex; align-items: center; justify-content: center; gap: 0.25rem; color: var(--text-500); background: var(--bg-500); border: 2px solid var(--border-400); border-radius: 0.5rem; font: inherit; font-weight: 400; padding: 0.5rem 1rem; cursor: pointer; position: relative; overflow: hidden; &:hover::after { content: ''; position: absolute; inset: 0; background: #0000000c; z-index: 1; } &.primary { background: var(--accent-100); border-color: var(--accent-500); &:hover::after { background: #00000020; } } &.icon { padding: 0.5rem; width: 2.5rem; height: 2.5rem; } &.flat { border: none; } } .input-combo { display: flex; // align-items: center; justify-content: center; height: 3rem; background: var(--bg-500); border: 2px solid var(--border-400); border-radius: 0.5rem; font-weight: 400; // padding: 0.5rem 0.5rem 0.5rem 1rem; user-select: none; cursor: pointer; position: relative; select { border: none; background: none; color: var(--text-500); appearance: none; font-family: inherit; font-size: inherit; font-weight: 300; height: 100%; padding-left: 1rem; padding-right: 3rem; width: 100%; } .icon { position: absolute; right: 0; height: 100%; width: calc(3rem - 4px); display: grid; place-content: center; pointer-events: none; } } // Components .logo { display: flex; align-items: center; & > img { max-height: 2.5rem; body.dark-mode & { filter: hue-rotate(135deg) brightness(1.1); } } gap: 0.25rem; } .popup-container { position: absolute; inset: 0; z-index: 10; background: #00000099; max-width: 100%; .popup { @extend .panel; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; gap: 1rem; box-shadow: 0 0 1.5rem #00000033; .header { display: flex; align-items: center; justify-content: space-between; user-select: none; .title { display: flex; align-items: center; gap: 0.5rem; font-size: 24px; } } .content { @extend .text-block; width: 60ch; max-width: 100%; max-height: 60vh; overflow-y: auto; padding-bottom: 3rem; } max-width: 100%; } } .compound { display: flex; .material-symbols-outlined { font-size: 20px; } button, .button { border-radius: 0; border-right: none; padding-left: 0.75rem; padding-right: 0.75rem; height: 2.5rem; &:first-child { padding-left: 1rem; border-top-left-radius: 0.5rem; border-bottom-left-radius: 0.5rem; } &:last-child { padding-right: 1rem; border-top-right-radius: 0.5rem; border-bottom-right-radius: 0.5rem; border: 2px solid var(--border-400); } &.radio { &.selected { background: var(--accent-100); border-color: var(--accent-500); & + .radio { border-left-color: var(--accent-500); } &:hover::after { background: #00000018; } } } } } // Extension Classes .panel { background: var(--bg-500); border: 1px solid var(--border-500); border-radius: 1rem; padding: 1rem; } .text-block { display: flex; flex-direction: column; gap: 0.5rem; p { line-height: 1.5; .material-symbols-outlined { font-size: 18px; vertical-align: text-top; } } } // Structure body { background: var(--bg-500); color: var(--text-500); font-weight: 300; font-family: 'Inter', sans-serif; position: relative; } .toolbar { @extend .panel; padding: 1rem 0.75rem 1rem 1rem; border-radius: 0; border: none; border-bottom: 1px solid var(--border-500); height: 4rem; display: flex; align-items: center; justify-content: space-between; .option-group { display: flex; align-items: center; gap: 0.75rem; @media screen and (max-width: $device-s-width), (pointer: coarse) { display: none; } } } .events-view { height: calc(100vh - 4rem); .course-view { padding: 1rem; display: flex; flex-direction: column; align-items: center; height: 100%; overflow-y: scroll; .wrap-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(30ch, 1fr)); gap: 1rem; width: 100%; max-width: 1200px; .course { @extend .panel; display: flex; flex-direction: column; gap: 0.25rem; flex-grow: 1; position: relative; cursor: pointer; &.selected { background: var(--bg-selected-500); &::after { content: ''; position: absolute; inset: -1px; border-radius: 1rem; border: 3px solid var(--border-selected-500); } } &.highlight { background: var(--bg-highlight-500); border-color: var(--border-highlight-500); } .title { font-size: 24px; } .docenti { font-size: 16px; } .events { font-size: 18px; } } } } .work-week-h-view { --header-height: 3rem; --event-height: 2rem; display: grid; grid-template-columns: auto 1fr; grid-template-rows: var(--header-height) 1fr; overflow-y: scroll; height: 100%; .week { grid-column: 1 / 2; grid-row: 2 / 3; display: flex; flex-direction: column; .day { box-sizing: content-box; // @media screen and (max-width: $device-s-width) { // writing-mode: vertical-lr; // } height: calc(var(--size) * var(--event-height) + (var(--size) - 1) * 0.25rem); border-top: 1px solid var(--border-500); border-right: 1px solid var(--border-500); padding: 0.5rem 1rem 0 0.5rem; font-size: 18px; font-weight: 400; &:last-child { border-bottom: 1px solid var(--border-500); } } } .events { grid-column: 2 / 3; grid-row: 1 / 3; overflow-y: hidden; overflow-x: scroll; // scrollbar-gutter: stable both-edges; display: grid; grid-template-rows: auto 1fr; --hour-width: 7.5rem; .header { display: grid; grid-template-columns: repeat(12, var(--hour-width)); grid-template-rows: var(--header-height); gap: 0.25rem; .label { display: grid; place-content: center; font-size: 18px; font-weight: 400; border-left: 1px solid var(--border-500); &:nth-child(2), &:nth-child(4) { border-right: 1px solid var(--border-500); } } } .days { display: flex; flex-direction: column; .day { display: grid; // grid-template-columns: repeat(7, 0) repeat(12, 1fr) repeat(5, 0); grid-template-columns: repeat(12, var(--hour-width)); grid-template-rows: repeat(var(--size), var(--event-height)); gap: 0.25rem; position: relative; &:hover { z-index: 5; } .event { grid-row: var(--row) / span 1; grid-column: var(--start) / span var(--size); $color: var(--bg-500); background: $color; color: var(--text-500); border-radius: 0.25rem; border: 1px solid var(--border-600); display: flex; padding: 0.4rem; font-size: 15px; width: 100%; min-height: var(--event-height); overflow: hidden; position: relative; line-height: 1.1; &::after { content: ''; position: absolute; inset: 0; border-radius: 0.25rem; background: linear-gradient(to top, $color 0%, transparent 25%); } &:hover { z-index: 3; position: absolute; overflow: visible; &::after { background: none; } } z-index: 2; } border-top: 1px solid var(--border-500); padding: 0.25rem 0; &:last-child { border-bottom: 1px solid var(--border-500); } } } } } .work-week-v-view { position: relative; display: grid; grid-template-columns: max-content repeat(5, minmax(auto, 1fr)); height: 100%; overflow: scroll; --event-height: 4.75rem; .pivot { height: 3rem; grid-column: 1 / 2; grid-row: 1 / 2; position: sticky; top: 0; left: 0; z-index: 2; background: var(--bg-500); border-bottom: 1px solid var(--border-500); border-right: 1px solid var(--border-500); } .left-header { grid-column: 1 / 2; grid-row: 1 / 2; display: grid; position: sticky; left: 0; border-right: 1px solid var(--border-500); background: var(--bg-500); z-index: 1; padding-top: 3rem; .blocks { display: grid; grid-template-rows: repeat(12, calc(var(--event-height) + 1rem)); .block { grid-row: var(--start) / span var(--size); display: grid; place-content: center; padding: 0.5rem; font-size: 16px; font-weight: 400; border-top: 1px solid var(--border-500); @media screen and (max-width: $device-s-width), (pointer: coarse) { writing-mode: vertical-lr; } &:not(.skip-border) { height: calc(2 * (var(--event-height) + 1rem) + 1px); border-bottom: 1px solid var(--border-500); } } } } .day { position: relative; display: flex; flex-direction: column; .top-header { position: sticky; top: 0; height: 3rem; flex: 0 0 auto; z-index: 1; grid-column: span var(--size); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 400; background: var(--bg-500); border-bottom: 1px solid var(--border-500); } // &:not(:last-child) { border-right: 1px solid var(--border-500); // } .events { position: relative; display: grid; grid-template-columns: repeat(var(--size), auto); grid-template-rows: repeat(12, var(--event-height)); padding: 0.5rem; gap: 1rem 0.5rem; .event { position: relative; cursor: pointer; grid-row: var(--start) / span var(--size); grid-column: var(--stack) / span 1; background: var(--bg-500); border: 1px solid var(--border-600); // border: 4px solid hsl(var(--hue), 80%, 80%); border-radius: 0.5rem; display: flex; flex-direction: column; gap: 0.25rem; padding: 0.5rem 1rem 0.5rem 0.5rem; &.selected { background: var(--bg-selected-500); &::after { content: ''; position: absolute; inset: -1px; border-radius: 0.5rem; border: 3px solid var(--border-selected-500); } } &.highlight { background: var(--bg-highlight-500); border-color: var(--border-highlight-500); } .title { font-size: 18px; font-weight: 400; } .aula { font-size: 16px; font-weight: 300; } } .grid-line-h { grid-column: 1 / span var(--size); grid-row: var(--track) / span 2; height: 0px; border-bottom: 1px dashed var(--border-500); align-self: center; position: relative; top: 0.5px; left: -0.5rem; width: calc(100% + 1rem); z-index: -1; } } } } .schedule-view { padding: 1rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; overflow-y: scroll; height: 100%; & > * { max-width: 50rem; } .header { position: relative; width: 100%; display: grid; place-content: center; &.giorno { font-size: 24px; font-weight: 400; .inner { background: var(--bg-500); padding: 0 0.5rem; } &::before { position: absolute; content: ''; top: 50%; left: 0; right: 0; height: 1px; background: var(--border-600); z-index: -1; } } &.orario { font-size: 18px; font-weight: 300; } } .event { @extend .panel; width: 100%; .title { font-size: 22px; } position: relative; cursor: pointer; &:hover { background: var(--bg-highlight-500); border-color: var(--border-highlight-500); } &.selected { background: var(--bg-selected-500); &::after { content: ''; position: absolute; inset: -1px; border-radius: 1rem; border: 3px solid var(--border-selected-500); } } } } } .overlay { display: flex; position: fixed; bottom: 3rem; right: 3rem; // on mobile @media screen and (max-width: $device-s-width), (pointer: coarse) { bottom: 1rem; right: 1rem; } gap: 0.5rem; button { width: 3rem; height: 3rem; border-radius: 100%; .material-symbols-outlined { font-size: 22px; } color: var(--accent-900); box-shadow: 0 0.25rem 0.75rem #00000033; } animation: fade-in 150ms ease-in forwards; } .menu { position: absolute; top: 0; left: 0; width: 100vw; height: 100vh; background: var(--bg-500); z-index: 10; .header { height: 4rem; padding: 0.75rem 1rem 0.75rem 0.75rem; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border-500); .option-group { display: flex; gap: 0.5rem; } } .options { padding: 1rem; display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; .label { font-weight: 400; } } hr { position: relative; width: calc(100% - 2rem); height: 1px; left: 1rem; background: var(--border-500); border: none; } .help { @extend .text-block; padding: 1rem 1rem 2.5rem; } } // not on mobile @media screen and (min-width: $device-s-width) and (pointer: fine) { .mobile { display: none; } .menu { display: none; } } // on mobile @media screen and (max-width: $device-s-width), (pointer: coarse) { .toolbar { padding: 0.75rem 1rem 0.75rem 0.75rem; } } @media print { // @page { // size: A4 landscape; // } .toolbar, .menu, .overlay { display: none; } .work-week-v-view { overflow: visible; } } @keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } } .fade-out { animation: fade-out 150ms ease-in forwards; } @keyframes fade-out { 0% { opacity: 1; } 100% { opacity: 0; } } // Utilities span.bold { font-weight: 400; }