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

Commit ce10750

Browse files
Merge branch 'master' into testimonial-duplicate-key
2 parents d52940a + f189b3f commit ce10750

File tree

3 files changed

+28
-8
lines changed

3 files changed

+28
-8
lines changed

src/components/Component.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
<div id="stats" class="section">
7777
<div class="title">Stats</div>
7878
<div id="statsContent" class="content">
79-
<component-stat v-for="stat in stats" :key="stat.id" :propName="stat.prop" :imageURL="stat.image" :propValue="stat.value" />
79+
<component-stat v-for="stat in stats" :key="stat.id" :propName="stat.prop" :imageURL="stat.image" :propValue="stat.value" :statURL="stat.url"/>
8080
</div>
8181
</div>
8282
<div id="contributors" class="section">
@@ -221,7 +221,8 @@ A watcher has been added to the component to render the details dynamically when
221221
{
222222
prop: 'commits',
223223
image: require('../assets/component/commit.png'),
224-
value: details.commits
224+
value: details.commits,
225+
url : details.github_url
225226
},
226227
{
227228
prop: 'version',

src/components/ComponentStat.vue

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<template>
22
<div id="stat">
3-
<img :src="imageURL" :alt="propName" />
4-
<span>{{ propValue }} {{ propName }}</span>
3+
<a :href="statURL" :v-if="statURL" target="_blank">
4+
<img :src="imageURL" :alt="propName" />
5+
<span>{{ propValue }} {{ propName }}</span>
6+
</a>
57
</div>
68
</template>
79
<script>
@@ -36,6 +38,10 @@ export default {
3638
required: true,
3739
default: '',
3840
note: 'Statistic of the property (a numerical in most cases).'
41+
},
42+
statURL: {
43+
required: true,
44+
note: 'Other links relevant to the stat'
3945
}
4046
}
4147
};
@@ -54,4 +60,17 @@ export default {
5460
text-align: center;
5561
}
5662
}
63+
64+
#stat a {
65+
display: flex;
66+
flex-direction: column;
67+
align-items: center;
68+
img {
69+
height: 50px;
70+
margin: 10px;
71+
}
72+
span {
73+
text-align: center;
74+
}
75+
}
5776
</style>

src/components/NavBar.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
<div id="mobileNavHeading">
1212
<router-link to="/"><h1 id="bio">Bio</h1><h1 id="js">JS</h1></router-link>
1313
</div>
14-
<router-link class="navLink" :class="active=='components'?'active':''" to="/components"><span>Components</span></router-link>
15-
<router-link class="navLink" :class="active=='guide'?'active':''" to="/guide"><span>Guide</span></router-link>
16-
<router-link class="navLink" :class="active=='about'?'active':''" to="/about"><span>About</span></router-link>
17-
<router-link class="navLink" :class="active=='contact_us'?'active':''" to="/contact"><span>Contact Us</span></router-link>
14+
<router-link class="navLink" active-class="active" to="/components"><span>Components</span></router-link>
15+
<router-link class="navLink" active-class="active" to="/guide"><span>Guide</span></router-link>
16+
<router-link class="navLink" active-class="active" to="/about"><span>About</span></router-link>
17+
<router-link class="navLink" active-class="active" to="/contact"><span>Contact Us</span></router-link>
1818
<div class="close">
1919
<img @click="closeMenu()" src="../../static/close.png" alt="Close menu">
2020
</div>

0 commit comments

Comments
 (0)