Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 9a5f8cd

Browse files
committed
feat: add Github star button to the footer
1 parent 4abf038 commit 9a5f8cd

6 files changed

Lines changed: 71 additions & 39 deletions

File tree

assets/css/main.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,11 @@ ul.icons a {
132132
.corner-ribbon.sticky{
133133
position: fixed;
134134
}
135+
136+
.el-footer{
137+
@media print {
138+
display: none !important;
139+
}
140+
margin: 0 auto;
141+
padding-top: 10px;
142+
}

nuxt.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export default {
5050
/*
5151
** Nuxt.js modules
5252
*/
53-
modules: [],
53+
modules: ["vue-github-buttons/nuxt"],
5454
/*
5555
** Build configuration
5656
*/

package-lock.json

Lines changed: 45 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@
1616
"lintfix": "eslint --fix --ext .js,.vue --ignore-path .gitignore ."
1717
},
1818
"dependencies": {
19+
"element-ui": "^2.4.11",
1920
"nuxt": "^2.0.0",
20-
"element-ui": "^2.4.11"
21+
"vue-github-buttons": "^3.1.0"
2122
},
2223
"devDependencies": {
2324
"@commitlint/cli": "^8.1.0",

pages/index.vue

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
<div class="corner-ribbon top-right sticky no-print" @click="print()">
1313
Print me
1414
</div>
15+
<el-footer>
16+
<gh-btns-star slug="dcyou/resume" />
17+
</el-footer>
1518
</el-container>
1619
<!-- @sproogen thanks for inspiration -->
1720
</template>
@@ -25,7 +28,14 @@ import Education from "~/components/Education.vue"
2528
import Hobbies from "~/components/Hobbies.vue"
2629
2730
export default {
28-
components: { Header, About, Projects, Experience, Education, Hobbies },
31+
components: {
32+
Header,
33+
About,
34+
Projects,
35+
Experience,
36+
Education,
37+
Hobbies
38+
},
2939
data() {
3040
return {}
3141
},

test/__snapshots__/index.spec.js.snap

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`Index Default Template 1`] = `
4-
<section class="el-container">
4+
<section class="el-container is-vertical">
55
<main class="el-main main-container" id="main">
66
<div class="container">
77
<div class="el-row">
@@ -374,5 +374,8 @@ exports[`Index Default Template 1`] = `
374374
<div class="corner-ribbon top-right sticky no-print">
375375
Print me
376376
</div>
377+
<footer class="el-footer" style="height: 60px;">
378+
<gh-btns-star slug="dcyou/resume"></gh-btns-star>
379+
</footer>
377380
</section>
378381
`;

0 commit comments

Comments
 (0)