Skip to content

Commit

Permalink
refactor: package names
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarow committed Dec 27, 2023
1 parent 111b5f1 commit d1006d3
Show file tree
Hide file tree
Showing 18 changed files with 29 additions and 29 deletions.
8 changes: 4 additions & 4 deletions internal/api/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/tarow/skat-counter/internal/skat"
"github.com/tarow/skat-counter/internal/skat/gen/model"
template "github.com/tarow/skat-counter/templates"
"github.com/tarow/skat-counter/templates/components"
component "github.com/tarow/skat-counter/templates/components"
)

type Handler struct {
Expand Down Expand Up @@ -99,7 +99,7 @@ func (h Handler) GetEditGameForm(c echo.Context) error {
return err
}

form := components.EditGameForm(*game)
form := component.EditGameForm(*game)
return render(c, http.StatusOK, form)
}

Expand Down Expand Up @@ -134,7 +134,7 @@ func (h Handler) EditGame(c echo.Context) error {
}

func (h Handler) GetCreateGameForm(c echo.Context) error {
form := components.CreateGameForm()
form := component.CreateGameForm()
return render(c, http.StatusOK, form)
}

Expand Down Expand Up @@ -203,7 +203,7 @@ func (h Handler) GetEditRoundForm(c echo.Context) error {
}
}

form := components.EditRoundForm(*game, round, roundIdx)
form := component.EditRoundForm(*game, round, roundIdx)
return render(c, http.StatusOK, form)
}

Expand Down
6 changes: 3 additions & 3 deletions templates/GameDetails.templ
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ templ GameDetails (game skat.Game) {
@GameDetailsNavbar()
<div class="container flex pt-4 mx-auto">
<div class="flex w-full flex-row flex-wrap-reverse gap-8 justify-around items-end">
@components.RoundsList(game)
@component.RoundsList(game)
<div class="flex flex-col items-center gap-4">
@components.GameCard(game, false, true, true)
@components.AddRoundForm(game)
@component.GameCard(game, false, true, true)
@component.AddRoundForm(game)
</div>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions templates/GameDetails_templ.go

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

2 changes: 1 addition & 1 deletion templates/GameOverview.templ
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ templ GameOverviewNavbar() {
templ GameOverview(games []skat.Game) {
@Base() {
@GameOverviewNavbar()
@components.GameList(games)
@component.GameList(games)
}
}
2 changes: 1 addition & 1 deletion templates/GameOverview_templ.go

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

2 changes: 1 addition & 1 deletion templates/components/create_game_form.templ
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package components
package component

templ CreateGameForm() {
<form method="dialog">
Expand Down
2 changes: 1 addition & 1 deletion templates/components/create_game_form_templ.go

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

2 changes: 1 addition & 1 deletion templates/components/edit_game_form.templ
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package components
package component

import "github.com/tarow/skat-counter/internal/skat"
import "fmt"
Expand Down
2 changes: 1 addition & 1 deletion templates/components/edit_game_form_templ.go

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

2 changes: 1 addition & 1 deletion templates/components/edit_round_form.templ
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package components
package component

import "github.com/tarow/skat-counter/internal/skat"
import "fmt"
Expand Down
2 changes: 1 addition & 1 deletion templates/components/edit_round_form_templ.go

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

4 changes: 2 additions & 2 deletions templates/components/game_card.templ
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package components
package component

import "github.com/tarow/skat-counter/internal/skat"
import "fmt"
Expand Down Expand Up @@ -93,7 +93,7 @@ templ GameCard(game skat.Game, detailsBtn, editBtn, deleteBtn bool) {

templ GameList(games []skat.Game) {
<div class="container flex pt-4 mx-auto">
<div class="flex flex-row flex-wrap gap-8 justify-center">
<div class="flex w-full flex-row flex-wrap gap-8 justify-center">
for _, g := range games {
@GameCard(g, true, false, false)
}
Expand Down
4 changes: 2 additions & 2 deletions templates/components/game_card_templ.go

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

2 changes: 1 addition & 1 deletion templates/components/player_input.templ
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package components
package component

templ PlayerInput() {
<div class="grid grid-cols-6 gap-3 items-center">
Expand Down
2 changes: 1 addition & 1 deletion templates/components/player_input_templ.go

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

4 changes: 2 additions & 2 deletions templates/components/rounds_list.templ
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package components
package component

import "github.com/tarow/skat-counter/internal/skat"
import "fmt"
Expand Down Expand Up @@ -90,7 +90,7 @@ templ AddRoundForm(game skat.Game) {
<span class="label-text">{ player.Name }</span>
</div>
<select name={ player.Name } class="select select-sm select-bordered w-full">
<option selected disabled value="">-</option>
<option selected value="">-</option>
<option value="declarer">Declarer</option>
<option value="opponent">Opponent</option>
<option value="dealer">Dealer</option>
Expand Down
4 changes: 2 additions & 2 deletions templates/components/rounds_list_templ.go

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

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package components
package component

import "fmt"

Expand Down

0 comments on commit d1006d3

Please sign in to comment.