Skip to content

Commit cea9e2d

Browse files
author
Your Name
committed
chore(polish): Localize Tailwind, Fix Warnings, & Clean Configs
1 parent afc9311 commit cea9e2d

8 files changed

Lines changed: 186 additions & 34 deletions

File tree

index.html

Lines changed: 81 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
21
<!DOCTYPE html>
32
<html lang="en">
3+
44
<head>
55
<meta charset="UTF-8">
66
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
77
<title>Thầy.AI</title>
8-
<meta name="description" content="Đồng hành tâm linh với AI - Thầy.AI mang trí tuệ Thích Nhất Hạnh đến với bạn qua công nghệ">
8+
<meta name="description"
9+
content="Đồng hành tâm linh với AI - Thầy.AI mang trí tuệ Thích Nhất Hạnh đến với bạn qua công nghệ">
910
<meta name="keywords" content="thiền, mindfulness, Thích Nhất Hạnh, meditation, mental health, AI, Vietnam">
1011
<meta name="theme-color" content="#f97316">
11-
12+
1213
<!-- Optimization Hints -->
1314
<link rel="preconnect" href="https://aistudiocdn.com" crossorigin>
1415
<link rel="preconnect" href="https://cdn.tailwindcss.com" crossorigin>
@@ -17,73 +18,126 @@
1718

1819
<!-- PWA & Mobile -->
1920
<link rel="manifest" href="/manifest.json">
21+
<meta name="mobile-web-app-capable" content="yes">
2022
<meta name="apple-mobile-web-app-capable" content="yes">
2123
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
2224
<meta name="apple-mobile-web-app-title" content="Thầy.AI">
23-
25+
2426
<!-- Open Graph -->
2527
<meta property="og:title" content="Thầy.AI - Quantum Zen Companion">
2628
<meta property="og:description" content="Đồng hành tâm linh với AI inspired by Thích Nhất Hạnh">
2729
<meta property="og:type" content="website">
28-
29-
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🪷</text></svg>">
30-
31-
<script src="https://cdn.tailwindcss.com"></script>
32-
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Noto+Serif:ital,wght@0,400;0,700;1,400&display=swap" rel="stylesheet">
30+
31+
<link rel="icon"
32+
href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🪷</text></svg>">
33+
34+
<link
35+
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Noto+Serif:ital,wght@0,400;0,700;1,400&display=swap"
36+
rel="stylesheet">
3337
<style>
3438
:root {
3539
--glass-bg: rgba(255, 255, 255, 0.8);
3640
--ease-in: cubic-bezier(0.22, 1, 0.36, 1);
3741
--ease-out: cubic-bezier(0.4, 0, 1, 1);
3842
}
39-
body { font-family: 'Inter', sans-serif; -webkit-tap-highlight-color: transparent; }
40-
.font-serif { font-family: 'Noto Serif', serif; }
41-
43+
44+
body {
45+
font-family: 'Inter', sans-serif;
46+
-webkit-tap-highlight-color: transparent;
47+
}
48+
49+
.font-serif {
50+
font-family: 'Noto Serif', serif;
51+
}
52+
4253
/* Utility Animations from Design Kit */
4354
@keyframes pulse-ring {
44-
0% { transform: scale(0.8); opacity: 0.5; }
45-
100% { transform: scale(1.3); opacity: 0; }
55+
0% {
56+
transform: scale(0.8);
57+
opacity: 0.5;
58+
}
59+
60+
100% {
61+
transform: scale(1.3);
62+
opacity: 0;
63+
}
4664
}
65+
4766
.animate-pulse-ring {
4867
animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
4968
}
69+
5070
@keyframes slideRight {
51-
from { opacity: 0; transform: translateX(-10px); }
52-
to { opacity: 1; transform: translateX(0); }
71+
from {
72+
opacity: 0;
73+
transform: translateX(-10px);
74+
}
75+
76+
to {
77+
opacity: 1;
78+
transform: translateX(0);
79+
}
5380
}
81+
5482
@keyframes scaleIn {
55-
from { opacity: 0; transform: scale(0.8); }
56-
to { opacity: 1; transform: scale(1); }
83+
from {
84+
opacity: 0;
85+
transform: scale(0.8);
86+
}
87+
88+
to {
89+
opacity: 1;
90+
transform: scale(1);
91+
}
5792
}
93+
5894
@keyframes slideUp {
59-
from { opacity: 0; transform: translateY(20px); }
60-
to { opacity: 1; transform: translateY(0); }
95+
from {
96+
opacity: 0;
97+
transform: translateY(20px);
98+
}
99+
100+
to {
101+
opacity: 1;
102+
transform: translateY(0);
103+
}
61104
}
105+
62106
@keyframes fadeIn {
63-
from { opacity: 0; }
64-
to { opacity: 1; }
107+
from {
108+
opacity: 0;
109+
}
110+
111+
to {
112+
opacity: 1;
113+
}
65114
}
115+
66116
/* Scrollbar hiding */
67117
.no-scrollbar::-webkit-scrollbar {
68118
display: none;
69119
}
120+
70121
.no-scrollbar {
71122
-ms-overflow-style: none;
72123
scrollbar-width: none;
73124
}
125+
74126
/* Custom Scrollbar for history */
75127
.custom-scrollbar::-webkit-scrollbar {
76128
width: 4px;
77129
}
130+
78131
.custom-scrollbar::-webkit-scrollbar-track {
79132
background: transparent;
80133
}
134+
81135
.custom-scrollbar::-webkit-scrollbar-thumb {
82136
background: #d6d3d1;
83137
border-radius: 4px;
84138
}
85139
</style>
86-
<script type="importmap">
140+
<script type="importmap">
87141
{
88142
"imports": {
89143
"react/": "https://aistudiocdn.com/react@^19.2.1/",
@@ -107,6 +161,7 @@
107161
}
108162
</script>
109163
</head>
164+
110165
<body class="bg-stone-50 text-stone-900 h-screen w-screen overflow-hidden">
111166
<div id="root" class="h-full w-full"></div>
112167
<script>
@@ -118,5 +173,7 @@
118173
});
119174
}
120175
</script>
176+
<script type="module" src="/index.tsx"></script>
121177
</body>
122-
</html>
178+
179+
</html>

