diff --git a/frontend/wechat/package-lock.json b/frontend/wechat/package-lock.json index 15b272e..070cba5 100644 --- a/frontend/wechat/package-lock.json +++ b/frontend/wechat/package-lock.json @@ -11,20 +11,20 @@ "@tailwindcss/vite": "^4.1.4", "@vueuse/core": "^13.1.0", "axios": "^1.8.4", - "dplayer": "^1.27.1", "pinia": "^3.0.2", - "plyr": "^3.7.8", "sha1": "^1.1.1", "tailwindcss": "^4.1.4", "vue": "^3.5.13", "vue-icons-plus": "^0.1.8", "vue-router": "^4.5.0", - "wechat-js-sdk": "^1.3.3", "weixin-js-sdk": "^1.6.5", "xgplayer": "^3.0.22", "xgplayer-mp4": "^3.0.22" }, "devDependencies": { + "@tailwindcss/aspect-ratio": "^0.4.2", + "@tailwindcss/forms": "^0.5.10", + "@tailwindcss/typography": "^0.5.16", "@vitejs/plugin-vue": "^5.2.2", "autoprefixer": "^10.4.21", "postcss": "^8.5.3", @@ -176,6 +176,29 @@ "linux" ] }, + "node_modules/@tailwindcss/aspect-ratio": { + "version": "0.4.2", + "resolved": "https://npm.hub.ipao.vip/repository/npm/@tailwindcss/aspect-ratio/-/aspect-ratio-0.4.2.tgz", + "integrity": "sha512-8QPrypskfBa7QIMuKHg2TA7BqES6vhBrDLOv8Unb6FcFyd3TjKbc6lcmb9UPQHxfl24sXoJ41ux/H7qQQvfaSQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "tailwindcss": ">=2.0.0 || >=3.0.0 || >=3.0.0-alpha.1" + } + }, + "node_modules/@tailwindcss/forms": { + "version": "0.5.10", + "resolved": "https://npm.hub.ipao.vip/repository/npm/@tailwindcss/forms/-/forms-0.5.10.tgz", + "integrity": "sha512-utI1ONF6uf/pPNO68kmN1b8rEwNXv3czukalo8VtJH8ksIkZXr3Q3VYudZLkCsDd4Wku120uF02hYK25XGPorw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mini-svg-data-uri": "^1.2.3" + }, + "peerDependencies": { + "tailwindcss": ">=3.0.0 || >= 3.0.0-alpha.1 || >= 4.0.0-alpha.20 || >= 4.0.0-beta.1" + } + }, "node_modules/@tailwindcss/node": { "version": "4.1.4", "license": "MIT", @@ -235,6 +258,22 @@ "node": ">= 10" } }, + "node_modules/@tailwindcss/typography": { + "version": "0.5.16", + "resolved": "https://npm.hub.ipao.vip/repository/npm/@tailwindcss/typography/-/typography-0.5.16.tgz", + "integrity": "sha512-0wDLwCVF5V3x3b1SGXPCDcdsbDHMBe+lkFzBRaHeLvNi+nrrnZ1lA18u+OTWO8iSWU2GxUOCvlXtDuqftc1oiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash.castarray": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.merge": "^4.6.2", + "postcss-selector-parser": "6.0.10" + }, + "peerDependencies": { + "tailwindcss": ">=3.0.0 || insiders || >=4.0.0-alpha.20 || >=4.0.0-beta.1" + } + }, "node_modules/@tailwindcss/vite": { "version": "4.1.4", "license": "MIT", @@ -496,10 +535,6 @@ "proxy-from-env": "^1.1.0" } }, - "node_modules/balloon-css": { - "version": "1.2.0", - "license": "MIT" - }, "node_modules/birpc": { "version": "2.3.0", "license": "MIT", @@ -675,6 +710,7 @@ "version": "3.41.0", "hasInstallScript": true, "license": "MIT", + "peer": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/core-js" @@ -691,14 +727,23 @@ "version": "1.2.7", "license": "MIT" }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://npm.hub.ipao.vip/repository/npm/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "license": "MIT", + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/csstype": { "version": "3.1.3", "license": "MIT" }, - "node_modules/custom-event-polyfill": { - "version": "1.0.7", - "license": "MIT" - }, "node_modules/d": { "version": "1.0.2", "license": "ISC", @@ -774,24 +819,6 @@ "version": "1.4.7", "license": "MIT" }, - "node_modules/dplayer": { - "version": "1.27.1", - "license": "MIT", - "dependencies": { - "axios": "1.2.3", - "balloon-css": "^1.0.3", - "promise-polyfill": "8.3.0" - } - }, - "node_modules/dplayer/node_modules/axios": { - "version": "1.2.3", - "license": "MIT", - "dependencies": { - "follow-redirects": "^1.15.0", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" - } - }, "node_modules/dunder-proto": { "version": "1.0.1", "license": "MIT", @@ -1302,8 +1329,25 @@ "url": "https://opencollective.com/parcel" } }, - "node_modules/loadjs": { - "version": "4.3.0", + "node_modules/lodash.castarray": { + "version": "4.4.0", + "resolved": "https://npm.hub.ipao.vip/repository/npm/lodash.castarray/-/lodash.castarray-4.4.0.tgz", + "integrity": "sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://npm.hub.ipao.vip/repository/npm/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://npm.hub.ipao.vip/repository/npm/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, "license": "MIT" }, "node_modules/magic-string": { @@ -1337,6 +1381,16 @@ "node": ">= 0.6" } }, + "node_modules/mini-svg-data-uri": { + "version": "1.4.4", + "resolved": "https://npm.hub.ipao.vip/repository/npm/mini-svg-data-uri/-/mini-svg-data-uri-1.4.4.tgz", + "integrity": "sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg==", + "dev": true, + "license": "MIT", + "bin": { + "mini-svg-data-uri": "cli.js" + } + }, "node_modules/mitt": { "version": "3.0.1", "license": "MIT" @@ -1436,17 +1490,6 @@ } } }, - "node_modules/plyr": { - "version": "3.7.8", - "license": "MIT", - "dependencies": { - "core-js": "^3.26.1", - "custom-event-polyfill": "^1.0.7", - "loadjs": "^4.2.0", - "rangetouch": "^2.0.1", - "url-polyfill": "^1.1.12" - } - }, "node_modules/postcss": { "version": "8.5.3", "funding": [ @@ -1473,23 +1516,29 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/postcss-selector-parser": { + "version": "6.0.10", + "resolved": "https://npm.hub.ipao.vip/repository/npm/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz", + "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/postcss-value-parser": { "version": "4.2.0", "dev": true, "license": "MIT" }, - "node_modules/promise-polyfill": { - "version": "8.3.0", - "license": "MIT" - }, "node_modules/proxy-from-env": { "version": "1.1.0", "license": "MIT" }, - "node_modules/rangetouch": { - "version": "2.0.1", - "license": "MIT" - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://npm.hub.ipao.vip/repository/npm/require-directory/-/require-directory-2.1.1.tgz", @@ -1766,8 +1815,11 @@ "browserslist": ">= 4.21.0" } }, - "node_modules/url-polyfill": { - "version": "1.1.13", + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://npm.hub.ipao.vip/repository/npm/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, "license": "MIT" }, "node_modules/vite": { @@ -1900,10 +1952,6 @@ "version": "6.6.4", "license": "MIT" }, - "node_modules/wechat-js-sdk": { - "version": "1.3.3", - "license": "ISC" - }, "node_modules/weixin-js-sdk": { "version": "1.6.5", "license": "MIT" diff --git a/frontend/wechat/package.json b/frontend/wechat/package.json index 28b2e3d..87dc980 100644 --- a/frontend/wechat/package.json +++ b/frontend/wechat/package.json @@ -23,6 +23,9 @@ "xgplayer-mp4": "^3.0.22" }, "devDependencies": { + "@tailwindcss/aspect-ratio": "^0.4.2", + "@tailwindcss/forms": "^0.5.10", + "@tailwindcss/typography": "^0.5.16", "@vitejs/plugin-vue": "^5.2.2", "autoprefixer": "^10.4.21", "postcss": "^8.5.3", @@ -31,4 +34,4 @@ "vite": "^6.3.0", "vite-plugin-compression": "^0.5.1" } -} \ No newline at end of file +} diff --git a/frontend/wechat/src/App.vue b/frontend/wechat/src/App.vue index a68421f..06eca68 100644 --- a/frontend/wechat/src/App.vue +++ b/frontend/wechat/src/App.vue @@ -1,5 +1,21 @@ \ No newline at end of file + + + \ No newline at end of file diff --git a/frontend/wechat/src/components/ArticleListItem.vue b/frontend/wechat/src/components/ArticleListItem.vue index 91437c5..40a799a 100644 --- a/frontend/wechat/src/components/ArticleListItem.vue +++ b/frontend/wechat/src/components/ArticleListItem.vue @@ -30,49 +30,39 @@ const showArticle = (article) => { diff --git a/frontend/wechat/src/styles.css b/frontend/wechat/src/styles.css index ca6b587..dfee755 100644 --- a/frontend/wechat/src/styles.css +++ b/frontend/wechat/src/styles.css @@ -1,6 +1,37 @@ -@import "tailwindcss"; +@import "tailwindcss/preflight"; +@import "tailwindcss/components"; +@import "tailwindcss/utilities"; -html, body { +@layer base { + html, body { touch-action: manipulation; -webkit-touch-callout: none; + } +} + +@layer components { + .btn { + @apply px-4 py-2 rounded-lg font-medium transition-colors duration-200; + } + .btn-primary { + @apply bg-primary-500 text-white hover:bg-primary-600 active:bg-primary-700; + } + .btn-secondary { + @apply bg-secondary-100 text-secondary-900 hover:bg-secondary-200 active:bg-secondary-300; + } + .input { + @apply px-3 py-2 border border-secondary-200 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-transparent; + } + .card { + @apply bg-white rounded-xl shadow-lg p-6; + } +} + +@layer utilities { + .text-balance { + text-wrap: balance; + } + .text-pretty { + text-wrap: pretty; + } } \ No newline at end of file diff --git a/frontend/wechat/src/views/ArticleList.vue b/frontend/wechat/src/views/ArticleList.vue index 3f9ba76..fba0665 100644 --- a/frontend/wechat/src/views/ArticleList.vue +++ b/frontend/wechat/src/views/ArticleList.vue @@ -69,29 +69,54 @@ onMounted(() => {