Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve demo slides source #1965

Merged
merged 2 commits into from
Dec 1, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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" 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 abs-br m-6 text-xl>
KermanX marked this conversation as resolved.
Show resolved Hide resolved
<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;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried not to use !important here

}

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