web 기본셋팅

This commit is contained in:
2026-06-22 22:17:24 +09:00
parent a195e81dc0
commit 5e61a5de18
2081 changed files with 857581 additions and 2292 deletions
+3
View File
@@ -0,0 +1,3 @@
{
"recommendations": ["Vue.volar"]
}
+3 -71
View File
@@ -1,73 +1,5 @@
# React + TypeScript + Vite
# Vue 3 + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
Currently, two official plugins are available:
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)
## React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
## Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
```js
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Remove tseslint.configs.recommended and replace with this
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
tseslint.configs.stylisticTypeChecked,
// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
```
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
```js
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
```
Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).
-22
View File
@@ -1,22 +0,0 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'
import { defineConfig, globalIgnores } from 'eslint/config'
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
js.configs.recommended,
tseslint.configs.recommended,
reactHooks.configs.flat.recommended,
reactRefresh.configs.vite,
],
languageOptions: {
globals: globals.browser,
},
},
])
+8 -4
View File
@@ -1,13 +1,17 @@
<!doctype html>
<html lang="en">
<html lang="ko">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>frontend</title>
<title>아이일기 AI - 유치원 알림장 AI 작성 서비스</title>
<!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&family=Outfit:wght@400;500;600;700&display=swap" rel="stylesheet">
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
+235 -1737
View File
File diff suppressed because it is too large Load Diff
+6 -14
View File
@@ -5,26 +5,18 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"build": "vue-tsc -b && vite build",
"preview": "vite preview"
},
"dependencies": {
"react": "^19.2.6",
"react-dom": "^19.2.6"
"vue": "^3.5.34"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@types/node": "^24.12.3",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^6.0.1",
"eslint": "^10.3.0",
"eslint-plugin-react-hooks": "^7.1.1",
"eslint-plugin-react-refresh": "^0.5.2",
"globals": "^17.6.0",
"@vitejs/plugin-vue": "^6.0.6",
"@vue/tsconfig": "^0.9.1",
"typescript": "~6.0.2",
"typescript-eslint": "^8.59.2",
"vite": "^8.0.12"
"vite": "^8.0.12",
"vue-tsc": "^3.2.8"
}
}
-184
View File
@@ -1,184 +0,0 @@
.counter {
font-size: 16px;
padding: 5px 10px;
border-radius: 5px;
color: var(--accent);
background: var(--accent-bg);
border: 2px solid transparent;
transition: border-color 0.3s;
margin-bottom: 24px;
&:hover {
border-color: var(--accent-border);
}
&:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
}
.hero {
position: relative;
.base,
.framework,
.vite {
inset-inline: 0;
margin: 0 auto;
}
.base {
width: 170px;
position: relative;
z-index: 0;
}
.framework,
.vite {
position: absolute;
}
.framework {
z-index: 1;
top: 34px;
height: 28px;
transform: perspective(2000px) rotateZ(300deg) rotateX(44deg) rotateY(39deg)
scale(1.4);
}
.vite {
z-index: 0;
top: 107px;
height: 26px;
width: auto;
transform: perspective(2000px) rotateZ(300deg) rotateX(40deg) rotateY(39deg)
scale(0.8);
}
}
#center {
display: flex;
flex-direction: column;
gap: 25px;
place-content: center;
place-items: center;
flex-grow: 1;
@media (max-width: 1024px) {
padding: 32px 20px 24px;
gap: 18px;
}
}
#next-steps {
display: flex;
border-top: 1px solid var(--border);
text-align: left;
& > div {
flex: 1 1 0;
padding: 32px;
@media (max-width: 1024px) {
padding: 24px 20px;
}
}
.icon {
margin-bottom: 16px;
width: 22px;
height: 22px;
}
@media (max-width: 1024px) {
flex-direction: column;
text-align: center;
}
}
#docs {
border-right: 1px solid var(--border);
@media (max-width: 1024px) {
border-right: none;
border-bottom: 1px solid var(--border);
}
}
#next-steps ul {
list-style: none;
padding: 0;
display: flex;
gap: 8px;
margin: 32px 0 0;
.logo {
height: 18px;
}
a {
color: var(--text-h);
font-size: 16px;
border-radius: 6px;
background: var(--social-bg);
display: flex;
padding: 6px 12px;
align-items: center;
gap: 8px;
text-decoration: none;
transition: box-shadow 0.3s;
&:hover {
box-shadow: var(--shadow);
}
.button-icon {
height: 18px;
width: 18px;
}
}
@media (max-width: 1024px) {
margin-top: 20px;
flex-wrap: wrap;
justify-content: center;
li {
flex: 1 1 calc(50% - 8px);
}
a {
width: 100%;
justify-content: center;
box-sizing: border-box;
}
}
}
#spacer {
height: 88px;
border-top: 1px solid var(--border);
@media (max-width: 1024px) {
height: 48px;
}
}
.ticks {
position: relative;
width: 100%;
&::before,
&::after {
content: '';
position: absolute;
top: -4.5px;
border: 5px solid transparent;
}
&::before {
left: 0;
border-left-color: var(--border);
}
&::after {
right: 0;
border-right-color: var(--border);
}
}
-122
View File
@@ -1,122 +0,0 @@
import { useState } from 'react'
import reactLogo from './assets/react.svg'
import viteLogo from './assets/vite.svg'
import heroImg from './assets/hero.png'
import './App.css'
function App() {
const [count, setCount] = useState(0)
return (
<>
<section id="center">
<div className="hero">
<img src={heroImg} className="base" width="170" height="179" alt="" />
<img src={reactLogo} className="framework" alt="React logo" />
<img src={viteLogo} className="vite" alt="Vite logo" />
</div>
<div>
<h1>Get started</h1>
<p>
Edit <code>src/App.tsx</code> and save to test <code>HMR</code>
</p>
</div>
<button
type="button"
className="counter"
onClick={() => setCount((count) => count + 1)}
>
Count is {count}
</button>
</section>
<div className="ticks"></div>
<section id="next-steps">
<div id="docs">
<svg className="icon" role="presentation" aria-hidden="true">
<use href="/icons.svg#documentation-icon"></use>
</svg>
<h2>Documentation</h2>
<p>Your questions, answered</p>
<ul>
<li>
<a href="https://vite.dev/" target="_blank">
<img className="logo" src={viteLogo} alt="" />
Explore Vite
</a>
</li>
<li>
<a href="https://react.dev/" target="_blank">
<img className="button-icon" src={reactLogo} alt="" />
Learn more
</a>
</li>
</ul>
</div>
<div id="social">
<svg className="icon" role="presentation" aria-hidden="true">
<use href="/icons.svg#social-icon"></use>
</svg>
<h2>Connect with us</h2>
<p>Join the Vite community</p>
<ul>
<li>
<a href="https://github.com/vitejs/vite" target="_blank">
<svg
className="button-icon"
role="presentation"
aria-hidden="true"
>
<use href="/icons.svg#github-icon"></use>
</svg>
GitHub
</a>
</li>
<li>
<a href="https://chat.vite.dev/" target="_blank">
<svg
className="button-icon"
role="presentation"
aria-hidden="true"
>
<use href="/icons.svg#discord-icon"></use>
</svg>
Discord
</a>
</li>
<li>
<a href="https://x.com/vite_js" target="_blank">
<svg
className="button-icon"
role="presentation"
aria-hidden="true"
>
<use href="/icons.svg#x-icon"></use>
</svg>
X.com
</a>
</li>
<li>
<a href="https://bsky.app/profile/vite.dev" target="_blank">
<svg
className="button-icon"
role="presentation"
aria-hidden="true"
>
<use href="/icons.svg#bluesky-icon"></use>
</svg>
Bluesky
</a>
</li>
</ul>
</div>
</section>
<div className="ticks"></div>
<section id="spacer"></section>
</>
)
}
export default App
+288
View File
@@ -0,0 +1,288 @@
<script setup lang="ts">
import { ref, onMounted } from 'vue';
interface Diary {
id?: number;
childName: string;
originalContent: string;
generatedContent: string;
createdAt?: string;
}
// 환경 변수에서 API URL 읽기
const API_URL = import.meta.env.VITE_API_URL || 'http://localhost:4000';
// 폼 입력 상태
const childName = ref('');
const content = ref('');
const currentKeyword = ref('');
const keywords = ref<string[]>([]);
// 생성된 결과 및 통신 상태
const generatedContent = ref('');
const isGenerating = ref(false);
const isSaving = ref(false);
const errorMessage = ref('');
// 일지 히스토리 목록
const diaries = ref<Diary[]>([]);
// 추천 키워드 목록
const recommendedKeywords = ['낮잠 꿀잠', '밥 잘 먹음', '친구와 협동', '양치질 꼼꼼히', '야외 놀이 활발', '노래 율동 우수'];
// 키워드 칩 추가
const addKeyword = () => {
const trimmed = currentKeyword.value.trim();
if (trimmed && !keywords.value.includes(trimmed)) {
keywords.value.push(trimmed);
currentKeyword.value = '';
}
};
const addRecommendKeyword = (kw: string) => {
if (!keywords.value.includes(kw)) {
keywords.value.push(kw);
}
};
// 키워드 칩 삭제
const removeKeyword = (index: number) => {
keywords.value.splice(index, 1);
};
// 일지 히스토리 불러오기
const fetchDiaries = async () => {
try {
const res = await fetch(`${API_URL}/api/diary/list`);
const result = await res.json();
if (result.success) {
diaries.value = result.data;
}
} catch (error) {
console.error('일지 목록 로드 실패:', error);
}
};
// AI 일지 생성 요청
const generateDiary = async () => {
if (!content.value.trim() && keywords.value.length === 0) {
errorMessage.value = '일지 내용 또는 키워드를 작성해 주세요.';
return;
}
isGenerating.value = true;
errorMessage.value = '';
generatedContent.value = '';
try {
const res = await fetch(`${API_URL}/api/diary/generate`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
childName: childName.value,
content: content.value,
keywords: keywords.value,
}),
});
const data = await res.json();
if (res.ok) {
generatedContent.value = data.generatedContent;
} else {
errorMessage.value = data.error || 'AI 생성에 실패했습니다.';
}
} catch (error: any) {
errorMessage.value = '서버 연결에 실패했습니다. 백엔드가 구동 중인지 확인해 주세요.';
console.error(error);
} finally {
isGenerating.value = false;
}
};
// DB에 저장
const saveDiary = async () => {
if (!generatedContent.value) return;
isSaving.value = true;
try {
const res = await fetch(`${API_URL}/api/diary/save`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
childName: childName.value || '아이',
originalContent: content.value || (keywords.value.length > 0 ? `[키워드] ${keywords.value.join(', ')}` : ''),
generatedContent: generatedContent.value,
}),
});
const data = await res.json();
if (res.ok) {
alert('일지가 저장되었습니다.');
// 폼 리셋
childName.value = '';
content.value = '';
keywords.value = [];
generatedContent.value = '';
// 이력 갱신
fetchDiaries();
} else {
alert(data.error || '저장에 실패했습니다.');
}
} catch (error) {
alert('서버 저장 중 에러가 발생했습니다.');
console.error(error);
} finally {
isSaving.value = false;
}
};
// 날짜 포맷팅 함수
const formatDate = (dateStr?: string) => {
if (!dateStr) return '';
const date = new Date(dateStr);
return `${date.getFullYear()}.${String(date.getMonth() + 1).padStart(2, '0')}.${String(date.getDate()).padStart(2, '0')} ${String(date.getHours()).padStart(2, '0')}:${String(date.getMinutes()).padStart(2, '0')}`;
};
onMounted(() => {
fetchDiaries();
});
</script>
<template>
<div class="app-container">
<header>
<h1 class="title-gradient">아이일기 AI</h1>
<p class="subtitle">유치원 알림장 일지를 AI를 통해 쉽고 세련되게 작성해 보세요.</p>
</header>
<div class="main-content">
<!-- 입력 영역 -->
<section class="glass-card">
<div class="form-group">
<label for="child-name"> 아이 이름</label>
<input
id="child-name"
v-model="childName"
type="text"
placeholder="아이 이름을 입력해 주세요 (예: 민우)"
/>
</div>
<div class="form-group">
<label for="diary-keywords">🏷 오늘의 키워드</label>
<div class="keywords-container">
<span
v-for="(kw, idx) in keywords"
:key="idx"
class="keyword-chip"
@click="removeKeyword(idx)"
>
#{{ kw }}
</span>
</div>
<div class="keyword-input-wrapper">
<input
id="diary-keywords"
v-model="currentKeyword"
type="text"
placeholder="키워드를 적고 등록 버튼을 눌러주세요"
@keyup.enter="addKeyword"
/>
<button class="btn-secondary-mini" @click="addKeyword">등록</button>
</div>
<!-- 추천 키워드 -->
<div style="margin-top: 0.8rem; font-size: 0.85rem; color: #a0aec0;">
추천 키워드 클릭:
<span
v-for="kw in recommendedKeywords"
:key="kw"
style="margin-right: 0.4rem; text-decoration: underline; cursor: pointer;"
@click="addRecommendKeyword(kw)"
>
{{ kw }}
</span>
</div>
</div>
<div class="form-group">
<label for="diary-memo">📝 일지 간단 메모</label>
<textarea
id="diary-memo"
v-model="content"
rows="5"
placeholder="아이의 오늘 활동에 대한 간단한 뼈대나 메모를 적어주세요. AI가 자연스러운 문맥의 알림장으로 변환해 줍니다."
></textarea>
</div>
<button
class="btn-primary"
:disabled="isGenerating || (!content.trim() && keywords.length === 0)"
@click="generateDiary"
>
<span v-if="isGenerating" class="spinner"></span>
{{ isGenerating ? 'AI가 정성스레 일지를 작성하는 중...' : '🪄 AI로 일지 다듬기' }}
</button>
<!-- 결과 노출 영역 -->
<div v-if="generatedContent || errorMessage" class="result-section">
<div v-if="errorMessage" style="color: #e53e3e; font-weight: 500;">
{{ errorMessage }}
</div>
<div v-if="generatedContent" class="form-group" style="margin-top: 1rem;">
<label> AI 작성 결과 (수정 가능)</label>
<div class="ai-output-area">
<span class="badge-ai">AI 추천 일지</span>
<textarea
v-model="generatedContent"
rows="10"
style="background: transparent; border: none; padding: 0; box-shadow: none;"
></textarea>
</div>
<button
class="btn-success"
:disabled="isSaving"
@click="saveDiary"
>
{{ isSaving ? '저장 중...' : '💾 이 일지를 데이터베이스에 저장하기' }}
</button>
</div>
</div>
</section>
<!-- 일지 히스토리 영역 -->
<section class="glass-card history-section">
<div class="history-header">
<span>📚 일지 작성 기록</span>
<span class="history-count">{{ diaries.length }}</span>
</div>
<div v-if="diaries.length === 0" class="empty-state">
저장된 일지 내역이 없습니다.<br /> 일지를 작성하고 저장해 보세요!
</div>
<div v-else class="history-list">
<div
v-for="diary in diaries"
:key="diary.id"
class="history-card"
>
<div class="history-card-header">
<span class="child-badge">{{ diary.childName }} 어린이</span>
<span class="date-badge">{{ formatDate(diary.createdAt) }}</span>
</div>
<div class="history-original">
<strong>교사 메모:</strong> {{ diary.originalContent }}
</div>
<div class="history-generated">
{{ diary.generatedContent }}
</div>
</div>
</div>
</section>
</div>
</div>
</template>
-1
View File
@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>

