slidev-theme-frankfurt 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -13,7 +13,7 @@ A theme for [Slidev](https://github.com/slidevjs/slidev), inspired by the Frankf
13
13
  run `npm run dev` to check out the slides for more details of how to start writing a theme
14
14
  -->
15
15
 
16
- ![](screenshots/001.png)
16
+ ![](screenshots/01.png)
17
17
 
18
18
  ## Install
19
19
 
@@ -51,7 +51,7 @@ This theme provides the following component:
51
51
  </Item>
52
52
  ```
53
53
 
54
- ![](screenshots/006.png)
54
+ ![](screenshots/06.png)
55
55
 
56
56
  ## Contributing
57
57
 
@@ -15,13 +15,15 @@
15
15
  <script setup lang="ts">
16
16
  import { computed } from "vue";
17
17
 
18
+ import type { SlideInfoBase } from "@slidev/types";
19
+
18
20
  const sections = computed(() => {
19
21
  const result: [string, number[]][] = [];
20
22
  let pages: number[] = [];
21
23
  let title = "";
22
- for(let i = 1; i < $slidev.nav.rawRoutes.length; i++) {
23
- const route = $slidev.nav.rawRoutes[i];
24
- const section = route.meta?.slide?.frontmatter?.section;
24
+ for(let i = 1; i < $slidev.nav.slides.length; i++) {
25
+ const slide = $slidev.nav.slides[i];
26
+ const section = (slide.meta?.slide as SlideInfoBase)?.frontmatter?.section;
25
27
  if(section) {
26
28
  if(pages.length > 0) result.push([title, pages]);
27
29
  pages = [];
@@ -8,7 +8,7 @@
8
8
  </div>
9
9
  <div class="flex-1 p-1" style="background:#3333B3">
10
10
  <div class="float-right">
11
- <SlideCurrentNo /> /
11
+ {{ $slidev.nav.currentPage }} /
12
12
  <SlidesTotal />
13
13
  </div>
14
14
  {{ $slidev.configs.date || new Date().toLocaleDateString() }}
@@ -9,6 +9,15 @@ declare global {
9
9
 
10
10
  declare module 'vue' {
11
11
  interface ComponentCustomProperties {
12
+ $slidev: UnwrapNestedRefs<SlidevContext>;
12
13
  $renderContext: string;
13
14
  }
14
15
  }
16
+
17
+ declare module '@slidev/types' {
18
+ interface SlidevConfig {
19
+ infoLine?: boolean;
20
+ date?: string;
21
+ author?: string;
22
+ }
23
+ }
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slidev-theme-frankfurt",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "type": "module",
5
5
  "description": "A theme for Slidev, inspired by the Frankfurt theme in Beamer.",
6
6
  "repository": {
@@ -24,14 +24,14 @@
24
24
  "screenshot": "slidev export example.md --per-slide --format png --output screenshots"
25
25
  },
26
26
  "dependencies": {
27
- "@slidev/types": "^0.43.14",
27
+ "@slidev/types": "^0.48.3",
28
28
  "codemirror-theme-vars": "^0.1.2",
29
29
  "prism-theme-vars": "^0.2.4",
30
- "theme-vitesse": "^0.7.3"
30
+ "theme-vitesse": "^0.7.7"
31
31
  },
32
32
  "devDependencies": {
33
- "@slidev/cli": "^0.43.14",
34
- "playwright-chromium": "^1.39.0"
33
+ "@slidev/cli": "^0.48.3",
34
+ "playwright-chromium": "^1.42.1"
35
35
  },
36
36
  "//": "Learn more: https://sli.dev/themes/write-a-theme.html",
37
37
  "slidev": {
package/setup/shiki.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { defineShikiSetup } from '@slidev/types/dist/index.mjs'
1
+ import { ShikiSetupReturn, defineShikiSetup } from '@slidev/types/dist/index.mjs'
2
2
 
3
3
  export default defineShikiSetup(async () => {
4
4
  return {
@@ -6,5 +6,5 @@ export default defineShikiSetup(async () => {
6
6
  dark: 'dark-plus',
7
7
  light: 'light-plus',
8
8
  },
9
- }
10
- })
9
+ } as ShikiSetupReturn;
10
+ });