Skip to content

Commit

Permalink
feat: introduce frame layouts (#361)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrugman committed Oct 1, 2021
1 parent d76e9d4 commit da68608
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 0 deletions.
23 changes: 23 additions & 0 deletions packages/client/layouts/iframe-left.vue
@@ -0,0 +1,23 @@
<script setup lang="ts">
import { defineProps, ref } from 'vue'
const props = defineProps({
class: {
type: String,
},
url: {
type: String,
},
})
const url = ref(props.url)
</script>

<template>
<div class="grid grid-cols-2 w-full h-full">
<div>
<iframe id="frame" class="w-full h-full" :src="url"> </iframe>
</div>
<div class="slidev-layout default" :class="props.class">
<slot />
</div>
</div>
</template>
23 changes: 23 additions & 0 deletions packages/client/layouts/iframe-right.vue
@@ -0,0 +1,23 @@
<script setup lang="ts">
import { defineProps, ref } from 'vue'
const props = defineProps({
class: {
type: String,
},
url: {
type: String,
},
})
const url = ref(props.url)
</script>

<template>
<div class="grid grid-cols-2 w-full h-full">
<div class="slidev-layout default" :class="props.class">
<slot />
</div>
<div>
<iframe id="frame" class="w-full h-full" :src="url"> </iframe>
</div>
</div>
</template>
17 changes: 17 additions & 0 deletions packages/client/layouts/iframe.vue
@@ -0,0 +1,17 @@
<script setup lang="ts">
import { defineProps, ref } from 'vue'
const props = defineProps({
url: {
type: String,
},
})
const url = ref(props.url)
</script>

<template>
<div class="h-full w-full">
<div>
<iframe id="frame" class="w-full h-full" :src="url"> </iframe>
</div>
</div>
</template>

0 comments on commit da68608

Please sign in to comment.