Add Makefile, package.json, and initial configuration for VitePress and Slidev integration

- Introduced a Makefile for streamlined commands related to building, running, and managing presentations.
- Created package.json to define project metadata, dependencies, and scripts for development and testing.
- Added .gitignore entries to exclude build artifacts and temporary files from version control.
- Included playwright.config.mjs for end-to-end testing setup with Playwright.
- Added README.md for project documentation, outlining setup instructions and development guidelines.
This commit is contained in:
Le Prévost-Corvellec Arnault
2026-04-11 15:59:20 +02:00
parent 10f7798afb
commit 354c8cd9ef
70 changed files with 16388 additions and 2469 deletions
+43
View File
@@ -0,0 +1,43 @@
<script setup lang="ts">
import { ref, computed, onMounted, watch } from 'vue'
import { withBase } from 'vitepress'
import QRCode from 'qrcode'
const props = defineProps<{ path: string }>()
const canvas = ref<HTMLCanvasElement | null>(null)
const href = computed(() => withBase(props.path))
const displayHost = computed(() => {
if (typeof window === 'undefined') return href.value
const abs = new URL(href.value, window.location.origin).href
return abs.replace(/^https?:\/\//, '')
})
const fullHref = computed(() => {
if (typeof window === 'undefined') return href.value
return new URL(href.value, window.location.origin).href
})
async function draw() {
if (!canvas.value || typeof window === 'undefined') return
const url = new URL(href.value, window.location.origin).href
await QRCode.toCanvas(canvas.value, url, {
width: 200,
margin: 1,
color: { dark: '#0d1115ff', light: '#ffffffff' },
})
}
onMounted(draw)
watch(href, draw)
</script>
<template>
<div class="qr-deck">
<a class="qr-link" :href="href">{{ displayHost }}</a>
<div class="qrcode-wrap">
<canvas ref="canvas" role="img" :aria-label="`QR code vers ${fullHref}`" />
</div>
</div>
</template>