Skip to content

Commit

Permalink
refactor: use internal and web folders
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Brereton authored and Tom Brereton committed Jan 14, 2024
1 parent 0202f40 commit b10bfb3
Show file tree
Hide file tree
Showing 18 changed files with 25 additions and 11 deletions.
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"os/signal"

"github.com/tombrereton/go-hot-reload/application"
"github.com/tombrereton/go-hot-reload/internal/application"
)

func main() {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion application/routes.go → internal/application/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package application
import (
"github.com/go-chi/chi/v5"
"github.com/go-chi/chi/v5/middleware"
"github.com/tombrereton/go-hot-reload/handler"
"github.com/tombrereton/go-hot-reload/internal/handler"
)

func loadRoutes() *chi.Mux {
Expand Down
6 changes: 3 additions & 3 deletions handler/marketing.go → internal/handler/marketing.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (

"github.com/mavolin/go-htmx"

"github.com/tombrereton/go-hot-reload/model"
"github.com/tombrereton/go-hot-reload/view/layout"
"github.com/tombrereton/go-hot-reload/view/marketing"
"github.com/tombrereton/go-hot-reload/internal/model"
"github.com/tombrereton/go-hot-reload/web/view/layout"
"github.com/tombrereton/go-hot-reload/web/view/marketing"
)

type Marketing struct {
Expand Down
2 changes: 1 addition & 1 deletion handler/static.go → internal/handler/static.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type Static struct {
func (h *Static) GetStaticFiles() *chi.Mux {
r := chi.NewRouter()

fs := http.FileServer(http.Dir("static"))
fs := http.FileServer(http.Dir("web/static"))
r.Handle("/*", http.StripPrefix("/static/", fs))

return r
Expand Down
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions static/css/output.css → web/static/css/output.css
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,11 @@ video {
background-color: rgb(71 85 105 / var(--tw-bg-opacity));
}

.bg-green-500 {
--tw-bg-opacity: 1;
background-color: rgb(34 197 94 / var(--tw-bg-opacity));
}

.bg-gradient-to-tr {
background-image: linear-gradient(to top right, var(--tw-gradient-stops));
}
Expand Down Expand Up @@ -692,6 +697,15 @@ video {
padding-bottom: 0.25rem;
}

.text-lg {
font-size: 1.125rem;
line-height: 1.75rem;
}

.font-extrabold {
font-weight: 800;
}

.text-white {
--tw-text-opacity: 1;
color: rgb(255 255 255 / var(--tw-text-opacity));
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion view/layout/base.templ → web/view/layout/base.templ
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package layout

import "github.com/tombrereton/go-hot-reload/view/components"
import "github.com/tombrereton/go-hot-reload/web/view/components"

templ Base(contents templ.Component) {
<!DOCTYPE html>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package marketing

import (
"github.com/tombrereton/go-hot-reload/model"
"github.com/tombrereton/go-hot-reload/internal/model"
)

templ LandingPage(user model.User) {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b10bfb3

Please sign in to comment.