chore: add nebula assets to proxy server

This commit is contained in:
Prad Nukala
2024-09-25 22:09:15 -04:00
parent de05777261
commit a785d3a01f
14 changed files with 1959 additions and 52 deletions
+3
View File
@@ -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
-47
View File
@@ -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,
}
}
+41
View File
@@ -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/>
+42
View File
@@ -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
+14
View File
@@ -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"
}
}
+2
View File
@@ -0,0 +1,2 @@
// src/ts/main.ts
console.log("Hello from TypeScript!");
+6
View File
@@ -0,0 +1,6 @@
/* src/css/styles.css */
@tailwind base;
@tailwind components;
@tailwind utilities;
/* Custom styles */
+12
View File
@@ -0,0 +1,12 @@
// tailwind.config.js
module.exports = {
content: [
"./blocks/**/*.{templ,html}",
"./pages/**/*.{templ,html}",
"./src/**/*.ts",
],
theme: {
extend: {},
},
plugins: [],
};
+13
View File
@@ -0,0 +1,13 @@
{
"compilerOptions": {
"outDir": "./assets",
"rootDir": "./src",
"target": "ES6",
"module": "ES6",
"moduleResolution": "node",
"strict": true
},
"include": [
"src/**/*"
]
}