diff --git a/input.css b/input.css index 83c8592..b483148 100644 --- a/input.css +++ b/input.css @@ -1,6 +1,7 @@ @import "tailwindcss"; @import "./internal/ui/views/shelf/shelf.css"; @import "./internal/ui/views/login/login.css"; +@import "./internal/ui/components/header/header.css"; @font-face { font-family: 'Epilogue'; @@ -33,11 +34,18 @@ body { display: flex; flex-direction: column; + min-height: 100vh; font-family: var(--font-primary); background-color: var(--color-canvas); color: var(--color-ink); } +main { + flex: 1; + display: flex; + flex-direction: column; +} + .container { margin-inline: auto; max-width: 80rem; @@ -51,6 +59,8 @@ body { gap: theme(spacing.2); cursor: pointer; padding: theme(spacing.3) theme(spacing.2); + font-weight: bold; + font-family: var(--font-primary); &:hover { background-color: var(--color-hover); @@ -66,17 +76,15 @@ body { cursor: not-allowed; pointer-events: none; } -} - -.button-primary { - background-color: var(--color-ink); - color: var(--color-canvas); - font-weight: bold; - font-family: var(--font-primary); - &:hover { - background-color: var(--color-dim); + &.button-primary { + background-color: var(--color-ink); color: var(--color-canvas); + + &:hover { + background-color: var(--color-dim); + color: var(--color-canvas); + } } } diff --git a/internal/ui/components/header/header.css b/internal/ui/components/header/header.css new file mode 100644 index 0000000..5aec633 --- /dev/null +++ b/internal/ui/components/header/header.css @@ -0,0 +1,89 @@ +header { + position: sticky; + top: 0; + z-index: 50; + padding-inline: 1rem; + margin-bottom: 2rem; +} + +.header-nav { + display: flex; + justify-content: space-between; + align-items: center; + margin-inline: auto; + max-width: 80rem; + height: 4rem; +} + +.header-logo { + font-size: 1.25rem; + font-weight: 500; + text-decoration: none; + color: inherit; + + span { + font-size: 0.75rem; + font-weight: 400; + font-style: italic; + } +} + +.header-dropdown { + position: relative; + display: inline-block; + + summary { + cursor: pointer; + list-style: none; + display: flex; + gap: 0.375rem; + align-items: center; + } + + & > div { + position: absolute; + right: 0; + margin-top: 0.5rem; + padding: 0.25rem; + display: flex; + flex-direction: column; + width: 12rem; + background: var(--color-tonal); + border: 1px solid color-mix(in srgb, var(--color-ink) 10%, transparent); + + hr { + border: none; + border-top: 1px solid color-mix(in srgb, var(--color-ink) 10%, transparent); + margin: 0.25rem 0; + } + } +} + +.header-avatar { + display: flex; + align-items: center; + justify-content: center; + width: 1.5rem; + height: 1.5rem; + border-radius: 9999px; + background: var(--color-dim); +} + +.header-dropdown-btn { + display: block; + width: 100%; + padding: 0.4rem 0.75rem; + font-size: 0.8125rem; + font-family: var(--font-primary); + color: var(--color-dim); + text-decoration: none; + text-align: left; + background: none; + border: none; + cursor: pointer; + + &:hover { + background: var(--color-hover); + color: var(--color-ink); + } +} diff --git a/internal/ui/components/header/header.templ b/internal/ui/components/header/header.templ index 8a8d4ea..1cce332 100644 --- a/internal/ui/components/header/header.templ +++ b/internal/ui/components/header/header.templ @@ -3,44 +3,51 @@ package header import "fmt" templ Header(params HeaderParams) { -
-