Skip to content

Commit

Permalink
fix: layout
Browse files Browse the repository at this point in the history
  • Loading branch information
katallaxie authored Aug 15, 2024
1 parent 994803d commit e192c74
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 32 deletions.
32 changes: 0 additions & 32 deletions internal/components/layout.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ package components
import (
"github.com/zeiss/fiber-goth/adapters"
htmx "github.com/zeiss/fiber-htmx"
"github.com/zeiss/fiber-htmx/components/buttons"
"github.com/zeiss/fiber-htmx/components/dividers"
"github.com/zeiss/fiber-htmx/components/drawers"
"github.com/zeiss/fiber-htmx/components/icons"
"github.com/zeiss/fiber-htmx/components/navbars"
"github.com/zeiss/fiber-htmx/components/swap"
"github.com/zeiss/fiber-htmx/components/toasts"
)

Expand Down Expand Up @@ -102,36 +100,6 @@ func Layout(p LayoutProps, children ...htmx.Node) htmx.Node {
),
navbars.NavbarEnd(
navbars.NavbarEndProps{},
swap.Swap(
swap.SwapProps{
ClassNames: htmx.ClassNames{
"swap-rotate": true,
},
},
htmx.Input(
htmx.Class("theme-controller"),
htmx.Value("dark"),
htmx.Attribute("type", "checkbox"),
),
swap.SwapOn(
swap.SwapProps{},
icons.MoonOutlineSmall(
icons.IconProps{},
),
),
swap.SwapOff(
swap.SwapProps{},
icons.SunOutlineSmall(
icons.IconProps{},
),
),
),
buttons.CircleSmall(
buttons.ButtonProps{},
icons.BellAlertOutlineSmall(
icons.IconProps{},
),
),
ProfileMenu(
ProfileMenuProps{
User: p.User,
Expand Down
7 changes: 7 additions & 0 deletions internal/components/profile-menu.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ func ProfileMenu(p ProfileMenuProps, children ...htmx.Node) htmx.Node {
htmx.Text("Profile"),
),
),
dropdowns.DropdownMenuItem(
dropdowns.DropdownMenuItemProps{},
htmx.A(
htmx.Attribute("href", "/logout"),
htmx.Text("Logout"),
),
),
),
)
}

0 comments on commit e192c74

Please sign in to comment.