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

change: renaming some stuff

This commit is contained in:
“axzilla” 2024-10-09 18:08:26 +02:00
parent 38a12acf1c
commit e01eafb674
3 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@ generate-lib:
templ generate ./pkg/...
generate-css:
npx tailwindcss -i ./assets/css/input.css -o ./pkg/styles/goilerplate.css
npx tailwindcss -i ./assets/css/input.css -o ./assets/css/goilerplate.css
update-package: generate-css generate-lib # generate-icons <- if needed
@echo "Package updated successfully"

View File

@ -8,17 +8,17 @@ import (
// CSS returns a link tag for the Goilerplate CSS
// If no branch is specified, it defaults to 'main'
func CSS(branch string) templ.Component {
func GoilerplateCSS(branch string) templ.Component {
if branch == "" {
branch = "main"
}
cssURL := fmt.Sprintf("https://cdn.jsdelivr.net/gh/axzilla/goilerplate@%s/pkg/styles/goilerplate.css", branch)
cssURL := fmt.Sprintf("https://cdn.jsdelivr.net/gh/axzilla/goilerplate@%s/assets/css/goilerplate.css", branch)
return templ.Raw(fmt.Sprintf(`<link rel="stylesheet" href="%s">`, cssURL))
}
// Alpine returns script tags for Alpine.js
func Alpine() templ.Component {
func AlpineJs() templ.Component {
return templ.Raw(`
<script defer src="https://cdn.jsdelivr.net/npm/@alpinejs/focus@3.x.x/dist/cdn.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>