Skip to content

Commit

Permalink
refactor: remove cdn package and move assets to global styles
Browse files Browse the repository at this point in the history
  • Loading branch information
prnk28 committed Oct 9, 2024
1 parent 58a02be commit a824c23
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 32 deletions.
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,6 @@ gen-pkl:
nebula-build:
@echo "(nebula) Building nebula"
cd pkg/nebula && bun install && bun run build
@echo "(nebula) Copying assets to hway"
cp -r pkg/nebula/assets/js pkg/nebula/assets/css cmd/hway/build

motr-build: gen-templ gen-pkl
@echo "(dwn) Building motr.wasm -> Service Worker IPFS Vault"
Expand Down
17 changes: 7 additions & 10 deletions pkg/nebula/global/styles/layout.templ
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package styles

import (
cdn "github.com/onsonr/sonr/pkg/nebula/assets"
"strings"
)
import "strings"

type Icon interface {
Render() templ.Component
Expand Down Expand Up @@ -33,9 +30,9 @@ templ Layout(title string, remote bool) {
<!DOCTYPE html>
<html lang="en">
<head>
@cdn.Styles()
@cdn.Htmx()
@cdn.Alpine()
@Styles()
@Htmx()
@Alpine()
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
Expand All @@ -57,9 +54,9 @@ templ LayoutNoBody(title string, remote bool) {
<!DOCTYPE html>
<html lang="en">
<head>
@cdn.Styles()
@cdn.Htmx()
@cdn.Alpine()
@Styles()
@Htmx()
@Alpine()
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
Expand Down
25 changes: 11 additions & 14 deletions pkg/nebula/global/styles/layout_templ.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cdn
package styles

const (
PublicOrigin = "https://cdn.sonr.id"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a824c23

Please sign in to comment.