From 6fb46644789d097209f7f2189834afe6fba08210 Mon Sep 17 00:00:00 2001 From: Hayden Hargreaves Date: Fri, 13 Jun 2025 22:49:38 -0700 Subject: [PATCH] (CHORE): Fixed tailwind css and directory renames. --- .gitignore | 1 + cmd/web/main.go | 2 +- flake.nix | 1 + go.mod | 10 +- internal/app/services/recipe_service.go | 0 internal/app/services/user_service.go | 0 internal/templates/pages/home.templ | 0 internal/templates/pages/home_templ.go | 10 - web/static/css/main.css | 1 + web/static/css/style.css | 0 web/static/css/tailwind.css | 277 ++++++++++++++++++++++++ 11 files changed, 290 insertions(+), 12 deletions(-) delete mode 100644 internal/app/services/recipe_service.go delete mode 100644 internal/app/services/user_service.go delete mode 100644 internal/templates/pages/home.templ delete mode 100644 internal/templates/pages/home_templ.go create mode 100644 web/static/css/main.css delete mode 100644 web/static/css/style.css create mode 100644 web/static/css/tailwind.css diff --git a/.gitignore b/.gitignore index d15e243..b11462a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /flake.lock /go.sum +/.env diff --git a/cmd/web/main.go b/cmd/web/main.go index b11cbaa..505bf14 100644 --- a/cmd/web/main.go +++ b/cmd/web/main.go @@ -5,5 +5,5 @@ import "github.com/haydenhargreaves/Potion/internal/app/server" const PORT = 3000 func main() { - server.Init(PORT).Setup().Start() + server.Init(PORT).ConfigureAuth().Setup().Start() } diff --git a/flake.nix b/flake.nix index 7adae7e..85a20a5 100644 --- a/flake.nix +++ b/flake.nix @@ -24,6 +24,7 @@ templ tailwindcss_4 tailwindcss-language-server + watchman ]; # Define the shell that will be executed. diff --git a/go.mod b/go.mod index af85225..854e920 100644 --- a/go.mod +++ b/go.mod @@ -8,17 +8,24 @@ require ( ) require ( + cloud.google.com/go/compute/metadata v0.3.0 // indirect + github.com/a-h/templ/examples/integration-gin v0.0.0-20250610141150-9b34663a6ef0 // indirect github.com/bytedance/sonic v1.13.2 // indirect github.com/bytedance/sonic/loader v0.2.4 // indirect github.com/cloudwego/base64x v0.1.5 // indirect github.com/cloudwego/iasm v0.2.0 // indirect github.com/gabriel-vasile/mimetype v1.4.8 // indirect github.com/gin-contrib/cors v1.7.5 // indirect + github.com/gin-contrib/sessions v1.0.4 // indirect github.com/gin-contrib/sse v1.0.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/validator/v10 v10.26.0 // indirect github.com/goccy/go-json v0.10.5 // indirect + github.com/gorilla/context v1.1.2 // indirect + github.com/gorilla/securecookie v1.1.2 // indirect + github.com/gorilla/sessions v1.4.0 // indirect + github.com/joho/godotenv v1.5.1 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/cpuid/v2 v2.2.10 // indirect github.com/leodido/go-urn v1.4.0 // indirect @@ -28,9 +35,10 @@ require ( github.com/pelletier/go-toml/v2 v2.2.3 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.12 // indirect - golang.org/x/arch v0.15.0 // indirect + golang.org/x/arch v0.16.0 // indirect golang.org/x/crypto v0.37.0 // indirect golang.org/x/net v0.39.0 // indirect + golang.org/x/oauth2 v0.30.0 // indirect golang.org/x/sys v0.32.0 // indirect golang.org/x/text v0.24.0 // indirect google.golang.org/protobuf v1.36.6 // indirect diff --git a/internal/app/services/recipe_service.go b/internal/app/services/recipe_service.go deleted file mode 100644 index e69de29..0000000 diff --git a/internal/app/services/user_service.go b/internal/app/services/user_service.go deleted file mode 100644 index e69de29..0000000 diff --git a/internal/templates/pages/home.templ b/internal/templates/pages/home.templ deleted file mode 100644 index e69de29..0000000 diff --git a/internal/templates/pages/home_templ.go b/internal/templates/pages/home_templ.go deleted file mode 100644 index 1d1995d..0000000 --- a/internal/templates/pages/home_templ.go +++ /dev/null @@ -1,10 +0,0 @@ -// Code generated by templ - DO NOT EDIT. - -// templ: version: v0.3.865 - -//lint:file-ignore SA4006 This context is only used if a nested component is present. - -import "github.com/a-h/templ" -import templruntime "github.com/a-h/templ/runtime" - -var _ = templruntime.GeneratedTemplate \ No newline at end of file diff --git a/web/static/css/main.css b/web/static/css/main.css new file mode 100644 index 0000000..f1d8c73 --- /dev/null +++ b/web/static/css/main.css @@ -0,0 +1 @@ +@import "tailwindcss"; diff --git a/web/static/css/style.css b/web/static/css/style.css deleted file mode 100644 index e69de29..0000000 diff --git a/web/static/css/tailwind.css b/web/static/css/tailwind.css new file mode 100644 index 0000000..c5ce61b --- /dev/null +++ b/web/static/css/tailwind.css @@ -0,0 +1,277 @@ +/*! tailwindcss v4.1.8 | MIT License | https://tailwindcss.com */ +@layer properties; +@layer theme, base, components, utilities; +@layer theme { + :root, :host { + --font-sans: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', + 'Noto Color Emoji'; + --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', + monospace; + --color-red-500: oklch(63.7% 0.237 25.331); + --default-font-family: var(--font-sans); + --default-mono-font-family: var(--font-mono); + } +} +@layer base { + *, ::after, ::before, ::backdrop, ::file-selector-button { + box-sizing: border-box; + margin: 0; + padding: 0; + border: 0 solid; + } + html, :host { + line-height: 1.5; + -webkit-text-size-adjust: 100%; + tab-size: 4; + font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'); + font-feature-settings: var(--default-font-feature-settings, normal); + font-variation-settings: var(--default-font-variation-settings, normal); + -webkit-tap-highlight-color: transparent; + } + hr { + height: 0; + color: inherit; + border-top-width: 1px; + } + abbr:where([title]) { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + } + h1, h2, h3, h4, h5, h6 { + font-size: inherit; + font-weight: inherit; + } + a { + color: inherit; + -webkit-text-decoration: inherit; + text-decoration: inherit; + } + b, strong { + font-weight: bolder; + } + code, kbd, samp, pre { + font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace); + font-feature-settings: var(--default-mono-font-feature-settings, normal); + font-variation-settings: var(--default-mono-font-variation-settings, normal); + font-size: 1em; + } + small { + font-size: 80%; + } + sub, sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + sub { + bottom: -0.25em; + } + sup { + top: -0.5em; + } + table { + text-indent: 0; + border-color: inherit; + border-collapse: collapse; + } + :-moz-focusring { + outline: auto; + } + progress { + vertical-align: baseline; + } + summary { + display: list-item; + } + ol, ul, menu { + list-style: none; + } + img, svg, video, canvas, audio, iframe, embed, object { + display: block; + vertical-align: middle; + } + img, video { + max-width: 100%; + height: auto; + } + button, input, select, optgroup, textarea, ::file-selector-button { + font: inherit; + font-feature-settings: inherit; + font-variation-settings: inherit; + letter-spacing: inherit; + color: inherit; + border-radius: 0; + background-color: transparent; + opacity: 1; + } + :where(select:is([multiple], [size])) optgroup { + font-weight: bolder; + } + :where(select:is([multiple], [size])) optgroup option { + padding-inline-start: 20px; + } + ::file-selector-button { + margin-inline-end: 4px; + } + ::placeholder { + opacity: 1; + } + @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) { + ::placeholder { + color: currentcolor; + @supports (color: color-mix(in lab, red, red)) { + color: color-mix(in oklab, currentcolor 50%, transparent); + } + } + } + textarea { + resize: vertical; + } + ::-webkit-search-decoration { + -webkit-appearance: none; + } + ::-webkit-date-and-time-value { + min-height: 1lh; + text-align: inherit; + } + ::-webkit-datetime-edit { + display: inline-flex; + } + ::-webkit-datetime-edit-fields-wrapper { + padding: 0; + } + ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field { + padding-block: 0; + } + :-moz-ui-invalid { + box-shadow: none; + } + button, input:where([type='button'], [type='reset'], [type='submit']), ::file-selector-button { + appearance: button; + } + ::-webkit-inner-spin-button, ::-webkit-outer-spin-button { + height: auto; + } + [hidden]:where(:not([hidden='until-found'])) { + display: none !important; + } +} +@layer utilities { + .static { + position: static; + } + .hidden { + display: none; + } + .table { + display: table; + } + .h-screen { + height: 100vh; + } + .w-full { + width: 100%; + } + .border { + border-style: var(--tw-border-style); + border-width: 1px; + } + .bg-red-500 { + background-color: var(--color-red-500); + } + .text-red-500 { + color: var(--color-red-500); + } + .outline { + outline-style: var(--tw-outline-style); + outline-width: 1px; + } + .filter { + filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,); + } +} +@property --tw-border-style { + syntax: "*"; + inherits: false; + initial-value: solid; +} +@property --tw-outline-style { + syntax: "*"; + inherits: false; + initial-value: solid; +} +@property --tw-blur { + syntax: "*"; + inherits: false; +} +@property --tw-brightness { + syntax: "*"; + inherits: false; +} +@property --tw-contrast { + syntax: "*"; + inherits: false; +} +@property --tw-grayscale { + syntax: "*"; + inherits: false; +} +@property --tw-hue-rotate { + syntax: "*"; + inherits: false; +} +@property --tw-invert { + syntax: "*"; + inherits: false; +} +@property --tw-opacity { + syntax: "*"; + inherits: false; +} +@property --tw-saturate { + syntax: "*"; + inherits: false; +} +@property --tw-sepia { + syntax: "*"; + inherits: false; +} +@property --tw-drop-shadow { + syntax: "*"; + inherits: false; +} +@property --tw-drop-shadow-color { + syntax: "*"; + inherits: false; +} +@property --tw-drop-shadow-alpha { + syntax: ""; + inherits: false; + initial-value: 100%; +} +@property --tw-drop-shadow-size { + syntax: "*"; + inherits: false; +} +@layer properties { + @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) { + *, ::before, ::after, ::backdrop { + --tw-border-style: solid; + --tw-outline-style: solid; + --tw-blur: initial; + --tw-brightness: initial; + --tw-contrast: initial; + --tw-grayscale: initial; + --tw-hue-rotate: initial; + --tw-invert: initial; + --tw-opacity: initial; + --tw-saturate: initial; + --tw-sepia: initial; + --tw-drop-shadow: initial; + --tw-drop-shadow-color: initial; + --tw-drop-shadow-alpha: 100%; + --tw-drop-shadow-size: initial; + } + } +}