Discover books, shows, and movies at your level. Track your progress by filling your Shelf with what you find, and share with other language learners. *No dusting required. shlf.space

refactor: organise html/templ files to be less flat-structure like

Signed-off-by: brookjeynes <me@brookjeynes.dev>

authored by brookjeynes.dev and committed by tangled.org 69f649fb 1ee5dd22

+9 -7
+1 -1
docs/contributing.md
··· 46 46 47 47 Format templates and code before submitting for final review. 48 48 ``` 49 - go tool templ fmt ./internal/server/views/ && go fmt ./... 49 + go tool templ fmt ./internal/views/ && go fmt ./... 50 50 ``` 51 51 52 52 ## Proposals for bigger changes
+1 -1
docs/hacking.md
··· 33 33 If you modified the views, you will need to regenerate them: 34 34 ```bash 35 35 go tool templ generate 36 - go tool templ fmt ./internal/server/views/ 36 + go tool templ fmt ./internal/views/ 37 37 ``` 38 38 39 39 If you modified the tailwind styles, you will need to regenerate the css:
+2 -2
internal/server/views/index.templ internal/views/index/index.templ
··· 1 - package views 1 + package index 2 2 3 - import "shelf.app/internal/server/views/layouts" 3 + import "shelf.app/internal/layouts/base" 4 4 5 5 templ IndexPage(params IndexPageParams) { 6 6 @layouts.Base(layouts.BaseParams{Title: "home"})
+4 -2
internal/server/views/layouts/base.templ internal/layouts/base/base.templ
··· 10 10 <script src="/static/htmx.min.js" defer></script> 11 11 <script src="/static/lucide.min.js"></script> 12 12 <script src="/static/alpinejs.min.js" defer></script> 13 + <script src="/static/oat.min.js" defer></script> 13 14 <link rel="stylesheet" href="/static/style.css" type="text/css"/> 15 + <link rel="stylesheet" href="/static/oat.min.css" type="text/css"/> 14 16 </head> 15 - <body class="flex flex-col min-h-screen bg-bg"> 16 - <main class="flex-1 pb-8 text-text"> 17 + <body class="min-h-screen"> 18 + <main> 17 19 { children... } 18 20 </main> 19 21 </body>
internal/server/views/layouts/layouts.go internal/layouts/base/base.go
+1 -1
internal/server/views/views.go internal/views/index/index.go
··· 1 - package views 1 + package index 2 2 3 3 type IndexPageParams struct{}