mirror of https://github.com/vuejs/vitepress
parent
1617a0438f
commit
1ff0cba0ad
@ -0,0 +1,36 @@
|
||||
<script setup lang="ts">
|
||||
import Print from "./icons/Print.vue";
|
||||
|
||||
function printPDF() {
|
||||
window.print()
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<button @click="printPDF" type="button" title="Print PDF" aria-label="Print PDF" class="print">
|
||||
<Print class="icon" />
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.print{
|
||||
border: 0;
|
||||
background-color: var(--c-white);
|
||||
color: var(--c-text-light-2);
|
||||
margin-left: 0.8em;
|
||||
width: 2.6em;
|
||||
height: 2.6em;
|
||||
display: none;
|
||||
}
|
||||
.print:hover{
|
||||
color: var(--vt-c-text-1);
|
||||
transition: color .25s;
|
||||
}
|
||||
|
||||
@media (min-width: 720px) {
|
||||
.print {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
aria-hidden="true"
|
||||
role="img"
|
||||
preserveAspectRatio="xMidYMid meet"
|
||||
viewBox="0 0 1664 1536"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M384 1408h896v-256H384v256zm0-640h896V384h-160q-40 0-68-28t-28-68V128H384v640zm1152 64q0-26-19-45t-45-19t-45 19t-19 45t19 45t45 19t45-19t19-45zm128 0v416q0 13-9.5 22.5t-22.5 9.5h-224v160q0 40-28 68t-68 28H352q-40 0-68-28t-28-68v-160H32q-13 0-22.5-9.5T0 1248V832q0-79 56.5-135.5T192 640h64V96q0-40 28-68t68-28h672q40 0 88 20t76 48l152 152q28 28 48 76t20 88v256h64q79 0 135.5 56.5T1664 832z" />
|
||||
</svg>
|
||||
</template>
|
Loading…
Reference in new issue