bregsiaju преди 8 месеца
ревизия
da621003d8
променени са 16 файла, в които са добавени 4666 реда и са изтрити 0 реда
  1. 14
    0
      .eslintrc.cjs
  2. 28
    0
      .gitignore
  3. 8
    0
      .prettierrc.json
  4. 8
    0
      .vscode/extensions.json
  5. 35
    0
      README.md
  6. 13
    0
      index.html
  7. 4383
    0
      package-lock.json
  8. 25
    0
      package.json
  9. Двоични данни
      public/favicon.ico
  10. 71
    0
      src/App.vue
  11. 1
    0
      src/assets/logo.svg
  12. 33
    0
      src/assets/main.css
  13. 11
    0
      src/main.js
  14. 15
    0
      src/router/index.js
  15. 5
    0
      src/views/HomeView.vue
  16. 16
    0
      vite.config.js

+ 14
- 0
.eslintrc.cjs Целия файл

@@ -0,0 +1,14 @@
1
+/* eslint-env node */
2
+require('@rushstack/eslint-patch/modern-module-resolution')
3
+
4
+module.exports = {
5
+  root: true,
6
+  'extends': [
7
+    'plugin:vue/vue3-essential',
8
+    'eslint:recommended',
9
+    '@vue/eslint-config-prettier/skip-formatting'
10
+  ],
11
+  parserOptions: {
12
+    ecmaVersion: 'latest'
13
+  }
14
+}

+ 28
- 0
.gitignore Целия файл

