init
This commit is contained in:
commit
70d6285ebf
1
.env.developer
Normal file
1
.env.developer
Normal file
@ -0,0 +1 @@
|
||||
VITE_BASE_URL=http://localhost:3000
|
||||
19
Dockerfile
Normal file
19
Dockerfile
Normal file
@ -0,0 +1,19 @@
|
||||
FROM node:22-alpine AS build
|
||||
WORKDIR /app
|
||||
RUN corepack enable
|
||||
COPY package.json yarn.lock ./
|
||||
RUN yarn install
|
||||
COPY . .
|
||||
RUN yarn build
|
||||
|
||||
FROM node:22-alpine
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/.output/ ./
|
||||
|
||||
ENV PORT=80
|
||||
|
||||
ENV VITE_BASE_URL=http://localhost:3000
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["node", "/app/server/index.mjs"]
|
||||
7
README.md
Normal file
7
README.md
Normal file
@ -0,0 +1,7 @@
|
||||
node.js 20.19.0
|
||||
|
||||
yarn
|
||||
|
||||
yarn dev
|
||||
|
||||
https://wp.koptilnya.xyz/wp-admin/edit.php?post_type=product
|
||||
11
app.vue
Normal file
11
app.vue
Normal file
@ -0,0 +1,11 @@
|
||||
<template>
|
||||
<UApp>
|
||||
<NuxtLayout>
|
||||
<NuxtPage />
|
||||
</NuxtLayout>
|
||||
</UApp>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
@use '@/assets/scss/main' as *;
|
||||
</style>
|
||||
2
assets/css/main.css
Normal file
2
assets/css/main.css
Normal file
@ -0,0 +1,2 @@
|
||||
@import "tailwindcss";
|
||||
@import "@nuxt/ui";
|
||||
60
assets/scss/main.scss
Normal file
60
assets/scss/main.scss
Normal file
@ -0,0 +1,60 @@
|
||||
//скроллбар
|
||||
::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: rgba(128, 128, 128, 0.5);
|
||||
border-radius: 4px;
|
||||
border: 2px solid transparent;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: rgba(128, 128, 128, 0.7);
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
* {
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: rgba(128, 128, 128, 0.5) transparent;
|
||||
}
|
||||
|
||||
body {
|
||||
-ms-overflow-style: -ms-autohiding-scrollbar;
|
||||
}
|
||||
|
||||
//swiper
|
||||
.swiper {
|
||||
width: 100%;
|
||||
height: calc(100dvh - 54px);
|
||||
}
|
||||
|
||||
.swiper-slide {
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
background: #444;
|
||||
|
||||
/* Center slide text vertically */
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.swiper-slide img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: calc(100dvh - 54px);
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.swiper-pagination {
|
||||
position: absolute;
|
||||
bottom: 200px !important;
|
||||
--swiper-pagination-bullet-size: 4px
|
||||
}
|
||||
5
assets/scss/mixins.scss
Normal file
5
assets/scss/mixins.scss
Normal file
@ -0,0 +1,5 @@
|
||||
@mixin mobile {
|
||||
@media (max-width: 768px) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
17
eslint.config.js
Normal file
17
eslint.config.js
Normal file
@ -0,0 +1,17 @@
|
||||
import antfu from '@antfu/eslint-config'
|
||||
|
||||
export default antfu({
|
||||
rules: {
|
||||
'antfu/top-level-function': 'off',
|
||||
},
|
||||
formatters: {
|
||||
css: true,
|
||||
},
|
||||
overrides: {
|
||||
vue: {
|
||||
'vue/block-order': ['error', {
|
||||
order: ['template', 'script', 'style'],
|
||||
}],
|
||||
},
|
||||
},
|
||||
})
|
||||
5
i18n/locales/en.json
Normal file
5
i18n/locales/en.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"colors": {
|
||||
"black": "black"
|
||||
}
|
||||
}
|
||||
20
i18n/locales/ru.json
Normal file
20
i18n/locales/ru.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"colors": {
|
||||
"black": "черный",
|
||||
"beige": "бежевый",
|
||||
"grey": "серый",
|
||||
"grey-black": "серо-черный"
|
||||
},
|
||||
"materials": {
|
||||
"cotton": "хлопок",
|
||||
"cotton-polyester": "хлопок-полиэстер"
|
||||
},
|
||||
"checkoutSteps": {
|
||||
"delivery": "Выберите адрес получения заказа",
|
||||
"mobileDelivery": "доставка",
|
||||
"contacts": "Введите данные получателя",
|
||||
"mobileContacts": "контакты",
|
||||
"summary": "Подтвердите заказ",
|
||||
"mobileSummary": "заказ"
|
||||
}
|
||||
}
|
||||
53
layouts/default.vue
Normal file
53
layouts/default.vue
Normal file
@ -0,0 +1,53 @@
|
||||
<template>
|
||||
<div class="layout">
|
||||
<UHeader title="Rental">
|
||||
<UTabs v-model="activeTab" :content="false" :items="tabs" />
|
||||
|
||||
<template #right>
|
||||
<UColorModeButton />
|
||||
</template>
|
||||
</UHeader>
|
||||
|
||||
<UMain>
|
||||
<UContainer>
|
||||
<slot />
|
||||
</UContainer>
|
||||
</UMain>
|
||||
|
||||
<UFooter />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { TabsItem } from '@nuxt/ui'
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
const tabs = ref<TabsItem[]>([
|
||||
{
|
||||
label: 'Главная',
|
||||
icon: 'i-lucide-home',
|
||||
route: '/',
|
||||
},
|
||||
{
|
||||
label: 'Недвижимость',
|
||||
icon: 'i-lucide-building-2',
|
||||
route: '/nedvizhimost',
|
||||
},
|
||||
{
|
||||
label: 'Авто',
|
||||
icon: 'i-lucide-car',
|
||||
route: '/transport',
|
||||
},
|
||||
])
|
||||
|
||||
const activeTab = ref(tabs.value.findIndex(tab => route.path.startsWith(tab.route)))
|
||||
|
||||
watch(() => activeTab.value, () => {
|
||||
router.push(tabs.value[activeTab?.value]?.route)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
</style>
|
||||
55
nuxt.config.ts
Normal file
55
nuxt.config.ts
Normal file
@ -0,0 +1,55 @@
|
||||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||
import { createResolver } from '@nuxt/kit'
|
||||
|
||||
const { resolve } = createResolver(import.meta.url)
|
||||
|
||||
export default defineNuxtConfig({
|
||||
ssr: true,
|
||||
compatibilityDate: '2025-05-15',
|
||||
devtools: { enabled: true },
|
||||
modules: [
|
||||
'@nuxt/ui',
|
||||
'@nuxt/image',
|
||||
'@nuxt/icon',
|
||||
'@nuxt/fonts',
|
||||
'@nuxtjs/i18n',
|
||||
[
|
||||
'@vee-validate/nuxt',
|
||||
{
|
||||
autoImports: true,
|
||||
},
|
||||
],
|
||||
],
|
||||
css: ['~/assets/css/main.css', '~/assets/scss/main.scss'],
|
||||
i18n: {
|
||||
locales: [
|
||||
{ code: 'en', name: 'English', file: 'en.json' },
|
||||
{ code: 'ru', name: 'Русский', file: 'ru.json' },
|
||||
],
|
||||
defaultLocale: 'ru',
|
||||
strategy: 'prefix_except_default',
|
||||
detectBrowserLanguage: false,
|
||||
},
|
||||
app: {
|
||||
head: {
|
||||
meta: [
|
||||
{
|
||||
name: 'viewport',
|
||||
content: 'width=device-width, initial-scale=1, maximum-scale=1, viewport-fit=cover, user-scalable=no',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
vite: {
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
scss: {
|
||||
additionalData: `@use "${resolve('./assets/scss/mixins')}" as *;`,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
fonts: {
|
||||
provider: 'google',
|
||||
},
|
||||
})
|
||||
16419
package-lock.json
generated
Normal file
16419
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
43
package.json
Normal file
43
package.json
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "nuxt-app",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "nuxt build",
|
||||
"dev": "nuxt dev",
|
||||
"generate": "nuxt generate",
|
||||
"preview": "nuxt preview",
|
||||
"postinstall": "nuxt prepare",
|
||||
"lint": "eslint .",
|
||||
"lint:fix": "eslint . --fix",
|
||||
"typegen": "node .typegen"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nuxt/content": "^3.7.1",
|
||||
"@nuxt/fonts": "0.11.4",
|
||||
"@nuxt/icon": "1.15.0",
|
||||
"@nuxt/image": "1.10.0",
|
||||
"@nuxt/ui": "^4.0.1",
|
||||
"@nuxtjs/i18n": "^10.0.4",
|
||||
"@tanstack/vue-query-devtools": "^5.87.1",
|
||||
"@vee-validate/nuxt": "^4.15.1",
|
||||
"@vueuse/core": "^13.1.0",
|
||||
"axios": "^1.12.2",
|
||||
"dayjs": "^1.11.13",
|
||||
"decimal.js": "^10.5.0",
|
||||
"maska": "^3.2.0",
|
||||
"nuxt": "^4.1.3",
|
||||
"swiper": "^12.0.2",
|
||||
"typescript": "^5.6.3",
|
||||
"vue": "^3.5.17",
|
||||
"vue-router": "^4.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^4.13.2",
|
||||
"@nuxt/devtools": "latest",
|
||||
"eslint": "^9.27.0",
|
||||
"eslint-plugin-format": "^1.0.1",
|
||||
"sass": "^1.71.0"
|
||||
},
|
||||
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
||||
}
|
||||
9
pages/index.vue
Normal file
9
pages/index.vue
Normal file
@ -0,0 +1,9 @@
|
||||
<template>
|
||||
index
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
</style>
|
||||
11
pages/nedvizhimost.vue
Normal file
11
pages/nedvizhimost.vue
Normal file
@ -0,0 +1,11 @@
|
||||
<template>
|
||||
nedvizhimost
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
11
pages/transport.vue
Normal file
11
pages/transport.vue
Normal file
@ -0,0 +1,11 @@
|
||||
<template>
|
||||
transport
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
5
plugins/maska.ts
Normal file
5
plugins/maska.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import { vMaska } from 'maska/vue'
|
||||
|
||||
export default defineNuxtPlugin((nuxtApp) => {
|
||||
nuxtApp.vueApp.directive('maska', vMaska)
|
||||
})
|
||||
BIN
public/favicon.ico
Normal file
BIN
public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
2
public/robots.txt
Normal file
2
public/robots.txt
Normal file
@ -0,0 +1,2 @@
|
||||
User-Agent: *
|
||||
Disallow:
|
||||
16
tailwind.config.ts
Normal file
16
tailwind.config.ts
Normal file
@ -0,0 +1,16 @@
|
||||
// tailwind.config.ts
|
||||
import type { Config } from 'tailwindcss'
|
||||
|
||||
const config: Config = {
|
||||
content: [], // Nuxt сам заполняет content автоматически
|
||||
theme: {
|
||||
extend: {
|
||||
fontFamily: {
|
||||
sans: ['Inter', 'sans-serif'], // если используешь @nuxt/fonts или свою кастомную типографику
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [],
|
||||
}
|
||||
|
||||
export default config
|
||||
4
tsconfig.json
Normal file
4
tsconfig.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
// https://nuxt.com/docs/guide/concepts/typescript
|
||||
"extends": "./.nuxt/tsconfig.json",
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user