Skip to content

Commit

Permalink
chore(playground): added vue-semantic-structure
Browse files Browse the repository at this point in the history
  • Loading branch information
ThornWalli committed Sep 26, 2024
1 parent 5bd0e0a commit 2f0355d
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 23 deletions.
8 changes: 8 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
"vite-svg-loader": "5.1.0",
"vitepress": "1.3.4",
"vitest": "2.1.1",
"vue-semantic-structure": "^1.0.0-next.9",
"wicg-inert": "3.1.3"
}
}
10 changes: 6 additions & 4 deletions playground/components/PreviewContainer.vue
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
<template>
<section class="preview-container">
<content-container class="preview-container">
<div class="preview">
<div>
<slot name="default" />
</div>
</div>
<h2 class="info">
<content-headline class="info">
<span v-font="$getFont('Quicksand', 400, 'normal')">
<slot name="title">
<p>Preview Info</p>
</slot>
</span>
</h2>
</section>
</content-headline>
</content-container>
</template>

<script setup>
import { useBoosterFonts } from '#imports';
import ContentContainer from 'vue-semantic-structure/ContentContainer.vue';
import ContentHeadline from 'vue-semantic-structure/ContentHeadline.vue';
const { $getFont } = useBoosterFonts();
</script>

Expand Down
8 changes: 5 additions & 3 deletions playground/components/modules/ImageText.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<section
<content-container
v-font="[
$getFont('Merriweather', 300, 'normal'),
$getFont('Montserrat Alternates', 700, 'normal', { selector: 'h2' })
Expand All @@ -17,15 +17,17 @@
/>
</div>
<div class="text">
<h2>{{ headline }}</h2>
<content-headline>{{ headline }}</content-headline>
<div v-html="content" />
</div>
</div>
</section>
</content-container>
</template>

<script setup>
import BoosterPicture from '#booster/components/BoosterPicture';
import ContentContainer from 'vue-semantic-structure/ContentContainer.vue';
import ContentHeadline from 'vue-semantic-structure/ContentHeadline.vue';
import { useBoosterFonts } from '#imports';
const { $getFont } = useBoosterFonts();
Expand Down
9 changes: 5 additions & 4 deletions playground/components/modules/Stage.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<template>
<section class="component-stage" :level="-1">
<header class="component-stage" :level="-1">
<booster-picture
class="background"
:title="picture.title"
:alt="picture.alt"
:sources="picture.sources"
/>
<h1 class="headline">
<content-headline class="headline">
<span
v-font="[
$getFont('Montserrat Alternates', 700, 'normal', {
Expand All @@ -18,19 +18,20 @@
<span class="content">{{ content }}</span>
<span class="claim">{{ claim }}</span>
</span>
</h1>
</content-headline>

<transition name="fade">
<span v-if="ready" class="arrow"><svg-chevron-down /></span>
</transition>

<booster-image class="logo" v-bind="image" :loading-spinner="null" />
</section>
</header>
</template>

<script setup>
import BoosterPicture from '#booster/components/BoosterPicture';
import BoosterImage from '#booster/components/BoosterImage';
import ContentHeadline from 'vue-semantic-structure/ContentHeadline.vue';
import SvgChevronDown from '@/assets/svg/chevron-down.svg';
import { useBoosterFonts } from '#imports';
import { ref, onMounted } from 'vue';
Expand Down
8 changes: 5 additions & 3 deletions playground/components/modules/TextFontA.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<section
<content-container
v-font="[
$getFont('Merriweather', 300, 'normal'),
$getFont('Merriweather', 700, 'normal', { selector: 'h1,h2' }),
Expand All @@ -13,15 +13,17 @@
class="component-text-font-a"
>
<div>
<h2>{{ headline }}</h2>
<content-headline>{{ headline }}</content-headline>
<div v-html="content" />
</div>
</section>
</content-container>
</template>

<script setup>
import { useBoosterFonts } from '#imports';
import { ref, onMounted } from 'vue';
import ContentContainer from 'vue-semantic-structure/ContentContainer.vue';
import ContentHeadline from 'vue-semantic-structure/ContentHeadline.vue';
const { $getFont } = useBoosterFonts();
const ready = ref(false);
Expand Down
8 changes: 5 additions & 3 deletions playground/components/modules/TextFontB.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<section :class="{ ready }" class="component-text-font-b">
<content-container :class="{ ready }" class="component-text-font-b">
<div
v-font="[
$getFont('Montserrat Alternates', 300, 'normal'),
Expand All @@ -13,15 +13,17 @@
})
]"
>
<h2>{{ headline }}</h2>
<content-headline>{{ headline }}</content-headline>
<div v-html="content" />
</div>
</section>
</content-container>
</template>

<script setup>
import { useBoosterFonts } from '#imports';
import { ref, onMounted } from 'vue';
import ContentContainer from 'vue-semantic-structure/ContentContainer.vue';
import ContentHeadline from 'vue-semantic-structure/ContentHeadline.vue';
const { $getFont } = useBoosterFonts();
const ready = ref(false);
Expand Down
8 changes: 6 additions & 2 deletions playground/components/modules/VideoVimeo.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<template>
<section v-font="[$getFont('Merriweather', 400)]" class="video-vimeo">
<content-container
v-font="[$getFont('Merriweather', 400)]"
class="video-vimeo"
>
<booster-vimeo v-bind="$attrs">
<template #default="{ videoData }">
<div class="description" v-html="videoData && videoData.description" />
Expand All @@ -8,12 +11,13 @@
<weak-hardware-overlay />
</template>
</booster-vimeo>
</section>
</content-container>
</template>

<script setup>
import BoosterVimeo from '#booster/components/BoosterVimeo';
import WeakHardwareOverlay from '@/components/WeakHardwareOverlay';
import ContentContainer from 'vue-semantic-structure/ContentContainer.vue';
import { useBoosterFonts } from '#imports';
const { $getFont } = useBoosterFonts();
Expand Down
8 changes: 6 additions & 2 deletions playground/components/modules/VideoYoutube.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
<template>
<section v-font="[$getFont('Merriweather', 400)]" class="video-youtube">
<content-container
v-font="[$getFont('Merriweather', 400)]"
class="video-youtube"
>
<booster-youtube v-bind="$attrs">
<template #afterPlayer>
<weak-hardware-overlay />
</template>
</booster-youtube>
<p v-if="text" v-html="text" />
</section>
</content-container>
</template>

<script setup>
import BoosterYoutube from '#booster/components/BoosterYoutube';
import WeakHardwareOverlay from '@/components/WeakHardwareOverlay';
import ContentContainer from 'vue-semantic-structure/ContentContainer.vue';
import { useBoosterFonts } from '#imports';
const { $getFont } = useBoosterFonts();
Expand Down
5 changes: 3 additions & 2 deletions playground/layouts/default.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<template>
<div>
<page-header v-model="menuOpened" v-bind="pageHeaderData" />
<main :inert="menuOpened">
<content-container :inert="menuOpened">
<slot />
</main>
</content-container>
<info-layer v-if="!$config.public.disableInfoLayer" critical />
<github-corner :url="$config.public.githubRepoUrl" />
</div>
Expand All @@ -12,6 +12,7 @@
<script setup>
import 'wicg-inert';
import { useBoosterHydrate, useRoute, useHead } from '#imports';
import ContentContainer from 'vue-semantic-structure/ContentContainer.vue';
import { defineAsyncComponent, ref, computed } from 'vue';
const hydrate = useBoosterHydrate();
Expand Down

0 comments on commit 2f0355d

Please sign in to comment.