mirror of
https://github.com/eduardolat/pgbackweb.git
synced 2026-05-12 06:28:31 -05:00
Add StarOnGithub component and update auth layout
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package component
|
||||
|
||||
import (
|
||||
"github.com/maragudk/gomponents"
|
||||
"github.com/maragudk/gomponents/html"
|
||||
)
|
||||
|
||||
func StarOnGithub(size size) gomponents.Node {
|
||||
small := html.IFrame(
|
||||
html.Src("https://ghbtns.com/github-btn.html?user=eduardolat&repo=pgbackweb&type=star&count=true"),
|
||||
gomponents.Attr("frameborder", "0"),
|
||||
gomponents.Attr("scrolling", "0"),
|
||||
html.Width("150"),
|
||||
html.Height("20"),
|
||||
)
|
||||
|
||||
big := html.IFrame(
|
||||
html.Src("https://ghbtns.com/github-btn.html?user=eduardolat&repo=pgbackweb&type=star&count=true&size=large"),
|
||||
gomponents.Attr("frameborder", "0"),
|
||||
gomponents.Attr("scrolling", "0"),
|
||||
html.Width("170"),
|
||||
html.Height("30"),
|
||||
)
|
||||
|
||||
switch size {
|
||||
case SizeSm:
|
||||
return small
|
||||
case SizeMd:
|
||||
return big
|
||||
default:
|
||||
return big
|
||||
}
|
||||
}
|
||||
@@ -51,7 +51,11 @@ func Auth(params AuthParams) gomponents.Node {
|
||||
html.Class("rounded-box shadow-md bg-base-100 p-4"),
|
||||
gomponents.Group(params.Body),
|
||||
),
|
||||
component.ChangeThemeButton(component.DropdownPositionTop, false),
|
||||
html.Div(
|
||||
html.Class("flex justify-between items-start"),
|
||||
component.StarOnGithub(component.SizeMd),
|
||||
component.ChangeThemeButton(component.DropdownPositionTop, false),
|
||||
),
|
||||
),
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user