mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-03 01:41:44 +00:00
chore: add nebula assets to proxy server
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
// src/ts/main.ts
|
||||
console.log("Hello from TypeScript!");
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,47 +0,0 @@
|
||||
package blocks
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/a-h/templ"
|
||||
)
|
||||
|
||||
type Icon interface {
|
||||
Render() templ.Component
|
||||
}
|
||||
|
||||
type Variant interface {
|
||||
Attributes() templ.Attributes
|
||||
}
|
||||
|
||||
func clsxMerge(variants ...Variant) templ.Attributes {
|
||||
combinedAttrs := templ.Attributes{}
|
||||
var classElements []string
|
||||
|
||||
for _, variant := range variants {
|
||||
attrs := variant.Attributes()
|
||||
if class, ok := attrs["class"].(string); ok {
|
||||
classElements = append(classElements, strings.Fields(class)...)
|
||||
}
|
||||
for key, value := range attrs {
|
||||
if key != "class" {
|
||||
combinedAttrs[key] = value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(classElements) > 0 {
|
||||
combinedAttrs["class"] = strings.Join(classElements, " ")
|
||||
}
|
||||
return combinedAttrs
|
||||
}
|
||||
|
||||
func clsxBuilder(classes ...string) templ.Attributes {
|
||||
if len(classes) == 0 {
|
||||
return templ.Attributes{}
|
||||
}
|
||||
class := strings.Join(classes, " ")
|
||||
return templ.Attributes{
|
||||
"class": class,
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,46 @@
|
||||
package blocks
|
||||
|
||||
import "strings"
|
||||
|
||||
type Icon interface {
|
||||
Render() templ.Component
|
||||
}
|
||||
|
||||
type Variant interface {
|
||||
Attributes() templ.Attributes
|
||||
}
|
||||
|
||||
func clsxMerge(variants ...Variant) templ.Attributes {
|
||||
combinedAttrs := templ.Attributes{}
|
||||
var classElements []string
|
||||
|
||||
for _, variant := range variants {
|
||||
attrs := variant.Attributes()
|
||||
if class, ok := attrs["class"].(string); ok {
|
||||
classElements = append(classElements, strings.Fields(class)...)
|
||||
}
|
||||
for key, value := range attrs {
|
||||
if key != "class" {
|
||||
combinedAttrs[key] = value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(classElements) > 0 {
|
||||
combinedAttrs["class"] = strings.Join(classElements, " ")
|
||||
}
|
||||
return combinedAttrs
|
||||
}
|
||||
|
||||
func clsxBuilder(classes ...string) templ.Attributes {
|
||||
if len(classes) == 0 {
|
||||
return templ.Attributes{}
|
||||
}
|
||||
class := strings.Join(classes, " ")
|
||||
return templ.Attributes{
|
||||
"class": class,
|
||||
}
|
||||
}
|
||||
|
||||
templ Spacer() {
|
||||
<br/>
|
||||
|
||||
@@ -8,6 +8,48 @@ package blocks
|
||||
import "github.com/a-h/templ"
|
||||
import templruntime "github.com/a-h/templ/runtime"
|
||||
|
||||
import "strings"
|
||||
|
||||
type Icon interface {
|
||||
Render() templ.Component
|
||||
}
|
||||
|
||||
type Variant interface {
|
||||
Attributes() templ.Attributes
|
||||
}
|
||||
|
||||
func clsxMerge(variants ...Variant) templ.Attributes {
|
||||
combinedAttrs := templ.Attributes{}
|
||||
var classElements []string
|
||||
|
||||
for _, variant := range variants {
|
||||
attrs := variant.Attributes()
|
||||
if class, ok := attrs["class"].(string); ok {
|
||||
classElements = append(classElements, strings.Fields(class)...)
|
||||
}
|
||||
for key, value := range attrs {
|
||||
if key != "class" {
|
||||
combinedAttrs[key] = value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(classElements) > 0 {
|
||||
combinedAttrs["class"] = strings.Join(classElements, " ")
|
||||
}
|
||||
return combinedAttrs
|
||||
}
|
||||
|
||||
func clsxBuilder(classes ...string) templ.Attributes {
|
||||
if len(classes) == 0 {
|
||||
return templ.Attributes{}
|
||||
}
|
||||
class := strings.Join(classes, " ")
|
||||
return templ.Attributes{
|
||||
"class": class,
|
||||
}
|
||||
}
|
||||
|
||||
func Spacer() templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"scripts": {
|
||||
"build:ts": "tsc",
|
||||
"build:css": "bunx tailwindcss -i ./src/styles.css -o ./assets/styles.css",
|
||||
"build": "bun run build:ts && bun run build:css",
|
||||
"watch:ts": "tsc -w",
|
||||
"watch:css": "bunx tailwindcss -i ./src/styles.css -o ./assets/styles.css --watch",
|
||||
"watch": "bun run watch:ts & bun run watch:css"
|
||||
},
|
||||
"devDependencies": {
|
||||
"tailwindcss": "^3.3.0",
|
||||
"typescript": "^4.9.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
// src/ts/main.ts
|
||||
console.log("Hello from TypeScript!");
|
||||
@@ -0,0 +1,6 @@
|
||||
/* src/css/styles.css */
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
/* Custom styles */
|
||||
@@ -0,0 +1,12 @@
|
||||
// tailwind.config.js
|
||||
module.exports = {
|
||||
content: [
|
||||
"./blocks/**/*.{templ,html}",
|
||||
"./pages/**/*.{templ,html}",
|
||||
"./src/**/*.ts",
|
||||
],
|
||||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
plugins: [],
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"outDir": "./assets",
|
||||
"rootDir": "./src",
|
||||
"target": "ES6",
|
||||
"module": "ES6",
|
||||
"moduleResolution": "node",
|
||||
"strict": true
|
||||
},
|
||||
"include": [
|
||||
"src/**/*"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user