index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import * as React from 'react';
33
import * as ReactDOM from 'react-dom/client';
44
import App from './App';
55
import { ErrorBoundary } from './components/ErrorBoundary';
6+
import './src/index.css';
67

78
const rootElement = document.getElementById('root');
89
if (!rootElement) throw new Error("Root not found");

package-lock.json

Lines changed: 68 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,26 @@
99
"preview": "vite preview"
1010
},
1111
"dependencies": {
12+
"@google/genai": "^1.32.0",
13+
"@react-three/drei": "^9.120.0",
14+
"@react-three/fiber": "^9.0.0-rc.3",
15+
"@vitejs/plugin-react": "^5.1.2",
16+
"lucide-react": "^0.559.0",
17+
"onnxruntime-web": "1.17.1",
1218
"react": "^19.2.1",
1319
"react-dom": "^19.2.1",
1420
"scheduler": "^0.23.2",
15-
"@google/genai": "^1.32.0",
16-
"lucide-react": "^0.559.0",
1721
"three": "^0.170.0",
18-
"@react-three/fiber": "^9.0.0-rc.3",
19-
"@react-three/drei": "^9.120.0",
2022
"tone": "^14.7.77",
21-
"zustand": "^5.0.3",
2223
"vite": "^7.2.7",
23-
"@vitejs/plugin-react": "^5.1.2",
24-
"onnxruntime-web": "1.17.1"
24+
"zustand": "^5.0.3"
2525
},
2626
"devDependencies": {
2727
"@types/node": "^22.14.0",
2828
"@vitejs/plugin-react": "^5.0.0",
29+
"autoprefixer": "^10.4.23",
30+
"postcss": "^8.5.6",
31+
"tailwindcss": "^4.1.18",
2932
"typescript": "~5.8.2",
3033
"vite": "^6.2.0"
3134
}

postcss.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export default {
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
},
6+
}

src/index.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;
4+
5+
/* Custom Utilities if needed */

tailwind.config.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/** @type {import('tailwindcss').Config} */
2+
export default {
3+
content: [
4+
"./index.html",
5+
"./src/**/*.{js,ts,jsx,tsx}",
6+
"./components/**/*.{js,ts,jsx,tsx}",
7+
"./views/**/*.{js,ts,jsx,tsx}",
8+
"./App.tsx",
9+
"./index.tsx"
10+
],
11+
theme: {
12+
extend: {},
13+
},
14+
plugins: [],
15+
}

vite.config.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ export default defineConfig({
66
plugins: [react()],
77
server: {
88
host: '0.0.0.0',
9-
hmr: {
10-
clientPort: 443,
11-
}
129
},
1310
// Security Note: We strictly DO NOT use 'define' for process.env.API_KEY here.
1411
// The key must be injected at runtime by the environment (window.aistudio) to prevent leaking in the build bundle.

0 commit comments

Comments
 (0)