dont defer

This commit is contained in:
maddalax 2024-09-24 13:23:38 -05:00
parent a1f6879a72
commit 387c31dcc5
2 changed files with 9 additions and 7 deletions

View file

@ -16,7 +16,7 @@ func RootPage(children ...h.Ren) *h.Element {
h.LinkWithVersion("/public/main.css", "stylesheet", Version), h.LinkWithVersion("/public/main.css", "stylesheet", Version),
h.ScriptWithVersion("/public/htmgo.js", Version), h.ScriptWithVersion("/public/htmgo.js", Version),
h.Raw(` h.Raw(`
<script async defer src="https://buttons.github.io/buttons.js"></script> <script src="https://buttons.github.io/buttons.js"></script>
`), `),
h.Style(` h.Style(`
html { html {

View file

@ -21,17 +21,21 @@ var navItems = []NavItem{
{Name: "Examples", Url: "/examples"}, {Name: "Examples", Url: "/examples"},
} }
func Star() *h.RawContent { func Star() *h.Element {
return h.Raw(` return h.Div(
h.Id("github-star"),
h.Class("min-w-[100px]"),
h.Raw(`
<a <a
class="github-button hidden" class="github-button hidden min-w-[100px]"
href="https://github.com/maddalax/htmgo" href="https://github.com/maddalax/htmgo"
data-color-scheme="no-preference: light; light: light; dark: dark;" data-color-scheme="no-preference: light; light: light; dark: dark;"
data-icon="octicon-star" data-icon="octicon-star"
data-size="large" data-size="large"
data-show-count="true" data-show-count="true"
aria-label="Star maddalax/htmgo on GitHub">Star</a> aria-label="Star maddalax/htmgo on GitHub">Star</a>
`) `),
)
} }
func NavBar(expanded bool) *h.Element { func NavBar(expanded bool) *h.Element {
@ -49,7 +53,6 @@ func NavBar(expanded bool) *h.Element {
h.Div( h.Div(
h.Class("flex items-center"), h.Class("flex items-center"),
h.A( h.A(
h.Boost(),
h.Class("text-2xl"), h.Class("text-2xl"),
h.Href("/"), h.Href("/"),
h.Text("htmgo"), h.Text("htmgo"),
@ -60,7 +63,6 @@ func NavBar(expanded bool) *h.Element {
return h.Div( return h.Div(
h.Class("flex items-center"), h.Class("flex items-center"),
h.A( h.A(
h.Boost(),
h.Class(""), h.Class(""),
h.Href(item.Url), h.Href(item.Url),
h.Text(item.Name), h.Text(item.Name),