diff --git a/internal/site/styles/accessibility.css b/internal/site/styles/accessibility.css new file mode 100644 index 0000000..e69de29 diff --git a/internal/site/styles/backgrounds.css b/internal/site/styles/backgrounds.css new file mode 100644 index 0000000..49514df --- /dev/null +++ b/internal/site/styles/backgrounds.css @@ -0,0 +1,6 @@ +@layer theme { + header, + footer { + background-color: var(--base-200); + } +} diff --git a/internal/site/styles/borders.css b/internal/site/styles/borders.css new file mode 100644 index 0000000..80e2e1e --- /dev/null +++ b/internal/site/styles/borders.css @@ -0,0 +1,14 @@ +@theme inline { + --radius-sm: calc(var(--radius) - 4px); + --radius-md: calc(var(--radius) - 2px); + --radius-lg: var(--radius); + --radius-xl: calc(var(--radius) + 4px); +} + +@layer base { + select { + border-width: 2px; + border-color: var(--border); + border-radius: var(--radius-lg); + } +} diff --git a/internal/site/styles/effects.css b/internal/site/styles/effects.css new file mode 100644 index 0000000..e69de29 diff --git a/internal/site/styles/filters.css b/internal/site/styles/filters.css new file mode 100644 index 0000000..e69de29 diff --git a/internal/site/styles/flexbox-and-grid.css b/internal/site/styles/flexbox-and-grid.css new file mode 100644 index 0000000..e69de29 diff --git a/internal/site/styles/index.css b/internal/site/styles/index.css index 7d12ccd..e3369e5 100644 --- a/internal/site/styles/index.css +++ b/internal/site/styles/index.css @@ -7,9 +7,23 @@ "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + --color-black: #000; + --color-white: #fff; + --text-lg: 1.125rem; + --text-lg--line-height: calc(1.75 / 1.125); + --text-xl: 1.25rem; + --text-xl--line-height: calc(1.75 / 1.25); + --text-2xl: 1.5rem; + --text-3xl: 1.875rem; + --text-4xl: 2.25rem; + --text-5xl: 3rem; --font-weight-bold: 700; + --font-weight-black: 900; + --radius-lg: var(--radius); --default-font-family: var(--font-sans); --default-mono-font-family: var(--font-mono); + --font-display: var(--display-family); + --font-text: var(--text-family); } } @layer base { @@ -161,18 +175,258 @@ } } @layer utilities { - .\[margin-left\:10px\] { - margin-left: 10px; + .mt-\[1em\] { + margin-top: 1em; } .block { display: block; } + .flex { + display: flex; + } + .h-\[100\%\] { + height: 100%; + } + .min-h-\[100\%\] { + min-height: 100%; + } + .min-h-full { + min-height: 100%; + } + .flex-grow-1 { + flex-grow: 1; + } + .grow { + flex-grow: 1; + } + .basis-full { + flex-basis: 100%; + } + .flex-col { + flex-direction: column; + } + .items-center { + align-items: center; + } + .items-stretch { + align-items: stretch; + } + .gap-\[1em\] { + gap: 1em; + } + .overflow-auto { + overflow: auto; + } + .overflow-x-auto { + overflow-x: auto; + } + .overflow-x-scroll { + overflow-x: scroll; + } + .overflow-y-hidden { + overflow-y: hidden; + } + .bg-background { + background-color: var(--background); + } + .bg-header { + background-color: var(--base-200); + } + .p-\[1em\] { + padding: 1em; + } + .pt-\[1em\] { + padding-top: 1em; + } + .pb-\[1em\] { + padding-bottom: 1em; + } + .text-lg { + font-size: var(--text-lg); + line-height: var(--tw-leading, var(--text-lg--line-height)); + } + .text-xl { + font-size: var(--text-xl); + line-height: var(--tw-leading, var(--text-xl--line-height)); + } + .font-black { + --tw-font-weight: var(--font-weight-black); + font-weight: var(--font-weight-black); + } .font-bold { --tw-font-weight: var(--font-weight-bold); font-weight: var(--font-weight-bold); } - .underline { - text-decoration-line: underline; + .text-nowrap { + text-wrap: nowrap; + } +} +@layer base { + select { + padding: 0.5em; + } +} +@import url('https://fonts.googleapis.com/css2?family=Geist:wght@600&display=swap'); +@import url('https://fonts.googleapis.com/css2?family=Alexandria:wght@300&display=swap'); +:root { + --display-family: "Geist", "sans-serif"; + --display-weight: 600; + --text-family: "Alexandria", "sans-serif"; + --text-weight: 300; + --base-50: oklch(0.9869 0.0042 280.57); + --base-100: oklch(0.9703 0.0084 281.74); + --base-200: oklch(0.9309 0.0168 282.31); + --base-300: oklch(0.8708 0.0252 283.4); + --base-400: oklch(0.7052 0.0378 286.14); + --base-500: oklch(0.5544 0.0504 286.81); + --base-600: oklch(0.4463 0.0483 286.39); + --base-700: oklch(0.3722 0.0441 286.47); + --base-800: oklch(0.2638 0.0399 288.01); + --base-900: oklch(0.2083 0.0347 289.9); + --base-950: oklch(0.1292 0.0315 290.68); + --base-1000: oklch(0.0781 0.0294 290.82); + --primary-50: oklch(0.9866 0.0288 120.05); + --primary-100: oklch(0.9676 0.0628 121.5); + --primary-200: oklch(0.9384 0.1189 123.4); + --primary-300: oklch(0.8719 0.1829 125.59); + --primary-400: oklch(0.8416 0.2214 127.63); + --primary-500: oklch(0.7692 0.2165 129.47); + --primary-600: oklch(0.6495 0.1859 130.24); + --primary-700: oklch(0.5331 0.1462 130.1); + --primary-800: oklch(0.4542 0.1157 129.41); + --primary-900: oklch(0.406 0.0943 129.43); + --primary-950: oklch(0.2748 0.0672 130.42); + --primary-1000: oklch(0.1896 0.0494 131.02); + --secondary-50: oklch(0.9792 0.0142 56.84); + --secondary-100: oklch(0.9531 0.0338 55.36); + --secondary-200: oklch(0.9004 0.0676 53.94); + --secondary-300: oklch(0.8362 0.114 51.61); + --secondary-400: oklch(0.7489 0.1635 49.36); + --secondary-500: oklch(0.7164 0.1906 47.14); + --secondary-600: oklch(0.6445 0.1986 44.75); + --secondary-700: oklch(0.5519 0.1744 42.09); + --secondary-800: oklch(0.4693 0.1405 40.02); + --secondary-900: oklch(0.4076 0.1102 38.89); + --secondary-950: oklch(0.2656 0.0708 38); + --secondary-1000: oklch(0.1738 0.0448 36.79); + --background: var(--base-50); + --foreground: var(--base-800); + --card: var(--color-white); + --card-foreground: var(--base-800); + --popover: var(--color-white); + --popover-foreground: var(--base-800); + --primary: var(--primary-300); + --primary-foreground: var(--color-black); + --secondary: var(--secondary-500); + --secondary-foreground: var(--color-black); + --muted: var(--base-100); + --muted-foreground: var(--base-600); + --accent: var(--base-100); + --accent-foreground: var(--base-800); + --destructive: oklch(0.577 0.245 27.325); + --border: var(--base-200); + --input: var(--base-300); + --ring: var(--primary-300); + --chart-1: var(--primary-300); + --chart-2: var(--secondary-500); + --chart-3: var(--primary-400); + --chart-4: var(--secondary-300); + --chart-5: var(--primary-300); + --radius: 0.5rem; + --sidebar: var(--color-white); + --sidebar-foreground: var(--base-800); + --sidebar-primary: var(--primary-300); + --sidebar-primary-foreground: var(--color-black); + --sidebar-accent: var(--base-50); + --sidebar-accent-foreground: var(--base-800); + --sidebar-border: var(--base-200); + --sidebar-ring: var(--primary-300); +} +.dark { + --background: var(--base-950); + --foreground: var(--base-200); + --card: var(--base-900); + --card-foreground: var(--base-200); + --popover: var(--base-900); + --popover-foreground: var(--base-200); + --primary: var(--primary-300); + --primary-foreground: var(--color-black); + --secondary: var(--secondary-500); + --secondary-foreground: var(--color-black); + --muted: var(--base-800); + --muted-foreground: var(--base-300); + --accent: var(--base-800); + --accent-foreground: var(--base-200); + --destructive: oklch(0.704 0.191 22.216); + --border: var(--base-800); + --input: var(--base-700); + --ring: var(--primary-300); + --chart-1: var(--primary-300); + --chart-2: var(--secondary-500); + --chart-3: var(--primary-400); + --chart-4: var(--secondary-300); + --chart-5: var(--primary-300); + --sidebar: var(--base-900); + --sidebar-foreground: var(--base-200); + --sidebar-primary: var(--primary-300); + --sidebar-primary-foreground: var(--color-black); + --sidebar-accent: var(--base-800); + --sidebar-accent-foreground: var(--base-200); + --sidebar-border: var(--base-800); + --sidebar-ring: var(--primary-300); +} +@layer base { + * { + font-family: var(--font-text); + font-weight: var(--text-weight); + } + h1, h2, h3, h4, h5, h6, label { + font-family: var(--font-display); + font-weight: var(--display-weight); + } + h1 { + font-size: var(--text-5xl); + } + h2 { + font-size: var(--text-4xl); + } + h3 { + font-size: var(--text-3xl); + } + h4 { + font-size: var(--text-2xl); + } + h5 { + font-size: var(--text-xl); + } + h6 { + font-size: var(--text-lg); + } + ul, ol { + list-style: none; + } + a:hover { + text-decoration: underline; + } + .font-display { + font-family: var(--font-display); + font-weight: var(--display-weight); + } + .font-text { + font-family: var(--font-text); + font-weight: var(--text-weight); + } +} +@layer theme { + header, footer { + background-color: var(--base-200); + } +} +@layer base { + select { + border-width: 2px; + border-color: var(--border); + border-radius: var(--radius-lg); } } @property --tw-font-weight { diff --git a/internal/site/styles/interactivity.css b/internal/site/styles/interactivity.css new file mode 100644 index 0000000..e69de29 diff --git a/internal/site/styles/layout.css b/internal/site/styles/layout.css new file mode 100644 index 0000000..e69de29 diff --git a/internal/site/styles/sizing.css b/internal/site/styles/sizing.css new file mode 100644 index 0000000..e69de29 diff --git a/internal/site/styles/source.css b/internal/site/styles/source.css index e4eaa3a..73d911e 100644 --- a/internal/site/styles/source.css +++ b/internal/site/styles/source.css @@ -1,19 +1,16 @@ @import "tailwindcss"; - -@theme { -} - -/* -ul, ol { -*/ - /* remove default agent spacing */ -/* - margin: 0; - padding: 0; - list-style: none; - - & > li { - display: inline-block; - } -} -*/ +@import "./layout.css"; +@import "./flexbox-and-grid.css"; +@import "./spacing.css"; +@import "./sizing.css"; +@import "./typography.css"; +@import "./backgrounds.css"; +@import "./borders.css"; +@import "./effects.css"; +@import "./filters.css"; +@import "./tables.css"; +@import "./transitions-and-animations.css"; +@import "./transforms.css"; +@import "./interactivity.css"; +@import "./svg.css"; +@import "./accessibility.css"; diff --git a/internal/site/styles/spacing.css b/internal/site/styles/spacing.css new file mode 100644 index 0000000..94bf696 --- /dev/null +++ b/internal/site/styles/spacing.css @@ -0,0 +1,5 @@ +@layer base { + select { + padding: 0.5em; + } +} diff --git a/internal/site/styles/svg.css b/internal/site/styles/svg.css new file mode 100644 index 0000000..e69de29 diff --git a/internal/site/styles/tables.css b/internal/site/styles/tables.css new file mode 100644 index 0000000..e69de29 diff --git a/internal/site/styles/transforms.css b/internal/site/styles/transforms.css new file mode 100644 index 0000000..e69de29 diff --git a/internal/site/styles/transitions-and-animations.css b/internal/site/styles/transitions-and-animations.css new file mode 100644 index 0000000..e69de29 diff --git a/internal/site/styles/typography.css b/internal/site/styles/typography.css new file mode 100644 index 0000000..3c18caa --- /dev/null +++ b/internal/site/styles/typography.css @@ -0,0 +1,255 @@ +@import url('https://fonts.googleapis.com/css2?family=Geist:wght@600&display=swap'); +@import url('https://fonts.googleapis.com/css2?family=Alexandria:wght@300&display=swap'); + + +:root { + --display-family: "Geist", "sans-serif"; + --display-weight: 600; + --text-family: "Alexandria", "sans-serif"; + --text-weight: 300; + + --base-50: oklch(0.9869 0.0042 280.57); + --base-100: oklch(0.9703 0.0084 281.74); + --base-200: oklch(0.9309 0.0168 282.31); + --base-300: oklch(0.8708 0.0252 283.4); + --base-400: oklch(0.7052 0.0378 286.14); + --base-500: oklch(0.5544 0.0504 286.81); + --base-600: oklch(0.4463 0.0483 286.39); + --base-700: oklch(0.3722 0.0441 286.47); + --base-800: oklch(0.2638 0.0399 288.01); + --base-900: oklch(0.2083 0.0347 289.9); + --base-950: oklch(0.1292 0.0315 290.68); + --base-1000: oklch(0.0781 0.0294 290.82); + + --primary-50: oklch(0.9866 0.0288 120.05); + --primary-100: oklch(0.9676 0.0628 121.5); + --primary-200: oklch(0.9384 0.1189 123.4); + --primary-300: oklch(0.8719 0.1829 125.59); + --primary-400: oklch(0.8416 0.2214 127.63); + --primary-500: oklch(0.7692 0.2165 129.47); + --primary-600: oklch(0.6495 0.1859 130.24); + --primary-700: oklch(0.5331 0.1462 130.1); + --primary-800: oklch(0.4542 0.1157 129.41); + --primary-900: oklch(0.406 0.0943 129.43); + --primary-950: oklch(0.2748 0.0672 130.42); + --primary-1000: oklch(0.1896 0.0494 131.02); + + --secondary-50: oklch(0.9792 0.0142 56.84); + --secondary-100: oklch(0.9531 0.0338 55.36); + --secondary-200: oklch(0.9004 0.0676 53.94); + --secondary-300: oklch(0.8362 0.114 51.61); + --secondary-400: oklch(0.7489 0.1635 49.36); + --secondary-500: oklch(0.7164 0.1906 47.14); + --secondary-600: oklch(0.6445 0.1986 44.75); + --secondary-700: oklch(0.5519 0.1744 42.09); + --secondary-800: oklch(0.4693 0.1405 40.02); + --secondary-900: oklch(0.4076 0.1102 38.89); + --secondary-950: oklch(0.2656 0.0708 38); + --secondary-1000: oklch(0.1738 0.0448 36.79); + + --background: var(--base-50); + --foreground: var(--base-800); + --card: var(--color-white); + --card-foreground: var(--base-800); + --popover: var(--color-white); + --popover-foreground: var(--base-800); + --primary: var(--primary-300); + --primary-foreground: var(--color-black); + --secondary: var(--secondary-500); + --secondary-foreground: var(--color-black); + --muted: var(--base-100); + --muted-foreground: var(--base-600); + --accent: var(--base-100); + --accent-foreground: var(--base-800); + --destructive: oklch(0.577 0.245 27.325); + --border: var(--base-200); + --input: var(--base-300); + --ring: var(--primary-300); + --chart-1: var(--primary-300); + --chart-2: var(--secondary-500); + --chart-3: var(--primary-400); + --chart-4: var(--secondary-300); + --chart-5: var(--primary-300); + --radius: 0.5rem; + --sidebar: var(--color-white); + --sidebar-foreground: var(--base-800); + --sidebar-primary: var(--primary-300); + --sidebar-primary-foreground: var(--color-black); + --sidebar-accent: var(--base-50); + --sidebar-accent-foreground: var(--base-800); + --sidebar-border: var(--base-200); + --sidebar-ring: var(--primary-300); +} + + +.dark { + --background: var(--base-950); + --foreground: var(--base-200); + --card: var(--base-900); + --card-foreground: var(--base-200); + --popover: var(--base-900); + --popover-foreground: var(--base-200); + --primary: var(--primary-300); + --primary-foreground: var(--color-black); + --secondary: var(--secondary-500); + --secondary-foreground: var(--color-black); + --muted: var(--base-800); + --muted-foreground: var(--base-300); + --accent: var(--base-800); + --accent-foreground: var(--base-200); + --destructive: oklch(0.704 0.191 22.216); + --border: var(--base-800); + --input: var(--base-700); + --ring: var(--primary-300); + --chart-1: var(--primary-300); + --chart-2: var(--secondary-500); + --chart-3: var(--primary-400); + --chart-4: var(--secondary-300); + --chart-5: var(--primary-300); + --sidebar: var(--base-900); + --sidebar-foreground: var(--base-200); + --sidebar-primary: var(--primary-300); + --sidebar-primary-foreground: var(--color-black); + --sidebar-accent: var(--base-800); + --sidebar-accent-foreground: var(--base-200); + --sidebar-border: var(--base-800); + --sidebar-ring: var(--primary-300); +} + + +@theme inline { + --font-display: var(--display-family); + --font-text: var(--text-family); + + --color-base-50: var(--base-50); + --color-base-100: var(--base-100); + --color-base-200: var(--base-200); + --color-base-300: var(--base-300); + --color-base-400: var(--base-400); + --color-base-500: var(--base-500); + --color-base-600: var(--base-600); + --color-base-700: var(--base-700); + --color-base-800: var(--base-800); + --color-base-900: var(--base-900); + --color-base-950: var(--base-950); + --color-base-1000: var(--base-1000); + + --color-primary-50: var(--primary-50); + --color-primary-100: var(--primary-100); + --color-primary-200: var(--primary-200); + --color-primary-300: var(--primary-300); + --color-primary-400: var(--primary-400); + --color-primary-500: var(--primary-500); + --color-primary-600: var(--primary-600); + --color-primary-700: var(--primary-700); + --color-primary-800: var(--primary-800); + --color-primary-900: var(--primary-900); + --color-primary-950: var(--primary-950); + --color-primary-1000: var(--primary-1000); + + --color-secondary-50: var(--secondary-50); + --color-secondary-100: var(--secondary-100); + --color-secondary-200: var(--secondary-200); + --color-secondary-300: var(--secondary-300); + --color-secondary-400: var(--secondary-400); + --color-secondary-500: var(--secondary-500); + --color-secondary-600: var(--secondary-600); + --color-secondary-700: var(--secondary-700); + --color-secondary-800: var(--secondary-800); + --color-secondary-900: var(--secondary-900); + --color-secondary-950: var(--secondary-950); + --color-secondary-1000: var(--secondary-1000); + + --color-background: var(--background); + --color-foreground: var(--foreground); + --color-sidebar-ring: var(--sidebar-ring); + --color-sidebar-border: var(--sidebar-border); + --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); + --color-sidebar-accent: var(--sidebar-accent); + --color-sidebar-primary-foreground: var(--sidebar-primary-foreground); + --color-sidebar-primary: var(--sidebar-primary); + --color-sidebar-foreground: var(--sidebar-foreground); + --color-sidebar: var(--sidebar); + --color-chart-5: var(--chart-5); + --color-chart-4: var(--chart-4); + --color-chart-3: var(--chart-3); + --color-chart-2: var(--chart-2); + --color-chart-1: var(--chart-1); + --color-ring: var(--ring); + --color-input: var(--input); + --color-border: var(--border); + --color-destructive: var(--destructive); + --color-accent-foreground: var(--accent-foreground); + --color-accent: var(--accent); + --color-muted-foreground: var(--muted-foreground); + --color-muted: var(--muted); + --color-secondary-foreground: var(--secondary-foreground); + --color-secondary: var(--secondary); + --color-primary-foreground: var(--primary-foreground); + --color-primary: var(--primary); + --color-popover-foreground: var(--popover-foreground); + --color-popover: var(--popover); + --color-card-foreground: var(--card-foreground); + --color-card: var(--card); + + --color-header: var(--base-200); + --color-footer: var(--base-200); +} + + +@layer base { + * { + font-family: var(--font-text); + font-weight: var(--text-weight); + } + + h1, + h2, + h3, + h4, + h5, + h6, + label { + font-family: var(--font-display); + font-weight: var(--display-weight); + } + + h1 { + font-size: var(--text-5xl); + } + h2 { + font-size: var(--text-4xl); + } + h3 { + font-size: var(--text-3xl); + } + h4 { + font-size: var(--text-2xl); + } + h5 { + font-size: var(--text-xl); + } + h6 { + font-size: var(--text-lg); + } + + ul, ol { + list-style: none; + } + + a:hover { + text-decoration: underline; + } + + select { + } + + .font-display { + font-family: var(--font-display); + font-weight: var(--display-weight); + } + .font-text { + font-family: var(--font-text); + font-weight: var(--text-weight); + } +} diff --git a/internal/site/templates/layout.html.tmpl b/internal/site/templates/layout.html.tmpl index 63eaf6f..084529a 100644 --- a/internal/site/templates/layout.html.tmpl +++ b/internal/site/templates/layout.html.tmpl @@ -1,5 +1,5 @@ - + {{ block "title" . }} Inventory++ {{ end }} @@ -16,24 +16,12 @@ {{- block "head" . }}{{ end }} </head> - <body style="margin: 0; padding: 0;"> - <header style="margin: 0; padding: 0;"> - <nav - style=" - margin: 0; - padding: 1em; - background-color: #bdf; - - font-size: 1.25em; - - display: flex; - flex-direction: column; - align-items: center; - " - > - <ul> - <li> - <a href="/"> + <body class="basis-full grow bg-background flex flex-col items-stretch"> + <header> + <nav class="flex flex-col items-center text-xl overflow-x-scroll overflow-y-hidden "> + <ul class="flex text-nowrap overflow-x-scroll overflow-y-hidden"> + <li class="pt-[1em] pb-[1em]"> + <a href="/" class="p-[1em] font-bold"> Home </a> </li> @@ -48,34 +36,34 @@ {{- if not $userID }} - <li> - <a href="/login"> + <li class="pt-[1em] pb-[1em]"> + <a href="/login" class="p-[1em] font-bold"> Log In / Sign Up </a> </li> {{- else if $acctID }} - <li> - <a href="/accounts/{{$acctID}}"> + <li class="pt-[1em] pb-[1em]"> + <a href="/accounts/{{$acctID}}" class="p-[1em] font-bold"> Account </a> </li> - <li> - <a href="/accounts/{{$acctID}}/reports"> + <li class="pt-[1em] pb-[1em]"> + <a href="/accounts/{{$acctID}}/reports" class="p-[1em] font-bold"> Reports </a> </li> - <li> - <a href="/accounts/{{$acctID}}/inventory"> + <li class="pt-[1em] pb-[1em]"> + <a href="/accounts/{{$acctID}}/inventory" class="p-[1em] font-bold"> Inventory </a> </li> - <li> - <a href="/logout"> + <li class="pt-[1em] pb-[1em]"> + <a href="/logout" class="p-[1em] font-bold"> Log Out </a> </li> @@ -85,32 +73,15 @@ </nav> </header> - <main style="margin: 0; padding: 1em;"> + <main class="basis-full grow p-[1em]"> {{/* This is where the page_body template will be inserted into the page */}} {{- block "body" . }}{{ end }} </main> - <footer - style=" - margin: 0; - padding: 2em; - background-color: #bdf; - - display: flex; - flex-direction: column; - align-items: center; - " - > - <address - style=" - display: flex; - flex-direction: column; - align-items: center; - gap: 0.5em; - " - > - <a href="mailto:contact-us@inventory-plus-plus.com">Contact Us</a> - <a href="mailto:support@inventory-plus-plus.com">Support</a> + <footer class="flex flex-col items-center"> + <address class="flex items-center"> + <a href="mailto:contact-us@inventory-plus-plus.com" class="p-[1em] font-bold">Contact Us</a> + <a href="mailto:support@inventory-plus-plus.com" class="p-[1em] font-bold">Support</a> </address> </footer> </body>