From 471e81f55628572d2114f7621a7173e04eb8e64a Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Wed, 17 Aug 2022 19:04:57 +0530 Subject: [PATCH] Initial migration to UnoCSS. --- package.json | 9 +- src/App.vue | 14 +- src/components/ChaptersBar.vue | 15 +- src/components/CommentItem.vue | 4 +- src/components/NavBar.vue | 10 +- src/components/PreferencesPage.vue | 6 +- src/components/SearchSuggestions.vue | 6 +- src/components/SubscriptionsPage.vue | 2 +- src/components/VideoItem.vue | 2 +- src/components/WatchVideo.vue | 14 +- src/main.js | 7 +- uno.config.js | 34 ++ vite.config.js | 4 +- windi.config.js | 23 -- yarn.lock | 543 ++++++++++++++++++++++++--- 15 files changed, 578 insertions(+), 115 deletions(-) create mode 100644 uno.config.js delete mode 100644 windi.config.js diff --git a/package.json b/package.json index 5bd4d491..1492cb8c 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,12 @@ "xml-js": "^1.6.11" }, "devDependencies": { + "@iconify/json": "^2.1.94", "@intlify/vite-plugin-vue-i18n": "^6.0.1", + "@unocss/preset-icons": "^0.45.7", + "@unocss/preset-web-fonts": "^0.45.7", + "@unocss/transformer-directives": "^0.45.7", + "@unocss/transformer-variant-group": "^0.45.7", "@vitejs/plugin-legacy": "^1.8.2", "@vitejs/plugin-vue": "^2.3.4", "@vue/compiler-sfc": "3.2.37", @@ -36,10 +41,10 @@ "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-vue": "^9.3.0", "prettier": "^2.7.1", + "unocss": "^0.45.7", "vite": "^2.9.14", "vite-plugin-eslint": "^1.7.0", - "vite-plugin-pwa": "^0.12.3", - "vite-plugin-windicss": "^1.8.7" + "vite-plugin-pwa": "^0.12.3" }, "eslintConfig": { "root": true, diff --git a/src/App.vue b/src/App.vue index 25a13a04..76938920 100644 --- a/src/App.vue +++ b/src/App.vue @@ -102,11 +102,11 @@ b { } .video-grid { - @apply grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 col-auto -
+

{{ $t("video.chapters") }} ({{ chapters.length }})

@@ -45,16 +45,17 @@ } .chapter { @apply cursor-pointer self-center p-2.5; - img { - @apply w-full h-full; - } +} +.chapter img { + @apply w-full h-full; } .chapter-vertical { @apply cursor-pointer self-center p-2.5; - img { - @apply w-3/10 h-3/10; - } } +.chapter-vertical img { + @apply w-3/10 h-3/10; +} + .chapter-vertical:hover { @apply bg-gray-500; } diff --git a/src/components/CommentItem.vue b/src/components/CommentItem.vue index 36e805b2..5a701651 100644 --- a/src/components/CommentItem.vue +++ b/src/components/CommentItem.vue @@ -24,8 +24,8 @@
-