Skip to content

Commit

Permalink
chore: improve demo slides source (#1965)
Browse files Browse the repository at this point in the history
  • Loading branch information
KermanX authored Dec 1, 2024
1 parent 5678108 commit 8bb6bc1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
31 changes: 14 additions & 17 deletions demo/starter/slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,16 @@ mdc: true

Presentation slides for developers

<div class="pt-12">
<span @click="$slidev.nav.next" class="px-2 py-1 rounded cursor-pointer" flex="~ justify-center items-center gap-2" hover="bg-white bg-opacity-10">
Press Space for next page <div class="i-carbon:arrow-right inline-block"/>
</span>
<div @click="$slidev.nav.next" class="mt-12 py-1" hover:bg="white op-10">
Press Space for next page <carbon:arrow-right />
</div>

<div class="abs-br m-6 flex gap-2">
<button @click="$slidev.nav.openInEditor()" title="Open in Editor" class="text-xl slidev-icon-btn opacity-50 !border-none !hover:text-white">
<div class="i-carbon:edit" />
<div class="abs-br m-6 text-xl">
<button @click="$slidev.nav.openInEditor" title="Open in Editor" class="slidev-icon-btn">
<carbon:edit />
</button>
<a href="https://github.com/slidevjs/slidev" target="_blank" alt="GitHub" title="Open in GitHub"
class="text-xl slidev-icon-btn opacity-50 !border-none !hover:text-white">
<carbon-logo-github />
<a href="https://github.com/slidevjs/slidev" target="_blank" class="slidev-icon-btn">
<carbon:logo-github />
</a>
</div>

Expand Down Expand Up @@ -98,12 +95,12 @@ Hover on the bottom-left corner to see the navigation's controls panel, [learn m

## Keyboard Shortcuts

| | |
| --- | --- |
| <kbd>right</kbd> / <kbd>space</kbd>| next animation or slide |
| | |
| --------------------------------------------------- | --------------------------- |
| <kbd>right</kbd> / <kbd>space</kbd> | next animation or slide |
| <kbd>left</kbd> / <kbd>shift</kbd><kbd>space</kbd> | previous animation or slide |
| <kbd>up</kbd> | previous slide |
| <kbd>down</kbd> | next slide |
| <kbd>up</kbd> | previous slide |
| <kbd>down</kbd> | next slide |

<!-- https://sli.dev/guide/animations.html#click-animation -->
<img
Expand All @@ -124,14 +121,14 @@ layoutClass: gap-16
You can use the `Toc` component to generate a table of contents for your slides:

```html
<Toc minDepth="1" maxDepth="1"></Toc>
<Toc minDepth="1" maxDepth="1" />
```

The title will be inferred from your slide content, or you can override it with `title` and `level` in your frontmatter.

::right::

<Toc v-click minDepth="1" maxDepth="2"></Toc>
<Toc text-sm minDepth="1" maxDepth="2" />

---
layout: image-right
Expand Down
4 changes: 4 additions & 0 deletions packages/client/styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ html {
pointer-events: none;
}

.slidev-layout a.slidev-icon-btn {
@apply border-none hover:border-none hover:text-white;
}

.slidev-vclick-target {
@apply transition-opacity duration-100;
}
Expand Down

0 comments on commit 8bb6bc1

Please sign in to comment.