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