feat: add custom icons to the website
This commit adds icons from various sources as a single font file to the website. Icons can be inserted with the new Icon component.
This commit is contained in:
@@ -17,11 +17,15 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-col flex-start gap-1rem stats">
|
||||
<p>Stars: {{ repository.stargazers_count }}</p>
|
||||
<p>Forks: {{ repository.forks_count }}</p>
|
||||
<p>
|
||||
<a :href="repository.html_url">source</a>
|
||||
</p>
|
||||
<div class="stars">
|
||||
<Icon name="star" /> {{ repository.stargazers_count }}
|
||||
</div>
|
||||
<div class="forks">
|
||||
<Icon name="fork" /> {{ repository.forks_count }}
|
||||
</div>
|
||||
<div class="link">
|
||||
<a :href="repository.html_url"><i class="icon phunic-link" /></a>
|
||||
</div>
|
||||
</div>
|
||||
</ApiLoader>
|
||||
</div>
|
||||
|
||||
17
content/.vuepress/components/Icon.vue
Normal file
17
content/.vuepress/components/Icon.vue
Normal file
@@ -0,0 +1,17 @@
|
||||
<template>
|
||||
<i :class="`icon phunic-${props.name}`" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const props = defineProps({
|
||||
name: {
|
||||
default: '',
|
||||
required: true,
|
||||
type: String,
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
@import '../styles/fonts.less';
|
||||
</style>
|
||||
Reference in New Issue
Block a user