Before

Width:  |  Height:  |  Size: 4.0 KiB

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>

After

Width:  |  Height:  |  Size: 496 B

+95
View File
@@ -0,0 +1,95 @@
<script setup lang="ts">
import { ref } from 'vue'
import viteLogo from '../assets/vite.svg'
import heroImg from '../assets/hero.png'
import vueLogo from '../assets/vue.svg'
const count = ref(0)
</script>
<template>
<section id="center">
<div class="hero">
<img :src="heroImg" class="base" width="170" height="179" alt="" />
<img :src="vueLogo" class="framework" alt="Vue logo" />
<img :src="viteLogo" class="vite" alt="Vite logo" />
</div>
<div>
<h1>Get started</h1>
<p>Edit <code>src/App.vue</code> and save to test <code>HMR</code></p>
</div>
<button type="button" class="counter" @click="count++">
Count is {{ count }}
</button>
</section>
<div class="ticks"></div>
<section id="next-steps">
<div id="docs">
<svg class="icon" role="presentation" aria-hidden="true">
<use href="/icons.svg#documentation-icon"></use>
</svg>
<h2>Documentation</h2>
<p>Your questions, answered</p>
<ul>
<li>
<a href="https://vite.dev/" target="_blank">
<img class="logo" :src="viteLogo" alt="" />
Explore Vite
</a>
</li>
<li>
<a href="https://vuejs.org/" target="_blank">
<img class="button-icon" :src="vueLogo" alt="" />
Learn more
</a>
</li>
</ul>
</div>
<div id="social">
<svg class="icon" role="presentation" aria-hidden="true">
<use href="/icons.svg#social-icon"></use>
</svg>
<h2>Connect with us</h2>
<p>Join the Vite community</p>
<ul>
<li>
<a href="https://github.com/vitejs/vite" target="_blank">
<svg class="button-icon" role="presentation" aria-hidden="true">
<use href="/icons.svg#github-icon"></use>
</svg>
GitHub
</a>
</li>
<li>
<a href="https://chat.vite.dev/" target="_blank">
<svg class="button-icon" role="presentation" aria-hidden="true">
<use href="/icons.svg#discord-icon"></use>
</svg>
Discord
</a>
</li>
<li>
<a href="https://x.com/vite_js" target="_blank">
<svg class="button-icon" role="presentation" aria-hidden="true">
<use href="/icons.svg#x-icon"></use>
</svg>
X.com
</a>
</li>
<li>
<a href="https://bsky.app/profile/vite.dev" target="_blank">
<svg class="button-icon" role="presentation" aria-hidden="true">
<use href="/icons.svg#bluesky-icon"></use>
</svg>
Bluesky
</a>
</li>
</ul>
</div>
</section>
<div class="ticks"></div>
<section id="spacer"></section>
</template>
-111
View File
@@ -1,111 +0,0 @@
:root {
--text: #6b6375;
--text-h: #08060d;
--bg: #fff;
--border: #e5e4e7;
--code-bg: #f4f3ec;
--accent: #aa3bff;
--accent-bg: rgba(170, 59, 255, 0.1);
--accent-border: rgba(170, 59, 255, 0.5);
--social-bg: rgba(244, 243, 236, 0.5);
--shadow:
rgba(0, 0, 0, 0.1) 0 10px 15px -3px, rgba(0, 0, 0, 0.05) 0 4px 6px -2px;
--sans: system-ui, 'Segoe UI', Roboto, sans-serif;
--heading: system-ui, 'Segoe UI', Roboto, sans-serif;
--mono: ui-monospace, Consolas, monospace;
font: 18px/145% var(--sans);
letter-spacing: 0.18px;
color-scheme: light dark;
color: var(--text);
background: var(--bg);
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
@media (max-width: 1024px) {
font-size: 16px;
}
}
@media (prefers-color-scheme: dark) {
:root {
--text: #9ca3af;
--text-h: #f3f4f6;
--bg: #16171d;
--border: #2e303a;
--code-bg: #1f2028;
--accent: #c084fc;
--accent-bg: rgba(192, 132, 252, 0.15);
--accent-border: rgba(192, 132, 252, 0.5);
--social-bg: rgba(47, 48, 58, 0.5);
--shadow:
rgba(0, 0, 0, 0.4) 0 10px 15px -3px, rgba(0, 0, 0, 0.25) 0 4px 6px -2px;
}
#social .button-icon {
filter: invert(1) brightness(2);
}
}
#root {
width: 1126px;
max-width: 100%;
margin: 0 auto;
text-align: center;
border-inline: 1px solid var(--border);
min-height: 100svh;
display: flex;
flex-direction: column;
box-sizing: border-box;
}
body {
margin: 0;
}
h1,
h2 {
font-family: var(--heading);
font-weight: 500;
color: var(--text-h);
}
h1 {
font-size: 56px;
letter-spacing: -1.68px;
margin: 32px 0;
@media (max-width: 1024px) {
font-size: 36px;
margin: 20px 0;
}
}
h2 {
font-size: 24px;
line-height: 118%;
letter-spacing: -0.24px;
margin: 0 0 8px;
@media (max-width: 1024px) {
font-size: 20px;
}
}
p {
margin: 0;
}
code,
.counter {
font-family: var(--mono);
display: inline-flex;
border-radius: 4px;
color: var(--text-h);
}
code {
font-size: 15px;
line-height: 135%;
padding: 4px 8px;
background: var(--code-bg);
}
+5
View File
@@ -0,0 +1,5 @@
import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
createApp(App).mount('#app')
-10
View File
@@ -1,10 +0,0 @@
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import './index.css'
import App from './App.tsx'
createRoot(document.getElementById('root')!).render(
<StrictMode>
<App />
</StrictMode>,
)
+400
View File
@@ -0,0 +1,400 @@
:root {
font-family: 'Noto Sans KR', 'Outfit', sans-serif;
line-height: 1.5;
font-weight: 400;
color-scheme: light dark;
color: #2d3748;
background-color: #f7fafc;
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
/* Theme variables */
--primary: #6c5ce7;
--primary-hover: #5b4bc4;
--secondary: #a8a5e6;
--bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
--card-bg: rgba(255, 255, 255, 0.85);
--border-color: rgba(226, 232, 240, 0.8);
--shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
--glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}
@media (prefers-color-scheme: dark) {
:root {
color: #e2e8f0;
background-color: #0f172a;
--primary: #818cf8;
--primary-hover: #6366f1;
--secondary: #475569;
--bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
--card-bg: rgba(30, 41, 59, 0.7);
--border-color: rgba(255, 255, 255, 0.08);
--shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
--glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
transition: background-color 0.3s, border-color 0.3s, transform 0.2s, box-shadow 0.3s;
}
body {
margin: 0;
display: flex;
place-items: center;
min-width: 320px;
min-height: 100vh;
background: var(--bg-gradient);
background-attachment: fixed;
}
#app {
max-width: 1200px;
margin: 0 auto;
padding: 2rem;
width: 100%;
}
/* Animations */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* Scrollbar */
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: rgba(108, 92, 231, 0.3);
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: rgba(108, 92, 231, 0.5);
}
/* Component styles */
.app-container {
display: flex;
flex-direction: column;
gap: 2rem;
animation: fadeIn 0.6s ease-out;
}
header {
text-align: center;
margin-bottom: 1.5rem;
}
.title-gradient {
font-size: 3rem;
font-weight: 700;
background: linear-gradient(135deg, #6c5ce7 0%, #a8a5e6 50%, #00d2d3 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
margin-bottom: 0.5rem;
font-family: 'Outfit', sans-serif;
letter-spacing: -1px;
}
.subtitle {
color: #718096;
font-size: 1.1rem;
}
.main-content {
display: grid;
grid-template-columns: 1.2fr 0.8fr;
gap: 2rem;
}
@media (max-width: 968px) {
.main-content {
grid-template-columns: 1fr;
}
}
/* Glassmorphism Card Style */
.glass-card {
background: var(--card-bg);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid var(--border-color);
border-radius: 20px;
padding: 2rem;
box-shadow: var(--glass-shadow);
}
.form-group {
margin-bottom: 1.5rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
label {
font-weight: 600;
font-size: 0.95rem;
color: var(--primary);
display: flex;
align-items: center;
gap: 0.4rem;
}
input[type="text"],
textarea {
width: 100%;
padding: 0.8rem 1rem;
border-radius: 12px;
border: 1.5px solid var(--border-color);
background: rgba(255, 255, 255, 0.5);
font-family: inherit;
font-size: 1rem;
outline: none;
}
input[type="text"]:focus,
textarea:focus {
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
background: white;
}
.keywords-container {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-bottom: 0.8rem;
}
.keyword-chip {
background: rgba(108, 92, 231, 0.1);
color: var(--primary);
border: 1px solid rgba(108, 92, 231, 0.2);
padding: 0.4rem 0.8rem;
border-radius: 20px;
font-size: 0.85rem;
cursor: pointer;
display: flex;
align-items: center;
gap: 0.3rem;
}
.keyword-chip:hover {
background: rgba(108, 92, 231, 0.2);
transform: translateY(-2px);
}
.keyword-input-wrapper {
display: flex;
gap: 0.5rem;
}
.btn-secondary-mini {
padding: 0.5rem 1rem;
border-radius: 10px;
border: none;
background: var(--primary);
color: white;
font-weight: 500;
cursor: pointer;
}
.btn-primary {
width: 100%;
padding: 1rem;
border-radius: 12px;
border: none;
background: linear-gradient(135deg, #6c5ce7 0%, #818cf8 100%);
color: white;
font-size: 1.1rem;
font-weight: 600;
cursor: pointer;
box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
display: flex;
justify-content: center;
align-items: center;
gap: 0.5rem;
}
.btn-primary:hover {
background: linear-gradient(135deg, #5b4bc4 0%, #6366f1 100%);
box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
transform: translateY(-2px);
}
.btn-primary:disabled {
background: #cbd5e1;
box-shadow: none;
transform: none;
cursor: not-allowed;
}
/* Result Area */
.result-section {
display: flex;
flex-direction: column;
gap: 1.5rem;
margin-top: 1.5rem;
animation: fadeIn 0.4s ease-out;
}
.ai-output-area {
border: 1px dashed var(--primary);
border-radius: 15px;
background: rgba(108, 92, 231, 0.03);
padding: 1.5rem;
min-height: 150px;
white-space: pre-wrap;
position: relative;
}
.badge-ai {
position: absolute;
top: -10px;
left: 15px;
background: #00d2d3;
color: white;
padding: 0.2rem 0.6rem;
border-radius: 8px;
font-size: 0.75rem;
font-weight: bold;
}
.btn-success {
background: linear-gradient(135deg, #00b894 0%, #00d2d3 100%);
color: white;
width: 100%;
padding: 1rem;
border-radius: 12px;
border: none;
font-size: 1.1rem;
font-weight: 600;
cursor: pointer;
box-shadow: 0 4px 15px rgba(0, 184, 148, 0.3);
}
.btn-success:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(0, 184, 148, 0.4);
}
/* History Side */
.history-section {
max-height: 80vh;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 1rem;
}
.history-header {
font-size: 1.3rem;
font-weight: 700;
color: var(--primary);
margin-bottom: 0.5rem;
display: flex;
align-items: center;
justify-content: space-between;
}
.history-count {
font-size: 0.85rem;
background: rgba(108, 92, 231, 0.1);
padding: 0.2rem 0.6rem;
border-radius: 10px;
color: var(--primary);
}
.history-list {
display: flex;
flex-direction: column;
gap: 1rem;
}
.history-card {
background: rgba(255, 255, 255, 0.5);
border: 1px solid var(--border-color);
border-radius: 15px;
padding: 1.2rem;
}
.history-card:hover {
background: white;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
transform: translateY(-2px);
}
.history-card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 0.8rem;
border-bottom: 1px solid var(--border-color);
padding-bottom: 0.4rem;
}
.child-badge {
font-weight: 700;
color: var(--primary);
font-size: 1rem;
}
.date-badge {
font-size: 0.8rem;
color: #a0aec0;
}
.history-original {
font-size: 0.85rem;
color: #718096;
margin-bottom: 0.6rem;
background: rgba(0, 0, 0, 0.02);
padding: 0.4rem 0.6rem;
border-radius: 8px;
}
.history-generated {
font-size: 0.9rem;
white-space: pre-wrap;
color: #2d3748;
}
/* Spinner */
.spinner {
border: 3px solid rgba(255, 255, 255, 0.3);
border-radius: 50%;
border-top: 3px solid white;
width: 20px;
height: 20px;
animation: spin 1s linear infinite;
display: inline-block;
margin-right: 0.5rem;
}
.empty-state {
text-align: center;
color: #a0aec0;
padding: 3rem 1rem;
}
+2 -13
View File
@@ -1,19 +1,8 @@
{
"extends": "@vue/tsconfig/tsconfig.dom.json",
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"target": "es2023",
"lib": ["ES2023", "DOM"],
"module": "esnext",
"types": ["vite/client"],
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"moduleDetection": "force",
"noEmit": true,
"jsx": "react-jsx",
/* Linting */
"noUnusedLocals": true,
@@ -21,5 +10,5 @@
"erasableSyntaxOnly": true,
"noFallthroughCasesInSwitch": true
},
"include": ["src"]
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"]
}
+2 -2
View File
@@ -1,7 +1,7 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import vue from '@vitejs/plugin-vue'
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
plugins: [vue()],
})