Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions src/content/built-in/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ These tags work in every slide. The generator imports a component only into the
| `<slide-ng-toc />` | Table of contents from slide titles and levels. Options: `columns`, `listClass`, `listStyle`, `start`, `minDepth`, `maxDepth`, `mode`. See [Table of contents](../features/table-of-contents.md). |
| `<slide-ng-current-no />` | The number of the slide it is on. |
| `<slide-ng-total />` | The number of slides. |
| `<slide-ng-timer />` | The presenter timer as a clock; a click starts or pauses it. See [Timer](../features/timer.md). New in 3.5. |
| `<slide-ng-progress-bar />` | A bar that shows how far through the deck the slide is. Options: `position` (`top`, `bottom`, `inline`), `height`, `color`, `track`, `clicks`, `minutes`. See [Progress bar](../features/progress-bar.md). |
| `<slide-ng-title-renderer />` | The title of the slide it is on, as HTML: its inline markdown and `$math$` are drawn. `no="3"` shows the title of slide 3. Raw HTML in a title is shown as text. Slidev's `TitleRenderer`. |
| `<slide-ng-link to="3">text</slide-ng-link>` | A link to slide 3, or to a `routeAlias`. It has the prefix because `link` is a built-in HTML tag. The link has the slide's real address, so Ctrl or Cmd + click opens it in a new tab. `title="Details"` is the text when the tag has none. |
Expand Down
2 changes: 2 additions & 0 deletions src/content/features/context-menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ A right click on a slide opens a menu with the same actions as the bar. Hold Shi

When the navigation bar is out of sight, the menu also has Show Navigation Bar, which shows it for a few seconds. Once a viewer moved the bar, Reset Navigation Bar Position puts it back in the deck's own place. See [Shortcuts](../built-in/shortcuts.md#mouse).

Show Timer and Hide Timer put the [timer](./timer.md#without-the-presenter-page) over the slides or take it away (new in 3.5).

<ngmd-image src="/images/ui/context-menu-light.webp" alt="The right-click menu over a slide" caption="The context menu" width="480"></ngmd-image>

```md
Expand Down
1 change: 1 addition & 0 deletions src/content/features/interface-language.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ title: Konuşmam
The bar then has a language button, with a translate icon. Its menu lists the languages, each named in its own language, with the current one ticked. Choosing one keeps the address and the slide. It switches the slides, `<html lang>` and `dir`, the page title, the locale of the pipes and the interface text.

- The page loads again for the switch, because Angular fixes the locale when the app starts.
- A link can pick the language: `/1?lang=tr` opens slide 1 in Turkish, for that tab only, and takes `lang` off the address. A host redirect makes it short, for example `/tr /1?lang=tr 302` in `public/_redirects` on Netlify (see [Hosting](../guide/hosting.md#netlify)). New in 3.5.
- The choice is kept in the browser, per deck, like the other settings. The presenter and audience windows of one browser switch together. Another device keeps its own choice.
- A page starts in the entry file's language until the reader chooses another.
- It works in `dev`, in a build and in an offline folder.
Expand Down
24 changes: 23 additions & 1 deletion src/content/features/timer.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Timer
description: A stopwatch or countdown on the presenter page.
description: A stopwatch or countdown on the presenter page, over the slides, or inside a slide.
---

# Timer
Expand All @@ -24,4 +24,26 @@ The timer starts, pauses and resets from the buttons on the presenter page. Hove
- A restart of the dev server (`r`) keeps the timer too.
- The newest start, pause or reset wins, so a tab that comes back with the time it kept does not undo a later reset from another window.

## Without the presenter page

New in 3.5. To keep an eye on the time while you present from the slides alone:

- **Show Timer**, in the settings menu or the right-click menu, puts the timer over the slides. Drag it anywhere, and the place is kept in the browser.
- **Timer Minutes** in the settings sets the length here and now: a countdown of that many minutes in this browser, over the deck's `duration`. Empty goes back to the deck's. Every window of the deck in this browser follows it.
- **Timer Size** in the settings picks S, M or L.
- **Timer Fades** picks when it fades: **When Idle** (after 3 seconds without mouse movement, the default) or **Always** (faint until you hover it).
- Click the clock to start or pause it, or Tab to it and press Space or Enter. Hover it for reset and hide.

To put the clock in a slide or a layer, write `<slide-ng-timer />`:

```md
Time left: <slide-ng-timer class="text-4xl" />

<slide-ng-drag pos="700,40,200,_"><slide-ng-timer /></slide-ng-drag>
```

Style it with `class`, and wrap it in [`slide-ng-drag`](./draggable.md) to move it. A click starts or pauses it. In the overview and the PDF it is shown as plain text. In a layer, import `SlideTimer` from `slide-ng/builtin/slide-timer`.

Every timer shows the same shared time, so the presenter page, the floating timer and `<slide-ng-timer />` always agree.

A bar shows how much of the duration has passed. `progressBar: { minutes: true }` shows the minutes on the slides too, see [Progress bar](./progress-bar.md).
7 changes: 7 additions & 0 deletions src/content/guide/hosting.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ The build contains `_redirects`. Or use `netlify.toml`:
status = 200
```

Netlify reads `_redirects` before `netlify.toml`, so redirects of your own in `netlify.toml` never run: the build's catch-all matches first. Put them in `public/_redirects` instead. The build keeps those lines and adds its catch-all after them (3.5.1 and newer):

```txt
/tr /1?lang=tr 302!
/en /1?lang=en 302!
```

## Vercel

```json
Expand Down
Loading