Skip to content

Commit

Permalink
feat: add two-thirds layout
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarosabu committed Oct 8, 2024
1 parent 8241709 commit 639dd9f
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 2 deletions.
41 changes: 40 additions & 1 deletion example.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,45 @@ currentAction.value.play()
</template>
```

---
layout: two-thirds
---
Awiwiiw

```vue
// Model.vue
<script setup lang="ts">
import { useAnimations, useGLTF } from '@tresjs/cientos'
const { scene: model, animations } = await useGLTF(
'models/ugly-bunny.gltf',
)
const { actions, mixer } = useAnimations(animations, model)
const currentAction = ref(actions.Greeting)
currentAction.value.play()
</script>
<template>
<primitive :object="model" />
</template>
```

::right::

```vue
<template>
<TresCanvas
clear-color="”#82DBC5”"
window-size
>
<TresPerspectiveCamera />
<Suspense>
<Model />
</Suspense>
</TresCanvas>
</template>
```
---
layout: text-window

Expand All @@ -195,8 +234,8 @@ Use code snippets and get the highlighting directly into a nice looking window!
```ts
// main.ts

import { createApp } from 'vue'
import { createDynamicForms } from '@asigloo/vue-dynamic-forms'
import { createApp } from 'vue'

const VueDynamicForms = createDynamicForms({
// Global Options go here
Expand Down
12 changes: 12 additions & 0 deletions layouts/two-thirds.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<template>
<div class="slidev-layout">
<div class="flex gap-16">
<div class="prose w-2/3">
<slot name="default"></slot>
</div>
<div class="prose w-1/3">
<slot name="right"></slot>
</div>
</div>
</div>
</template>
2 changes: 1 addition & 1 deletion styles/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ html:not(.dark) #slide-content {
}

.slidev-code-wrapper {
max-width: 400px;
max-width: 600px;
}

iframe label.btn {
Expand Down

0 comments on commit 639dd9f

Please sign in to comment.