diff --git a/package-lock.json b/package-lock.json index 0c03c409..a9ccadfc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -842,6 +842,32 @@ "to-fast-properties": "^2.0.0" } }, + "@fortawesome/fontawesome-common-types": { + "version": "0.2.25", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.25.tgz", + "integrity": "sha512-3RuZPDuuPELd7RXtUqTCfed14fcny9UiPOkdr2i+cYxBoTOfQgxcDoq77fHiiHcgWuo1LoBUpvGxFF1H/y7s3Q==" + }, + "@fortawesome/fontawesome-svg-core": { + "version": "1.2.25", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.25.tgz", + "integrity": "sha512-MotKnn53JKqbkLQiwcZSBJVYtTgIKFbh7B8+kd05TSnfKYPFmjKKI59o2fpz5t0Hzl35vVGU6+N4twoOpZUrqA==", + "requires": { + "@fortawesome/fontawesome-common-types": "^0.2.25" + } + }, + "@fortawesome/free-solid-svg-icons": { + "version": "5.11.2", + "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.11.2.tgz", + "integrity": "sha512-zBue4i0PAZJUXOmLBBvM7L0O7wmsDC8dFv9IhpW5QL4kT9xhhVUsYg/LX1+5KaukWq4/cbDcKT+RT1aRe543sg==", + "requires": { + "@fortawesome/fontawesome-common-types": "^0.2.25" + } + }, + "@fortawesome/vue-fontawesome": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/@fortawesome/vue-fontawesome/-/vue-fontawesome-0.1.7.tgz", + "integrity": "sha512-YCw2Q2m4fxzyFsPOH3uDYMoJztTD+pT+AAyse4LFpbdrBg+r8ueaVT8BFnXEjrGwMDJJeXrwJ5AOC6q/JWBI4w==" + }, "@mrmlnc/readdir-enhanced": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", @@ -4263,7 +4289,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -4284,12 +4311,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -4304,17 +4333,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -4431,7 +4463,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -4443,6 +4476,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -4457,6 +4491,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -4464,12 +4499,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -4488,6 +4525,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -4568,7 +4606,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -4580,6 +4619,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -4665,7 +4705,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -4701,6 +4742,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -4720,6 +4762,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -4763,12 +4806,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, diff --git a/package.json b/package.json index 02218095..6c634543 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,9 @@ "vuepress": "^1.1.0" }, "dependencies": { + "@fortawesome/fontawesome-svg-core": "^1.2.25", + "@fortawesome/free-solid-svg-icons": "^5.11.2", + "@fortawesome/vue-fontawesome": "^0.1.7", "axios": "^0.19.0", "iso-639-1": "^2.1.0", "lodash.groupby": "^4.6.0", diff --git a/src/.vuepress/components/ExtensionList.vue b/src/.vuepress/components/ExtensionList.vue index 333b65ca..da7472c5 100644 --- a/src/.vuepress/components/ExtensionList.vue +++ b/src/.vuepress/components/ExtensionList.vue @@ -13,7 +13,14 @@ {{ extension.pkg }} - Download + + + Download + @@ -28,11 +35,12 @@ import ISO6391 from 'iso-639-1'; const EXTENSION_JSON = 'https://raw.githubusercontent.com/inorichi/tachiyomi-extensions/repo/index.json'; export default { - data: function () { + data () { return { extensions: [] } }, + methods: { langName: code => code === 'all' ? 'All' : `${ISO6391.getName(code)} (${ISO6391.getNativeName(code)})`, iconUrl (pkg) { @@ -41,6 +49,7 @@ export default { }, apkUrl: apk => `https://raw.githubusercontent.com/inorichi/tachiyomi-extensions/repo/apk/${apk}` }, + async beforeMount () { const { data } = await axios.get(EXTENSION_JSON); const values = Object.values(groupBy(data, 'lang')); @@ -78,7 +87,7 @@ export default { font-size: 0.8em; color: #fff; background-color: #2e84bf; - padding: 0.3rem; + padding: 0.5rem; border-radius: 4px; transition: background-color 0.1s ease; box-sizing: border-box; @@ -89,12 +98,18 @@ export default { background-color: #3992cf; text-decoration: none !important; } + + svg + span { + margin-left: 0.25rem; + } } } @media (max-width: 767px) { - .extension .extension-text .down { - display: none; + .extension { + .extension-text .down, .button span { + display: none; + } } } diff --git a/src/.vuepress/enhanceApp.js b/src/.vuepress/enhanceApp.js index e620be25..6ae74df1 100644 --- a/src/.vuepress/enhanceApp.js +++ b/src/.vuepress/enhanceApp.js @@ -1,8 +1,16 @@ -import './styles/index.scss' +import './styles/index.scss'; + +import { library } from '@fortawesome/fontawesome-svg-core'; +import { faDownload } from '@fortawesome/free-solid-svg-icons'; +import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'; + +library.add(faDownload); export default ({ Vue, // the version of Vue being used in the VuePress app options, // the options for the root Vue instance router, // the router instance for the app siteData // site metadata -}) => {} +}) => { + Vue.component('font-awesome-icon', FontAwesomeIcon); +}; diff --git a/src/.vuepress/theme/components/Home.vue b/src/.vuepress/theme/components/Home.vue new file mode 100644 index 00000000..866d26e0 --- /dev/null +++ b/src/.vuepress/theme/components/Home.vue @@ -0,0 +1,263 @@ + + + + + diff --git a/src/.vuepress/theme/index.js b/src/.vuepress/theme/index.js new file mode 100644 index 00000000..ba95b2af --- /dev/null +++ b/src/.vuepress/theme/index.js @@ -0,0 +1,3 @@ +module.exports = { + extend: '@vuepress/theme-default' +};