added begin of new exercise page
This commit is contained in:
parent
72c3d91c7e
commit
24c784e434
@ -1,4 +1,5 @@
|
||||
/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
|
||||
@layer properties;
|
||||
@layer theme, base, components, utilities;
|
||||
@layer theme {
|
||||
:root, :host {
|
||||
@ -6,6 +7,15 @@
|
||||
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
|
||||
"Courier New", monospace;
|
||||
--spacing: 0.25rem;
|
||||
--container-md: 28rem;
|
||||
--container-xl: 36rem;
|
||||
--text-xl: 1.25rem;
|
||||
--text-xl--line-height: calc(1.75 / 1.25);
|
||||
--text-2xl: 1.5rem;
|
||||
--text-2xl--line-height: calc(2 / 1.5);
|
||||
--text-3xl: 1.875rem;
|
||||
--text-3xl--line-height: calc(2.25 / 1.875);
|
||||
--default-font-family: var(--font-sans);
|
||||
--default-mono-font-family: var(--font-mono);
|
||||
}
|
||||
@ -156,6 +166,704 @@
|
||||
}
|
||||
}
|
||||
@layer utilities {
|
||||
.menu {
|
||||
display: flex;
|
||||
width: fit-content;
|
||||
flex-direction: column;
|
||||
flex-wrap: wrap;
|
||||
padding: calc(0.25rem * 2);
|
||||
--menu-active-fg: var(--color-neutral-content);
|
||||
--menu-active-bg: var(--color-neutral);
|
||||
font-size: 0.875rem;
|
||||
:where(li ul) {
|
||||
position: relative;
|
||||
margin-inline-start: calc(0.25rem * 4);
|
||||
padding-inline-start: calc(0.25rem * 2);
|
||||
white-space: nowrap;
|
||||
&:before {
|
||||
position: absolute;
|
||||
inset-inline-start: calc(0.25rem * 0);
|
||||
top: calc(0.25rem * 3);
|
||||
bottom: calc(0.25rem * 3);
|
||||
background-color: var(--color-base-content);
|
||||
opacity: 10%;
|
||||
width: var(--border);
|
||||
content: "";
|
||||
}
|
||||
}
|
||||
:where(li > .menu-dropdown:not(.menu-dropdown-show)) {
|
||||
display: none;
|
||||
}
|
||||
:where(li:not(.menu-title) > *:not(ul, details, .menu-title, .btn)), :where(li:not(.menu-title) > details > summary:not(.menu-title)) {
|
||||
display: grid;
|
||||
grid-auto-flow: column;
|
||||
align-content: flex-start;
|
||||
align-items: center;
|
||||
gap: calc(0.25rem * 2);
|
||||
border-radius: var(--radius-field);
|
||||
padding-inline: calc(0.25rem * 3);
|
||||
padding-block: calc(0.25rem * 1.5);
|
||||
text-align: start;
|
||||
transition-property: color, background-color, box-shadow;
|
||||
transition-duration: 0.2s;
|
||||
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
||||
grid-auto-columns: minmax(auto, max-content) auto max-content;
|
||||
text-wrap: balance;
|
||||
user-select: none;
|
||||
}
|
||||
:where(li > details > summary) {
|
||||
--tw-outline-style: none;
|
||||
outline-style: none;
|
||||
@media (forced-colors: active) {
|
||||
outline: 2px solid transparent;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
&::-webkit-details-marker {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
:where(li > details > summary), :where(li > .menu-dropdown-toggle) {
|
||||
&:after {
|
||||
justify-self: flex-end;
|
||||
display: block;
|
||||
height: 0.375rem;
|
||||
width: 0.375rem;
|
||||
rotate: -135deg;
|
||||
translate: 0 -1px;
|
||||
transition-property: rotate, translate;
|
||||
transition-duration: 0.2s;
|
||||
content: "";
|
||||
transform-origin: 50% 50%;
|
||||
box-shadow: 2px 2px inset;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
:where(li > details[open] > summary):after, :where(li > .menu-dropdown-toggle.menu-dropdown-show):after {
|
||||
rotate: 45deg;
|
||||
translate: 0 1px;
|
||||
}
|
||||
:where( li:not(.menu-title, .disabled) > *:not(ul, details, .menu-title), li:not(.menu-title, .disabled) > details > summary:not(.menu-title) ):not(.menu-active, :active, .btn) {
|
||||
&.menu-focus, &:focus-visible {
|
||||
cursor: pointer;
|
||||
background-color: var(--color-base-content);
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
background-color: color-mix(in oklab, var(--color-base-content) 10%, transparent);
|
||||
}
|
||||
color: var(--color-base-content);
|
||||
--tw-outline-style: none;
|
||||
outline-style: none;
|
||||
@media (forced-colors: active) {
|
||||
outline: 2px solid transparent;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
:where( li:not(.menu-title, .disabled) > *:not(ul, details, .menu-title):not(.menu-active, :active, .btn):hover, li:not(.menu-title, .disabled) > details > summary:not(.menu-title):not(.menu-active, :active, .btn):hover ) {
|
||||
cursor: pointer;
|
||||
background-color: var(--color-base-content);
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
background-color: color-mix(in oklab, var(--color-base-content) 10%, transparent);
|
||||
}
|
||||
--tw-outline-style: none;
|
||||
outline-style: none;
|
||||
@media (forced-colors: active) {
|
||||
outline: 2px solid transparent;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
box-shadow: 0 1px oklch(0% 0 0 / 0.01) inset, 0 -1px oklch(100% 0 0 / 0.01) inset;
|
||||
}
|
||||
:where(li:empty) {
|
||||
background-color: var(--color-base-content);
|
||||
opacity: 10%;
|
||||
margin: 0.5rem 1rem;
|
||||
height: 1px;
|
||||
}
|
||||
:where(li) {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
flex-direction: column;
|
||||
flex-wrap: wrap;
|
||||
align-items: stretch;
|
||||
.badge {
|
||||
justify-self: flex-end;
|
||||
}
|
||||
& > *:not(ul, .menu-title, details, .btn):active, & > *:not(ul, .menu-title, details, .btn).menu-active, & > details > summary:active {
|
||||
--tw-outline-style: none;
|
||||
outline-style: none;
|
||||
@media (forced-colors: active) {
|
||||
outline: 2px solid transparent;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
color: var(--menu-active-fg);
|
||||
background-color: var(--menu-active-bg);
|
||||
background-size: auto, calc(var(--noise) * 100%);
|
||||
background-image: none, var(--fx-noise);
|
||||
&:not(&:active) {
|
||||
box-shadow: 0 2px calc(var(--depth) * 3px) -2px var(--menu-active-bg);
|
||||
}
|
||||
}
|
||||
&.menu-disabled {
|
||||
pointer-events: none;
|
||||
color: var(--color-base-content);
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
color: color-mix(in oklab, var(--color-base-content) 20%, transparent);
|
||||
}
|
||||
}
|
||||
}
|
||||
.dropdown:focus-within {
|
||||
.menu-dropdown-toggle:after {
|
||||
rotate: 45deg;
|
||||
translate: 0 1px;
|
||||
}
|
||||
}
|
||||
.dropdown-content {
|
||||
margin-top: calc(0.25rem * 2);
|
||||
padding: calc(0.25rem * 2);
|
||||
&:before {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
:where(&) {
|
||||
width: unset;
|
||||
}
|
||||
display: inline-flex;
|
||||
flex-shrink: 0;
|
||||
cursor: pointer;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: calc(0.25rem * 1.5);
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
outline-offset: 2px;
|
||||
webkit-user-select: none;
|
||||
user-select: none;
|
||||
padding-inline: var(--btn-p);
|
||||
color: var(--btn-fg);
|
||||
--tw-prose-links: var(--btn-fg);
|
||||
height: var(--size);
|
||||
font-size: var(--fontsize, 0.875rem);
|
||||
font-weight: 600;
|
||||
outline-color: var(--btn-color, var(--color-base-content));
|
||||
transition-property: color, background-color, border-color, box-shadow;
|
||||
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
||||
transition-duration: 0.2s;
|
||||
border-start-start-radius: var(--join-ss, var(--radius-field));
|
||||
border-start-end-radius: var(--join-se, var(--radius-field));
|
||||
border-end-start-radius: var(--join-es, var(--radius-field));
|
||||
border-end-end-radius: var(--join-ee, var(--radius-field));
|
||||
background-color: var(--btn-bg);
|
||||
background-size: auto, calc(var(--noise) * 100%);
|
||||
background-image: none, var(--btn-noise);
|
||||
border-width: var(--border);
|
||||
border-style: solid;
|
||||
border-color: var(--btn-border);
|
||||
text-shadow: 0 0.5px oklch(100% 0 0 / calc(var(--depth) * 0.15));
|
||||
touch-action: manipulation;
|
||||
box-shadow: 0 0.5px 0 0.5px oklch(100% 0 0 / calc(var(--depth) * 6%)) inset, var(--btn-shadow);
|
||||
--size: calc(var(--size-field, 0.25rem) * 10);
|
||||
--btn-bg: var(--btn-color, var(--color-base-200));
|
||||
--btn-fg: var(--color-base-content);
|
||||
--btn-p: 1rem;
|
||||
--btn-border: var(--btn-bg);
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
--btn-border: color-mix(in oklab, var(--btn-bg), #000 calc(var(--depth) * 5%));
|
||||
}
|
||||
--btn-shadow: 0 3px 2px -2px var(--btn-bg),
|
||||
0 4px 3px -2px var(--btn-bg);
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
--btn-shadow: 0 3px 2px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000),
|
||||
0 4px 3px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000);
|
||||
}
|
||||
--btn-noise: var(--fx-noise);
|
||||
.prose & {
|
||||
text-decoration-line: none;
|
||||
}
|
||||
@media (hover: hover) {
|
||||
&:hover {
|
||||
--btn-bg: var(--btn-color, var(--color-base-200));
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
--btn-bg: color-mix(in oklab, var(--btn-color, var(--color-base-200)), #000 7%);
|
||||
}
|
||||
}
|
||||
}
|
||||
&:focus-visible {
|
||||
outline-width: 2px;
|
||||
outline-style: solid;
|
||||
isolation: isolate;
|
||||
}
|
||||
&:active:not(.btn-active) {
|
||||
translate: 0 0.5px;
|
||||
--btn-bg: var(--btn-color, var(--color-base-200));
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
--btn-bg: color-mix(in oklab, var(--btn-color, var(--color-base-200)), #000 5%);
|
||||
}
|
||||
--btn-border: var(--btn-color, var(--color-base-200));
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
--btn-border: color-mix(in oklab, var(--btn-color, var(--color-base-200)), #000 7%);
|
||||
}
|
||||
--btn-shadow: 0 0 0 0 oklch(0% 0 0/0), 0 0 0 0 oklch(0% 0 0/0);
|
||||
}
|
||||
&:is(:disabled, [disabled], .btn-disabled) {
|
||||
&:not(.btn-link, .btn-ghost) {
|
||||
background-color: var(--color-base-content);
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
background-color: color-mix(in oklab, var(--color-base-content) 10%, transparent);
|
||||
}
|
||||
box-shadow: none;
|
||||
}
|
||||
pointer-events: none;
|
||||
--btn-border: #0000;
|
||||
--btn-noise: none;
|
||||
--btn-fg: var(--color-base-content);
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
--btn-fg: color-mix(in oklch, var(--color-base-content) 20%, #0000);
|
||||
}
|
||||
@media (hover: hover) {
|
||||
&:hover {
|
||||
pointer-events: none;
|
||||
background-color: var(--color-neutral);
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
background-color: color-mix(in oklab, var(--color-neutral) 20%, transparent);
|
||||
}
|
||||
--btn-border: #0000;
|
||||
--btn-fg: var(--color-base-content);
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
--btn-fg: color-mix(in oklch, var(--color-base-content) 20%, #0000);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&:is(input[type="checkbox"], input[type="radio"]) {
|
||||
appearance: none;
|
||||
&::after {
|
||||
content: attr(aria-label);
|
||||
}
|
||||
}
|
||||
&:where(input:checked:not(.filter .btn)) {
|
||||
--btn-color: var(--color-primary);
|
||||
--btn-fg: var(--color-primary-content);
|
||||
isolation: isolate;
|
||||
}
|
||||
}
|
||||
.input {
|
||||
cursor: text;
|
||||
border: var(--border) solid #0000;
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
flex-shrink: 1;
|
||||
appearance: none;
|
||||
align-items: center;
|
||||
gap: calc(0.25rem * 2);
|
||||
background-color: var(--color-base-100);
|
||||
padding-inline: calc(0.25rem * 3);
|
||||
vertical-align: middle;
|
||||
white-space: nowrap;
|
||||
width: clamp(3rem, 20rem, 100%);
|
||||
height: var(--size);
|
||||
font-size: 0.875rem;
|
||||
touch-action: manipulation;
|
||||
border-start-start-radius: var(--join-ss, var(--radius-field));
|
||||
border-start-end-radius: var(--join-se, var(--radius-field));
|
||||
border-end-start-radius: var(--join-es, var(--radius-field));
|
||||
border-end-end-radius: var(--join-ee, var(--radius-field));
|
||||
border-color: var(--input-color);
|
||||
box-shadow: 0 1px var(--input-color) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * 0.1)) inset;
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
box-shadow: 0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * 0.1)) inset;
|
||||
}
|
||||
--size: calc(var(--size-field, 0.25rem) * 10);
|
||||
--input-color: var(--color-base-content);
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
--input-color: color-mix(in oklab, var(--color-base-content) 20%, #0000);
|
||||
}
|
||||
&:where(input) {
|
||||
display: inline-flex;
|
||||
}
|
||||
:where(input) {
|
||||
display: inline-flex;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
appearance: none;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
&:focus, &:focus-within {
|
||||
--tw-outline-style: none;
|
||||
outline-style: none;
|
||||
@media (forced-colors: active) {
|
||||
outline: 2px solid transparent;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
:where(input[type="url"]), :where(input[type="email"]) {
|
||||
direction: ltr;
|
||||
}
|
||||
:where(input[type="date"]) {
|
||||
display: inline-block;
|
||||
}
|
||||
&:focus, &:focus-within {
|
||||
--input-color: var(--color-base-content);
|
||||
box-shadow: 0 1px var(--input-color);
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
box-shadow: 0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000);
|
||||
}
|
||||
outline: 2px solid var(--input-color);
|
||||
outline-offset: 2px;
|
||||
isolation: isolate;
|
||||
z-index: 1;
|
||||
}
|
||||
&:has(> input[disabled]), &:is(:disabled, [disabled]) {
|
||||
cursor: not-allowed;
|
||||
border-color: var(--color-base-200);
|
||||
background-color: var(--color-base-200);
|
||||
color: var(--color-base-content);
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
color: color-mix(in oklab, var(--color-base-content) 40%, transparent);
|
||||
}
|
||||
&::placeholder {
|
||||
color: var(--color-base-content);
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
color: color-mix(in oklab, var(--color-base-content) 20%, transparent);
|
||||
}
|
||||
}
|
||||
box-shadow: none;
|
||||
}
|
||||
&:has(> input[disabled]) > input[disabled] {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
&::-webkit-date-and-time-value {
|
||||
text-align: inherit;
|
||||
}
|
||||
&[type="number"] {
|
||||
&::-webkit-inner-spin-button {
|
||||
margin-block: calc(0.25rem * -3);
|
||||
margin-inline-end: calc(0.25rem * -3);
|
||||
}
|
||||
}
|
||||
&::-webkit-calendar-picker-indicator {
|
||||
position: absolute;
|
||||
inset-inline-end: 0.75em;
|
||||
}
|
||||
}
|
||||
.select {
|
||||
border: var(--border) solid #0000;
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
flex-shrink: 1;
|
||||
appearance: none;
|
||||
align-items: center;
|
||||
gap: calc(0.25rem * 1.5);
|
||||
background-color: var(--color-base-100);
|
||||
padding-inline-start: calc(0.25rem * 4);
|
||||
padding-inline-end: calc(0.25rem * 7);
|
||||
vertical-align: middle;
|
||||
width: clamp(3rem, 20rem, 100%);
|
||||
height: var(--size);
|
||||
font-size: 0.875rem;
|
||||
touch-action: manipulation;
|
||||
border-start-start-radius: var(--join-ss, var(--radius-field));
|
||||
border-start-end-radius: var(--join-se, var(--radius-field));
|
||||
border-end-start-radius: var(--join-es, var(--radius-field));
|
||||
border-end-end-radius: var(--join-ee, var(--radius-field));
|
||||
background-image: linear-gradient(45deg, #0000 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, #0000 50%);
|
||||
background-position: calc(100% - 20px) calc(1px + 50%), calc(100% - 16.1px) calc(1px + 50%);
|
||||
background-size: 4px 4px, 4px 4px;
|
||||
background-repeat: no-repeat;
|
||||
text-overflow: ellipsis;
|
||||
box-shadow: 0 1px var(--input-color) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * 0.1)) inset;
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
box-shadow: 0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * 0.1)) inset;
|
||||
}
|
||||
border-color: var(--input-color);
|
||||
--input-color: var(--color-base-content);
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
--input-color: color-mix(in oklab, var(--color-base-content) 20%, #0000);
|
||||
}
|
||||
--size: calc(var(--size-field, 0.25rem) * 10);
|
||||
[dir="rtl"] & {
|
||||
background-position: calc(0% + 12px) calc(1px + 50%), calc(0% + 16px) calc(1px + 50%);
|
||||
}
|
||||
select {
|
||||
margin-inline-start: calc(0.25rem * -4);
|
||||
margin-inline-end: calc(0.25rem * -7);
|
||||
width: calc(100% + 2.75rem);
|
||||
appearance: none;
|
||||
padding-inline-start: calc(0.25rem * 4);
|
||||
padding-inline-end: calc(0.25rem * 7);
|
||||
height: calc(100% - 2px);
|
||||
background: inherit;
|
||||
border-radius: inherit;
|
||||
border-style: none;
|
||||
&:focus, &:focus-within {
|
||||
--tw-outline-style: none;
|
||||
outline-style: none;
|
||||
@media (forced-colors: active) {
|
||||
outline: 2px solid transparent;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
}
|
||||
&:not(:last-child) {
|
||||
margin-inline-end: calc(0.25rem * -5.5);
|
||||
background-image: none;
|
||||
}
|
||||
}
|
||||
&:focus, &:focus-within {
|
||||
--input-color: var(--color-base-content);
|
||||
box-shadow: 0 1px var(--input-color);
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
box-shadow: 0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000);
|
||||
}
|
||||
outline: 2px solid var(--input-color);
|
||||
outline-offset: 2px;
|
||||
isolation: isolate;
|
||||
z-index: 1;
|
||||
}
|
||||
&:has(> select[disabled]), &:is(:disabled, [disabled]) {
|
||||
cursor: not-allowed;
|
||||
border-color: var(--color-base-200);
|
||||
background-color: var(--color-base-200);
|
||||
color: var(--color-base-content);
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
color: color-mix(in oklab, var(--color-base-content) 40%, transparent);
|
||||
}
|
||||
&::placeholder {
|
||||
color: var(--color-base-content);
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
color: color-mix(in oklab, var(--color-base-content) 20%, transparent);
|
||||
}
|
||||
}
|
||||
}
|
||||
&:has(> select[disabled]) > select[disabled] {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
.checkbox {
|
||||
border: var(--border) solid var(--input-color, var(--color-base-content));
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
border: var(--border) solid var(--input-color, color-mix(in oklab, var(--color-base-content) 20%, #0000));
|
||||
}
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
flex-shrink: 0;
|
||||
cursor: pointer;
|
||||
appearance: none;
|
||||
border-radius: var(--radius-selector);
|
||||
padding: calc(0.25rem * 1);
|
||||
vertical-align: middle;
|
||||
color: var(--color-base-content);
|
||||
box-shadow: 0 1px oklch(0% 0 0 / calc(var(--depth) * 0.1)) inset, 0 0 #0000 inset, 0 0 #0000;
|
||||
transition: background-color 0.2s, box-shadow 0.2s;
|
||||
--size: calc(var(--size-selector, 0.25rem) * 6);
|
||||
width: var(--size);
|
||||
height: var(--size);
|
||||
background-size: auto, calc(var(--noise) * 100%);
|
||||
background-image: none, var(--fx-noise);
|
||||
&:before {
|
||||
--tw-content: "";
|
||||
content: var(--tw-content);
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
rotate: 45deg;
|
||||
background-color: currentColor;
|
||||
opacity: 0%;
|
||||
transition: clip-path 0.3s, opacity 0.1s, rotate 0.3s, translate 0.3s;
|
||||
transition-delay: 0.1s;
|
||||
clip-path: polygon(20% 100%, 20% 80%, 50% 80%, 50% 80%, 70% 80%, 70% 100%);
|
||||
box-shadow: 0px 3px 0 0px oklch(100% 0 0 / calc(var(--depth) * 0.1)) inset;
|
||||
font-size: 1rem;
|
||||
line-height: 0.75;
|
||||
}
|
||||
&:focus-visible {
|
||||
outline: 2px solid var(--input-color, currentColor);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
&:checked, &[aria-checked="true"] {
|
||||
background-color: var(--input-color, #0000);
|
||||
box-shadow: 0 0 #0000 inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * 0.1)) inset, 0 1px oklch(0% 0 0 / calc(var(--depth) * 0.1));
|
||||
&:before {
|
||||
clip-path: polygon(20% 100%, 20% 80%, 50% 80%, 50% 0%, 70% 0%, 70% 100%);
|
||||
opacity: 100%;
|
||||
}
|
||||
@media (forced-colors: active) {
|
||||
&:before {
|
||||
rotate: 0deg;
|
||||
background-color: transparent;
|
||||
--tw-content: "✔︎";
|
||||
clip-path: none;
|
||||
}
|
||||
}
|
||||
@media print {
|
||||
&:before {
|
||||
rotate: 0deg;
|
||||
background-color: transparent;
|
||||
--tw-content: "✔︎";
|
||||
clip-path: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
&:indeterminate {
|
||||
&:before {
|
||||
rotate: 0deg;
|
||||
opacity: 100%;
|
||||
translate: 0 -35%;
|
||||
clip-path: polygon(20% 100%, 20% 80%, 50% 80%, 50% 80%, 80% 80%, 80% 100%);
|
||||
}
|
||||
}
|
||||
&:disabled {
|
||||
cursor: not-allowed;
|
||||
opacity: 20%;
|
||||
}
|
||||
}
|
||||
.textarea {
|
||||
border: var(--border) solid #0000;
|
||||
min-height: calc(0.25rem * 20);
|
||||
flex-shrink: 1;
|
||||
appearance: none;
|
||||
border-radius: var(--radius-field);
|
||||
background-color: var(--color-base-100);
|
||||
padding-block: calc(0.25rem * 2);
|
||||
vertical-align: middle;
|
||||
width: clamp(3rem, 20rem, 100%);
|
||||
padding-inline-start: 0.75rem;
|
||||
padding-inline-end: 0.75rem;
|
||||
font-size: 0.875rem;
|
||||
touch-action: manipulation;
|
||||
border-color: var(--input-color);
|
||||
box-shadow: 0 1px var(--input-color) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * 0.1)) inset;
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
box-shadow: 0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * 0.1)) inset;
|
||||
}
|
||||
--input-color: var(--color-base-content);
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
--input-color: color-mix(in oklab, var(--color-base-content) 20%, #0000);
|
||||
}
|
||||
textarea {
|
||||
appearance: none;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
&:focus, &:focus-within {
|
||||
--tw-outline-style: none;
|
||||
outline-style: none;
|
||||
@media (forced-colors: active) {
|
||||
outline: 2px solid transparent;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
&:focus, &:focus-within {
|
||||
--input-color: var(--color-base-content);
|
||||
box-shadow: 0 1px var(--input-color);
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
box-shadow: 0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000);
|
||||
}
|
||||
outline: 2px solid var(--input-color);
|
||||
outline-offset: 2px;
|
||||
isolation: isolate;
|
||||
}
|
||||
&:has(> textarea[disabled]), &:is(:disabled, [disabled]) {
|
||||
cursor: not-allowed;
|
||||
border-color: var(--color-base-200);
|
||||
background-color: var(--color-base-200);
|
||||
color: var(--color-base-content);
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
color: color-mix(in oklab, var(--color-base-content) 40%, transparent);
|
||||
}
|
||||
&::placeholder {
|
||||
color: var(--color-base-content);
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
color: color-mix(in oklab, var(--color-base-content) 20%, transparent);
|
||||
}
|
||||
}
|
||||
box-shadow: none;
|
||||
}
|
||||
&:has(> textarea[disabled]) > textarea[disabled] {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
.label {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: calc(0.25rem * 1.5);
|
||||
white-space: nowrap;
|
||||
color: currentColor;
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
color: color-mix(in oklab, currentColor 60%, transparent);
|
||||
}
|
||||
&:has(input) {
|
||||
cursor: pointer;
|
||||
}
|
||||
&:is(.input > *, .select > *) {
|
||||
display: flex;
|
||||
height: calc(100% - 0.5rem);
|
||||
align-items: center;
|
||||
padding-inline: calc(0.25rem * 3);
|
||||
white-space: nowrap;
|
||||
font-size: inherit;
|
||||
&:first-child {
|
||||
margin-inline-start: calc(0.25rem * -3);
|
||||
margin-inline-end: calc(0.25rem * 3);
|
||||
border-inline-end: var(--border) solid currentColor;
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
border-inline-end: var(--border) solid color-mix(in oklab, currentColor 10%, #0000);
|
||||
}
|
||||
}
|
||||
&:last-child {
|
||||
margin-inline-start: calc(0.25rem * 3);
|
||||
margin-inline-end: calc(0.25rem * -3);
|
||||
border-inline-start: var(--border) solid currentColor;
|
||||
@supports (color: color-mix(in lab, red, red)) {
|
||||
border-inline-start: var(--border) solid color-mix(in oklab, currentColor 10%, #0000);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.fieldset-legend {
|
||||
margin-bottom: calc(0.25rem * -1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: calc(0.25rem * 2);
|
||||
padding-block: calc(0.25rem * 2);
|
||||
color: var(--color-base-content);
|
||||
font-weight: 600;
|
||||
}
|
||||
.mb-5 {
|
||||
margin-bottom: calc(var(--spacing) * 5);
|
||||
}
|
||||
.fieldset {
|
||||
display: grid;
|
||||
gap: calc(0.25rem * 1.5);
|
||||
padding-block: calc(0.25rem * 1);
|
||||
font-size: 0.75rem;
|
||||
grid-template-columns: 1fr;
|
||||
grid-auto-rows: max-content;
|
||||
}
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
.h-full {
|
||||
height: 100%;
|
||||
}
|
||||
.h-screen {
|
||||
height: 100vh;
|
||||
}
|
||||
.w-56 {
|
||||
width: calc(var(--spacing) * 56);
|
||||
}
|
||||
.w-full {
|
||||
width: 100%;
|
||||
}
|
||||
.w-md {
|
||||
width: var(--container-md);
|
||||
}
|
||||
.w-xl {
|
||||
width: var(--container-xl);
|
||||
}
|
||||
.link {
|
||||
cursor: pointer;
|
||||
text-decoration-line: underline;
|
||||
@ -172,6 +880,61 @@
|
||||
outline-offset: 2px;
|
||||
}
|
||||
}
|
||||
.space-y-1 {
|
||||
:where(& > :not(:last-child)) {
|
||||
--tw-space-y-reverse: 0;
|
||||
margin-block-start: calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));
|
||||
margin-block-end: calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)));
|
||||
}
|
||||
}
|
||||
.space-y-3 {
|
||||
:where(& > :not(:last-child)) {
|
||||
--tw-space-y-reverse: 0;
|
||||
margin-block-start: calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));
|
||||
margin-block-end: calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)));
|
||||
}
|
||||
}
|
||||
.space-y-5 {
|
||||
:where(& > :not(:last-child)) {
|
||||
--tw-space-y-reverse: 0;
|
||||
margin-block-start: calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));
|
||||
margin-block-end: calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)));
|
||||
}
|
||||
}
|
||||
.rounded-box {
|
||||
border-radius: var(--radius-box);
|
||||
}
|
||||
.rounded-box {
|
||||
border-radius: var(--radius-box);
|
||||
}
|
||||
.border {
|
||||
border-style: var(--tw-border-style);
|
||||
border-width: 1px;
|
||||
}
|
||||
.border-base-300 {
|
||||
border-color: var(--color-base-300);
|
||||
}
|
||||
.bg-base-200 {
|
||||
background-color: var(--color-base-200);
|
||||
}
|
||||
.p-4 {
|
||||
padding: calc(var(--spacing) * 4);
|
||||
}
|
||||
.p-10 {
|
||||
padding: calc(var(--spacing) * 10);
|
||||
}
|
||||
}
|
||||
h1 {
|
||||
font-size: var(--text-3xl);
|
||||
line-height: var(--tw-leading, var(--text-3xl--line-height));
|
||||
}
|
||||
h2 {
|
||||
font-size: var(--text-2xl);
|
||||
line-height: var(--tw-leading, var(--text-2xl--line-height));
|
||||
}
|
||||
h3 {
|
||||
font-size: var(--text-xl);
|
||||
line-height: var(--tw-leading, var(--text-xl--line-height));
|
||||
}
|
||||
@layer base {
|
||||
:where(:root),:root:has(input.theme-controller[value=light]:checked),[data-theme=light] {
|
||||
@ -426,3 +1189,21 @@
|
||||
--noise: 0;
|
||||
}
|
||||
}
|
||||
@property --tw-space-y-reverse {
|
||||
syntax: "*";
|
||||
inherits: false;
|
||||
initial-value: 0;
|
||||
}
|
||||
@property --tw-border-style {
|
||||
syntax: "*";
|
||||
inherits: false;
|
||||
initial-value: solid;
|
||||
}
|
||||
@layer properties {
|
||||
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
||||
*, ::before, ::after, ::backdrop {
|
||||
--tw-space-y-reverse: 0;
|
||||
--tw-border-style: solid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
pub mod empty;
|
||||
mod desktop;
|
||||
mod empty;
|
||||
|
||||
pub use desktop::desktop;
|
||||
pub use empty::empty;
|
||||
|
||||
|
46
src/layouts/desktop.rs
Normal file
46
src/layouts/desktop.rs
Normal file
@ -0,0 +1,46 @@
|
||||
use maud::{Markup, html};
|
||||
|
||||
use super::empty;
|
||||
|
||||
pub fn desktop_minimal(content: Markup, name: &str) -> Markup {
|
||||
let content = html! {
|
||||
div class="w-full h-screen flex" {
|
||||
div class="w-56" {
|
||||
(sidebar())
|
||||
}
|
||||
div class="w-full" {
|
||||
(content)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
empty(content, name)
|
||||
}
|
||||
|
||||
pub fn desktop(content: Markup, name: &str) -> Markup {
|
||||
let content = html! {
|
||||
div class="p-10" {
|
||||
(content)
|
||||
}
|
||||
};
|
||||
|
||||
desktop_minimal(content, name)
|
||||
}
|
||||
|
||||
fn sidebar() -> Markup {
|
||||
html! {
|
||||
ul class="menu bg-base-200 rounded-box w-full h-full" {
|
||||
li {
|
||||
a href="/" {
|
||||
"Overview"
|
||||
}
|
||||
a href="/workouts" {
|
||||
"Workouts"
|
||||
}
|
||||
a href="/exercises" {
|
||||
"Exercises"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -11,7 +11,7 @@ pub fn empty(content: Markup, name: &str) -> Markup {
|
||||
(name) " - Timo's Workouts"
|
||||
}
|
||||
}
|
||||
body {
|
||||
body hx-boost="true" {
|
||||
(content)
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,10 @@
|
||||
use axum::Router;
|
||||
|
||||
mod exercises;
|
||||
mod index;
|
||||
|
||||
pub fn routes() -> Router {
|
||||
Router::new().merge(index::routes())
|
||||
Router::new()
|
||||
.merge(index::routes())
|
||||
.nest("/exercises", exercises::routes())
|
||||
}
|
||||
|
20
src/pages/exercises.rs
Normal file
20
src/pages/exercises.rs
Normal file
@ -0,0 +1,20 @@
|
||||
use crate::layouts;
|
||||
use axum::{Router, routing::get};
|
||||
use maud::{Markup, html};
|
||||
|
||||
mod new;
|
||||
|
||||
pub fn routes() -> Router {
|
||||
Router::new()
|
||||
.route("/", get(page))
|
||||
.nest("/new", new::routes())
|
||||
}
|
||||
|
||||
async fn page() -> Markup {
|
||||
let content = html! {
|
||||
h1 { "Exercises" }
|
||||
a href="/exercises/new" { "new exercise +" }
|
||||
};
|
||||
|
||||
layouts::desktop(content, "Exercises")
|
||||
}
|
55
src/pages/exercises/new.rs
Normal file
55
src/pages/exercises/new.rs
Normal file
@ -0,0 +1,55 @@
|
||||
use crate::layouts;
|
||||
use axum::{Router, routing::get};
|
||||
use maud::{Markup, html};
|
||||
|
||||
pub fn routes() -> Router {
|
||||
Router::new().route("/", get(page))
|
||||
}
|
||||
|
||||
async fn page() -> Markup {
|
||||
let content = html! {
|
||||
h1 class="mb-5" { "New Exercise" }
|
||||
|
||||
forum class="space-y-1" {
|
||||
fieldset class="fieldset" {
|
||||
legend class="fieldset-legend" { "Name" }
|
||||
input class="input" {}
|
||||
}
|
||||
|
||||
fieldset class="fieldset" {
|
||||
legend class="fieldset-legend" { "Description" }
|
||||
textarea class="textarea" {}
|
||||
}
|
||||
|
||||
fieldset class="fieldset" {
|
||||
legend class="fieldset-legend" { "Muscle Group" }
|
||||
|
||||
label class="label" {
|
||||
input type="checkbox" checked="checked" class="checkbox" {}
|
||||
"Chest"
|
||||
}
|
||||
label class="label" {
|
||||
input type="checkbox" checked="checked" class="checkbox" {}
|
||||
"Body"
|
||||
}
|
||||
}
|
||||
|
||||
fieldset class="fieldset" {
|
||||
legend class="fieldset-legend" { "Equipment" }
|
||||
|
||||
label class="label" {
|
||||
input type="checkbox" checked="checked" class="checkbox" {}
|
||||
"Weigted plates"
|
||||
}
|
||||
label class="label" {
|
||||
input type="checkbox" checked="checked" class="checkbox" {}
|
||||
"Jump Rope"
|
||||
}
|
||||
}
|
||||
|
||||
input type="submit" class="btn" value="save" { }
|
||||
}
|
||||
};
|
||||
|
||||
layouts::desktop(content, "New Exercise")
|
||||
}
|
@ -9,5 +9,5 @@ pub fn routes() -> Router {
|
||||
async fn page() -> Markup {
|
||||
let content = html! {};
|
||||
|
||||
layouts::empty(content, "Login")
|
||||
layouts::desktop(content, "Home")
|
||||
}
|
||||
|
12
tailwind.css
12
tailwind.css
@ -37,3 +37,15 @@
|
||||
--depth: 0;
|
||||
--noise: 0;
|
||||
}
|
||||
|
||||
h1 {
|
||||
@apply text-3xl
|
||||
}
|
||||
|
||||
h2 {
|
||||
@apply text-2xl
|
||||
}
|
||||
|
||||
h3 {
|
||||
@apply text-xl
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user