-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
64 changed files
with
1,530 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<template> | ||
<div class="color-swatch" :style="`background-color: ${color}`" /> | ||
</template> | ||
|
||
<script setup> | ||
const { color } = defineProps({ | ||
color: String, | ||
}); | ||
</script> | ||
|
||
<style scoped> | ||
.color-swatch { | ||
width: 100%; | ||
padding: 50%; | ||
margin: auto; | ||
border-radius: 0.25rem; | ||
border-color: grey; | ||
border-width: 1px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<template> | ||
<div class="container"> | ||
<img v-if="!$props.noVisualURL" :src="$props.visualURL ?? $props.downloadURL" style="max-width: 100%; max-height: 300px;"> | ||
<VPButton | ||
tag="a" | ||
size="medium" | ||
theme="brand" | ||
:text="`Download ${$props.type}`" | ||
:href="$props.downloadURL" | ||
download | ||
/> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { VPButton } from "vitepress/theme" | ||
// downloadURL prop, visualURL prop (optional), if no visualURL, use downloadURL | ||
const props = defineProps<{ | ||
downloadURL: string; | ||
visualURL?: string; | ||
noVisualURL?: boolean; | ||
type: string; | ||
}>(); | ||
</script> | ||
|
||
<style scoped> | ||
div.container { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
flex-direction: column; | ||
gap: 8px; | ||
} | ||
a { | ||
text-decoration: none; | ||
} | ||
a:hover { | ||
cursor: pointer; | ||
} | ||
img { | ||
/* Disable interactions, prevent right click save. */ | ||
pointer-events: none; | ||
z-index: 0; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<script setup lang="ts"> | ||
import 'vidstack/player/styles/default/theme.css'; | ||
import 'vidstack/player/styles/default/layouts/video.css'; | ||
import 'vidstack/player'; | ||
import 'vidstack/player/layouts/default'; | ||
import 'vidstack/player/ui'; | ||
const props = defineProps<{ | ||
title: string | ||
src: string | ||
}>(); | ||
</script> | ||
|
||
<template> | ||
<media-player load="visible" view-type="video" streamType="on-demand" :title="props.title" :src="props.src"> | ||
<media-provider> | ||
</media-provider> | ||
<media-video-layout /> | ||
</media-player> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.