Skip to content

Commit 8bb6bc1

Browse files
authoredDec 1, 2024··
chore: improve demo slides source (#1965)
1 parent 5678108 commit 8bb6bc1

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed
 

‎demo/starter/slides.md

+14-17
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,16 @@ mdc: true
2626

2727
Presentation slides for developers
2828

29-
<div class="pt-12">
30-
<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">
31-
Press Space for next page <div class="i-carbon:arrow-right inline-block"/>
32-
</span>
29+
<div @click="$slidev.nav.next" class="mt-12 py-1" hover:bg="white op-10">
30+
Press Space for next page <carbon:arrow-right />
3331
</div>
3432

35-
<div class="abs-br m-6 flex gap-2">
36-
<button @click="$slidev.nav.openInEditor()" title="Open in Editor" class="text-xl slidev-icon-btn opacity-50 !border-none !hover:text-white">
37-
<div class="i-carbon:edit" />
33+
<div class="abs-br m-6 text-xl">
34+
<button @click="$slidev.nav.openInEditor" title="Open in Editor" class="slidev-icon-btn">
35+
<carbon:edit />
3836
</button>
39-
<a href="https://github.com/slidevjs/slidev" target="_blank" alt="GitHub" title="Open in GitHub"
40-
class="text-xl slidev-icon-btn opacity-50 !border-none !hover:text-white">
41-
<carbon-logo-github />
37+
<a href="https://github.com/slidevjs/slidev" target="_blank" class="slidev-icon-btn">
38+
<carbon:logo-github />
4239
</a>
4340
</div>
4441

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

9996
## Keyboard Shortcuts
10097

101-
| | |
102-
| --- | --- |
103-
| <kbd>right</kbd> / <kbd>space</kbd>| next animation or slide |
98+
| | |
99+
| --------------------------------------------------- | --------------------------- |
100+
| <kbd>right</kbd> / <kbd>space</kbd> | next animation or slide |
104101
| <kbd>left</kbd> / <kbd>shift</kbd><kbd>space</kbd> | previous animation or slide |
105-
| <kbd>up</kbd> | previous slide |
106-
| <kbd>down</kbd> | next slide |
102+
| <kbd>up</kbd> | previous slide |
103+
| <kbd>down</kbd> | next slide |
107104

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

126123
```html
127-
<Toc minDepth="1" maxDepth="1"></Toc>
124+
<Toc minDepth="1" maxDepth="1" />
128125
```
129126

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

132129
::right::
133130

134-
<Toc v-click minDepth="1" maxDepth="2"></Toc>
131+
<Toc text-sm minDepth="1" maxDepth="2" />
135132

136133
---
137134
layout: image-right

‎packages/client/styles/index.css

+4
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ html {
4040
pointer-events: none;
4141
}
4242

43+
.slidev-layout a.slidev-icon-btn {
44+
@apply border-none hover:border-none hover:text-white;
45+
}
46+
4347
.slidev-vclick-target {
4448
@apply transition-opacity duration-100;
4549
}

0 commit comments

Comments
 (0)
Please sign in to comment.