pub const TEMPLATE_COMPONENTS_JSON: &str = r#"
{
"$schema": "https://ever-ui.com/schema.json",
"style": "default",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.ts",
"css": "app/globals.css",
"baseColor": "neutral",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils/cn"
}
}
"#;
pub const TEMPLATE_GLOBAL_CSS: &str = r#"
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
:root {
--background: 0 0% 98%;
--foreground: 240 10% 3.9%;
--card: 0 0% 100%;
--card-foreground: 240 10% 3.9%;
--popover: 0 0% 100%;
--popover-foreground: 240 10% 3.9%;
--primary: 240 7% 10%;
--primary-foreground: 0 0% 90%;
--secondary: 240 4.8% 95.9%;
--secondary-foreground: 240 7% 10%;
--muted: 240 4.8% 95.9%;
--muted-foreground: 240 3.8% 46.1%;
--accent: 240 4.8% 95.9%;
--accent-foreground: 240 7% 10%;
--success: 81 37% 44%;
--success-foreground: 71 44% 95%;
--warning: 32 95% 44%;
--warning-foreground: 48 100% 96%;
--error: 14 100% 53%;
--error-foreground: 0 86% 97%;
--destructive: 0 72.22% 50.59%;
--destructive-foreground: 0 0% 90%;
--border: 240 7% 80%;
--input: 240 7% 90%;
--ring: 240 5% 64.9%;
--radius: 0.5rem;
}
.dark {
--background: 240 3% 11.5%;
--foreground: 0 0% 98%;
--card: 240 3% 10%;
--card-foreground: 0 0% 70%;
--popover: 240 3% 10%;
--popover-foreground: 0 0% 98%;
--primary: 0 0% 80%;
--primary-foreground: 240 7% 16%;
--secondary: 240 3.7% 15.9%;
--secondary-foreground: 0 0% 98%;
--muted: 240 3.7% 15.9%;
--muted-foreground: 240 5% 64.9%;
--accent: 240 3.7% 15.9%;
--accent-foreground: 0 0% 98%;
--destructive: 0 62.8% 30.6%;
--destructive-foreground: 0 85.7% 97.3%;
--border: 240 3.7% 30%;
--input: 240 3.7% 20%;
--ring: 240 4.9% 83.9%;
}
}
"#;
pub const TEMPLATE_TAILWIND_CONFIG: &str = r#"/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: "class",
content: {
files: ["*.html", "./src/**/*.rs", "./input.css"],
},
theme: {
container: {
center: true,
padding: "2rem",
screens: {
"2xl": "1400px",
},
},
extend: {
fontFamily: {
opensans: ["Open Sans", "sans-serif"],
robotomono: ["Roboto Mono", "monospace"],
},
colors: {
border: "hsl(var(--border))",
input: "hsl(var(--input))",
ring: "hsl(var(--ring))",
background: "hsl(var(--background))",
foreground: "hsl(var(--foreground))",
primary: {
DEFAULT: "hsl(var(--primary))",
foreground: "hsl(var(--primary-foreground))",
},
secondary: {
DEFAULT: "hsl(var(--secondary))",
foreground: "hsl(var(--secondary-foreground))",
},
success: {
DEFAULT: "hsl(var(--success))",
foreground: "hsl(var(--success-foreground))",
},
info: {
DEFAULT: "hsl(var(--info))",
foreground: "hsl(var(--info-foreground))",
},
warning: {
DEFAULT: "hsl(var(--warning))",
foreground: "hsl(var(--warning-foreground))",
},
error: {
DEFAULT: "hsl(var(--error))",
foreground: "hsl(var(--error-foreground))",
},
destructive: {
DEFAULT: "hsl(var(--destructive))",
foreground: "hsl(var(--destructive-foreground))",
},
muted: {
DEFAULT: "hsl(var(--muted))",
foreground: "hsl(var(--muted-foreground))",
},
accent: {
DEFAULT: "hsl(var(--accent))",
foreground: "hsl(var(--accent-foreground))",
},
popover: {
DEFAULT: "hsl(var(--popover))",
foreground: "hsl(var(--popover-foreground))",
},
card: {
DEFAULT: "hsl(var(--card))",
foreground: "hsl(var(--card-foreground))",
},
},
borderRadius: {
lg: "var(--radius)",
md: "calc(var(--radius) - 2px)",
sm: "calc(var(--radius) - 4px)",
},
keyframes: {},
animation: {},
},
},
plugins: [require("tailwindcss-animate")],
};"#;
pub const TEMPLATE_LIB_RS: &str = r#"pub mod app;
pub mod error_template;
#[cfg(feature = "ssr")]
pub mod fileserv;
pub mod components;
#[cfg(feature = "hydrate")]
#[wasm_bindgen::prelude::wasm_bindgen]
pub fn hydrate() {
use crate::app::*;
console_error_panic_hook::set_once();
leptos::mount_to_body(App);
}
"#;