1
0
mirror of https://github.com/axzilla/templui.git synced 2025-02-21 00:12:48 +00:00

refactor: update CSS URL to use CDN

Update the CSS URL in the `pkg/styles/styles.go` file to use a CDN instead of directly referencing the GitHub repository. This change ensures faster and more reliable loading of the stylesheet.
This commit is contained in:
“axzilla” 2024-10-09 17:12:38 +02:00
parent ed0a3ac620
commit 38a12acf1c

View File

@ -12,7 +12,8 @@ func CSS(branch string) templ.Component {
if branch == "" {
branch = "main"
}
cssURL := fmt.Sprintf("https://raw.githubusercontent.com/axzilla/goilerplate/%s/pkg/styles/goilerplate.css", branch)
cssURL := fmt.Sprintf("https://cdn.jsdelivr.net/gh/axzilla/goilerplate@%s/pkg/styles/goilerplate.css", branch)
return templ.Raw(fmt.Sprintf(`<link rel="stylesheet" href="%s">`, cssURL))
}