diff options
Diffstat (limited to 'src/assets/index.css')
-rw-r--r-- | src/assets/index.css | 126 |
1 files changed, 126 insertions, 0 deletions
diff --git a/src/assets/index.css b/src/assets/index.css new file mode 100644 index 0000000..db51dc8 --- /dev/null +++ b/src/assets/index.css @@ -0,0 +1,126 @@ +:root { + --fg: rgb(0 0 0); + --bg: rgb(255 255 255); + --brand: rgb(139 0 0); + + @media screen and (prefers-color-scheme: dark) { + --bg: rgb(0 0 0); + --fg: rgb(255 255 255); + --brand: rgb(255 0 0); + } +} + +body { + font-family: serif; + background-color: var(--bg); + color: var(--fg); + + @media screen { + max-width: 920px; + min-height: calc(100vh - 1rem); + margin: 0.5rem auto; + display: grid; + grid-template: "head" auto "main" auto "footer" 1fr / auto; + + & > header { + background-color: var(--brand); + font-weight: bold; + color: rgb(255 255 255); + padding: 1rem; + grid-area: head; + + & *:any-link { + text-decoration: none; + } + } + + & > footer { + background-color: var(--brand); + color: rgb(255 255 255); + padding: 0.5rem; + align-self: end; + grid-area: footer; + + & *:any-link { + text-decoration: none; + } + + & > main { + grid-area: main; + } + } + } +} + +* :any-link { + color: inherit; + text-decoration: underline; + + @media screen { + &:is(:hover, :active) { + font-style: italic; + } + } +} + +a[href^="mailto:"]::after { + content: "📧"; +} + +.err { + color: var(--brand); +} + +aside { + width: 40%; + padding: 0.5rem; + margin-left: 0.5rem; + float: right; + background-color: var(--brand); + color: rgb(255 255 255); +} + +img { + max-width: 100%; + max-height: 100%; + + &.side { + width: 40%; + float: right; + + @media screen and (max-width: 450px) { + width: 100%; + float: none; + } + } +} + +@media screen { + nav > a { + margin-right: 1rem; + padding-left: 0; + padding-right: 0; + + @media (max-width: 450px) { + display: block; + margin: auto; + text-align: center; + padding: 16px; + + .navlinks { + display: none; + + .navopen { + display: block; + } + } + } + } +} + +@media print { + header, + footer { + display: none; + } +} |