From 3834a33ebe2e9fa65b5a84cc701dde390bc8b151 Mon Sep 17 00:00:00 2001 From: yunaimatsu Date: Sat, 1 Feb 2025 09:11:57 +0900 Subject: [PATCH] Set up Vue --- .gitignore | 24 +++++++++++ .vscode/extensions.json | 3 ++ README.md | 51 ++-------------------- bun.lockb | Bin 0 -> 30651 bytes index.html | 13 ++++++ package.json | 19 +++++++++ public/vite.svg | 1 + src/App.vue | 30 +++++++++++++ src/assets/vue.svg | 1 + src/components/Footer.vue | 6 +++ src/components/Header.vue | 55 ++++++++++++++++++++++++ src/components/SearchBtn.vue | 35 ++++++++++++++++ src/main.js | 10 +++++ src/router/index.js | 25 +++++++++++ src/style.css | 79 +++++++++++++++++++++++++++++++++++ src/web/html-css.vue | 8 ++++ vite.config.js | 7 ++++ 17 files changed, 319 insertions(+), 48 deletions(-) create mode 100644 .gitignore create mode 100644 .vscode/extensions.json create mode 100755 bun.lockb create mode 100644 index.html create mode 100644 package.json create mode 100644 public/vite.svg create mode 100644 src/App.vue create mode 100644 src/assets/vue.svg create mode 100644 src/components/Footer.vue create mode 100644 src/components/Header.vue create mode 100644 src/components/SearchBtn.vue create mode 100644 src/main.js create mode 100644 src/router/index.js create mode 100644 src/style.css create mode 100644 src/web/html-css.vue create mode 100644 vite.config.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..a7cea0b --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["Vue.volar"] +} diff --git a/README.md b/README.md index 923f36f..1511959 100644 --- a/README.md +++ b/README.md @@ -1,50 +1,5 @@ -# syllabus +# Vue 3 + Vite -## Requirements -### 1. ダッシュボード -- 知識のインプット -- 問題の投稿 - - 問題の誤り等へのFB -- 知識のアウトプット(正誤判定) -### 2. 問題投稿画面 -#### 一問一答 -- 問題文と解答を入力する -#### コード -- インプットとアウトプットのペアを作成 -### 3. 問題演習画面 -- 問題文 -- FB(誤り指摘)入力ボタン -- 解答入力 -- 飛ばした問題を後からやる -- 飛ばす -- 解答をやめる -- 最初からやり直す +This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 ` + + diff --git a/package.json b/package.json new file mode 100644 index 0000000..eaad9c6 --- /dev/null +++ b/package.json @@ -0,0 +1,19 @@ +{ + "name": "syllabus-front", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview" + }, + "dependencies": { + "vue": "^3.5.13", + "vue-router": "^4.5.0" + }, + "devDependencies": { + "@vitejs/plugin-vue": "^5.2.1", + "vite": "^6.0.11" + } +} diff --git a/public/vite.svg b/public/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..d4ec262 --- /dev/null +++ b/src/App.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/src/assets/vue.svg b/src/assets/vue.svg new file mode 100644 index 0000000..770e9d3 --- /dev/null +++ b/src/assets/vue.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/Footer.vue b/src/components/Footer.vue new file mode 100644 index 0000000..970b53f --- /dev/null +++ b/src/components/Footer.vue @@ -0,0 +1,6 @@ + + \ No newline at end of file diff --git a/src/components/Header.vue b/src/components/Header.vue new file mode 100644 index 0000000..ed183b7 --- /dev/null +++ b/src/components/Header.vue @@ -0,0 +1,55 @@ + + \ No newline at end of file diff --git a/src/components/SearchBtn.vue b/src/components/SearchBtn.vue new file mode 100644 index 0000000..b2fff80 --- /dev/null +++ b/src/components/SearchBtn.vue @@ -0,0 +1,35 @@ + + + + + \ No newline at end of file diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..6ce9f84 --- /dev/null +++ b/src/main.js @@ -0,0 +1,10 @@ +import { createApp } from 'vue' +import './style.css' +import App from './App.vue' +import router from './router'; + +createApp(App).mount('#app') +const app = createApp(App); + +app.use(router); // Use the router +app.mount('#app'); \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js new file mode 100644 index 0000000..2b65854 --- /dev/null +++ b/src/router/index.js @@ -0,0 +1,25 @@ +// src/router/index.js + +import { createRouter, createWebHistory } from 'vue-router'; +// import HomeView from '../views/HomeView.vue'; +import AboutView from '../views/AboutView.vue'; + +const routes = [ + { + path: '/', + name: 'Home', + // component: HomeView, + }, + { + path: '/about', + name: 'About', + // component: AboutView, + }, +]; + +const router = createRouter({ + history: createWebHistory(), + routes, +}); + +export default router; \ No newline at end of file diff --git a/src/style.css b/src/style.css new file mode 100644 index 0000000..bb131d6 --- /dev/null +++ b/src/style.css @@ -0,0 +1,79 @@ +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +.card { + padding: 2em; +} + +#app { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} diff --git a/src/web/html-css.vue b/src/web/html-css.vue new file mode 100644 index 0000000..f538464 --- /dev/null +++ b/src/web/html-css.vue @@ -0,0 +1,8 @@ + + \ No newline at end of file diff --git a/vite.config.js b/vite.config.js new file mode 100644 index 0000000..bbcf80c --- /dev/null +++ b/vite.config.js @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' + +// https://vite.dev/config/ +export default defineConfig({ + plugins: [vue()], +})