/* This file is part of Utatane. Utatane is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Utatane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with Utatane. If not, see . */ /* i dont like prettier REQUIRED tailwindcss >= v4.1.15 (https://github.com/tailwindlabs/tailwindcss/issues/19127) Tailwind Sort Order: display: table-*, flex-* align-*, justify-*, gap-*, grow-* position: static, fixed, absolute, relative, sticky top-*, left-*, bottom-*, right-* z-* size: w-*, h-* background: bg-* from-*, to-* text: text-*, font-*, leading-*, decoration-*, sr-only, whitespace-* spacing: m.-*, p.-* border: border-*, rounded-* overflow: overflow-* cursor: cursor-*, pointer-events-*, select-* filter: filter-*, drop-shadow-*, opacity-* animation: transition-*, duration-*, animate-* */ @import "tailwindcss" source(none); @import "../public/font/IBMPlexMono-Regular/IBMPlexMono-Regular.css"; @import "../public/font/IBMPlexSansJP-Regular/IBMPlexSansJP-Regular.css"; @import "../public/font/IBMPlexSansJP-Bold/IBMPlexSansJP-Bold.css"; @source "../**/*.{razor,cs,html,css,md}"; @source not "../public"; @source inline("hidden"); @source inline("invisible"); @source inline("opacity-0"); @theme { --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; --font-sans: "IBM Plex Sans JP", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; } body { @apply bg-linear-to-b bg-fixed from-green-100 to-green-300 dark:from-sky-800 dark:to-sky-950 text-black leading-[1.65] dark:text-white font-sans; } body * { @apply transition-colors duration-100; } a:not(td > a):not(.clickable) { /* all links except those in a table since they get colored from td */ &:hover { /* like https://phk.freebsd.dk/ */ @apply bg-blue-400/15; } @apply text-blue-500 underline; } hr { @apply text-zinc-400 my-4; } #main { @apply h-fit; } .n-box { @apply w-[min(80%,_var(--container-6xl))] max-md:w-full bg-white dark:bg-zinc-600 flex flex-col mx-auto my-8 p-4 border border-solid border-black rounded-sm drop-shadow-xl; /* subsequent `n-box`es have their bottom margin shrunk */ &:has(+ .n-box) { @apply mb-2; } &:has(> #main) { @apply max-md:!px-0; } } .m-box { @apply bg-white dark:bg-zinc-600 m-2 p-2 border border-solid border-black rounded-sm drop-shadow-2xl; } .clickable { @apply bg-gray-100 dark:bg-zinc-500 no-underline px-[0.5ch] border border-solid border-black rounded-sm; &:hover { @apply bg-gray-200 dark:bg-zinc-400; } &:disabled, &[aria-disabled="true"] { @apply text-stone-400 border-stone-400 pointer-events-none; } } /* rows have no spacing between them, so when hovering on an even row it made this weird looking sequence of rounded corners. this makes it so when those even rows are hovered, the corners of the previous and next rows are squared */ tr { /* the of an odd whose next sibling is :hover-ed */ &:nth-child(odd of :not(.hidden)):has(+ tr:hover) td { @apply rounded-b-none; } /* the of even s who are :hover-ed */ &:nth-child(even of :not(.hidden)):hover td { @apply rounded-none; } /* the of the next odd sibling of a :hover-ed */ &:hover + tr:nth-child(odd of :not(.hidden)) td { @apply rounded-t-none; } } tr:nth-child(odd of :not(.hidden)) { & td { @apply bg-green-100 dark:bg-zinc-500; } &:hover td { @apply bg-green-200/75 dark:bg-zinc-400/75; } } tr td { @apply bg-transparent duration-200; } tr:hover td { @apply bg-green-100/50 dark:bg-zinc-500/75 duration-0; } td, th { @apply bg-clip-padding overflow-hidden; } td { @apply whitespace-nowrap; /* left-most */ &:first-child { @apply rounded-l-sm align-top; } /* right-most */ &:last-child { @apply rounded-r-sm; } } .fsobject > abbr { @apply mx-[0.5ch]; } abbr { @apply no-underline cursor-help; } th { @apply top-0 bg-white p-[6px] cursor-pointer; & div { @apply flex justify-center gap-[1ch]; &::before { @apply content-center text-gray-500 dark:text-gray-300 text-[xx-small]; } } } th { &[aria-sort="ascending"] { & div::before { content: "▲"; } &#filetable-head-name div::before { content: "A→Z"; } &#filetable-head-size div::before { content: "0→9"; } &#filetable-head-time div::before { content: "0→9"; } } &[aria-sort="descending"] { & div::before { content: "▼"; } &#filetable-head-name div::before { content: "Z→A"; } &#filetable-head-size div::before { content: "9→0"; } &#filetable-head-time div::before { content: "9→0"; } } } #breadcrumbs { @apply flex gap-[1ch]; & > a { white-space: nowrap; overflow: hidden; } & > span { @apply my-auto mx-[0.1ch]; } } #toolbar { @apply flex justify-stretch gap-[2ch] max-md:gap-[1ch] whitespace-nowrap mt-4; #go-back { @apply cursor-pointer; } #search-label { @apply my-auto ms-[0.5ch] cursor-default! max-md:hidden; } } #rx-label, #case-label { @apply my-auto ms-[0ch] font-mono cursor-default! } #use-rx-for-search { transform: scale(1.2); } #search { @apply grow w-full px-[0.5ch] border border-solid rounded-sm; } #redirect-notice code { @apply bg-green-100 dark:bg-zinc-500 px-2 rounded-sm whitespace-nowrap select-all; } #filetable { @apply w-full table-fixed; s, .dotfile { @apply text-current/40; } & th { @apply sticky bg-white dark:bg-zinc-600 z-999; } & th { @apply text-center; /*&#filetable-head-dl { @apply w-[2.25ch]; }*/ &#filetable-head-icon { @apply w-[3ch]; } /* implicitly take up the rest of available width */ &#filetable-head-name { } &#filetable-head-size { @apply w-[10ch]; } &#filetable-head-time { @apply w-[15.25ch]; } } } .file-icon { @apply px-2; } .file-name { text-indent: 4ch md:hanging; overflow: unset; white-space: normal; word-break: break-word; @apply font-mono; & a { @apply inline-block py-0; } } .dir-slash { @apply text-gray-400 cursor-pointer! select-none; } .visually-hidden { @apply sr-only; } #readme { @apply max-w-full; } .dir-indicator { @apply font-bold pe-[1ch]; } .htmx-indicator { @apply opacity-100! } .htmx-request tr { @apply animate-pulse; } @keyframes yt-spinner { 0% { transform: translate(-50%, -50%) rotate(0deg); } 100% { transform: translate(-50%, -50%) rotate(360deg); } } .htmx-request { &#filetable-head-time, &#filetable-head-size, &#filetable-head-name { @apply text-current/25; } } .spinner { @apply hidden absolute left-1/2 top-1/2 align-middle bg-[auto_100%] bg-no-repeat [background-image:_url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPGNpcmNsZSBjeD0iOCIgY3k9IjIiIGZpbGw9IiNmZmZmZmYiIHI9IjIiLz4KICA8Y2lyY2xlIGN4PSIzLjc2IiBjeT0iMy43NiIgZmlsbD0iI2UwZTBlMCIgcj0iMiIvPgogIDxjaXJjbGUgY3g9IjIiIGN5PSI4IiBmaWxsPSIjYzBjMGMwIiByPSIyIi8+CiAgPGNpcmNsZSBjeD0iMy43NiIgY3k9IjEyLjI0IiBmaWxsPSIjYTBhMGEwIiByPSIyIi8+CiAgPGNpcmNsZSBjeD0iOCIgY3k9IjE0IiBmaWxsPSIjODA4MDgwIiByPSIyIi8+CiAgPGNpcmNsZSBjeD0iMTIuMjQiIGN5PSIxMi4yNCIgZmlsbD0iIzYwNjA2MCIgcj0iMiIvPgogIDxjaXJjbGUgY3g9IjE0IiBjeT0iOCIgZmlsbD0iIzQwNDA0MCIgcj0iMiIvPgogIDxjaXJjbGUgY3g9IjEyLjI0IiBjeT0iMy43NiIgZmlsbD0iIzIwMjAyMCIgcj0iMiIvPgo8L3N2Zz4=")] dark:![background-image:_url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPGNpcmNsZSBjeD0iOCIgY3k9IjIiIGZpbGw9IiNmZmZmZmZmZiIgcj0iMiIvPgogIDxjaXJjbGUgY3g9IjMuNzYiIGN5PSIzLjc2IiBmaWxsPSIjZmZmZmZmZTAiIHI9IjIiLz4KICA8Y2lyY2xlIGN4PSIyIiBjeT0iOCIgZmlsbD0iI2ZmZmZmZmMwIiByPSIyIi8+CiAgPGNpcmNsZSBjeD0iMy43NiIgY3k9IjEyLjI0IiBmaWxsPSIjZmZmZmZmYTAiIHI9IjIiLz4KICA8Y2lyY2xlIGN4PSI4IiBjeT0iMTQiIGZpbGw9IiNmZmZmZmY4MCIgcj0iMiIvPgogIDxjaXJjbGUgY3g9IjEyLjI0IiBjeT0iMTIuMjQiIGZpbGw9IiNmZmZmZmY2MCIgcj0iMiIvPgogIDxjaXJjbGUgY3g9IjE0IiBjeT0iOCIgZmlsbD0iI2ZmZmZmZjQwIiByPSIyIi8+CiAgPGNpcmNsZSBjeD0iMTIuMjQiIGN5PSIzLjc2IiBmaWxsPSIjZmZmZmZmMjAiIHI9IjIiLz4KPC9zdmc+")] p-[0.6rem] filter-[drop-shadow(0px_0px_4px_#a0a0a0)] dark:[filter:_none]; animation: yt-spinner 0.75s steps(8, end) infinite; } .spinner.htmx-request { @apply block; } .header-label { @apply relative inline-block; }