Last active
November 22, 2023 10:57
-
-
Save a-h/e7450ea6adad91394431ea87cf9f83db to your computer and use it in GitHub Desktop.
slidev two columns with header layout
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
<!-- | |
Usage: | |
```md | |
--- | |
layout: two-cols-header | |
--- | |
This shows up across both | |
::left:: | |
# Left | |
This shows on the left | |
::right:: | |
# Right | |
This shows on the right | |
``` | |
--> | |
<script setup lang="ts"> | |
const props = defineProps({ | |
class: { | |
type: String, | |
}, | |
}) | |
</script> | |
<template> | |
<div class="slidev-layout two-columns w-full h-full"> | |
<div class="col-span-2"> | |
<slot /> | |
</div> | |
<div class="grid grid-cols-2 grid-rows-2"> | |
<div class="col-left" :class="props.class"> | |
<slot name="left" /> | |
</div> | |
<div class="col-right" :class="props.class"> | |
<slot name="right" /> | |
</div> | |
</div> | |
</div> | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add the file as
layouts/two-cols-header.vue
See https://github.com/slidevjs/slidev