Skip to content

Commit 9a421ae

Browse files
committed
chore: update
1 parent 8bcce1e commit 9a421ae

File tree

10 files changed

+196
-11
lines changed

10 files changed

+196
-11
lines changed

packages/v2/.vitepress/theme/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import DefaultTheme from 'vitepress/theme'
55
import './style.css'
66
import Layout from './Layout.vue'
77
import naive from "naive-ui";
8+
// import "unocss"
89

910
export default {
1011

packages/v2/.vitepress/theme/style.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@
4343
* in custom container, badges, etc.
4444
* -------------------------------------------------------------------------- */
4545

46+
47+
@tailwind base;
48+
@tailwind components;
49+
@tailwind utilities;
50+
4651
:root {
4752
--vp-c-default-1: var(--vp-c-gray-1);
4853
--vp-c-default-2: var(--vp-c-gray-2);

packages/v2/Taskfile.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,19 @@ tasks:
3131
- bun add -D @lunariajs/core
3232
- bun add -D markdown-it-mathjax3
3333
- bun add -D naive-ui
34+
# - bun add -D unocss
35+
# - bun add -D @unocss/postcss
36+
- bun add -D daisyui@latest
37+
- bun add -D tailwindcss
38+
- bun add -D postcss
39+
- bun add -D prettier
40+
- bun add -D autoprefixer
41+
42+
remove:
43+
aliases: [ "rm" ]
44+
cmds:
45+
- bun remove unocss
46+
- bun remove @unocss/postcss
3447

3548
run:
3649
aliases: [ "r" ]
@@ -55,12 +68,12 @@ tasks:
5568
- git init
5669
- git add -A
5770
- git commit -m 'deploy'
58-
# - |
59-
# cd ..;
60-
# repo_url=`git remote -v | grep push | awk -F ":" '{print $2}' | awk -F ".git " '{print "[email protected]:"$1".git"}'`;
61-
# echo "git remote add $repo_url";
62-
# cd .dist/;
63-
# git remote add origin $repo_url
71+
# - |
72+
# cd ..;
73+
# repo_url=`git remote -v | grep push | awk -F ":" '{print $2}' | awk -F ".git " '{print "[email protected]:"$1".git"}'`;
74+
# echo "git remote add $repo_url";
75+
# cd .dist/;
76+
# git remote add origin $repo_url
6477
- git remote add origin {{.GIT_REPO}}
6578
- git branch -M {{.BRANCH}}
6679
- git push -f origin {{.BRANCH}}
@@ -78,7 +91,7 @@ tasks:
7891
- task: open
7992

8093
clean:
81-
aliases: [ "cl", "rm" ]
94+
aliases: [ "cl" ]
8295
cmds:
8396
- rm -rf cache/
8497
- rm -rf dist/

packages/v2/bun.lockb

35 KB
Binary file not shown.

packages/v2/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,14 @@
99
},
1010
"devDependencies": {
1111
"@lunariajs/core": "^0.0.32",
12+
"autoprefixer": "^10.4.19",
13+
"daisyui": "^4.10.2",
1214
"markdown-it-mathjax3": "^4.3.2",
1315
"naive-ui": "^2.38.1",
1416
"open-cli": "^8.0.0",
17+
"postcss": "^8.4.38",
18+
"prettier": "^3.2.5",
19+
"tailwindcss": "^3.4.3",
1520
"vitepress": "^1.1.3"
1621
}
1722
}

packages/v2/postcss.config.mjs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import tailwind from 'tailwindcss';
2+
import autoprefixer from 'autoprefixer';
3+
import daisyui from 'daisyui';
4+
5+
export default {
6+
plugins: [
7+
tailwind({
8+
content: [
9+
'./src/**/*.{html,js,vue,ts,md}',
10+
'./.vitepress/**/*.{html,js,vue,ts,md}',
11+
],
12+
plugins: [daisyui],
13+
daisyui: {
14+
styled: true,
15+
themes: ['emerald'],
16+
base: false,
17+
utils: false,
18+
logs: false,
19+
rtl: false,
20+
prefix: 'ds-',
21+
darkTheme: "dark",
22+
},
23+
}),
24+
autoprefixer()
25+
],
26+
};

packages/v2/src/components/WDownload.vue

Lines changed: 96 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,99 @@
11
<template>
22

