diff --git a/assets/styles.css b/assets/styles.css index b4c01e4..b9a40e1 100644 --- a/assets/styles.css +++ b/assets/styles.css @@ -727,6 +727,39 @@ html{ --btn-focus-scale: 1; } +:root:has(input.theme-controller[value=corporate]:checked){ + color-scheme: light; + --b2: 93% 0 0; + --b3: 86% 0 0; + --in: 72.06% 0.191 231.6; + --su: 64.8% 0.150 160; + --wa: 84.71% 0.199 83.87; + --er: 71.76% 0.221 22.18; + --pc: 12.078% 0.0456 269.1; + --sc: 13.0739% 0.010951 256.688055; + --ac: 15.3934% 0.022799 163.57888; + --inc: 0% 0 0; + --suc: 0% 0 0; + --wac: 0% 0 0; + --erc: 0% 0 0; + --border-btn: 1px; + --tab-border: 1px; + --p: 60.39% 0.228 269.1; + --s: 65.3694% 0.054756 256.688055; + --a: 76.9669% 0.113994 163.57888; + --n: 22.3899% 0.031305 278.07229; + --nc: 95.8796% 0.008588 247.915135; + --b1: 100% 0 0; + --bc: 22.3899% 0.031305 278.07229; + --rounded-box: 0.25rem; + --rounded-btn: .125rem; + --rounded-badge: .125rem; + --tab-radius: 0.25rem; + --animation-btn: 0; + --animation-input: 0; + --btn-focus-scale: 1; +} + [data-theme=dark]{ color-scheme: dark; --in: 72.06% 0.191 231.6; @@ -760,6 +793,307 @@ html{ --bc: 74.6477% 0.0216 264.435964; } +:root:has(input.theme-controller[value=dark]:checked){ + color-scheme: dark; + --in: 72.06% 0.191 231.6; + --su: 64.8% 0.150 160; + --wa: 84.71% 0.199 83.87; + --er: 71.76% 0.221 22.18; + --pc: 13.138% 0.0392 275.75; + --sc: 14.96% 0.052 342.55; + --ac: 14.902% 0.0334 183.61; + --inc: 0% 0 0; + --suc: 0% 0 0; + --wac: 0% 0 0; + --erc: 0% 0 0; + --rounded-box: 1rem; + --rounded-btn: 0.5rem; + --rounded-badge: 1.9rem; + --animation-btn: 0.25s; + --animation-input: .2s; + --btn-focus-scale: 0.95; + --border-btn: 1px; + --tab-border: 1px; + --tab-radius: 0.5rem; + --p: 65.69% 0.196 275.75; + --s: 74.8% 0.26 342.55; + --a: 74.51% 0.167 183.61; + --n: 31.3815% 0.021108 254.139175; + --nc: 74.6477% 0.0216 264.435964; + --b1: 25.3267% 0.015896 252.417568; + --b2: 23.2607% 0.013807 253.100675; + --b3: 21.1484% 0.01165 254.087939; + --bc: 74.6477% 0.0216 264.435964; +} + +.alert{ + display: grid; + width: 100%; + grid-auto-flow: row; + align-content: flex-start; + align-items: center; + justify-items: center; + gap: 1rem; + text-align: center; + border-radius: var(--rounded-box, 1rem); + border-width: 1px; + --tw-border-opacity: 1; + border-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity))); + padding: 1rem; + --tw-text-opacity: 1; + color: var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity))); + --alert-bg: var(--fallback-b2,oklch(var(--b2)/1)); + --alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1)); + background-color: var(--alert-bg); +} + +@media (min-width: 640px){ + .alert{ + grid-auto-flow: column; + grid-template-columns: auto minmax(auto,1fr); + justify-items: start; + text-align: start; + } +} + +.avatar.placeholder > div{ + display: flex; + align-items: center; + justify-content: center; +} + +.badge{ + display: inline-flex; + align-items: center; + justify-content: center; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-timing-function: cubic-bezier(0, 0, 0.2, 1); + transition-duration: 200ms; + height: 1.25rem; + font-size: 0.875rem; + line-height: 1.25rem; + width: -moz-fit-content; + width: fit-content; + padding-left: 0.563rem; + padding-right: 0.563rem; + border-radius: var(--rounded-badge, 1.9rem); + border-width: 1px; + --tw-border-opacity: 1; + border-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity))); + --tw-bg-opacity: 1; + background-color: var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity))); + --tw-text-opacity: 1; + color: var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity))); +} + +@media (hover:hover){ + .label a:hover{ + --tw-text-opacity: 1; + color: var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity))); + } + + .menu li > *:not(ul, .menu-title, details, .btn):active, +.menu li > *:not(ul, .menu-title, details, .btn).active, +.menu li > details > summary:active{ + --tw-bg-opacity: 1; + background-color: var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity))); + --tw-text-opacity: 1; + color: var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity))); + } +} + +.btn{ + display: inline-flex; + height: 3rem; + min-height: 3rem; + flex-shrink: 0; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + flex-wrap: wrap; + align-items: center; + justify-content: center; + border-radius: var(--rounded-btn, 0.5rem); + border-color: transparent; + border-color: oklch(var(--btn-color, var(--b2)) / var(--tw-border-opacity)); + padding-left: 1rem; + padding-right: 1rem; + text-align: center; + font-size: 0.875rem; + line-height: 1em; + gap: 0.5rem; + font-weight: 600; + text-decoration-line: none; + transition-duration: 200ms; + transition-timing-function: cubic-bezier(0, 0, 0.2, 1); + border-width: var(--border-btn, 1px); + transition-property: color, background-color, border-color, opacity, box-shadow, transform; + --tw-text-opacity: 1; + color: var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity))); + --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); + --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); + outline-color: var(--fallback-bc,oklch(var(--bc)/1)); + background-color: oklch(var(--btn-color, var(--b2)) / var(--tw-bg-opacity)); + --tw-bg-opacity: 1; + --tw-border-opacity: 1; +} + +.btn-disabled, + .btn[disabled], + .btn:disabled{ + pointer-events: none; +} + +:where(.btn:is(input[type="checkbox"])), +:where(.btn:is(input[type="radio"])){ + width: auto; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} + +.btn:is(input[type="checkbox"]):after, +.btn:is(input[type="radio"]):after{ + --tw-content: attr(aria-label); + content: var(--tw-content); +} + +.card{ + position: relative; + display: flex; + flex-direction: column; + border-radius: var(--rounded-box, 1rem); +} + +.card:focus{ + outline: 2px solid transparent; + outline-offset: 2px; +} + +.card figure{ + display: flex; + align-items: center; + justify-content: center; +} + +.card.image-full{ + display: grid; +} + +.card.image-full:before{ + position: relative; + content: ""; + z-index: 10; + border-radius: var(--rounded-box, 1rem); + --tw-bg-opacity: 1; + background-color: var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity))); + opacity: 0.75; +} + +.card.image-full:before, + .card.image-full > *{ + grid-column-start: 1; + grid-row-start: 1; +} + +.card.image-full > figure img{ + height: 100%; + -o-object-fit: cover; + object-fit: cover; +} + +.card.image-full > .card-body{ + position: relative; + z-index: 20; + --tw-text-opacity: 1; + color: var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity))); +} + +.checkbox{ + flex-shrink: 0; + --chkbg: var(--fallback-bc,oklch(var(--bc)/1)); + --chkfg: var(--fallback-b1,oklch(var(--b1)/1)); + height: 1.5rem; + width: 1.5rem; + cursor: pointer; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + border-radius: var(--rounded-btn, 0.5rem); + border-width: 1px; + border-color: var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity))); + --tw-border-opacity: 0.2; +} + +.collapse:not(td):not(tr):not(colgroup){ + visibility: visible; +} + +.collapse{ + position: relative; + display: grid; + overflow: hidden; + grid-template-rows: auto 0fr; + transition: grid-template-rows 0.2s; + width: 100%; + border-radius: var(--rounded-box, 1rem); +} + +.collapse-title, +.collapse > input[type="checkbox"], +.collapse > input[type="radio"], +.collapse-content{ + grid-column-start: 1; + grid-row-start: 1; +} + +.collapse > input[type="checkbox"], +.collapse > input[type="radio"]{ + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + opacity: 0; +} + +.collapse-content{ + visibility: hidden; + grid-column-start: 1; + grid-row-start: 2; + min-height: 0px; + transition: visibility 0.2s; + transition: padding 0.2s ease-out, + background-color 0.2s ease-out; + padding-left: 1rem; + padding-right: 1rem; + cursor: unset; +} + +.collapse[open], +.collapse-open, +.collapse:focus:not(.collapse-close){ + grid-template-rows: auto 1fr; +} + +.collapse:not(.collapse-close):has(> input[type="checkbox"]:checked), +.collapse:not(.collapse-close):has(> input[type="radio"]:checked){ + grid-template-rows: auto 1fr; +} + +.collapse[open] > .collapse-content, +.collapse-open > .collapse-content, +.collapse:focus:not(.collapse-close) > .collapse-content, +.collapse:not(.collapse-close) > input[type="checkbox"]:checked ~ .collapse-content, +.collapse:not(.collapse-close) > input[type="radio"]:checked ~ .collapse-content{ + visibility: visible; + min-height: -moz-fit-content; + min-height: fit-content; +} + .divider{ display: flex; flex-direction: row; @@ -781,6 +1115,167 @@ html{ background-color: var(--fallback-bc,oklch(var(--bc)/0.1)); } +@media (hover: hover){ + .btn:hover{ + --tw-border-opacity: 1; + border-color: var(--fallback-b3,oklch(var(--b3)/var(--tw-border-opacity))); + --tw-bg-opacity: 1; + background-color: var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity))); + } + + @supports (color: color-mix(in oklab, black, black)){ + .btn:hover{ + background-color: color-mix( + in oklab, + oklch(var(--btn-color, var(--b2)) / var(--tw-bg-opacity, 1)) 90%, + black + ); + border-color: color-mix( + in oklab, + oklch(var(--btn-color, var(--b2)) / var(--tw-border-opacity, 1)) 90%, + black + ); + } + } + + @supports not (color: oklch(0% 0 0)){ + .btn:hover{ + background-color: var(--btn-color, var(--fallback-b2)); + border-color: var(--btn-color, var(--fallback-b2)); + } + } + + .btn.glass:hover{ + --glass-opacity: 25%; + --glass-border-opacity: 15%; + } + + .btn-disabled:hover, + .btn[disabled]:hover, + .btn:disabled:hover{ + --tw-border-opacity: 0; + background-color: var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity))); + --tw-bg-opacity: 0.2; + color: var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity))); + --tw-text-opacity: 0.2; + } + + @supports (color: color-mix(in oklab, black, black)){ + .btn:is(input[type="checkbox"]:checked):hover, .btn:is(input[type="radio"]:checked):hover{ + background-color: color-mix(in oklab, var(--fallback-p,oklch(var(--p)/1)) 90%, black); + border-color: color-mix(in oklab, var(--fallback-p,oklch(var(--p)/1)) 90%, black); + } + } + + :where(.menu li:not(.menu-title, .disabled) > *:not(ul, details, .menu-title)):not(.active, .btn):hover, :where(.menu li:not(.menu-title, .disabled) > details > summary:not(.menu-title)):not(.active, .btn):hover{ + cursor: pointer; + outline: 2px solid transparent; + outline-offset: 2px; + } + + @supports (color: oklch(0% 0 0)){ + :where(.menu li:not(.menu-title, .disabled) > *:not(ul, details, .menu-title)):not(.active, .btn):hover, :where(.menu li:not(.menu-title, .disabled) > details > summary:not(.menu-title)):not(.active, .btn):hover{ + background-color: var(--fallback-bc,oklch(var(--bc)/0.1)); + } + } +} + +.label{ + display: flex; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + align-items: center; + justify-content: space-between; + padding-left: 0.25rem; + padding-right: 0.25rem; + padding-top: 0.5rem; + padding-bottom: 0.5rem; +} + +.input{ + flex-shrink: 1; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + height: 3rem; + padding-left: 1rem; + padding-right: 1rem; + font-size: 1rem; + line-height: 2; + line-height: 1.5rem; + border-radius: var(--rounded-btn, 0.5rem); + border-width: 1px; + border-color: transparent; + --tw-bg-opacity: 1; + background-color: var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity))); +} + +.input[type="number"]::-webkit-inner-spin-button, +.input-md[type="number"]::-webkit-inner-spin-button{ + margin-top: -1rem; + margin-bottom: -1rem; + margin-inline-end: -1rem; +} + +.link{ + cursor: pointer; + text-decoration-line: underline; +} + +.menu{ + display: flex; + flex-direction: column; + flex-wrap: wrap; + font-size: 0.875rem; + line-height: 1.25rem; + padding: 0.5rem; +} + +.menu :where(li ul){ + position: relative; + white-space: nowrap; + margin-inline-start: 1rem; + padding-inline-start: 0.5rem; +} + +.menu :where(li:not(.menu-title) > *:not(ul, details, .menu-title, .btn)), .menu :where(li:not(.menu-title) > details > summary:not(.menu-title)){ + display: grid; + grid-auto-flow: column; + align-content: flex-start; + align-items: center; + gap: 0.5rem; + grid-auto-columns: minmax(auto, max-content) auto max-content; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; +} + +.menu li.disabled{ + cursor: not-allowed; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + color: var(--fallback-bc,oklch(var(--bc)/0.3)); +} + +.menu :where(li > .menu-dropdown:not(.menu-dropdown-show)){ + display: none; +} + +:where(.menu li){ + position: relative; + display: flex; + flex-shrink: 0; + flex-direction: column; + flex-wrap: wrap; + align-items: stretch; +} + +:where(.menu li) .badge{ + justify-self: end; +} + .steps{ display: inline-grid; grid-auto-flow: column; @@ -801,6 +1296,139 @@ html{ min-width: 4rem; } +.swap{ + position: relative; + display: inline-grid; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + place-content: center; + cursor: pointer; +} + +.swap > *{ + grid-column-start: 1; + grid-row-start: 1; + transition-duration: 300ms; + transition-timing-function: cubic-bezier(0, 0, 0.2, 1); + transition-property: transform, opacity; +} + +.swap input{ + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} + +.swap .swap-on, +.swap .swap-indeterminate, +.swap input:indeterminate ~ .swap-on{ + opacity: 0; +} + +.swap input:checked ~ .swap-off, +.swap-active .swap-off, +.swap input:indeterminate ~ .swap-off{ + opacity: 0; +} + +.swap input:checked ~ .swap-on, +.swap-active .swap-on, +.swap input:indeterminate ~ .swap-indeterminate{ + opacity: 1; +} + +.textarea{ + min-height: 3rem; + flex-shrink: 1; + padding-left: 1rem; + padding-right: 1rem; + padding-top: 0.5rem; + padding-bottom: 0.5rem; + font-size: 0.875rem; + line-height: 1.25rem; + line-height: 2; + border-radius: var(--rounded-btn, 0.5rem); + border-width: 1px; + border-color: transparent; + --tw-bg-opacity: 1; + background-color: var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity))); +} + +.alert-error{ + border-color: var(--fallback-er,oklch(var(--er)/0.2)); + --tw-text-opacity: 1; + color: var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity))); + --alert-bg: var(--fallback-er,oklch(var(--er)/1)); + --alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1)); +} + +.btm-nav > * .label{ + font-size: 1rem; + line-height: 1.5rem; +} + +@media (prefers-reduced-motion: no-preference){ + .btn{ + animation: button-pop var(--animation-btn, 0.25s) ease-out; + } +} + +.btn:active:hover, + .btn:active:focus{ + animation: button-pop 0s ease-out; + transform: scale(var(--btn-focus-scale, 0.97)); +} + +@supports not (color: oklch(0% 0 0)){ + .btn{ + background-color: var(--btn-color, var(--fallback-b2)); + border-color: var(--btn-color, var(--fallback-b2)); + } +} + +.btn:focus-visible{ + outline-style: solid; + outline-width: 2px; + outline-offset: 2px; +} + +.btn.glass{ + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); + outline-color: currentColor; +} + +.btn.glass.btn-active{ + --glass-opacity: 25%; + --glass-border-opacity: 15%; +} + +.btn.btn-disabled, + .btn[disabled], + .btn:disabled{ + --tw-border-opacity: 0; + background-color: var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity))); + --tw-bg-opacity: 0.2; + color: var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity))); + --tw-text-opacity: 0.2; +} + +.btn:is(input[type="checkbox"]:checked), +.btn:is(input[type="radio"]:checked){ + --tw-border-opacity: 1; + border-color: var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity))); + --tw-bg-opacity: 1; + background-color: var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity))); + --tw-text-opacity: 1; + color: var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity))); +} + +.btn:is(input[type="checkbox"]:checked):focus-visible, .btn:is(input[type="radio"]:checked):focus-visible{ + outline-color: var(--fallback-p,oklch(var(--p)/1)); +} + @keyframes button-pop{ 0%{ transform: scale(var(--btn-focus-scale, 0.98)); @@ -815,6 +1443,92 @@ html{ } } +.card :where(figure:first-child){ + overflow: hidden; + border-start-start-radius: inherit; + border-start-end-radius: inherit; + border-end-start-radius: unset; + border-end-end-radius: unset; +} + +.card :where(figure:last-child){ + overflow: hidden; + border-start-start-radius: unset; + border-start-end-radius: unset; + border-end-start-radius: inherit; + border-end-end-radius: inherit; +} + +.card:focus-visible{ + outline: 2px solid currentColor; + outline-offset: 2px; +} + +.card.bordered{ + border-width: 1px; + --tw-border-opacity: 1; + border-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity))); +} + +.card.compact .card-body{ + padding: 1rem; + font-size: 0.875rem; + line-height: 1.25rem; +} + +.card.image-full :where(figure){ + overflow: hidden; + border-radius: inherit; +} + +.checkbox:focus{ + box-shadow: none; +} + +.checkbox:focus-visible{ + outline-style: solid; + outline-width: 2px; + outline-offset: 2px; + outline-color: var(--fallback-bc,oklch(var(--bc)/1)); +} + +.checkbox:disabled{ + border-width: 0px; + cursor: not-allowed; + border-color: transparent; + --tw-bg-opacity: 1; + background-color: var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity))); + opacity: 0.2; +} + +.checkbox:checked, + .checkbox[aria-checked="true"]{ + background-repeat: no-repeat; + animation: checkmark var(--animation-input, 0.2s) ease-out; + background-color: var(--chkbg); + background-image: linear-gradient(-45deg, transparent 65%, var(--chkbg) 65.99%), + linear-gradient(45deg, transparent 75%, var(--chkbg) 75.99%), + linear-gradient(-45deg, var(--chkbg) 40%, transparent 40.99%), + linear-gradient( + 45deg, + var(--chkbg) 30%, + var(--chkfg) 30.99%, + var(--chkfg) 40%, + transparent 40.99% + ), + linear-gradient(-45deg, var(--chkfg) 50%, var(--chkbg) 50.99%); +} + +.checkbox:indeterminate{ + --tw-bg-opacity: 1; + background-color: var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity))); + background-repeat: no-repeat; + animation: checkmark var(--animation-input, 0.2s) ease-out; + background-image: linear-gradient(90deg, transparent 80%, var(--chkbg) 80%), + linear-gradient(-90deg, transparent 80%, var(--chkbg) 80%), + linear-gradient(0deg, var(--chkbg) 43%, var(--chkfg) 43%, var(--chkfg) 57%, var(--chkbg) 57%); +} + @keyframes checkmark{ 0%{ background-position-y: 5px; @@ -829,10 +1543,338 @@ html{ } } +details.collapse{ + width: 100%; +} + +details.collapse summary{ + position: relative; + display: block; + outline: 2px solid transparent; + outline-offset: 2px; +} + +details.collapse summary::-webkit-details-marker{ + display: none; +} + +.collapse:focus-visible{ + outline-style: solid; + outline-width: 2px; + outline-offset: 2px; + outline-color: var(--fallback-bc,oklch(var(--bc)/1)); +} + +.collapse:has(.collapse-title:focus-visible), +.collapse:has(> input[type="checkbox"]:focus-visible), +.collapse:has(> input[type="radio"]:focus-visible){ + outline-style: solid; + outline-width: 2px; + outline-offset: 2px; + outline-color: var(--fallback-bc,oklch(var(--bc)/1)); +} + +.collapse-arrow > .collapse-title:after{ + position: absolute; + display: block; + height: 0.5rem; + width: 0.5rem; + --tw-translate-y: -100%; + --tw-rotate: 45deg; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); + transition-property: all; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-timing-function: cubic-bezier(0, 0, 0.2, 1); + transition-duration: 150ms; + transition-duration: 0.2s; + top: 1.9rem; + inset-inline-end: 1.4rem; + content: ""; + transform-origin: 75% 75%; + box-shadow: 2px 2px; + pointer-events: none; +} + +.collapse-plus > .collapse-title:after{ + position: absolute; + display: block; + height: 0.5rem; + width: 0.5rem; + transition-property: all; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-timing-function: cubic-bezier(0, 0, 0.2, 1); + transition-duration: 300ms; + top: 0.9rem; + inset-inline-end: 1.4rem; + content: "+"; + pointer-events: none; +} + +.collapse:not(.collapse-open):not(.collapse-close) > input[type="checkbox"], +.collapse:not(.collapse-open):not(.collapse-close) > input[type="radio"]:not(:checked), +.collapse:not(.collapse-open):not(.collapse-close) > .collapse-title{ + cursor: pointer; +} + +.collapse:focus:not(.collapse-open):not(.collapse-close):not(.collapse[open]) > .collapse-title{ + cursor: unset; +} + +.collapse-title{ + position: relative; +} + +:where(.collapse > input[type="checkbox"]), +:where(.collapse > input[type="radio"]){ + z-index: 1; +} + +.collapse-title, +:where(.collapse > input[type="checkbox"]), +:where(.collapse > input[type="radio"]){ + width: 100%; + padding: 1rem; + padding-inline-end: 3rem; + min-height: 3.75rem; + transition: background-color 0.2s ease-out; +} + +.collapse[open] > :where(.collapse-content), +.collapse-open > :where(.collapse-content), +.collapse:focus:not(.collapse-close) > :where(.collapse-content), +.collapse:not(.collapse-close) > :where(input[type="checkbox"]:checked ~ .collapse-content), +.collapse:not(.collapse-close) > :where(input[type="radio"]:checked ~ .collapse-content){ + padding-bottom: 1rem; + transition: padding 0.2s ease-out, + background-color 0.2s ease-out; +} + +.collapse[open].collapse-arrow > .collapse-title:after, +.collapse-open.collapse-arrow > .collapse-title:after, +.collapse-arrow:focus:not(.collapse-close) > .collapse-title:after, +.collapse-arrow:not(.collapse-close) > input[type="checkbox"]:checked ~ .collapse-title:after, +.collapse-arrow:not(.collapse-close) > input[type="radio"]:checked ~ .collapse-title:after{ + --tw-translate-y: -50%; + --tw-rotate: 225deg; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.collapse[open].collapse-plus > .collapse-title:after, +.collapse-open.collapse-plus > .collapse-title:after, +.collapse-plus:focus:not(.collapse-close) > .collapse-title:after, +.collapse-plus:not(.collapse-close) > input[type="checkbox"]:checked ~ .collapse-title:after, +.collapse-plus:not(.collapse-close) > input[type="radio"]:checked ~ .collapse-title:after{ + content: "−"; +} + .divider:not(:empty){ gap: 1rem; } +.input input{ + --tw-bg-opacity: 1; + background-color: var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity))); + background-color: transparent; +} + +.input input:focus{ + outline: 2px solid transparent; + outline-offset: 2px; +} + +.input[list]::-webkit-calendar-picker-indicator{ + line-height: 1em; +} + +.input-bordered{ + border-color: var(--fallback-bc,oklch(var(--bc)/0.2)); +} + +.input:focus, + .input:focus-within{ + box-shadow: none; + border-color: var(--fallback-bc,oklch(var(--bc)/0.2)); + outline-style: solid; + outline-width: 2px; + outline-offset: 2px; + outline-color: var(--fallback-bc,oklch(var(--bc)/0.2)); +} + +.input:has(> input[disabled]), + .input-disabled, + .input:disabled, + .input[disabled]{ + cursor: not-allowed; + --tw-border-opacity: 1; + border-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity))); + --tw-bg-opacity: 1; + background-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity))); + color: var(--fallback-bc,oklch(var(--bc)/0.4)); +} + +.input:has(> input[disabled])::-moz-placeholder, .input-disabled::-moz-placeholder, .input:disabled::-moz-placeholder, .input[disabled]::-moz-placeholder{ + color: var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity))); + --tw-placeholder-opacity: 0.2; +} + +.input:has(> input[disabled])::placeholder, + .input-disabled::placeholder, + .input:disabled::placeholder, + .input[disabled]::placeholder{ + color: var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity))); + --tw-placeholder-opacity: 0.2; +} + +.input:has(> input[disabled]) > input[disabled]{ + cursor: not-allowed; +} + +.input::-webkit-date-and-time-value{ + text-align: inherit; +} + +.join > :where(*:not(:first-child)):is(.btn){ + margin-inline-start: calc(var(--border-btn) * -1); +} + +.link:focus{ + outline: 2px solid transparent; + outline-offset: 2px; +} + +.link:focus-visible{ + outline: 2px solid currentColor; + outline-offset: 2px; +} + +:where(.menu li:empty){ + --tw-bg-opacity: 1; + background-color: var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity))); + opacity: 0.1; + margin: 0.5rem 1rem; + height: 1px; +} + +.menu :where(li ul):before{ + position: absolute; + bottom: 0.75rem; + inset-inline-start: 0px; + top: 0.75rem; + width: 1px; + --tw-bg-opacity: 1; + background-color: var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity))); + opacity: 0.1; + content: ""; +} + +.menu :where(li:not(.menu-title) > *:not(ul, details, .menu-title, .btn)), +.menu :where(li:not(.menu-title) > details > summary:not(.menu-title)){ + border-radius: var(--rounded-btn, 0.5rem); + padding-left: 1rem; + padding-right: 1rem; + padding-top: 0.5rem; + padding-bottom: 0.5rem; + text-align: start; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-timing-function: cubic-bezier(0, 0, 0.2, 1); + transition-duration: 200ms; + text-wrap: balance; +} + +:where(.menu li:not(.menu-title, .disabled) > *:not(ul, details, .menu-title)):not(summary, .active, .btn).focus, :where(.menu li:not(.menu-title, .disabled) > *:not(ul, details, .menu-title)):not(summary, .active, .btn):focus, :where(.menu li:not(.menu-title, .disabled) > *:not(ul, details, .menu-title)):is(summary):not(.active, .btn):focus-visible, :where(.menu li:not(.menu-title, .disabled) > details > summary:not(.menu-title)):not(summary, .active, .btn).focus, :where(.menu li:not(.menu-title, .disabled) > details > summary:not(.menu-title)):not(summary, .active, .btn):focus, :where(.menu li:not(.menu-title, .disabled) > details > summary:not(.menu-title)):is(summary):not(.active, .btn):focus-visible{ + cursor: pointer; + background-color: var(--fallback-bc,oklch(var(--bc)/0.1)); + --tw-text-opacity: 1; + color: var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity))); + outline: 2px solid transparent; + outline-offset: 2px; +} + +.menu li > *:not(ul, .menu-title, details, .btn):active, +.menu li > *:not(ul, .menu-title, details, .btn).active, +.menu li > details > summary:active{ + --tw-bg-opacity: 1; + background-color: var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity))); + --tw-text-opacity: 1; + color: var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity))); +} + +.menu :where(li > details > summary)::-webkit-details-marker{ + display: none; +} + +.menu :where(li > details > summary):after, +.menu :where(li > .menu-dropdown-toggle):after{ + justify-self: end; + display: block; + margin-top: -0.5rem; + height: 0.5rem; + width: 0.5rem; + transform: rotate(45deg); + transition-property: transform, margin-top; + transition-duration: 0.3s; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + content: ""; + transform-origin: 75% 75%; + box-shadow: 2px 2px; + pointer-events: none; +} + +.menu :where(li > details[open] > summary):after, +.menu :where(li > .menu-dropdown-toggle.menu-dropdown-show):after{ + transform: rotate(225deg); + margin-top: 0; +} + +.mockup-browser .mockup-browser-toolbar .input{ + position: relative; + margin-left: auto; + margin-right: auto; + display: block; + height: 1.75rem; + width: 24rem; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + --tw-bg-opacity: 1; + background-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity))); + padding-left: 2rem; + direction: ltr; +} + +.mockup-browser .mockup-browser-toolbar .input:before{ + content: ""; + position: absolute; + left: 0.5rem; + top: 50%; + aspect-ratio: 1 / 1; + height: 0.75rem; + --tw-translate-y: -50%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); + border-radius: 9999px; + border-width: 2px; + border-color: currentColor; + opacity: 0.6; +} + +.mockup-browser .mockup-browser-toolbar .input:after{ + content: ""; + position: absolute; + left: 1.25rem; + top: 50%; + height: 0.5rem; + --tw-translate-y: 25%; + --tw-rotate: -45deg; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); + border-radius: 9999px; + border-width: 1px; + border-color: currentColor; + opacity: 0.6; +} + @keyframes modal-pop{ 0%{ opacity: 0; @@ -1008,6 +2050,81 @@ html{ color: var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity))); } +.swap-rotate .swap-on, +.swap-rotate .swap-indeterminate, +.swap-rotate input:indeterminate ~ .swap-on{ + --tw-rotate: 45deg; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.swap-rotate input:checked ~ .swap-off, +.swap-active:where(.swap-rotate) .swap-off, +.swap-rotate input:indeterminate ~ .swap-off{ + --tw-rotate: -45deg; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.swap-rotate input:checked ~ .swap-on, +.swap-active:where(.swap-rotate) .swap-on, +.swap-rotate input:indeterminate ~ .swap-indeterminate{ + --tw-rotate: 0deg; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.swap-flip .swap-on, +.swap-flip .swap-indeterminate, +.swap-flip input:indeterminate ~ .swap-on{ + transform: rotateY(180deg); + backface-visibility: hidden; + opacity: 1; +} + +.swap-flip input:checked ~ .swap-off, +.swap-active:where(.swap-flip) .swap-off, +.swap-flip input:indeterminate ~ .swap-off{ + transform: rotateY(-180deg); + backface-visibility: hidden; + opacity: 1; +} + +.swap-flip input:checked ~ .swap-on, +.swap-active:where(.swap-flip) .swap-on, +.swap-flip input:indeterminate ~ .swap-indeterminate{ + transform: rotateY(0deg); +} + +.textarea:focus{ + box-shadow: none; + border-color: var(--fallback-bc,oklch(var(--bc)/0.2)); + outline-style: solid; + outline-width: 2px; + outline-offset: 2px; + outline-color: var(--fallback-bc,oklch(var(--bc)/0.2)); +} + +.textarea-disabled, + .textarea:disabled, + .textarea[disabled]{ + cursor: not-allowed; + --tw-border-opacity: 1; + border-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity))); + --tw-bg-opacity: 1; + background-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity))); + color: var(--fallback-bc,oklch(var(--bc)/0.4)); +} + +.textarea-disabled::-moz-placeholder, .textarea:disabled::-moz-placeholder, .textarea[disabled]::-moz-placeholder{ + color: var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity))); + --tw-placeholder-opacity: 0.2; +} + +.textarea-disabled::placeholder, + .textarea:disabled::placeholder, + .textarea[disabled]::placeholder{ + color: var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity))); + --tw-placeholder-opacity: 0.2; +} + @keyframes toast-pop{ 0%{ transform: scale(0.9); @@ -1034,6 +2151,15 @@ html{ grid-template-rows: repeat(1, minmax(0, 1fr)); } +.join.join-vertical > :where(*:not(:first-child)):is(.btn){ + margin-top: calc(var(--border-btn) * -1); +} + +.join.join-horizontal > :where(*:not(:first-child)):is(.btn){ + margin-inline-start: calc(var(--border-btn) * -1); + margin-top: 0px; +} + .steps-horizontal .step{ grid-template-rows: 40px 1fr; grid-template-columns: auto; @@ -1077,10 +2203,22 @@ html{ transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } +.collapse{ + visibility: collapse; +} + .m-4{ margin: 1rem; } +.m-auto{ + margin: auto; +} + +.ml-2{ + margin-left: 0.5rem; +} + .ml-auto{ margin-left: auto; } @@ -1101,18 +2239,86 @@ html{ display: block; } +.inline-block{ + display: inline-block; +} + .flex{ display: flex; } +.hidden{ + display: none; +} + +.h-32{ + height: 8rem; +} + +.h-4{ + height: 1rem; +} + +.h-5{ + height: 1.25rem; +} + +.h-6{ + height: 1.5rem; +} + +.w-1\/2{ + width: 50%; +} + +.w-12{ + width: 3rem; +} + +.w-24{ + width: 6rem; +} + +.w-4{ + width: 1rem; +} + .w-40{ width: 10rem; } +.w-5{ + width: 1.25rem; +} + +.w-6{ + width: 1.5rem; +} + .w-full{ width: 100%; } +.shrink-0{ + flex-shrink: 0; +} + +.grow{ + flex-grow: 1; +} + +.grow-0{ + flex-grow: 0; +} + +.transform{ + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.cursor-pointer{ + cursor: pointer; +} + .list-inside{ list-style-position: inside; } @@ -1129,14 +2335,34 @@ html{ flex-direction: column; } +.flex-wrap{ + flex-wrap: wrap; +} + .items-center{ align-items: center; } +.justify-end{ + justify-content: flex-end; +} + .justify-center{ justify-content: center; } +.justify-between{ + justify-content: space-between; +} + +.gap-1{ + gap: 0.25rem; +} + +.gap-2{ + gap: 0.5rem; +} + .gap-3{ gap: 0.75rem; } @@ -1149,19 +2375,70 @@ html{ gap: 1.75rem; } +.gap-8{ + gap: 2rem; +} + .rounded-full{ border-radius: 9999px; } +.rounded-lg{ + border-radius: 0.5rem; +} + .rounded-xl{ border-radius: 0.75rem; } +.border{ + border-width: 1px; +} + +.border-b{ + border-bottom-width: 1px; +} + +.border-solid{ + border-style: solid; +} + +.border-gray-100{ + --tw-border-opacity: 1; + border-color: rgb(243 244 246 / var(--tw-border-opacity)); +} + +.border-gray-200{ + --tw-border-opacity: 1; + border-color: rgb(229 231 235 / var(--tw-border-opacity)); +} + .bg-gray-300{ --tw-bg-opacity: 1; background-color: rgb(209 213 219 / var(--tw-bg-opacity)); } +.fill-current{ + fill: currentColor; +} + +.stroke-current{ + stroke: currentColor; +} + +.object-cover{ + -o-object-fit: cover; + object-fit: cover; +} + +.p-12{ + padding: 3rem; +} + +.p-4{ + padding: 1rem; +} + .px-4{ padding-left: 1rem; padding-right: 1rem; @@ -1176,15 +2453,55 @@ html{ text-align: center; } +.text-right{ + text-align: right; +} + +.font-body{ + font-family: Nunito; +} + +.text-6xl{ + font-size: 3.75rem; + line-height: 1; +} + .text-base{ font-size: 1rem; line-height: 1.5rem; } +.text-sm{ + font-size: 0.875rem; + line-height: 1.25rem; +} + .font-bold{ font-weight: 700; } +.font-normal{ + font-weight: 400; +} + +.font-semibold{ + font-weight: 600; +} + +.uppercase{ + text-transform: uppercase; +} + +.text-gray-500{ + --tw-text-opacity: 1; + color: rgb(107 114 128 / var(--tw-text-opacity)); +} + +.text-gray-600{ + --tw-text-opacity: 1; + color: rgb(75 85 99 / var(--tw-text-opacity)); +} + .text-gray-700{ --tw-text-opacity: 1; color: rgb(55 65 81 / var(--tw-text-opacity)); @@ -1200,6 +2517,30 @@ html{ color: rgb(68 64 60 / var(--tw-text-opacity)); } +.opacity-70{ + opacity: 0.7; +} + +.transition{ + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} + +.duration-300{ + transition-duration: 300ms; +} + +.ease-linear{ + transition-timing-function: linear; +} + +.ease-out{ + transition-timing-function: cubic-bezier(0, 0, 0.2, 1); +} + .section-separator{ border-width: 0px; border-bottom-width: 2px; @@ -1262,6 +2603,309 @@ html{ font-style: normal; } +blockquote{ + margin-top: 1rem; + margin-bottom: 1rem; + display: flex; + flex-direction: column; + gap: 1rem; + border-radius: 0.5rem; + border-width: 0px; + border-inline-start-width: 4px; + --tw-border-opacity: 1; + border-color: rgb(209 213 219 / var(--tw-border-opacity)); + --tw-bg-opacity: 1; + background-color: rgb(229 231 235 / var(--tw-bg-opacity)); + padding: 1rem; + font-size: 1.25rem; + line-height: 1.75rem; + font-weight: 500; + font-style: italic; + line-height: 1.625; + --tw-text-opacity: 1; + color: rgb(17 24 39 / var(--tw-text-opacity)); +} + +code{ + border-radius: 9999px; + border-width: 0px; + --tw-bg-opacity: 1; + background-color: rgb(156 163 175 / var(--tw-bg-opacity)); + padding-top: 0.25rem; + padding-bottom: 0.25rem; + padding-left: 0.5rem; + padding-right: 0.5rem; + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + +.content ul{ + list-style-position: inside; + list-style-type: decimal; +} + +.textarea-with-view{ + flex-shrink: 1; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + height: 3rem; + padding-left: 1rem; + padding-right: 1rem; + font-size: 1rem; + line-height: 2; + line-height: 1.5rem; + border-radius: var(--rounded-btn, 0.5rem); + border-width: 1px; + border-color: transparent; + --tw-bg-opacity: 1; + background-color: var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity))); +} + +.textarea-with-view[type="number"]::-webkit-inner-spin-button{ + margin-top: -1rem; + margin-bottom: -1rem; + margin-inline-end: -1rem; +} + +.textarea-with-view input{ + --tw-bg-opacity: 1; + background-color: var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity))); + background-color: transparent; +} + +.textarea-with-view input:focus{ + outline: 2px solid transparent; + outline-offset: 2px; +} + +.textarea-with-view[list]::-webkit-calendar-picker-indicator{ + line-height: 1em; +} + +.textarea-with-view:focus,.textarea-with-view:focus-within{ + box-shadow: none; + border-color: var(--fallback-bc,oklch(var(--bc)/0.2)); + outline-style: solid; + outline-width: 2px; + outline-offset: 2px; + outline-color: var(--fallback-bc,oklch(var(--bc)/0.2)); +} + +.textarea-with-view:has(> input[disabled]),.textarea-with-view:disabled,.textarea-with-view[disabled]{ + cursor: not-allowed; + --tw-border-opacity: 1; + border-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity))); + --tw-bg-opacity: 1; + background-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity))); + color: var(--fallback-bc,oklch(var(--bc)/0.4)); +} + +.textarea-with-view:has(> input[disabled])::-moz-placeholder, .textarea-with-view:disabled::-moz-placeholder, .textarea-with-view[disabled]::-moz-placeholder{ + color: var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity))); + --tw-placeholder-opacity: 0.2; +} + +.textarea-with-view:has(> input[disabled])::placeholder,.textarea-with-view:disabled::placeholder,.textarea-with-view[disabled]::placeholder{ + color: var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity))); + --tw-placeholder-opacity: 0.2; +} + +.textarea-with-view:has(> input[disabled]) > input[disabled]{ + cursor: not-allowed; +} + +.textarea-with-view::-webkit-date-and-time-value{ + text-align: inherit; +} + +.mockup-browser .mockup-browser-toolbar .textarea-with-view{ + position: relative; + margin-left: auto; + margin-right: auto; + display: block; + height: 1.75rem; + width: 24rem; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + --tw-bg-opacity: 1; + background-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity))); + padding-left: 2rem; + direction: ltr; +} + +.mockup-browser .mockup-browser-toolbar .textarea-with-view:before{ + content: ""; + position: absolute; + left: 0.5rem; + top: 50%; + aspect-ratio: 1 / 1; + height: 0.75rem; + --tw-translate-y: -50%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); + border-radius: 9999px; + border-width: 2px; + border-color: currentColor; + opacity: 0.6; +} + +.mockup-browser .mockup-browser-toolbar .textarea-with-view:after{ + content: ""; + position: absolute; + left: 1.25rem; + top: 50%; + height: 0.5rem; + --tw-translate-y: 25%; + --tw-rotate: -45deg; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); + border-radius: 9999px; + border-width: 1px; + border-color: currentColor; + opacity: 0.6; +} + +.textarea-with-view{ + min-height: 10rem; + width: 50%; + border-radius: 0.5rem; + border-width: 1px; + border-style: solid; + --tw-border-opacity: 1; + border-color: rgb(229 231 235 / var(--tw-border-opacity)); +} + +.textarea-without-view{ + flex-shrink: 1; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + height: 3rem; + padding-left: 1rem; + padding-right: 1rem; + font-size: 1rem; + line-height: 2; + line-height: 1.5rem; + border-radius: var(--rounded-btn, 0.5rem); + border-width: 1px; + border-color: transparent; + --tw-bg-opacity: 1; + background-color: var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity))); +} + +.textarea-without-view[type="number"]::-webkit-inner-spin-button{ + margin-top: -1rem; + margin-bottom: -1rem; + margin-inline-end: -1rem; +} + +.textarea-without-view input{ + --tw-bg-opacity: 1; + background-color: var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity))); + background-color: transparent; +} + +.textarea-without-view input:focus{ + outline: 2px solid transparent; + outline-offset: 2px; +} + +.textarea-without-view[list]::-webkit-calendar-picker-indicator{ + line-height: 1em; +} + +.textarea-without-view:focus,.textarea-without-view:focus-within{ + box-shadow: none; + border-color: var(--fallback-bc,oklch(var(--bc)/0.2)); + outline-style: solid; + outline-width: 2px; + outline-offset: 2px; + outline-color: var(--fallback-bc,oklch(var(--bc)/0.2)); +} + +.textarea-without-view:has(> input[disabled]),.textarea-without-view:disabled,.textarea-without-view[disabled]{ + cursor: not-allowed; + --tw-border-opacity: 1; + border-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity))); + --tw-bg-opacity: 1; + background-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity))); + color: var(--fallback-bc,oklch(var(--bc)/0.4)); +} + +.textarea-without-view:has(> input[disabled])::-moz-placeholder, .textarea-without-view:disabled::-moz-placeholder, .textarea-without-view[disabled]::-moz-placeholder{ + color: var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity))); + --tw-placeholder-opacity: 0.2; +} + +.textarea-without-view:has(> input[disabled])::placeholder,.textarea-without-view:disabled::placeholder,.textarea-without-view[disabled]::placeholder{ + color: var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity))); + --tw-placeholder-opacity: 0.2; +} + +.textarea-without-view:has(> input[disabled]) > input[disabled]{ + cursor: not-allowed; +} + +.textarea-without-view::-webkit-date-and-time-value{ + text-align: inherit; +} + +.mockup-browser .mockup-browser-toolbar .textarea-without-view{ + position: relative; + margin-left: auto; + margin-right: auto; + display: block; + height: 1.75rem; + width: 24rem; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + --tw-bg-opacity: 1; + background-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity))); + padding-left: 2rem; + direction: ltr; +} + +.mockup-browser .mockup-browser-toolbar .textarea-without-view:before{ + content: ""; + position: absolute; + left: 0.5rem; + top: 50%; + aspect-ratio: 1 / 1; + height: 0.75rem; + --tw-translate-y: -50%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); + border-radius: 9999px; + border-width: 2px; + border-color: currentColor; + opacity: 0.6; +} + +.mockup-browser .mockup-browser-toolbar .textarea-without-view:after{ + content: ""; + position: absolute; + left: 1.25rem; + top: 50%; + height: 0.5rem; + --tw-translate-y: 25%; + --tw-rotate: -45deg; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); + border-radius: 9999px; + border-width: 1px; + border-color: currentColor; + opacity: 0.6; +} + +.textarea-without-view{ + min-height: 10rem; + width: 100%; + border-radius: 0.5rem; + border-width: 1px; + border-style: solid; + --tw-border-opacity: 1; + border-color: rgb(229 231 235 / var(--tw-border-opacity)); +} + .marker\:text-rose-900 *::marker{ color: rgb(136 19 55 ); } @@ -1270,16 +2914,43 @@ html{ color: rgb(136 19 55 ); } +.hover\:scale-105:hover{ + --tw-scale-x: 1.05; + --tw-scale-y: 1.05; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + .hover\:bg-gray-400:hover{ --tw-bg-opacity: 1; background-color: rgb(156 163 175 / var(--tw-bg-opacity)); } +.hover\:text-gray-600:hover{ + --tw-text-opacity: 1; + color: rgb(75 85 99 / var(--tw-text-opacity)); +} + +.hover\:shadow-lg:hover{ + --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} + +.hover\:shadow-md:hover{ + --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} + @media (min-width: 640px){ .sm\:rounded-3xl{ border-radius: 1.5rem; } + .sm\:border-2{ + border-width: 2px; + } + .sm\:text-base{ font-size: 1rem; line-height: 1.5rem; @@ -1292,15 +2963,92 @@ html{ } @media (min-width: 768px){ + .md\:col-span-1{ + grid-column: span 1 / span 1; + } + + .md\:col-span-3{ + grid-column: span 3 / span 3; + } + + .md\:mb-10{ + margin-bottom: 2.5rem; + } + + .md\:flex{ + display: flex; + } + + .md\:hidden{ + display: none; + } + + .md\:h-48{ + height: 12rem; + } + + .md\:w-1\/2{ + width: 50%; + } + .md\:w-3\/4{ width: 75%; } + .md\:w-\[225px\]{ + width: 225px; + } + + .md\:w-full{ + width: 100%; + } + + .md\:flex-row{ + flex-direction: row; + } + + .md\:justify-end{ + justify-content: flex-end; + } + .md\:text-left{ text-align: left; } } +@media (min-width: 1024px){ + .lg\:w-800{ + width: 50rem; + } + + .lg\:w-\[400px\]{ + width: 400px; + } + + .lg\:rounded-lg{ + border-radius: 0.5rem; + } + + .lg\:border{ + border-width: 1px; + } + + .lg\:border-0{ + border-width: 0px; + } + + .lg\:border-gray-300{ + --tw-border-opacity: 1; + border-color: rgb(209 213 219 / var(--tw-border-opacity)); + } + + .lg\:shadow{ + --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); + } +} + @media (prefers-color-scheme: dark){ .dark\:bg-gray-700{ --tw-bg-opacity: 1; diff --git a/src/routes.rs b/src/routes.rs index bccaf48..0a87fa7 100644 --- a/src/routes.rs +++ b/src/routes.rs @@ -15,7 +15,7 @@ use serde::Deserialize; struct RecipeCard(entities::recipies::Model); #[derive(Debug, Template)] -#[template(path = "index.jinja")] +#[template(path = "index.jinja", ext = "html")] struct IndexTemplate { recipies: Vec, count: u64, @@ -24,7 +24,7 @@ struct IndexTemplate { } #[derive(Debug, Template)] -#[template(path = "search.jinja")] +#[template(path = "search.jinja", ext = "html")] struct SearchTemplate { recipies: Vec, count: u64, @@ -34,7 +34,7 @@ struct SearchTemplate { } #[derive(Debug, Template)] -#[template(path = "top_bar.jinja")] +#[template(path = "top_bar.jinja", ext = "html")] struct TopBar<'s> { session: &'s Option, } @@ -46,7 +46,7 @@ impl<'s> TopBar<'s> { } #[derive(Debug, Template)] -#[template(path = "sign_in/form.jinja")] +#[template(path = "sign_in/form.jinja", ext = "html")] struct SignInForm { not_found: bool, email: String, @@ -54,6 +54,19 @@ struct SignInForm { page: Page, } +#[derive(Debug, Template)] +#[template(path = "recipies/create_form.jinja", ext = "html")] +struct RecipeForm { + title: String, + summary: String, + ingeredients: String, + steps: String, + tags: String, + error: Option, + session: Option, + page: Page, +} + #[get("/sign-in")] async fn render_sign_in() -> SignInForm { SignInForm { @@ -209,7 +222,7 @@ async fn index_html( } #[derive(Debug, Template)] -#[template(path = "recipies/show.jinja")] +#[template(path = "recipies/show.jinja", ext = "html")] struct RecipeDetailTemplate { recipe: entities::recipies::Model, tags: Vec, @@ -266,6 +279,20 @@ async fn show( ) } +#[get("/create")] +async fn recipe_form(admin: Identity) -> RecipeForm { + RecipeForm { + title: "".into(), + summary: "".into(), + ingeredients: "".into(), + steps: "".into(), + tags: "".into(), + error: None, + session: admin.id().ok(), + page: Page::Index, + } +} + #[get("/styles.css")] async fn styles_css() -> HttpResponse { HttpResponse::Ok() @@ -281,5 +308,6 @@ pub fn configure(config: &mut actix_web::web::ServiceConfig) { .service(index_html) .service(show) .service(search_page) - .service(search_results); + .service(search_results) + .service(recipe_form); } diff --git a/tailwind.config.js b/tailwind.config.js index 6c6ae3d..31b452c 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,6 +1,9 @@ /** @type {import('tailwindcss').Config} */ module.exports = { - content: ["./templates/**/*.html"], + content: [ + "./templates/**/*.html", + "./templates/**/*.jinja", + ], theme: { extend: { colors: { diff --git a/templates/recipies/create_form.jinja b/templates/recipies/create_form.jinja index dfeae94..e11d97d 100644 --- a/templates/recipies/create_form.jinja +++ b/templates/recipies/create_form.jinja @@ -1,5 +1,9 @@ {% extends "base.jinja" %} +{% block head %} + +{% endblock %} + {% block content %}
{{ TopBar::new(session)|safe }} @@ -9,29 +13,77 @@
-
+ +
+ +
+

Summary supports Markdown

+
+
+ +
+ Ingeredients should be listed as list of AMOUNT UNIT INGEREDIENT. Example: + +
+
1 KG Potato
+
200 G Sugar
+
3 Bananas
+
+
+ -
+ +
+ Syntax for steps: +
+

* is step

+

> is hint for step

+
+
+ +
+ +
+
diff --git a/templates/styles.css b/templates/styles.css index a61ef7d..1bc0f92 100644 --- a/templates/styles.css +++ b/templates/styles.css @@ -39,3 +39,22 @@ .text-mobile-heading-xxl { @apply text-5xl not-italic font-medium; } + +blockquote { + @apply p-4 my-4 border-s-4 border-gray-300 bg-gray-200 text-xl italic font-medium leading-relaxed text-gray-900 border-0 rounded-lg flex flex-col gap-4; +} + +code { + @apply bg-gray-400 text-white py-1 px-2 border-0 rounded-full; +} + +.content ul { + @apply list-inside list-decimal; +} + +.textarea-with-view { + @apply min-h-40 input border border-solid border-gray-200 rounded-lg w-1/2; +} +.textarea-without-view { + @apply min-h-40 input border border-solid border-gray-200 rounded-lg w-full; +}