diff --git a/package.json b/package.json
index 2ff97f5d..421f6762 100644
--- a/package.json
+++ b/package.json
@@ -29,8 +29,8 @@
"@fullhuman/postcss-purgecss": "1.3.0",
"@ky-is/vue-cli-plugin-tailwind": "2.0.0",
"@types/jest": "24.0.23",
- "@typescript-eslint/eslint-plugin": "2.11.0",
- "@typescript-eslint/parser": "2.11.0",
+ "@typescript-eslint/eslint-plugin": "2.12.0",
+ "@typescript-eslint/parser": "2.12.0",
"@vue/cli-plugin-babel": "4.1.1",
"@vue/cli-plugin-eslint": "4.1.1",
"@vue/cli-plugin-router": "4.1.1",
@@ -49,6 +49,7 @@
"prettier": "1.19.1",
"tailwindcss": "1.1.4",
"typescript": "3.7.3",
+ "vue-material-design-icons": "^4.4.0",
"vue-template-compiler": "2.6.11"
},
"gitHooks": {
diff --git a/src/components/GithubRepos.vue b/src/components/GithubRepos.vue
new file mode 100644
index 00000000..e492d67a
--- /dev/null
+++ b/src/components/GithubRepos.vue
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+ {{ repo }}
+
+
+ - Stars
+ -
+ {{ stars.value }}
+
+
+
+ - Language
+ -
+ {{ language.value }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/icons/GithubCircle.vue b/src/components/icons/GithubCircle.vue
new file mode 100644
index 00000000..46c0afba
--- /dev/null
+++ b/src/components/icons/GithubCircle.vue
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
diff --git a/src/pages/index.vue b/src/pages/index.vue
index 47d21ac8..2e7c97d1 100644
--- a/src/pages/index.vue
+++ b/src/pages/index.vue
@@ -8,6 +8,9 @@
Recent articles
+
+ Projects
+
@@ -15,11 +18,13 @@
import { createComponent } from '@vue/composition-api'
import BlogList from '@/components/BlogList.vue'
+import GithubRepos from '@/components/GithubRepos.vue'
import home from '@/content/index.md'
export default createComponent({
components: {
BlogList,
+ GithubRepos,
HomePage: home.vue.component,
},
head: {
diff --git a/src/utils/github.ts b/src/utils/github.ts
new file mode 100644
index 00000000..f1ab3a54
--- /dev/null
+++ b/src/utils/github.ts
@@ -0,0 +1,11 @@
+import { computed } from '@vue/composition-api'
+import { useFetch } from 'vue-use-web'
+
+export function useGithub(repo: string) {
+ const { json } = useFetch(`https://api.github.com/repos/${repo}`, {})
+
+ const stars = computed(() => json.value && json.value.stargazers_count)
+ const language = computed(() => json.value && json.value.language)
+
+ return { stars, language }
+}
diff --git a/yarn.lock b/yarn.lock
index 4e2a5b77..5d484528 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1116,40 +1116,40 @@
dependencies:
"@types/yargs-parser" "*"
-"@typescript-eslint/eslint-plugin@2.11.0":
- version "2.11.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.11.0.tgz#4477c33491ccf0a9a3f4a30ef84978fa0ea0cad2"
- integrity sha512-G2HHA1vpMN0EEbUuWubiCCfd0R3a30BB+UdvnFkxwZIxYEGOrWEXDv8tBFO9f44CWc47Xv9lLM3VSn4ORLI2bA==
+"@typescript-eslint/eslint-plugin@2.12.0":
+ version "2.12.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.12.0.tgz#0da7cbca7b24f4c6919e9eb31c704bfb126f90ad"
+ integrity sha512-1t4r9rpLuEwl3hgt90jY18wJHSyb0E3orVL3DaqwmpiSDHmHiSspVsvsFF78BJ/3NNG3qmeso836jpuBWYziAA==
dependencies:
- "@typescript-eslint/experimental-utils" "2.11.0"
+ "@typescript-eslint/experimental-utils" "2.12.0"
eslint-utils "^1.4.3"
functional-red-black-tree "^1.0.1"
regexpp "^3.0.0"
tsutils "^3.17.1"
-"@typescript-eslint/experimental-utils@2.11.0":
- version "2.11.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.11.0.tgz#cef18e6b122706c65248a5d8984a9779ed1e52ac"
- integrity sha512-YxcA/y0ZJaCc/fB/MClhcDxHI0nOBB7v2/WxBju2cOTanX7jO9ttQq6Fy4yW9UaY5bPd9xL3cun3lDVqk67sPQ==
+"@typescript-eslint/experimental-utils@2.12.0":
+ version "2.12.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.12.0.tgz#e0a76ffb6293e058748408a191921e453c31d40d"
+ integrity sha512-jv4gYpw5N5BrWF3ntROvCuLe1IjRenLy5+U57J24NbPGwZFAjhnM45qpq0nDH1y/AZMb3Br25YiNVwyPbz6RkA==
dependencies:
"@types/json-schema" "^7.0.3"
- "@typescript-eslint/typescript-estree" "2.11.0"
+ "@typescript-eslint/typescript-estree" "2.12.0"
eslint-scope "^5.0.0"
-"@typescript-eslint/parser@2.11.0":
- version "2.11.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.11.0.tgz#cdcc3be73ee31cbef089af5ff97ccaa380ef6e8b"
- integrity sha512-DyGXeqhb3moMioEFZIHIp7oXBBh7dEfPTzGrlyP0Mi9ScCra4SWEGs3kPd18mG7Sy9Wy8z88zmrw5tSGL6r/6A==
+"@typescript-eslint/parser@2.12.0":
+ version "2.12.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.12.0.tgz#393f1604943a4ca570bb1a45bc8834e9b9158884"
+ integrity sha512-lPdkwpdzxEfjI8TyTzZqPatkrswLSVu4bqUgnB03fHSOwpC7KSerPgJRgIAf11UGNf7HKjJV6oaPZI4AghLU6g==
dependencies:
"@types/eslint-visitor-keys" "^1.0.0"
- "@typescript-eslint/experimental-utils" "2.11.0"
- "@typescript-eslint/typescript-estree" "2.11.0"
+ "@typescript-eslint/experimental-utils" "2.12.0"
+ "@typescript-eslint/typescript-estree" "2.12.0"
eslint-visitor-keys "^1.1.0"
-"@typescript-eslint/typescript-estree@2.11.0":
- version "2.11.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.11.0.tgz#21ada6504274cd1644855926312c798fc697e9fb"
- integrity sha512-HGY4+d4MagO6cKMcKfIKaTMxcAv7dEVnji2Zi+vi5VV8uWAM631KjAB5GxFcexMYrwKT0EekRiiGK1/Sd7VFGA==
+"@typescript-eslint/typescript-estree@2.12.0":
+ version "2.12.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.12.0.tgz#bd9e547ccffd17dfab0c3ab0947c80c8e2eb914c"
+ integrity sha512-rGehVfjHEn8Frh9UW02ZZIfJs6SIIxIu/K1bbci8rFfDE/1lQ8krIJy5OXOV3DVnNdDPtoiPOdEANkLMrwXbiQ==
dependencies:
debug "^4.1.1"
eslint-visitor-keys "^1.1.0"
@@ -1164,7 +1164,7 @@
resolved "https://registry.yarnpkg.com/@vapper/configer-vue-cli/-/configer-vue-cli-0.7.2.tgz#eb5796bb9d676318ca0299e15e098264a66b129e"
integrity sha512-13Chj0sELif9XW0L4fnDP3BVC4DevnS/1tk2oXRjyQIVvXa5DWXWnZR8a9RLJY7GFwnPNMKeN+IguDVym9THIA==
dependencies:
- "@vapper/webpack-config" "^0.5.4"
+ "@vapper/webpack-config" "^0.5.6"
chalk "^2.4.2"
gzip-size "^5.1.1"
pretty-ms "^5.0.0"
@@ -1207,10 +1207,10 @@
fs-extra "^8.1.0"
serve-static "^1.14.1"
-"@vapper/webpack-config@^0.5.4":
- version "0.5.4"
- resolved "https://registry.yarnpkg.com/@vapper/webpack-config/-/webpack-config-0.5.4.tgz#217abc4d77d54273160b50971e8cc1e127d001b1"
- integrity sha512-70UIFSrEtjleSqDH6oUxS0jA3gW1BoxudMR/6+mw5RKRIGyT4kcFNVXdZP4AI4wJDxDJNhquWp6pARtwjFwD7A==
+"@vapper/webpack-config@^0.5.6":
+ version "0.5.6"
+ resolved "https://registry.yarnpkg.com/@vapper/webpack-config/-/webpack-config-0.5.6.tgz#5c554949c0623c4e641ec137bdd6f117d8961df1"
+ integrity sha512-pPBkDUdKQiP8sal9ZCrWStvLnYu//MD93lXTFFyGCNnyQCsxaQPdSpI4xSrkcVYNC5J8T4WXAeyKIgNz445rxw==
dependencies:
time-fix-plugin "^2.0.6"
webpack "^4.38.0"
@@ -10604,6 +10604,11 @@ vue-loader@^15.7.2:
vue-hot-reload-api "^2.3.0"
vue-style-loader "^4.1.0"
+vue-material-design-icons@^4.4.0:
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/vue-material-design-icons/-/vue-material-design-icons-4.4.0.tgz#57b213abd0fc29dd20b14f0627a51ed70293fb03"
+ integrity sha512-5SkO9ijY2jIjVmypliBWBMUB6i4ovbX2BwLqSNozRBcY7lb32+GzHrDkumoDwEMOHxe8gO6tIZimOYfBySQ+LQ==
+
vue-meta@^2.0.5:
version "2.3.1"
resolved "https://registry.yarnpkg.com/vue-meta/-/vue-meta-2.3.1.tgz#32a1c2634f49433f30e7e7a028aa5e5743f84f6a"