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
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor: move ui code to ui/

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

authored by

brookjeynes and committed by
Tangled
a062f41b bfcbb734

+15 -12
+1
docs/hacking.md
··· 40 40 If you modified the views, you will need to regenerate them: 41 41 ```bash 42 42 go tool templ generate 43 + go tool templ fmt ./internal/ui/ 43 44 ``` 44 45 45 46 If you modified the tailwind styles, you will need to regenerate the css:
+1 -1
input.css
··· 1 1 @import "tailwindcss"; 2 - @import "./internal/views/shelf/shelf.css"; 2 + @import "./internal/ui/views/shelf/shelf.css"; 3 3 4 4 @theme { 5 5 --color-ink: #000;
internal/atproto/utils.go internal/atproto/identity.go
internal/components/header/header.go internal/ui/components/header/header.go
internal/components/header/header.templ internal/ui/components/header/header.templ
internal/layouts/base/base.go internal/ui/layouts/base/base.go
internal/layouts/base/base.templ internal/ui/layouts/base/base.templ
+1 -1
internal/server/index.go
··· 3 3 import ( 4 4 "net/http" 5 5 6 - "shlf.space/internal/views/index" 6 + "shlf.space/internal/ui/views/index" 7 7 ) 8 8 9 9 func (s *Server) Index(w http.ResponseWriter, r *http.Request) {
+1 -1
internal/server/login.go
··· 7 7 "strings" 8 8 9 9 "shlf.space/internal/server/htmx" 10 - "shlf.space/internal/views/login" 10 + "shlf.space/internal/ui/views/login" 11 11 ) 12 12 13 13 func (s *Server) Login(w http.ResponseWriter, r *http.Request) {
+1 -1
internal/server/middleware/middleware.go
··· 10 10 "github.com/go-chi/chi/v5" 11 11 "shlf.space/internal/atproto" 12 12 "shlf.space/internal/server/oauth" 13 - notfound "shlf.space/internal/views/not-found" 13 + notfound "shlf.space/internal/ui/views/not-found" 14 14 ) 15 15 16 16 type CtxKey string
+1 -1
internal/server/router.go
··· 7 7 "github.com/go-chi/chi/v5" 8 8 "shlf.space/internal/atproto" 9 9 "shlf.space/internal/server/middleware" 10 - notfound "shlf.space/internal/views/not-found" 10 + notfound "shlf.space/internal/ui/views/not-found" 11 11 ) 12 12 13 13 func (s *Server) Router() http.Handler {
+1 -1
internal/server/shelf.go
··· 7 7 "shlf.space/internal/db" 8 8 "shlf.space/internal/server/htmx" 9 9 "shlf.space/internal/types" 10 - "shlf.space/internal/views/shelf" 10 + "shlf.space/internal/ui/views/shelf" 11 11 ) 12 12 13 13 func (s *Server) Shelf(w http.ResponseWriter, r *http.Request) {
internal/views/index/index.go internal/ui/views/index/index.go
+4 -2
internal/views/index/index.templ internal/ui/views/index/index.templ
··· 1 1 package index 2 2 3 - import "shlf.space/internal/layouts/base" 4 - import "shlf.space/internal/components/header" 3 + import ( 4 + "shlf.space/internal/ui/components/header" 5 + layouts "shlf.space/internal/ui/layouts/base" 6 + ) 5 7 6 8 templ IndexPage(params IndexPageParams) { 7 9 @layouts.Base(layouts.BaseParams{Title: "home"}) {
internal/views/login/login.go internal/ui/views/login/login.go
+1 -1
internal/views/login/login.templ internal/ui/views/login/login.templ
··· 1 1 package login 2 2 3 - import "shlf.space/internal/layouts/base" 3 + import layouts "shlf.space/internal/ui/layouts/base" 4 4 5 5 templ LoginPage(params LoginPageParams) { 6 6 @layouts.Base(layouts.BaseParams{Title: "login"}) {
internal/views/not-found/not-found.go internal/ui/views/not-found/not-found.go
+1 -1
internal/views/not-found/not-found.templ internal/ui/views/not-found/not-found.templ
··· 1 1 package notfound 2 2 3 - import "shlf.space/internal/layouts/base" 3 + import layouts "shlf.space/internal/ui/layouts/base" 4 4 5 5 templ NotFoundPage(params NotFoundPageParams) { 6 6 @layouts.Base(layouts.BaseParams{Title: "not found"}) {
internal/views/shelf/shelf.css internal/ui/views/shelf/shelf.css
internal/views/shelf/shelf.go internal/ui/views/shelf/shelf.go
internal/views/shelf/shelf.js internal/ui/views/shelf/shelf.js
+2 -2
internal/views/shelf/shelf.templ internal/ui/views/shelf/shelf.templ
··· 2 2 3 3 import ( 4 4 "fmt" 5 - "shlf.space/internal/components/header" 6 - "shlf.space/internal/layouts/base" 5 + "shlf.space/internal/ui/components/header" 6 + layouts "shlf.space/internal/ui/layouts/base" 7 7 ) 8 8 9 9 templ ShelfPage(params ShelfPageParams) {