diff --git a/app.vue b/app.vue index c4900da..96d12d2 100644 --- a/app.vue +++ b/app.vue @@ -1,6 +1,6 @@ - + diff --git a/components/UiButton/UiButton.params.ts b/components/UiButton/UiButton.params.ts index 4ee790f..e122ddd 100644 --- a/components/UiButton/UiButton.params.ts +++ b/components/UiButton/UiButton.params.ts @@ -1,13 +1,17 @@ export const colorVariants = { - primary: ['bg-accent-50', 'text-primary', 'hover:bg-accent-100', 'active:bg-accent-150'], - secondary: [ - 'bg-transparent', - 'text-primary', - 'hover:bg-accent-50', - 'border-accent-50', - 'border', - 'hover:bg-accent-100', - 'active:bg-accent-150', - 'cursor-pointer', + primary: [ + "bg-accent-50", + "text-primary", + "hover:bg-accent-100", + "active:bg-accent-150", ], -} + secondary: [ + "bg-transparent", + "text-primary", + "hover:bg-accent-50", + "border-accent-50", + "border", + "hover:bg-accent-100", + "active:bg-accent-150", + ], +}; diff --git a/components/UiButton/UiButton.vue b/components/UiButton/UiButton.vue index 37c8a4e..a2a4bee 100644 --- a/components/UiButton/UiButton.vue +++ b/components/UiButton/UiButton.vue @@ -1,6 +1,7 @@ diff --git a/config/head.ts b/config/head.ts new file mode 100644 index 0000000..307ff42 --- /dev/null +++ b/config/head.ts @@ -0,0 +1,28 @@ +export default { + meta: [ + { charset: "utf-8" }, + { + name: "viewport", + content: + "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no", + }, + ], + link: [ + { + rel: "preconnect", + href: "https://fonts.googleapis.com", + }, + { + rel: "preconnect", + href: "https://fonts.gstatic.com", + }, + { + rel: "stylesheet", + href: "https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap", + }, + { + rel: "stylesheet", + href: "https://fonts.googleapis.com/css2?family=Russo+One&display=swap", + }, + ], +}; diff --git a/config/index.ts b/config/index.ts index 85cc02c..0c0610d 100644 --- a/config/index.ts +++ b/config/index.ts @@ -1,5 +1,5 @@ -import modules from './modules' -import sitemap from './sitemap' +import modules from "./modules"; +import sitemap from "./sitemap"; export default { modules, @@ -8,4 +8,4 @@ export default { strict: true, typeCheck: true, }, -} +}; diff --git a/config/modules.ts b/config/modules.ts index 43743ac..4cd4e75 100644 --- a/config/modules.ts +++ b/config/modules.ts @@ -7,6 +7,7 @@ export default [ "@pinia/nuxt", "@nuxtjs/tailwindcss", "@pinia/nuxt", + "@nuxtjs/html-validator", // '@nuxtjs/robots', // '@nuxtjs/sitemap', ]; diff --git a/eslint.config.ts b/eslint.config.ts index a608c1f..83db4c4 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -26,5 +26,10 @@ export default defineConfigWithVueTs( pluginVue.configs["flat/essential"], vueTsConfigs.recommended, - skipFormatting + skipFormatting, + { + rules: { + "vue/multi-word-component-names": "off", + }, + } ); diff --git a/nuxt.config.ts b/nuxt.config.ts index d5acb2d..d38f650 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -1,6 +1,7 @@ import config from "./config"; import { fileURLToPath, URL } from "node:url"; +import head from "./config/head"; // import sitemap from "./config/sitemap"; // https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({ @@ -17,9 +18,24 @@ export default defineNuxtConfig({ dir: "./dist", }, }, + alias: { "@": fileURLToPath(new URL("./", import.meta.url)), }, + css: ["@/assets/css/tailwind.css"], ...config, + htmlValidator: { + usePrettier: true, + logLevel: "warning", + failOnError: false, + }, + app: { + head: { + htmlAttrs: { + lang: "ru", + }, + ...head, + }, + }, }); diff --git a/package-lock.json b/package-lock.json index ae06768..8bec7c1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "@nuxt/fonts": "^0.11.4", "@nuxt/icon": "^1.13.0", "@nuxt/image": "^1.10.0", + "@nuxtjs/html-validator": "^2.1.0", "@nuxtjs/robots": "^5.2.10", "@nuxtjs/sitemap": "^7.4.0", "@pinia/nuxt": "^0.5.5", @@ -1455,6 +1456,27 @@ "integrity": "sha512-5DGmA8FTdB2XbDeEwc/5ZXBl6UbBAyBOOLlPuBnZ/N1SwdH9Ii+cOX3tBROlDgcTXxjOYnLMVoKk9+FXAw0CJw==", "license": "MIT" }, + "node_modules/@html-validate/stylish": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@html-validate/stylish/-/stylish-4.2.0.tgz", + "integrity": "sha512-Nl8HCv0hGRSLQ+n1OD4Hk3a+Urwk9HH0vQkAzzCarT4KlA7bRl+6xEiS5PZVwOmjtC7XiH/oNe3as9Fxcr2A1w==", + "license": "MIT", + "dependencies": { + "kleur": "^4.0.0" + }, + "engines": { + "node": ">= 16" + } + }, + "node_modules/@html-validate/stylish/node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/@humanfs/core": { "version": "0.19.1", "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", @@ -2624,6 +2646,21 @@ "vue": "^3.3.4" } }, + "node_modules/@nuxtjs/html-validator": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@nuxtjs/html-validator/-/html-validator-2.1.0.tgz", + "integrity": "sha512-ldo8ioSsH3OEumtgwDMokTxlhjgO9FxjJWViAxisq5l/wjvaVX8SYTQ02wjtQcQQPSvS6BwgypAp400RlyFHng==", + "license": "MIT", + "dependencies": { + "@nuxt/kit": "^3.15.4", + "consola": "^3.4.0", + "html-validate": "~9.4.0", + "knitwork": "^1.2.0", + "pathe": "^2.0.3", + "prettier": "^3.5.2", + "std-env": "^3.8.0" + } + }, "node_modules/@nuxtjs/mdc": { "version": "0.17.0", "resolved": "https://registry.npmjs.org/@nuxtjs/mdc/-/mdc-0.17.0.tgz", @@ -4050,6 +4087,30 @@ "integrity": "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==", "license": "MIT" }, + "node_modules/@sidvind/better-ajv-errors": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sidvind/better-ajv-errors/-/better-ajv-errors-3.0.1.tgz", + "integrity": "sha512-++1mEYIeozfnwWI9P1ECvOPoacy+CgDASrmGvXPMCcqgx0YUzB01vZ78uHdQ443V6sTY+e9MzHqmN9DOls02aw==", + "license": "Apache-2.0", + "dependencies": { + "kleur": "^4.1.0" + }, + "engines": { + "node": ">= 16.14" + }, + "peerDependencies": { + "ajv": "^6.12.3 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/@sidvind/better-ajv-errors/node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/@sindresorhus/is": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-7.0.2.tgz", @@ -5649,7 +5710,6 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "devOptional": true, "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", @@ -9054,7 +9114,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "devOptional": true, "license": "MIT" }, "node_modules/fast-levenshtein": { @@ -9073,6 +9132,22 @@ "url": "https://github.com/sponsors/antfu" } }, + "node_modules/fast-uri": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz", + "integrity": "sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, "node_modules/fastq": { "version": "1.19.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", @@ -10130,6 +10205,85 @@ "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", "license": "ISC" }, + "node_modules/html-validate": { + "version": "9.4.2", + "resolved": "https://registry.npmjs.org/html-validate/-/html-validate-9.4.2.tgz", + "integrity": "sha512-lvorU3Q320MMD6ryh0FupMJ5DOKsNKxwdKba+ig4cUYEBQ3SUnANBMCv5OaxwKqd2VCKQPlveXb3K1zqJsfV0Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/html-validate" + } + ], + "license": "MIT", + "dependencies": { + "@html-validate/stylish": "^4.1.0", + "@sidvind/better-ajv-errors": "3.0.1", + "ajv": "^8.0.0", + "glob": "^10.0.0", + "kleur": "^4.1.0", + "minimist": "^1.2.0", + "prompts": "^2.0.0", + "semver": "^7.0.0" + }, + "bin": { + "html-validate": "bin/html-validate.mjs" + }, + "engines": { + "node": "^18.19.0 || >= 20.6.0" + }, + "peerDependencies": { + "jest": "^27.1 || ^28.1.3 || ^29.0.3", + "jest-diff": "^27.1 || ^28.1.3 || ^29.0.3", + "jest-snapshot": "^27.1 || ^28.1.3 || ^29.0.3", + "vitest": "^0.34.0 || ^1.0.0 || ^2.0.0 || ^3.0.0" + }, + "peerDependenciesMeta": { + "jest": { + "optional": true + }, + "jest-diff": { + "optional": true + }, + "jest-snapshot": { + "optional": true + }, + "vitest": { + "optional": true + } + } + }, + "node_modules/html-validate/node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/html-validate/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "license": "MIT" + }, + "node_modules/html-validate/node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/html-void-elements": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-3.0.0.tgz", @@ -10955,7 +11109,6 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "devOptional": true, "license": "MIT" }, "node_modules/json-stable-stringify-without-jsonify": { @@ -15117,7 +15270,6 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "devOptional": true, "license": "MIT", "engines": { "node": ">=6" @@ -15744,6 +15896,15 @@ "node": ">=0.10.0" } }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/require-package-name": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/require-package-name/-/require-package-name-2.0.1.tgz", @@ -18230,7 +18391,6 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "devOptional": true, "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" diff --git a/package.json b/package.json index 9bb8cf5..dc3f5f2 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "@nuxt/fonts": "^0.11.4", "@nuxt/icon": "^1.13.0", "@nuxt/image": "^1.10.0", + "@nuxtjs/html-validator": "^2.1.0", "@nuxtjs/robots": "^5.2.10", "@nuxtjs/sitemap": "^7.4.0", "@pinia/nuxt": "^0.5.5", diff --git a/pages/books/[slug].vue b/pages/books/[slug].vue index 9617711..58edf0d 100644 --- a/pages/books/[slug].vue +++ b/pages/books/[slug].vue @@ -9,12 +9,7 @@ - + @@ -68,12 +63,7 @@ class="flex flex-row mr-14 items-center justify-between lg:whitespace-nowrap" > - + {{ book.pages }} @@ -82,20 +72,13 @@ {{ book.illust }} - + {{ book.format }} @@ -170,7 +153,7 @@ - + Что ты узнаешь diff --git a/pages/books/[titlesSlug]/[titlesSlug].vue b/pages/books/[titlesSlug]/[titlesSlug].vue index d7bd61a..976232a 100644 --- a/pages/books/[titlesSlug]/[titlesSlug].vue +++ b/pages/books/[titlesSlug]/[titlesSlug].vue @@ -16,7 +16,7 @@ class="flex flex-col gap-4" > - + {{ section.title }} diff --git a/pages/index/_ui/feedbackSection/feedbackSection.vue b/pages/index/_ui/feedbackSection/feedbackSection.vue index 9e35afb..c3d0a74 100644 --- a/pages/index/_ui/feedbackSection/feedbackSection.vue +++ b/pages/index/_ui/feedbackSection/feedbackSection.vue @@ -1,6 +1,6 @@ - + Что говорят читатели @@ -18,7 +18,9 @@ class="swiper-slide feedback-slide !w-[356px] !h-[325px]" > - {{ feedback.text }} + {{ + feedback.text + }} @@ -36,34 +38,34 @@