@@ -0,0 +1,28 @@
1
+# Logs
2
+logs
3
+*.log
4
+npm-debug.log*
5
+yarn-debug.log*
6
+yarn-error.log*
7
+pnpm-debug.log*
8
+lerna-debug.log*
9
+
10
+node_modules
11
+.DS_Store
12
+dist
13
+dist-ssr
14
+coverage
15
+*.local
16
+
17
+/cypress/videos/
18
+/cypress/screenshots/
19
+
20
+# Editor directories and files
21
+.vscode/*
22
+!.vscode/extensions.json
23
+.idea
24
+*.suo
25
+*.ntvs*
26
+*.njsproj
27
+*.sln
28
+*.sw?

+ 8
- 0
.prettierrc.json Целия файл

@@ -0,0 +1,8 @@
1
+{
2
+  "$schema": "https://json.schemastore.org/prettierrc",
3
+  "semi": false,
4
+  "tabWidth": 2,
5
+  "singleQuote": true,
6
+  "printWidth": 100,
7
+  "trailingComma": "none"
8
+}

+ 8
- 0
.vscode/extensions.json Целия файл

@@ -0,0 +1,8 @@
1
+{
2
+  "recommendations": [
3
+    "Vue.volar",
4
+    "Vue.vscode-typescript-vue-plugin",
5
+    "dbaeumer.vscode-eslint",
6
+    "esbenp.prettier-vscode"
7
+  ]
8
+}

+ 35
- 0
README.md Целия файл

@@ -0,0 +1,35 @@
1
+# post-vue
2
+
3
+This template should help get you started developing with Vue 3 in Vite.
4
+
5
+## Recommended IDE Setup
6
+
7
+[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
8
+
9
+## Customize configuration
10
+
11
+See [Vite Configuration Reference](https://vitejs.dev/config/).
12
+
13
+## Project Setup
14
+
15
+```sh
16
+npm install
17
+```
18
+
19
+### Compile and Hot-Reload for Development
20
+
21
+```sh
22
+npm run dev
23
+```
24
+
25
+### Compile and Minify for Production
26
+
27
+```sh
28
+npm run build
29
+```
30
+
31
+### Lint with [ESLint](https://eslint.org/)
32
+
33
+```sh
34
+npm run lint
35
+```

+ 13
- 0
index.html Целия файл

@@ -0,0 +1,13 @@
1
+<!DOCTYPE html>
2
+<html lang="en">
3
+  <head>
4
+    <meta charset="UTF-8">
5
+    <link rel="icon" href="/favicon.ico">
6
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+    <title>Vite App</title>
8
+  </head>
9
+  <body>
10
+    <div id="app"></div>
11
+    <script type="module" src="/src/main.js"></script>
12
+  </body>
13
+</html>

+ 4383
- 0
package-lock.json
Файловите разлики са ограничени, защото са твърде много
Целия файл


+ 25
- 0
package.json Целия файл

@@ -0,0 +1,25 @@
1
+{
2
+  "name": "post-vue",
3
+  "version": "0.0.0",
4
+  "private": true,
5
+  "scripts": {
6
+    "dev": "vite",
7
+    "build": "vite build",
8
+    "preview": "vite preview",
9
+    "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore",
10
+    "format": "prettier --write src/"
11
+  },
12
+  "dependencies": {
13
+    "vue": "^3.3.4",
14
+    "vue-router": "^4.2.4"
15
+  },
16
+  "devDependencies": {
17
+    "@rushstack/eslint-patch": "^1.3.2",
18
+    "@vitejs/plugin-vue": "^4.3.1",
19
+    "@vue/eslint-config-prettier": "^8.0.0",
20
+    "eslint": "^8.46.0",
21
+    "eslint-plugin-vue": "^9.16.1",
22
+    "prettier": "^3.0.0",
23
+    "vite": "^4.4.9"
24
+  }
25
+}

Двоични данни
public/favicon.ico Целия файл


+ 71
- 0
src/App.vue Целия файл

@@ -0,0 +1,71 @@
1
+<script setup>
2
+import { RouterView } from 'vue-router'
3
+</script>
4
+
5
+<template>
6
+  <RouterView />
7
+</template>
8
+
9
+<style scoped>
10
+header {
11
+  line-height: 1.5;
12
+  max-height: 100vh;
13
+}
14
+
15
+.logo {
16
+  display: block;
17
+  margin: 0 auto 2rem;
18
+}
19
+
20
+nav {
21
+  width: 100%;
22
+  font-size: 12px;
23
+  text-align: center;
24
+  margin-top: 2rem;
25
+}
26
+
27
+nav a.router-link-exact-active {
28
+  color: var(--color-text);
29
+}
30
+
31
+nav a.router-link-exact-active:hover {
32
+  background-color: transparent;
33
+}
34
+
35
+nav a {
36
+  display: inline-block;
37
+  padding: 0 1rem;
38
+  border-left: 1px solid var(--color-border);
39
+}
40
+
41
+nav a:first-of-type {
42
+  border: 0;
43
+}
44
+
45
+@media (min-width: 1024px) {
46
+  header {
47
+    display: flex;
48
+    place-items: center;
49
+    padding-right: calc(var(--section-gap) / 2);
50
+  }
51
+
52
+  .logo {
53
+    margin: 0 2rem 0 0;
54
+  }
55
+
56
+  header .wrapper {
57
+    display: flex;
58
+    place-items: flex-start;
59
+    flex-wrap: wrap;
60
+  }
61
+
62
+  nav {
63
+    text-align: left;
64
+    margin-left: -1rem;
65
+    font-size: 1rem;
66
+
67
+    padding: 1rem 0;
68
+    margin-top: 1rem;
69
+  }
70
+}
71
+</style>

+ 1
- 0
src/assets/logo.svg Целия файл

@@ -0,0 +1 @@
1
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 261.76 226.69"><path d="M161.096.001l-30.225 52.351L100.647.001H-.005l130.877 226.688L261.749.001z" fill="#41b883"/><path d="M161.096.001l-30.225 52.351L100.647.001H52.346l78.526 136.01L209.398.001z" fill="#34495e"/></svg>

+ 33
- 0
src/assets/main.css Целия файл

@@ -0,0 +1,33 @@
1
+#app {
2
+  max-width: 1280px;
3
+  margin: 0 auto;
4
+  padding: 2rem;
5
+
6
+  font-weight: normal;
7
+}
8
+
9
+a,
10
+.green {
11
+  text-decoration: none;
12
+  color: hsla(160, 100%, 37%, 1);
13
+  transition: 0.4s;
14
+}
15
+
16
+@media (hover: hover) {
17
+  a:hover {
18
+    background-color: hsla(160, 100%, 37%, 0.2);
19
+  }
20
+}
21
+
22
+@media (min-width: 1024px) {
23
+  body {
24
+    display: flex;
25
+    place-items: center;
26
+  }
27
+
28
+  #app {
29
+    display: grid;
30
+    grid-template-columns: 1fr 1fr;
31
+    padding: 0 2rem;
32
+  }
33
+}

+ 11
- 0
src/main.js Целия файл

@@ -0,0 +1,11 @@
1
+import './assets/main.css'
2
+
3
+import { createApp } from 'vue'
4
+import App from './App.vue'
5
+import router from './router'
6
+
7
+const app = createApp(App)
8
+
9
+app.use(router)
10
+
11
+app.mount('#app')

+ 15
- 0
src/router/index.js Целия файл

@@ -0,0 +1,15 @@
1
+import { createRouter, createWebHistory } from 'vue-router'
2
+import HomeView from '../views/HomeView.vue'
3
+
4
+const router = createRouter({
5
+  history: createWebHistory(import.meta.env.BASE_URL),
6
+  routes: [
7
+    {
8
+      path: '/',
9
+      name: 'home',
10
+      component: HomeView
11
+    }
12
+  ]
13
+})
14
+
15
+export default router

+ 5
- 0
src/views/HomeView.vue Целия файл

@@ -0,0 +1,5 @@
1
+<template>
2
+  <main>
3
+    <h1>Hai</h1>
4
+  </main>
5
+</template>

+ 16
- 0
vite.config.js Целия файл

@@ -0,0 +1,16 @@
1
+import { fileURLToPath, URL } from 'node:url'
2
+
3
+import { defineConfig } from 'vite'
4
+import vue from '@vitejs/plugin-vue'
5
+
6
+// https://vitejs.dev/config/
7
+export default defineConfig({
8
+  plugins: [
9
+    vue(),
10
+  ],
11
+  resolve: {
12
+    alias: {
13
+      '@': fileURLToPath(new URL('./src', import.meta.url))
14
+    }
15
+  }
16
+})

Loading…
Отказ
Запис