diff --git a/front/components.d.ts b/front/components.d.ts index 621d833..b9a0be7 100644 --- a/front/components.d.ts +++ b/front/components.d.ts @@ -7,6 +7,7 @@ export {} declare module 'vue' { export interface GlobalComponents { + Home: typeof import('./src/components/Home.vue')['default'] IMdi3dRotation: typeof import('~icons/mdi/3d-rotation')['default'] IMdiCard: typeof import('~icons/mdi/card')['default'] IMdiClarify: typeof import('~icons/mdi/clarify')['default'] @@ -14,6 +15,7 @@ declare module 'vue' { IMdiIcon: typeof import('~icons/mdi/icon')['default'] IMdiPrinter: typeof import('~icons/mdi/printer')['default'] IMdiVideo3d: typeof import('~icons/mdi/video3d')['default'] + Projects: typeof import('./src/components/Projects.vue')['default'] RandomIcon: typeof import('./src/components/RandomIcon.vue')['default'] } } diff --git a/front/package-lock.json b/front/package-lock.json index bdde0be..7cf9567 100644 --- a/front/package-lock.json +++ b/front/package-lock.json @@ -13,7 +13,8 @@ "pinia": "^2.1.7", "reset-css": "^5.0.2", "vue": "^3.4.21", - "vue-3d-model": "^2.0.0-alpha.4" + "vue-3d-model": "^2.0.0-alpha.4", + "vue-router": "^4.3.2" }, "devDependencies": { "@iconify-json/mdi": "^1.1.66", @@ -2284,6 +2285,20 @@ "vue": ">=3.0.0" } }, + "node_modules/vue-router": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.3.2.tgz", + "integrity": "sha512-hKQJ1vDAZ5LVkKEnHhmm1f9pMiWIBNGF5AwU67PdH7TyXCj/a4hTccuUuYCAMgJK6rO/NVYtQIEN3yL8CECa7Q==", + "dependencies": { + "@vue/devtools-api": "^6.5.1" + }, + "funding": { + "url": "https://github.com/sponsors/posva" + }, + "peerDependencies": { + "vue": "^3.2.0" + } + }, "node_modules/vue-template-compiler": { "version": "2.7.16", "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.7.16.tgz", diff --git a/front/package.json b/front/package.json index 0ba03f2..dbc1586 100644 --- a/front/package.json +++ b/front/package.json @@ -14,7 +14,8 @@ "pinia": "^2.1.7", "reset-css": "^5.0.2", "vue": "^3.4.21", - "vue-3d-model": "^2.0.0-alpha.4" + "vue-3d-model": "^2.0.0-alpha.4", + "vue-router": "^4.3.2" }, "devDependencies": { "@iconify-json/mdi": "^1.1.66", diff --git a/front/src/App.vue b/front/src/App.vue index e1b70af..8700889 100644 --- a/front/src/App.vue +++ b/front/src/App.vue @@ -1,129 +1,7 @@ - - - - - - - {{ item.title }} - - - - - Проекты Кустарщины - - - - - - {{ state.active_product.description }} - - - - - - - - - { state.show_fireworks = !state.show_fireworks }" /> - - - + \ No newline at end of file diff --git a/front/src/assets/grid.scss b/front/src/assets/grid.scss new file mode 100644 index 0000000..2e07a5b --- /dev/null +++ b/front/src/assets/grid.scss @@ -0,0 +1,27 @@ +@import '../../node_modules/reset-css/sass/reset'; + +.container { + display: grid; + grid-template-columns: 25vw 1fr; + grid-template-rows: 15vh 1fr; + gap: 0px 0px; + grid-template-areas: + "header header" + "sidebar content"; + + min-height: 100vh; + padding: 0 2rem; +} + +.sidebar { + grid-area: sidebar; +} + +.header { + grid-area: header; + +} + +.main { + grid-area: content; +} \ No newline at end of file diff --git a/front/src/assets/home.scss b/front/src/assets/home.scss new file mode 100644 index 0000000..62e39fa --- /dev/null +++ b/front/src/assets/home.scss @@ -0,0 +1,36 @@ +@font-face { + font-family: 'open-sans'; + src: url('../fonts/open-sans.ttf'); +} + +$accentColor: rgb(126, 126, 223); + +.container { + font-family: 'open-sans'; +} +.header { + display: flex; + justify-content: center; + font-size: 6rem; + font-weight: 800; +} + +.main { + ul { + font-size: 4rem; + + li { + padding: 2rem; + } + + a { + text-decoration: none; + color: initial; + + &:hover, + &:active { + color: $accentColor; + } + } + } +} \ No newline at end of file diff --git a/front/src/assets/main.scss b/front/src/assets/main.scss index 8249b15..0a2fed2 100644 --- a/front/src/assets/main.scss +++ b/front/src/assets/main.scss @@ -1,136 +1 @@ -@import '../../node_modules/reset-css/sass/reset'; - -$blackColor: #181818; -$accentColor: #ef570c; -$redColor: #f83300; - - -@font-face { - font-family: 'logo'; - src: url('../fonts/logo.ttf'); -} - -@font-face { - font-family: 'main'; - src: url('../fonts/main.otf'); -} - -body { - font-family: 'main'; - background: linear-gradient(to bottom, rgba(255, 255, 255, 0.15) 0%, rgba(0, 0, 0, 0.15) 100%), radial-gradient(at top center, rgba(255, 255, 255, 0.40) 0%, rgba(0, 0, 0, 0.40) 120%) $blackColor; - background-blend-mode: multiply, multiply; - color: #fff; - user-select: none; -} - -.container { - display: grid; - grid-template-columns: 25vw 1fr; - grid-template-rows: 15vh 1fr; - gap: 0px 0px; - grid-template-areas: - "header header" - "sidebar content"; - - min-height: 100vh; - padding: 0 2rem; -} - -.sidebar { - grid-area: sidebar; -} - -.header { - grid-area: header; - justify-content: center; - -} - -.main { - grid-area: content; -} - -.main, -.header, -.sidebar { - display: flex; - align-items: center; -} - -.menu { - padding: 1rem; - display: flex; - flex-direction: column; - gap: 1rem; - font-size: 2.5rem; - - li { - padding: 0.5rem 0; - - a { - text-decoration: none; - - &, - &:hover, - &:active, - &:visited { - color: $accentColor; - } - } - } -} - -.model { - max-width: 33vw; -} - -.product { - gap: 1rem; - position: relative; - - &-image { - flex-basis: 50%; - flex-shrink: 0; - } - - &-description { - font-size: 1.75rem; - line-height: 1.4; - } - - &-model { - max-height: 80%; - - &-icon { - position: absolute; - font-size: 4rem; - right: 0; - top: 0; - color: $accentColor; - z-index: 2; - } - } - -} - -.logo { - &-header { - font-family: 'logo'; - font-size: 4rem; - padding: 1rem; - - background: linear-gradient(45deg, $redColor, $accentColor); - background-clip: text; - -webkit-text-fill-color: transparent; - } - - &-img { - width: 54%; - display: block; - margin: auto; - } -} - -img { - max-width: 100%; -} \ No newline at end of file +@import 'grid.scss'; diff --git a/front/src/assets/projects.scss b/front/src/assets/projects.scss new file mode 100644 index 0000000..493cd98 --- /dev/null +++ b/front/src/assets/projects.scss @@ -0,0 +1,110 @@ + +$blackColor: #181818; +$accentColor: #ef570c; +$redColor: #f83300; + +@font-face { + font-family: 'logo'; + src: url('../fonts/logo.ttf'); +} + +@font-face { + font-family: 'main'; + src: url('../fonts/main.otf'); +} + +.container { + font-family: 'main'; + background: linear-gradient(to bottom, rgba(255, 255, 255, 0.15) 0%, rgba(0, 0, 0, 0.15) 100%), radial-gradient(at top center, rgba(255, 255, 255, 0.40) 0%, rgba(0, 0, 0, 0.40) 120%) $blackColor; + background-blend-mode: multiply, multiply; + color: #fff; + user-select: none; +} + +.header { + justify-content: center; +} +.main, +.header, +.sidebar { + display: flex; + align-items: center; +} + +.menu { + padding: 1rem; + display: flex; + flex-direction: column; + gap: 1rem; + font-size: 2.5rem; + + li { + padding: 0.5rem 0; + + a { + text-decoration: none; + + &, + &:hover, + &:active, + &:visited { + color: $accentColor; + } + } + } +} + +.model { + max-width: 33vw; +} + +.product { + gap: 1rem; + position: relative; + + &-image { + flex-basis: 50%; + flex-shrink: 0; + } + + &-description { + font-size: 1.75rem; + line-height: 1.4; + } + + &-model { + max-height: 80%; + + &-icon { + position: absolute; + font-size: 4rem; + right: 0; + top: 0; + color: $accentColor; + z-index: 2; + } + } + +} + +.logo { + &-header { + font-family: 'logo'; + font-size: 4rem; + padding: 1rem; + + background: linear-gradient(45deg, $redColor, $accentColor); + background-clip: text; + -webkit-text-fill-color: transparent; + } + + &-img { + width: 54%; + display: block; + margin: auto; + } +} + +img { + max-width: 100%; +} \ No newline at end of file diff --git a/front/src/components/Home.vue b/front/src/components/Home.vue new file mode 100644 index 0000000..4830e00 --- /dev/null +++ b/front/src/components/Home.vue @@ -0,0 +1,24 @@ + + + + + Выберите шаблон (демо) + + + + + + Проекты + + + Табель рабочего времени + + + Билетная система зоопарка + + + + + \ No newline at end of file diff --git a/front/src/components/Projects.vue b/front/src/components/Projects.vue new file mode 100644 index 0000000..103f5a7 --- /dev/null +++ b/front/src/components/Projects.vue @@ -0,0 +1,137 @@ + + + + + + + + + + + + {{ item.title }} + + + + + Проекты Кустарщины + + + + + + {{ state.active_product.description }} + + + + + + + + + { state.show_fireworks = !state.show_fireworks }" /> + + + + \ No newline at end of file diff --git a/front/src/fonts/open-sans.ttf b/front/src/fonts/open-sans.ttf new file mode 100644 index 0000000..ac587b4 Binary files /dev/null and b/front/src/fonts/open-sans.ttf differ diff --git a/front/src/main.ts b/front/src/main.ts index 91525ac..deac00b 100644 --- a/front/src/main.ts +++ b/front/src/main.ts @@ -1,10 +1,27 @@ import { createApp } from 'vue' import { createPinia } from 'pinia' +import { createWebHistory, createRouter } from 'vue-router' + import './assets/main.scss' - import App from './App.vue' +import Home from './components/Home.vue' +import Projects from './components/Projects.vue' + +const routes = [ + { path: '/', component: Home }, + { path: '/projects', component: Projects }, +] + +const router = createRouter({ + history: createWebHistory(), + routes, +}) + + const pinia = createPinia() const app = createApp(App) + +app.use(router) app.use(pinia) app.mount('#app') \ No newline at end of file