From 91a987e049d759a0ec063198e22881e493097757 Mon Sep 17 00:00:00 2001 From: maotovisk Date: Thu, 7 Aug 2025 14:29:49 -0300 Subject: [PATCH] add(js): add correct import ver --- .templui.json | 4 +-- cmd/maot-shortner/main.go | 4 +-- web/static/css/output.css | 28 ------------------- .../assets => static}/js/input.min.js | 0 .../assets => static}/js/label.min.js | 0 web/templates/components/input/input.templ | 4 +-- web/templates/components/label/label.templ | 2 +- web/templates/pages/home.templ | 2 +- 8 files changed, 7 insertions(+), 37 deletions(-) rename web/{resources/assets => static}/js/input.min.js (100%) rename web/{resources/assets => static}/js/label.min.js (100%) diff --git a/.templui.json b/.templui.json index b6939a8..9061767 100644 --- a/.templui.json +++ b/.templui.json @@ -2,6 +2,6 @@ "componentsDir": "web/templates/components", "utilsDir": "web/resources/utils", "moduleName": "maot-shortner", - "jsDir": "web/resources/assets/js", - "jsPublicPath": "/web/static/js" + "jsDir": "web/static/js", + "jsPublicPath": "static/js" } diff --git a/cmd/maot-shortner/main.go b/cmd/maot-shortner/main.go index dd43586..2f1c543 100644 --- a/cmd/maot-shortner/main.go +++ b/cmd/maot-shortner/main.go @@ -6,8 +6,6 @@ import ( ) func main() { - fmt.Println("Starting app...") - db, err := database.InitDatabase() if err != nil { panic(err) @@ -15,6 +13,6 @@ func main() { server := NewServer(db) - fmt.Println("App listening on port 3032") + fmt.Println("App listening on", server.Addr) server.ListenAndServe() } diff --git a/web/static/css/output.css b/web/static/css/output.css index 3d20a03..a5f0418 100644 --- a/web/static/css/output.css +++ b/web/static/css/output.css @@ -181,9 +181,6 @@ .relative { position: relative; } - .top-1 { - top: calc(var(--spacing) * 1); - } .top-1\/2 { top: calc(1/2 * 100%); } @@ -251,9 +248,6 @@ .h-10 { height: calc(var(--spacing) * 10); } - .h-12 { - height: calc(var(--spacing) * 12); - } .h-24 { height: calc(var(--spacing) * 24); } @@ -263,9 +257,6 @@ .w-6 { width: calc(var(--spacing) * 6); } - .w-12 { - width: calc(var(--spacing) * 12); - } .w-24 { width: calc(var(--spacing) * 24); } @@ -281,22 +272,12 @@ .flex-1 { flex: 1; } - .flex-shrink { - flex-shrink: 1; - } .shrink { flex-shrink: 1; } .shrink-0 { flex-shrink: 0; } - .border-collapse { - border-collapse: collapse; - } - .-translate-y-1 { - --tw-translate-y: calc(var(--spacing) * -1); - translate: var(--tw-translate-x) var(--tw-translate-y); - } .-translate-y-1\/2 { --tw-translate-y: calc(calc(1/2 * 100%) * -1); translate: var(--tw-translate-x) var(--tw-translate-y); @@ -310,9 +291,6 @@ .cursor-pointer { cursor: pointer; } - .resize { - resize: both; - } .columns-2 { columns: 2; } @@ -404,9 +382,6 @@ .pr-8 { padding-right: calc(var(--spacing) * 8); } - .pb-8 { - padding-bottom: calc(var(--spacing) * 8); - } .text-4xl { font-size: var(--text-4xl); line-height: var(--tw-leading, var(--text-4xl--line-height)); @@ -466,9 +441,6 @@ --tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.05)); box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); } - .ring-destructive { - --tw-ring-color: var(--destructive); - } .ring-destructive\/20 { --tw-ring-color: var(--destructive); @supports (color: color-mix(in lab, red, red)) { diff --git a/web/resources/assets/js/input.min.js b/web/static/js/input.min.js similarity index 100% rename from web/resources/assets/js/input.min.js rename to web/static/js/input.min.js diff --git a/web/resources/assets/js/label.min.js b/web/static/js/label.min.js similarity index 100% rename from web/resources/assets/js/label.min.js rename to web/static/js/label.min.js diff --git a/web/templates/components/input/input.templ b/web/templates/components/input/input.templ index b010a47..232d022 100644 --- a/web/templates/components/input/input.templ +++ b/web/templates/components/input/input.templ @@ -2,9 +2,9 @@ package input import ( + "maot-shortner/web/resources/utils" "maot-shortner/web/templates/components/button" "maot-shortner/web/templates/components/icon" - "maot-shortner/web/resources/utils" ) type Type string @@ -119,5 +119,5 @@ templ Input(props ...Props) { } templ Script() { - + } diff --git a/web/templates/components/label/label.templ b/web/templates/components/label/label.templ index d2d807f..d1a2872 100644 --- a/web/templates/components/label/label.templ +++ b/web/templates/components/label/label.templ @@ -38,5 +38,5 @@ templ Label(props ...Props) { } templ Script() { - + } diff --git a/web/templates/pages/home.templ b/web/templates/pages/home.templ index 25f4a71..42d6b07 100644 --- a/web/templates/pages/home.templ +++ b/web/templates/pages/home.templ @@ -11,7 +11,7 @@ templ Home() { @layouts.MainLayout() {
@icon.Link(icon.Props{Class: "w-24 h-24"}) -

shorten your urls...

+

shorten your urls...

@input.Input(input.Props{ ID: "URL",