Compare commits
2 Commits
00594c8125
...
14c4d0b9e0
| Author | SHA1 | Date | |
|---|---|---|---|
| 14c4d0b9e0 | |||
| a098e22e20 |
@@ -16,6 +16,31 @@ export default defineConfig({
|
||||
[ 'link', { rel: 'preconnect', href: 'https://fonts.googleapis.com' }],
|
||||
[ 'link', { rel: 'preconnect', href: 'https://fonts.gstatic.com', crossorigin: '' }],
|
||||
[ 'link', { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&family=Victor+Mono:ital,wght@0,100..700;1,100..700&display=swap' }],
|
||||
|
||||
/*
|
||||
<!-- Google tag (gtag.js) -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-L6F3Z6SBC7"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'G-L6F3Z6SBC7');
|
||||
</script>
|
||||
*/
|
||||
[
|
||||
'script',
|
||||
{ async: '', src: 'https://www.googletagmanager.com/gtag/js?id=G-L6F3Z6SBC7' }
|
||||
],
|
||||
[
|
||||
'script',
|
||||
{},
|
||||
`window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', 'G-L6F3Z6SBC7');`
|
||||
]
|
||||
|
||||
],
|
||||
transformHead({assets}) {
|
||||
// put the path of local assets into the <head>
|
||||
|
||||
@@ -3,14 +3,14 @@ import { h } from 'vue'
|
||||
import type { Theme } from 'vitepress'
|
||||
import DefaultTheme from 'vitepress/theme-without-fonts' // WITHOUT fonts
|
||||
import './style.css'
|
||||
import IntroVideo from "../../components/IntroVideo.vue";
|
||||
import IntroVideoAutoplay from "../../components/IntroVideoAutoplay.vue";
|
||||
|
||||
export default {
|
||||
extends: DefaultTheme,
|
||||
Layout: () => {
|
||||
return h(DefaultTheme.Layout, null, {
|
||||
// https://vitepress.dev/guide/extending-default-theme#layout-slots
|
||||
'home-hero-actions-after': () => h(IntroVideo),
|
||||
'home-hero-actions-after': () => h(IntroVideoAutoplay),
|
||||
})
|
||||
},
|
||||
enhanceApp({ app, router, siteData }) {
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
<template>
|
||||
<div style="margin-top: 1.5em; margin-bottom: 1.5em;">
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/_sqzehuqWXw?si=SY04mCk9MhiBPFLP" title="Dexorder on YouTube" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
|
||||
<!-- NOTE: add ?autoplay=1 to the src query string-->
|
||||
<iframe style="display: inline-block" width="560" height="315" :src="`https://www.youtube.com/embed/${idAndSi}&autoplay=${autoplay?'1':'0'}`" title="Dexorder on YouTube" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
const idAndSi = '_sqzehuqWXw?si=SY04mCk9MhiBPFLP'
|
||||
const props = defineProps({autoplay: {type: Boolean, default: false}})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
7
src/components/IntroVideoAutoplay.vue
Normal file
7
src/components/IntroVideoAutoplay.vue
Normal file
@@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<intro-video autoplay/>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import IntroVideo from "./IntroVideo.vue";
|
||||
</script>
|
||||
Reference in New Issue
Block a user