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.ScriptWithVersion("/public/htmgo.js", Version),
h.Raw(`
<script async defer src="https://buttons.github.io/buttons.js"></script>
<script src="https://buttons.github.io/buttons.js"></script>
`),
h.Style(`
html {

View file

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