3-
<n-message-provider>
3+
4+
<n-flex>
5+
6+
<n-flex vertical>
7+
<n-avatar
8+
:style="{
9+
color: 'yellow',
10+
backgroundColor: 'red'
11+
}"
12+
>
13+
M
14+
</n-avatar>
15+
16+
17+
<n-split direction="horizontal"
18+
default-size="0.3"
19+
class=""
20+
:max="0.75" :min="0.25">
21+
<template #1>
22+
Pane 1
23+
</template>
24+
<template #2>
25+
26+
27+
28+
29+
<div class="dropdown">
30+
<div tabindex="0" role="button" class="btn m-1">Click</div>
31+
<ul tabindex="0" class="dropdown-content z-[1] menu p-2 shadow bg-base-100 rounded-box w-52">
32+
<li><a>Item 1</a></li>
33+
<li><a>Item 2</a></li>
34+
</ul>
35+
</div>
36+
37+
38+
<button class="btn btn-red">One</button>
39+
<button class="btn btn-secondary">Two</button>
40+
<button class="btn btn-accent btn-outline">Three</button>
41+
42+
43+
44+
<div class="m-5 p-5 text-icon p4 gap4">
45+
test
46+
</div>
47+
48+
<div class="btn p-2 m-2 text-primary">
49+
btn
50+
</div>
51+
52+
53+
<div class="m-5 p-5 text-icon" style="font-size: 40px; padding: 10px">
54+
test
55+
</div>
56+
<div class="m-5 p-5">
57+
Pane 2
58+
</div>
59+
60+
61+
<n-card size="medium" content-class="p-5 m-5">
62+
63+
64+
<n-row class="m-5 p-5">
65+
<n-carousel
66+
dot-placement="bottom"
67+
interval="2000"
68+
align="center"
69+
class="m-2"
70+
autoplay>
71+
<img
72+
class="carousel-img"
73+
src="https://naive-ui.oss-cn-beijing.aliyuncs.com/carousel-img/carousel3.jpeg"
74+
>
75+
<img
76+
class="carousel-img"
77+
src="https://naive-ui.oss-cn-beijing.aliyuncs.com/carousel-img/carousel2.jpeg"
78+
>
79+
<img
80+
class="carousel-img"
81+
src="https://naive-ui.oss-cn-beijing.aliyuncs.com/carousel-img/carousel4.jpeg"
82+
>
83+
</n-carousel>
84+
</n-row>
85+
86+
</n-card>
87+
88+
</template>
89+
</n-split>
90+
91+
92+
<n-skeleton text size="large"></n-skeleton>
93+
94+
</n-flex>
95+
96+
497
<n-card theme="dark">
598
<n-space>
699
<n-button strong type="success" @click="download()">Download</n-button>
@@ -12,16 +105,15 @@
12105
<n-text> The count is: {{ count }}</n-text>
13106

14107
<n-space>
15-
<n-badge :value="count"> count </n-badge>
108+
<n-badge :value="count"> count</n-badge>
16109

17110
<n-button strong type="warning" @click="count++">Increment</n-button>
18111
</n-space>
19112
</div>
20113

21114
</n-card>
22115

23-
24-
</n-message-provider>
116+
</n-flex>
25117

26118

27119
</template>

packages/v2/tailwind.config.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
module.exports = {
2+
content: [
3+
'./src/**/*.{html,js,vue,ts,md}',
4+
'./.vitepress/**/*.{html,js,vue,ts,md}',
5+
// './src/**/*.{vue,js,ts}',
6+
],
7+
// add daisyUI plugin
8+
plugins: [require("daisyui")],
9+
10+
// daisyUI config (optional - here are the default values)
11+
daisyui: {
12+
themes: false, // false: only light + dark | true: all themes | array: specific themes like this ["light", "dark", "cupcake"]
13+
darkTheme: "dark", // name of one of the included themes for dark mode
14+
base: true, // applies background color and foreground color for root element by default
15+
styled: true, // include daisyUI colors and design decisions for all components
16+
utils: true, // adds responsive and modifier utility classes
17+
prefix: "", // prefix for daisyUI classnames (components, modifiers and responsive class names. Not colors)
18+
logs: true, // Shows info about daisyUI version and used config in the console when building your CSS
19+
themeRoot: ":root", // The element that receives theme color CSS variables
20+
},
21+
};
22+

packages/v2/uno.config.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// uno.config.ts
2+
import { defineConfig, presetAttributify, presetUno } from 'unocss'
3+
4+
export default defineConfig({
5+
presets: [
6+
presetAttributify({ /* preset options */}),
7+
presetUno(),
8+
// ...custom presets
9+
],
10+
})

packages/v2/vite.config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// vite.config.ts
2+
// import UnoCSS from 'unocss/vite'
3+
import { defineConfig } from 'vite';
4+
import vue from '@vitejs/plugin-vue';
5+
6+
export default defineConfig({
7+
plugins: [
8+
vue(),
9+
// UnoCSS(),
10+
],
11+
});

0 commit comments

Comments
 (0)