chore: add node config files
This commit is contained in:
parent
348f93955c
commit
4d6fe85f53
15
package.json
Normal file
15
package.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"devDependencies": {
|
||||||
|
"@iconify-json/carbon": "^1.2.10",
|
||||||
|
"@unocss/cli": "^66.3.2",
|
||||||
|
"@unocss/preset-icons": "^66.3.2",
|
||||||
|
"unocss": "^66.3.2",
|
||||||
|
"unocss-preset-daisy": "^7.0.0"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"build:css": "unocss",
|
||||||
|
"build": "unocss",
|
||||||
|
"watch:css": "unocss --watch",
|
||||||
|
"dev": "unocss --watch"
|
||||||
|
}
|
||||||
|
}
|
2243
pnpm-lock.yaml
generated
Normal file
2243
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
2
pnpm-workspace.yaml
Normal file
2
pnpm-workspace.yaml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
ignoredBuiltDependencies:
|
||||||
|
- esbuild
|
16
tailwind-package.json
Normal file
16
tailwind-package.json
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"name": "axum-leptos-tailwind-template",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "<picture> <source srcset=\"https://raw.githubusercontent.com/leptos-rs/leptos/main/docs/logos/Leptos_logo_Solid_White.svg\" media=\"(prefers-color-scheme: dark)\"> <img src=\"https://raw.githubusercontent.com/leptos-rs/leptos/main/docs/logos/Leptos_logo_RGB.svg\" alt=\"Leptos Logo\"> </picture>",
|
||||||
|
"main": "tailwind.config.js",
|
||||||
|
"scripts": {
|
||||||
|
"build": "npx tailwindcss -i ./style/input.css -o ./target/site/pkg/axum-leptos-tailwind-template.css",
|
||||||
|
"watch": "npx tailwindcss -i ./style/input.css -o ./target/site/pkg/axum-leptos-tailwind-template.css --watch"
|
||||||
|
},
|
||||||
|
"keywords": [],
|
||||||
|
"author": "",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"tailwindcss": "^3.4.17"
|
||||||
|
}
|
||||||
|
}
|
13
tailwind.config.js
Normal file
13
tailwind.config.js
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
/** @type {import('tailwindcss').Config} */
|
||||||
|
module.exports = {
|
||||||
|
content: {
|
||||||
|
files: ["*.html", "./src/**/*.rs"],
|
||||||
|
transform: {
|
||||||
|
rs: (content) => content.replace(/(?:^|\s)class:/g, ' '),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
theme: {
|
||||||
|
extend: {},
|
||||||
|
},
|
||||||
|
plugins: [],
|
||||||
|
}
|
81
uno.config.ts
Normal file
81
uno.config.ts
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
// uno.config.ts
|
||||||
|
// import type { Theme } from '@unocss/preset-mini'
|
||||||
|
import {
|
||||||
|
defineConfig,
|
||||||
|
presetAttributify,
|
||||||
|
presetIcons,
|
||||||
|
presetTypography,
|
||||||
|
presetUno,
|
||||||
|
presetWebFonts,
|
||||||
|
transformerDirectives,
|
||||||
|
transformerVariantGroup,
|
||||||
|
} from "unocss";
|
||||||
|
import { presetDaisy } from "unocss-preset-daisy";
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
cli: {
|
||||||
|
entry: {
|
||||||
|
patterns: ["src/**/*.rs", "client/src/**/*.rs"],
|
||||||
|
outFile: "target/site/pkg/website.css",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
shortcuts: [
|
||||||
|
{
|
||||||
|
btn: "px-4 py-1 rounded inline-block bg-primary text-white cursor-pointer tracking-wide op90 hover:op100 disabled:cursor-default disabled:bg-gray-600 disabled:!op50 disabled:pointer-events-none",
|
||||||
|
"indigo-btn":
|
||||||
|
"ml-5 capitalize !text-2xl !text-indigo-800 !bg-indigo-200 border-0.5 !border-indigo-500 dark:!text-indigo-200 dark:!bg-indigo-800 hover:!bg-gray-100 dark:hover:!bg-gray-700 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg font-bold !p-5 md:!p-8",
|
||||||
|
"icon-btn":
|
||||||
|
"text-1.2em cursor-pointer select-none opacity-75 transition duration-200 ease-in-out hover:opacity-100 hover:text-primary disabled:pointer-events-none",
|
||||||
|
"square-btn":
|
||||||
|
"flex flex-gap-2 items-center border border-base px2 py1 relative !outline-none",
|
||||||
|
"square-btn-mark":
|
||||||
|
"absolute h-2 w-2 bg-primary -right-0.2rem -top-0.2rem",
|
||||||
|
|
||||||
|
"bg-base": "bg-white dark:bg-[#121212]",
|
||||||
|
"bg-overlay": "bg-[#eee]:50 dark:bg-[#222]:50",
|
||||||
|
"bg-header": "bg-gray-500:5",
|
||||||
|
"bg-active": "bg-gray-500:8",
|
||||||
|
"bg-hover": "bg-gray-500:20",
|
||||||
|
"border-base": "border-gray-400:10",
|
||||||
|
|
||||||
|
"tab-button": "font-light op50 hover:op80 h-full px-4",
|
||||||
|
"tab-button-active": "op100 bg-gray-500:10",
|
||||||
|
},
|
||||||
|
[/^(flex|grid)-center/g, () => "justify-center items-center"],
|
||||||
|
[/^(flex|grid)-x-center/g, () => "justify-center"],
|
||||||
|
[/^(flex|grid)-y-center/g, () => "items-center"],
|
||||||
|
],
|
||||||
|
rules: [
|
||||||
|
["max-h-screen", { "max-height": "calc(var(--vh, 1vh) * 100)" }],
|
||||||
|
["h-screen", { height: "calc(var(--vh, 1vh) * 100)" }],
|
||||||
|
],
|
||||||
|
// theme: <Theme>{
|
||||||
|
theme: {
|
||||||
|
colors: {
|
||||||
|
ok: "var(--c-ok)",
|
||||||
|
primary: "var(--c-primary)",
|
||||||
|
"primary-deep": "var(--c-primary-deep)",
|
||||||
|
mis: "var(--c-mis)",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
presets: [
|
||||||
|
presetUno(),
|
||||||
|
presetAttributify(),
|
||||||
|
presetIcons({
|
||||||
|
scale: 1.2,
|
||||||
|
autoInstall: true,
|
||||||
|
collections: {
|
||||||
|
carbon: () =>
|
||||||
|
import("@iconify-json/carbon/icons.json").then((i) => i.default),
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
presetTypography(),
|
||||||
|
presetWebFonts({
|
||||||
|
fonts: {
|
||||||
|
// ...
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
presetDaisy(),
|
||||||
|
],
|
||||||
|
transformers: [transformerDirectives(), transformerVariantGroup()],
|
||||||
|
});
|
Loading…
x
Reference in New Issue
Block a user