This commit is contained in:
Sergey Krylov 2025-02-04 06:18:29 +03:00
parent 30105d32ec
commit ecbe521bc1
15 changed files with 2410 additions and 24 deletions

44
.gitignore vendored
View File

@ -1,32 +1,28 @@
node_modules/
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
.env
.env.local
.env.development
.env.test
.env.production
dist/
build/
out/
.next/
.nuxt/
.cache/
.turbo/
.idea/
.vscode/
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?
.DS_Store
Thumbs.db
package-lock.json
yarn.lock
pnpm-lock.yaml
coverage/
.nyc_output/
docs/
.yarn/*
!.yarn/releases
!.yarn/plugins
.pnp.*

BIN
.yarn/install-state.gz Normal file

Binary file not shown.

5
README.md Normal file
View File

@ -0,0 +1,5 @@
# Vue 3 + TypeScript + Vite
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.
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).

13
index.html Normal file
View File

@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Vue + TS</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>

21
package.json Normal file
View File

@ -0,0 +1,21 @@
{
"name": "vladilen-vue",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vue-tsc -b && vite build",
"preview": "vite preview"
},
"dependencies": {
"vue": "^3.5.13"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.2.1",
"@vue/tsconfig": "^0.7.0",
"typescript": "~5.6.2",
"vite": "^6.0.5",
"vue-tsc": "^2.2.0"
}
}

1
public/vite.svg Normal file
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="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

11
src/App.vue Normal file
View File

@ -0,0 +1,11 @@
<script setup lang="ts">
</script>
<template>
<div>
<h1>Init</h1>
</div>
</template>
<style scoped>
</style>

5
src/main.ts Normal file
View File

@ -0,0 +1,5 @@
import { createApp } from 'vue'
import './style.css';
import App from './App.vue'
createApp(App).mount('#app')

523
src/style.css Normal file
View File

@ -0,0 +1,523 @@
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');
* {
box-sizing: border-box;
}
body {
font-family: Inter, Roboto, Oxygen, Fira Sans, Helvetica Neue, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-size: 16px;
color: #2c3e50;
background: #2c3e50;
}
hr {
margin: 1rem 0;
}
strong,
.bold {
font-weight: 500;
}
ol,
p,
ul {
line-height: 1.7;
}
a {
color: #3eaf7c;
font-weight: 500;
text-decoration: none;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: 500;
line-height: 1.45;
}
h1 {
font-size: 2.2rem;
font-weight: 600;
}
h2 {
font-size: 1.65rem;
padding-bottom: 0.3rem;
border-bottom: 1px solid #eaecef;
}
h3 {
font-size: 1.35rem;
}
/*.primary {*/
/* color: #42b983;*/
/*}*/
/*.danger {*/
/* color: #e53935;*/
/*}*/
.btn {
color: #42b983;
position: relative;
place-content: center;
place-items: center;
width: fit-content;
border-radius: 99px;
letter-spacing: 0.05em;
border: 1px solid #42b983;
text-decoration: none;
text-transform: uppercase;
margin-right: 10px;
padding: 0.5rem 1.5rem;
white-space: nowrap;
font-weight: 700;
outline: none;
background: #fff;
transition: all 0.22s;
}
.btn:hover {
cursor: pointer;
opacity: 0.8;
}
.btn:disabled {
cursor: not-allowed;
opacity: 1!important;
background: #eee!important;
border-color: #ddd!important;
color: #999!important;
}
.btn:active {
box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.3);
}
.btn.primary {
background: #42b983;
color: #fff;
}
.btn.danger {
background: #e53935;
color: #fff;
border-color: #e53935;
}
.btn.warning {
background: #c25205;
color: #fff;
border-color: #c25205;
}
.container {
margin: 0 auto;
max-width: 1000px;
}
.container.with-nav {
margin-top: 70px;
}
.pt-2 {
padding-top: 2rem;
}
.pt-1 {
padding-top: 1rem;
}
.pt-5 {
padding-top: 5rem;
}
.form-control {
position: relative;
margin-bottom: 0.5rem;
}
.form-control input,
.form-control select,
.form-control textarea{
font-family: Inter, Roboto, Oxygen, Fira Sans, Helvetica Neue, sans-serif;
margin: 0;
outline: none;
border: 2px solid #ccc;
display: block;
width: 100%;
color: #2c3e50;
padding: 0.5rem 1.5rem;
border-radius: 3px;
font-size: 1rem;
resize: none;
}
.form-control small {
color: #e53935;
}
.form-control.invalid input {
border-color: #e53935;
}
.form-checkbox {
margin-bottom: 1rem;
}
.form-checkbox .label {
display: block;
margin: 0 0 0.3rem 0.3rem;
font-weight: 500;
}
.form-checkbox .checkbox input {
margin-right: 1rem;
}
.form-control label {
display: block;
margin: 0 0 0.3rem 0.3rem;
font-weight: 500;
}
.form-control input:active,
.form-control input:focus {
transition: border 0.22s;
border: 2px solid #42b983;
}
.card {
overflow: hidden;
padding: 1rem;
margin-bottom: 1rem;
border-radius: 10px;
box-shadow: 2px 3px 10px rgba(0, 0, 0, 0.2);
background: #fff;
}
.card.marked {
border: 4px solid #42b983;
}
.card.center {
display: flex;
flex-direction: column;
align-items: center;
}
.list {
margin: 0;
padding: 0;
list-style: none;
}
.list-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.5rem 0;
transition: .22s all;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.list-item:hover {
background: #eee;
}
.alert {
padding: 1rem 1.5rem;
border-left-width: .5rem;
border-left-style: solid;
margin: 1rem 0;
position: relative;
border-bottom-right-radius: 2px;
border-top-right-radius: 2px;
}
.alert.primary {
border-color: #42b983;
background-color: #f8f8f8;
}
.alert.danger {
border-color: #e53935;
background-color: #f8f8f8;
}
.alert.warning {
border-color: #c25205;
background-color: #f8f8f8;
}
.alert p {
color: #222;
line-height: 1.7;
}
.alert-title {
text-transform: uppercase;
font-weight: 600;
margin-bottom: -.4rem;
color: #222;
}
.alert-close {
position: absolute;
top: 10px;
right: 10px;
font-size: 1.5rem;
cursor: pointer;
}
.modal {
position: fixed;
top: 60px;
width: 600px;
padding: 1rem;
background: #fff;
z-index: 1000;
left: 50%;
border-radius: 10px;
transform: translateX(-50%);
box-shadow: 2px 3px 10px rgba(0, 0, 0, 0.2);
}
.modal-backdrop {
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
background: rgba(0, 0, 0, .35);
z-index: 100;
}
.loader {
font-size: 10px;
margin: 50px auto;
text-indent: -9999em;
width: 11em;
height: 11em;
border-radius: 50%;
background: #ffffff;
background: -moz-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
background: -webkit-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
background: -o-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
background: -ms-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
background: linear-gradient(to right, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
position: relative;
-webkit-animation: load3 1.4s infinite linear;
animation: load3 1.4s infinite linear;
-webkit-transform: translateZ(0);
-ms-transform: translateZ(0);
transform: translateZ(0);
}
.loader:before {
width: 50%;
height: 50%;
background: #ffffff;
border-radius: 100% 0 0 0;
position: absolute;
top: 0;
left: 0;
content: '';
}
.loader:after {
background: #2c3e50;
width: 75%;
height: 75%;
border-radius: 50%;
content: '';
margin: auto;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
@-webkit-keyframes load3 {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes load3 {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
.navbar {
display: flex;
padding: 0 2rem;
justify-content: space-between;
align-items: center;
position: fixed;
z-index: 20;
top: 0;
left: 0;
right: 0;
height: 56px;
background-color: #fff;
box-sizing: border-box;
border-bottom: 1px solid #eaecef;
}
.navbar-menu {
list-style: none;
display: flex;
}
.navbar-menu li {
margin-right: 2rem;
}
.navbar-menu li a {
color: #2c3e50;
text-decoration: none;
}
.navbar-menu li a:hover, .navbar-menu li a.active {
border-bottom: 2px solid #3eaf7c;
}
.card-title {
display: flex;
justify-content: space-between;
align-items: center;
}
.badge {
font-size: 0.8rem;
border: 1px solid #eee;
border-radius: 15px;
padding: 0 .5rem;
}
.badge.primary {
border-color: #3eaf7c;
color: #3eaf7c;
}
.badge.danger {
border-color: #e53935;
color: #e53935;
}
.badge.warning {
border-color: #c25205;
color: #c25205;
}
.text-white {
color: #fff;
}
.text-danger {
color: #e53935;
}
.text-center {
text-align: center;
}
.table {
width: 100%;
border-collapse: collapse;
}
.table th {
padding: .5rem 1rem;
}
.table td {
padding: .5rem 1rem;
}
.table tbody td {
text-align: center;
}
.table tbody tr:hover {
background: #eee;
}
.breadcrumbs {
margin-bottom: .5rem;
}
.filter {
display: flex;
align-items: center;
margin-bottom: 1rem;
}
.filter > div {
margin-right: 2rem;
width: 30%;
margin-bottom: 0;
}
.sidebar {
position: fixed;
width: 300px;
right: 0;
top: 0;
bottom: 0;
background: #ccc;
z-index: 100;
padding: .5rem;
}
.sidebar-close {
position: absolute;
top: 10px;
right: 20px;
font-size: 2rem;
cursor: pointer;
}
.sidebar-content {
margin-top: 50px;
}
.question {
padding: 1rem;
margin-bottom: 1rem;
border-radius: 4px;
}
.question:hover {
cursor: pointer;
background: #eee;
}
.question-title {
font-weight: bold;
}

1
src/vite-env.d.ts vendored Normal file
View File

@ -0,0 +1 @@
/// <reference types="vite/client" />

14
tsconfig.app.json Normal file
View File

@ -0,0 +1,14 @@
{
"extends": "@vue/tsconfig/tsconfig.dom.json",
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
},
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"]
}

7
tsconfig.json Normal file
View File

@ -0,0 +1,7 @@
{
"files": [],
"references": [
{ "path": "./tsconfig.app.json" },
{ "path": "./tsconfig.node.json" }
]
}

24
tsconfig.node.json Normal file
View File

@ -0,0 +1,24 @@
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"target": "ES2022",
"lib": ["ES2023"],
"module": "ESNext",
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
},
"include": ["vite.config.ts"]
}

7
vite.config.ts Normal file
View File

@ -0,0 +1,7 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
// https://vite.dev/config/
export default defineConfig({
plugins: [vue()],
})

1758
yarn.lock Normal file

File diff suppressed because it is too large Load Diff