Started incorporating the docs into the repo

This commit is contained in:
Aria Minaei 2021-09-04 15:44:31 +02:00
parent a3bec04088
commit c189bb2662
17 changed files with 2918 additions and 69 deletions

View 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>

View 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>