hpg/content/.vitepress/theme/DownloadLink.vue

48 lines
926 B
Vue
Raw Normal View History

2025-01-18 08:48:02 +00:00
<script setup>
import icon from './pdf.png';
const { file, text } = defineProps([ 'file', 'text' ]);
</script>
<template>
2025-01-18 14:34:27 +00:00
<a class="downloadlink" :href="'/bijlagen/' + file" target="_blank">
2025-01-18 08:48:02 +00:00
<span>{{ text }}</span>
2025-01-18 14:34:27 +00:00
<em>(.pdf)</em>
2025-01-18 08:48:02 +00:00
</a>
</template>
<style scoped>
.downloadlink {
2025-01-18 14:34:27 +00:00
display: inline-block;
text-decoration: none;
margin: 0 1.75rem 0.5rem 0;
2025-01-18 08:48:02 +00:00
}
.downloadlink::before {
display: inline-block;
content: '';
background-image: url('./pdf.png');
2025-01-18 14:34:27 +00:00
background-size: 1.5em 1.875em;
width: 1.5em;
height: 1.875em;
vertical-align: -0.5em;
margin-right: .5em;
}
.downloadlink::after {
display: none !important;
}
.downloadlink span {
text-decoration: underline;
}
.downloadlink:hover span {
text-decoration: none;
2025-01-18 08:48:02 +00:00
}
2025-01-18 14:34:27 +00:00
.downloadlink em {
font-style: normal;
margin-left: 0.5rem;
color: var(--vp-c-text-2);
2025-01-18 08:48:02 +00:00
}
</style>