Started incorporating the docs into the repo
This commit is contained in:
parent
a3bec04088
commit
c189bb2662
17 changed files with 2918 additions and 69 deletions
39
docs/.vuepress/components/KeyboardShortcut.vue
Normal file
39
docs/.vuepress/components/KeyboardShortcut.vue
Normal file
|
@ -0,0 +1,39 @@
|
|||
<template>
|
||||
<span class="wrapper">
|
||||
<span class="chosen-platform">{{isMac ? 'mac' : 'pc'}}</span>
|
||||
{{textForChosenPlatform}}
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from "vue";
|
||||
export default Vue.extend({
|
||||
props: {
|
||||
mac: String,
|
||||
pc: String
|
||||
},
|
||||
beforeMount() {},
|
||||
computed: {
|
||||
textForChosenPlatform() {
|
||||
return this.isMac ? this.mac : this.pc;
|
||||
}
|
||||
},
|
||||
data(opts) {
|
||||
const isMac = true;
|
||||
return { isMac };
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.wrapper {
|
||||
background: #f3f3f3;
|
||||
padding: 0 5px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.chosen-platform {
|
||||
font-size: 0.7em;
|
||||
font-variant: small-caps;
|
||||
}
|
||||
</style>
|
29
docs/.vuepress/components/VideoWithDescription.vue
Normal file
29
docs/.vuepress/components/VideoWithDescription.vue
Normal file
|
@ -0,0 +1,29 @@
|
|||
<!-- Creates a <video /> with an aria-described-by attribute for better a11y.
|
||||
Example:
|
||||
<VideoWtihDescription src="/path/from/.vuepress/plublic/file.mp4">Description (this must be in one line, otherwise parser will reak) </VideoWithDescription>
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<video width="100%" controls v-bind:src="src" v-bind:aria-describedby="descriptorId"/>
|
||||
<div v-bind:id="descriptorId" style="display: none;" aria-hidden="true">
|
||||
<slot/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from "vue";
|
||||
export default Vue.extend({
|
||||
props: {
|
||||
src: String
|
||||
},
|
||||
computed: {
|
||||
descriptorId() {
|
||||
return (
|
||||
"aria-description-video--" +
|
||||
this.src.replace(/[^a-zA-Z0-9]{1}/g, "-").toLowerCase()
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue