Download links

This commit is contained in:
2025-01-18 09:48:02 +01:00
parent 54639f8d3b
commit 09f5c58829
13 changed files with 56 additions and 35 deletions

View File

@ -0,0 +1,31 @@
<script setup>
import icon from './pdf.png';
const { file, text } = defineProps([ 'file', 'text' ]);
</script>
<template>
<a class="downloadlink" :href="'/bijlagen/' + file">
<span>{{ text }}</span>
</a>
</template>
<style scoped>
.downloadlink {
display: block;
}
.downloadlink::before {
display: inline-block;
content: '';
background-image: url('./pdf.png');
background-size: 2.5em;
width: 2.5em;
height: 2.5em;
vertical-align: -0.75em;
}
.downloadlink + .downloadlink {
margin-top: 8px;
}
</style>

View File

@ -1,7 +1,11 @@
import DefaultTheme from 'vitepress/theme-without-fonts';
import DownloadLink from './DownloadLink.vue';
import './custom.css';
/** @type {import('vitepress').Theme} */
export default {
extends: DefaultTheme,
enhanceApp({ app }) {
app.component('DownloadLink', DownloadLink);
}
};

BIN
content/.vitepress/theme/pdf.png (Stored with Git LFS) Normal file

Binary file not shown.