slidev-theme-neversink 0.0.0

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.
Files changed (147) hide show
  1. package/.github/workflows/deploy.yml +67 -0
  2. package/.prettierrc +15 -0
  3. package/.vscode/settings.json +4 -0
  4. package/LICENSE +21 -0
  5. package/README.md +112 -0
  6. package/assets/nyu_long_black_on_white.svg +41 -0
  7. package/components/Admonition.vue +80 -0
  8. package/components/AdmonitionType.vue +56 -0
  9. package/components/CreditScroll.vue +94 -0
  10. package/components/SpeechBubble.vue +294 -0
  11. package/components/StickyNote.vue +71 -0
  12. package/components/vue3-kawaii/README.md +5 -0
  13. package/components/vue3-kawaii/components/backpack/BackPack.vue +123 -0
  14. package/components/vue3-kawaii/components/backpack/backpackpaths.js +17 -0
  15. package/components/vue3-kawaii/components/browser/Browser.vue +56 -0
  16. package/components/vue3-kawaii/components/browser/browserpaths.js +9 -0
  17. package/components/vue3-kawaii/components/cat/Cat.vue +89 -0
  18. package/components/vue3-kawaii/components/cat/catpaths.js +8 -0
  19. package/components/vue3-kawaii/components/common/face/Face.vue +95 -0
  20. package/components/vue3-kawaii/components/common/face/facepaths.js +24 -0
  21. package/components/vue3-kawaii/components/common/wrapper/Wrapper.vue +24 -0
  22. package/components/vue3-kawaii/components/creditCard/CreditCard.vue +47 -0
  23. package/components/vue3-kawaii/components/creditCard/creditcardpaths.js +8 -0
  24. package/components/vue3-kawaii/components/ghost/Ghost.vue +48 -0
  25. package/components/vue3-kawaii/components/ghost/ghostpaths.js +8 -0
  26. package/components/vue3-kawaii/components/iceCream/IceCream.vue +49 -0
  27. package/components/vue3-kawaii/components/iceCream/icecreampaths.js +9 -0
  28. package/components/vue3-kawaii/components/mug/Mug.vue +48 -0
  29. package/components/vue3-kawaii/components/mug/mugpaths.js +7 -0
  30. package/components/vue3-kawaii/components/planet/Planet.vue +58 -0
  31. package/components/vue3-kawaii/components/planet/planetpaths.js +7 -0
  32. package/components/vue3-kawaii/components/speechBubble/SpeechBubbleGuy.vue +63 -0
  33. package/components/vue3-kawaii/components/speechBubble/speechbubblepaths.js +8 -0
  34. package/components/vue3-kawaii/utils/getUniqueId.js +10 -0
  35. package/docs/.vitepress/config.js +75 -0
  36. package/docs/.vitepress/theme/index.js +50 -0
  37. package/docs/.vitepress/theme/style.css +145 -0
  38. package/docs/api-examples.md +49 -0
  39. package/docs/branding.md +43 -0
  40. package/docs/colors.md +108 -0
  41. package/docs/components/admonitions.md +106 -0
  42. package/docs/components/creditscroll.md +1 -0
  43. package/docs/components/kawaii.md +26 -0
  44. package/docs/components/qrcode.md +24 -0
  45. package/docs/components/speechbubble.md +69 -0
  46. package/docs/components/stickynote.md +54 -0
  47. package/docs/components.md +19 -0
  48. package/docs/contributing.md +5 -0
  49. package/docs/customizing.md +38 -0
  50. package/docs/getting-started.md +32 -0
  51. package/docs/index.md +19 -0
  52. package/docs/layouts/cover.md +69 -0
  53. package/docs/layouts/credits.md +111 -0
  54. package/docs/layouts/default.md +88 -0
  55. package/docs/layouts/full.md +131 -0
  56. package/docs/layouts/intro.md +63 -0
  57. package/docs/layouts/quote.md +51 -0
  58. package/docs/layouts/section.md +67 -0
  59. package/docs/layouts/side-title.md +180 -0
  60. package/docs/layouts/top-title-two-cols.md +171 -0
  61. package/docs/layouts/top-title.md +103 -0
  62. package/docs/layouts/two-cols-title.md +273 -0
  63. package/docs/layouts.md +92 -0
  64. package/docs/markdown-examples.md +85 -0
  65. package/docs/markdown.md +87 -0
  66. package/docs/parts/columnsystem.md +18 -0
  67. package/docs/parts/layoutpicker.md +73 -0
  68. package/docs/public/deck.png +0 -0
  69. package/docs/public/layouts/side-title-12row.svg +27 -0
  70. package/docs/public/layouts/side-title-is-3.svg +7 -0
  71. package/docs/public/layouts/side-title-is-6.svg +7 -0
  72. package/docs/public/layouts/side-title-side.svg +13 -0
  73. package/docs/public/layouts/two-col-title-12row.svg +31 -0
  74. package/docs/public/layouts/two-col-title-align.svg +13 -0
  75. package/docs/public/layouts/two-col-title-is-4.svg +23 -0
  76. package/docs/public/layouts/two-col-title-is-6.svg +23 -0
  77. package/docs/public/layouts/two-col-title-titlepos.svg +31 -0
  78. package/docs/public/screenshots/1.png +0 -0
  79. package/docs/public/screenshots/10.png +0 -0
  80. package/docs/public/screenshots/11.png +0 -0
  81. package/docs/public/screenshots/12.png +0 -0
  82. package/docs/public/screenshots/13.png +0 -0
  83. package/docs/public/screenshots/14.png +0 -0
  84. package/docs/public/screenshots/15.png +0 -0
  85. package/docs/public/screenshots/16.png +0 -0
  86. package/docs/public/screenshots/17.png +0 -0
  87. package/docs/public/screenshots/18.png +0 -0
  88. package/docs/public/screenshots/19.png +0 -0
  89. package/docs/public/screenshots/2.png +0 -0
  90. package/docs/public/screenshots/20.png +0 -0
  91. package/docs/public/screenshots/21.png +0 -0
  92. package/docs/public/screenshots/22.png +0 -0
  93. package/docs/public/screenshots/23.png +0 -0
  94. package/docs/public/screenshots/24.png +0 -0
  95. package/docs/public/screenshots/25.png +0 -0
  96. package/docs/public/screenshots/26.png +0 -0
  97. package/docs/public/screenshots/27.png +0 -0
  98. package/docs/public/screenshots/28.png +0 -0
  99. package/docs/public/screenshots/29.png +0 -0
  100. package/docs/public/screenshots/3.png +0 -0
  101. package/docs/public/screenshots/30.png +0 -0
  102. package/docs/public/screenshots/31.png +0 -0
  103. package/docs/public/screenshots/32.png +0 -0
  104. package/docs/public/screenshots/33.png +0 -0
  105. package/docs/public/screenshots/34.png +0 -0
  106. package/docs/public/screenshots/35.png +0 -0
  107. package/docs/public/screenshots/36.png +0 -0
  108. package/docs/public/screenshots/37.png +0 -0
  109. package/docs/public/screenshots/38.png +0 -0
  110. package/docs/public/screenshots/4.png +0 -0
  111. package/docs/public/screenshots/5.png +0 -0
  112. package/docs/public/screenshots/6.png +0 -0
  113. package/docs/public/screenshots/7.png +0 -0
  114. package/docs/public/screenshots/8.png +0 -0
  115. package/docs/public/screenshots/9.png +0 -0
  116. package/example.md +1503 -0
  117. package/layoutHelper.ts +118 -0
  118. package/layouts/cover.vue +93 -0
  119. package/layouts/credits.vue +35 -0
  120. package/layouts/default.vue +18 -0
  121. package/layouts/four-cell.vue +210 -0
  122. package/layouts/full.vue +22 -0
  123. package/layouts/intro.vue +75 -0
  124. package/layouts/quote.vue +62 -0
  125. package/layouts/section.vue +84 -0
  126. package/layouts/side-title.vue +142 -0
  127. package/layouts/top-title-two-cols.vue +131 -0
  128. package/layouts/top-title.vue +63 -0
  129. package/layouts/two-cols-title.vue +176 -0
  130. package/layouts/two-cols.vue +141 -0
  131. package/package.json +54 -0
  132. package/public/images/photo.png +0 -0
  133. package/public/images/photo2.png +0 -0
  134. package/public/images/scatter1.png +0 -0
  135. package/public/images/scatter1.svg +20 -0
  136. package/screenshot.md +874 -0
  137. package/setup/main.ts +45 -0
  138. package/setup/shiki.ts +14 -0
  139. package/slide-bottom.vue +107 -0
  140. package/styles/base.css +240 -0
  141. package/styles/bubbles.css +4 -0
  142. package/styles/colors.css +12 -0
  143. package/styles/index.ts +11 -0
  144. package/styles/layouts.css +76 -0
  145. package/styles/stickynote.css +4 -0
  146. package/uno.config.ts +222 -0
  147. package/vite.config.ts +16 -0
@@ -0,0 +1,67 @@
1
+ # Sample workflow for building and deploying a VitePress site to GitHub Pages
2
+ #
3
+ name: Deploy VitePress site to Pages
4
+
5
+ on:
6
+ # Runs on pushes targeting the `main` branch. Change this to `master` if you're
7
+ # using the `master` branch as the default branch.
8
+ push:
9
+ branches:
10
+ - main
11
+
12
+ # Allows you to run this workflow manually from the Actions tab
13
+ workflow_dispatch:
14
+
15
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
16
+ permissions:
17
+ contents: read
18
+ pages: write
19
+ id-token: write
20
+
21
+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
22
+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
23
+ concurrency:
24
+ group: pages
25
+ cancel-in-progress: false
26
+
27
+ jobs:
28
+ # Build job
29
+ build:
30
+ runs-on: ubuntu-latest
31
+ steps:
32
+ - name: Checkout
33
+ uses: actions/checkout@v4
34
+ with:
35
+ fetch-depth: 0 # Not needed if lastUpdated is not enabled
36
+ - uses: pnpm/action-setup@v3 # Uncomment this if you're using pnpm
37
+ # - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
38
+ - name: Setup Node
39
+ uses: actions/setup-node@v4
40
+ with:
41
+ node-version: 20
42
+ cache: pnpm # or pnpm / yarn
43
+ - name: Setup Pages
44
+ uses: actions/configure-pages@v4
45
+ - name: Install dependencies
46
+ run: pnpm install # or pnpm install / yarn install / bun install
47
+ - name: Build with Slidev
48
+ run: pnpm build
49
+ - name: Build with VitePress
50
+ run: pnpm docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
51
+ - name: Upload artifact
52
+ uses: actions/upload-pages-artifact@v3
53
+ with:
54
+ path: docs/.vitepress/dist
55
+
56
+ # Deployment job
57
+ deploy:
58
+ environment:
59
+ name: github-pages
60
+ url: ${{ steps.deployment.outputs.page_url }}
61
+ needs: build
62
+ runs-on: ubuntu-latest
63
+ name: Deploy
64
+ steps:
65
+ - name: Deploy to GitHub Pages
66
+ id: deployment
67
+ uses: actions/deploy-pages@v4
package/.prettierrc ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "semi": false,
3
+ "singleQuote": true,
4
+ "trailingComma": "es5",
5
+ "printWidth": 120,
6
+ "overrides": [
7
+ {
8
+ "files": ["example.md", "screenshot.md"],
9
+ "options": {
10
+ "parser": "slidev",
11
+ "plugins": ["prettier-plugin-slidev"]
12
+ }
13
+ }
14
+ ]
15
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "slidev.force-enabled": true,
3
+ "slidev.include": ["**/slides.md", "example.md", "screenshot.md"]
4
+ }
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Todd Gureckis
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,112 @@
1
+ # Slidev Theme Neversink
2
+
3
+ An education/academia oriented [Slidev](https://sli.dev/) theme with some whimsical elements.
4
+
5
+ Documentation [here](https://gureckis.github.io/slidev-theme-neversink/)
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install slidev-theme-neversink
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ Add the theme to the frontmatter of your first slide in `slides.md`:
16
+
17
+ ```md
18
+ ---
19
+ theme: neversink
20
+ ---
21
+ ```
22
+
23
+ ## Features
24
+
25
+ ## Todo list
26
+
27
+ ### Code cleanup
28
+
29
+ - [x] refactor some of the layout stuff into layoutHelper.ts
30
+ - [x] two-cols-header
31
+ - [x] two-cols-footer
32
+ - [x] top-title
33
+ - [x] top-title-two-cols
34
+ - [x] side-title
35
+ - [x] quote
36
+ - [x] intro
37
+ - [x] cover
38
+ - [x] fix <code> bg colors on colored slides
39
+ - [x] add variables to configure things
40
+ - [x] make global-top be a feature of my talks not the theme
41
+ - [x] add a configuration option to global-bottom/slide-bottom for the date or whatever field
42
+ - [x] clean up css classes
43
+ - [ ] dark mode support
44
+ - [ ] publish as a theme
45
+ - [ ] automate workflow for publishing to npm
46
+ - add docs
47
+ - [x] vitepress setup published to github pages
48
+ - [ ] slide types
49
+ - [ ] add docs on how to customize variables/fonts
50
+
51
+ ### Layouts
52
+
53
+ - [x] add a 100% full slide slide
54
+ - [x] color side bar left/right
55
+ - [x] two column footer
56
+ - [x] two column (configurable) header
57
+ - [x] four cell grid
58
+ - [x] Add a config way to drop some of the lab/nyu stuff
59
+ - [x] add a way to drop the page numbers
60
+ - [x] color bar top/bottom centering
61
+ - [x] color title page
62
+ - [x] one up with caption below
63
+ - [x] two up with caption below
64
+ - [x] three up across with content option above and below (e.g., three panels of data)
65
+ - [x] top title
66
+ - [x] top title two cols
67
+ - [x] two cols no header
68
+ - [x] credits layout
69
+ - [x] default (with color)
70
+ - [x] sort out the global-top/slide-top thing (waiting for new slidev release)
71
+ - [x] new section (with color)
72
+ - [x] full (with color)
73
+ - [x] quote (better style)
74
+ - [x] scrolling credits slide
75
+ - [x] create as a layout also
76
+ - [x] add links and icons
77
+ - [ ] auto adjust height
78
+ - [ ] looping is not working
79
+ - [ ] use a animation library instead of raw request frame
80
+ - [ ] if in export mode then don't start scrolled down
81
+ - [ ] add keyboard commands to pause speed up and step forward/backwards in scrolling
82
+ - [ ] center final page
83
+
84
+ <img src="/screenshots/credits-light.gif" alt="credits slide example" width="600" class="screenshot mb-10 mt-10"/>
85
+
86
+ <img src="/screenshots/credits-dark.gif" alt="full slide example" width="600" class="screenshot"/>
87
+
88
+ ### components
89
+
90
+ - [x] markdown admonitions
91
+ - [x] draggable, custom admonition
92
+ - [ ] adminition colors for dark/navy/etc...
93
+ - [x] speech bubble
94
+ - [~x] corner tails (good enough)
95
+ - [x] text-align
96
+ - [x] animations
97
+ - [x] post-it note
98
+ - [ ] prop to toggle if only visible in dev mode (waiting for new slidev release)
99
+
100
+ ### Future ideas
101
+
102
+ - [ ] dynamic color themes
103
+ - [ ] thought bubble/comic style
104
+ - [ ] tooltip that appears on hover or with a click
105
+ - [ ] spoilers with clicks
106
+ - [ ] spring loaded word cloud
107
+ - [ ] quiz live polls
108
+ - [ ] map
109
+ - [ ] make admonition class be what the markdown processes uses
110
+ - [ ] animations/layouts
111
+ - [ ] kawaii waving hands
112
+ - [ ] kawaii raising hands
@@ -0,0 +1,41 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 419.73 72">
3
+ <defs>
4
+ <style>
5
+ .cls-1 {
6
+ fill: #000;
7
+ }
8
+
9
+ .cls-1, .cls-2 {
10
+ stroke-width: 0px;
11
+ }
12
+
13
+ .cls-2 {
14
+ fill: #fff;
15
+ }
16
+ </style>
17
+ </defs>
18
+ <rect class="cls-2" x="9.44" y="8" width="47.19" height="58.99"/>
19
+ <g>
20
+ <path class="cls-1" d="M72,72H0V0h72v72h0ZM33.5,63.58c.09.5,1.18.75,1.42,0l2.52-19.94h-6.11l2.18,19.94h0ZM39.58,42.19v-3.02h-10.39v3.02h10.39ZM36.59,37.7c13.17.47,14.1-11.53,14.16-16.02,0-.26-.13-.29-.2-.11-.38.94-2.1,4.29-6.85,6.32-4.24,1.82-6.79,5.95-7.23,9.67-.03.09.05.13.12.14ZM35.13,36.83c2.09-10,10.22-10.24,10.95-12.14,1.14-2.96-.94-8.21-1.47-8.83-.05-.07-.12-.03-.15.03-1.11,2.43-2.9,4.73-4.21,5.79-1.84,1.49-8.91,6.73-5.29,15.16.05.1.14.09.17,0ZM33.7,37.23c-4.42-9.43,4.41-15.52,5.85-16.84.21-.19.15-.36.16-.57,0-2.96-1.7-7.77-2.25-8.45-.08-.11-.15-.06-.18.04-.76,2.93-4.78,7.29-5.58,8.24-6.82,8.09-5.26,13.03,1.85,17.68.09.05.2,0,.15-.11ZM31.72,37.55c-7.38-4.41-6.64-10.69-3.58-15.31.07-.1.09-.26.07-.45-.13-1.1-1.32-3.88-1.82-4.63-.13-.2-.24-.18-.25-.05-.04,1.26-1.48,4.41-3.66,8.04-2.33,3.87-2.34,12.25,9.23,12.57.1,0,.14-.1.03-.17Z"/>
21
+ <g>
22
+ <polygon class="cls-1" points="90.19 27.87 93.48 27.87 101.09 37.88 101.09 27.87 104.63 27.87 104.63 44.12 101.58 44.12 93.71 33.79 93.71 44.12 90.19 44.12 90.19 27.87 90.19 27.87"/>
23
+ <polygon class="cls-1" points="110.84 27.87 123.11 27.87 123.11 31.05 114.4 31.05 114.4 34.35 122.06 34.35 122.06 37.53 114.4 37.53 114.4 40.94 123.22 40.94 123.22 44.12 110.84 44.12 110.84 27.87 110.84 27.87"/>
24
+ <polygon class="cls-1" points="127.47 27.87 131.3 27.87 134.66 38.88 138.31 27.82 141.38 27.82 145.02 38.88 148.39 27.87 152.13 27.87 146.58 44.24 143.47 44.24 139.8 33.61 136.13 44.24 133.02 44.24 127.47 27.87 127.47 27.87"/>
25
+ <polygon class="cls-1" points="170.96 37.72 164.71 27.87 168.89 27.87 172.77 34.4 176.71 27.87 180.77 27.87 174.53 37.64 174.53 44.12 170.96 44.12 170.96 37.72 170.96 37.72"/>
26
+ <path class="cls-1" d="M196.4,36.05v-.05c0-2.78-2.04-5.1-4.92-5.1s-4.88,2.27-4.88,5.05v.05c0,2.78,2.04,5.11,4.92,5.11s4.88-2.28,4.88-5.06h0ZM182.86,36.05v-.05c0-4.62,3.64-8.4,8.66-8.4s8.62,3.73,8.62,8.35v.05c0,4.62-3.65,8.41-8.66,8.41s-8.61-3.73-8.61-8.36h0Z"/>
27
+ <path class="cls-1" d="M212.83,35.77c1.74,0,2.74-.93,2.74-2.3v-.04c0-1.53-1.07-2.32-2.81-2.32h-3.55v4.67h3.62ZM205.64,27.87h7.42c2.08,0,3.68.58,4.74,1.65.91.91,1.4,2.18,1.4,3.71v.05c0,2.63-1.42,4.27-3.48,5.04l3.96,5.8h-4.16l-3.49-5.2h-2.81v5.2h-3.58v-16.25h0Z"/>
28
+ <polygon class="cls-1" points="224.75 27.87 228.33 27.87 228.33 34.98 234.92 27.87 239.23 27.87 232.62 34.77 239.53 44.12 235.24 44.12 230.2 37.2 228.33 39.16 228.33 44.12 224.75 44.12 224.75 27.87 224.75 27.87"/>
29
+ <path class="cls-1" d="M253.05,37.16v-9.29h3.58v9.19c0,2.65,1.32,4.02,3.5,4.02s3.51-1.33,3.51-3.9v-9.31h3.58v9.17c0,4.92-2.77,7.33-7.13,7.33s-7.04-2.44-7.04-7.21h0Z"/>
30
+ <polygon class="cls-1" points="273.18 27.87 276.47 27.87 284.08 37.88 284.08 27.87 287.62 27.87 287.62 44.12 284.58 44.12 276.7 33.79 276.7 44.12 273.18 44.12 273.18 27.87 273.18 27.87"/>
31
+ <polygon class="cls-1" points="294 27.87 297.58 27.87 297.58 44.12 294 44.12 294 27.87 294 27.87"/>
32
+ <polygon class="cls-1" points="302.57 27.87 306.52 27.87 310.76 39.31 315.01 27.87 318.87 27.87 312.3 44.24 309.14 44.24 302.57 27.87 302.57 27.87"/>
33
+ <polygon class="cls-1" points="323.69 27.87 335.96 27.87 335.96 31.05 327.25 31.05 327.25 34.35 334.91 34.35 334.91 37.53 327.25 37.53 327.25 40.94 336.07 40.94 336.07 44.12 323.69 44.12 323.69 27.87 323.69 27.87"/>
34
+ <path class="cls-1" d="M348.76,35.77c1.74,0,2.73-.93,2.73-2.3v-.04c0-1.53-1.06-2.32-2.8-2.32h-3.56v4.67h3.63ZM341.57,27.87h7.43c2.07,0,3.67.58,4.73,1.65.91.91,1.39,2.18,1.39,3.71v.05c0,2.63-1.41,4.27-3.47,5.04l3.96,5.8h-4.18l-3.48-5.2h-2.82v5.2h-3.57v-16.25h0Z"/>
35
+ <path class="cls-1" d="M359.56,41.75l2.11-2.53c1.47,1.2,3,1.98,4.86,1.98,1.45,0,2.34-.59,2.34-1.53v-.05c0-.91-.56-1.37-3.27-2.07-3.28-.83-5.39-1.74-5.39-4.97v-.04c0-2.95,2.37-4.9,5.7-4.9,2.36,0,4.38.75,6.03,2.07l-1.86,2.69c-1.44-.99-2.85-1.6-4.23-1.6s-2.09.63-2.09,1.42v.05c0,1.07.7,1.42,3.51,2.13,3.29.86,5.15,2.04,5.15,4.87v.04c0,3.23-2.46,5.05-5.97,5.05-2.46,0-4.94-.86-6.89-2.61h0Z"/>
36
+ <polygon class="cls-1" points="378.01 27.87 381.59 27.87 381.59 44.12 378.01 44.12 378.01 27.87 378.01 27.87"/>
37
+ <polygon class="cls-1" points="391.76 31.17 386.82 31.17 386.82 27.87 400.29 27.87 400.29 31.17 395.33 31.17 395.33 44.12 391.76 44.12 391.76 31.17 391.76 31.17"/>
38
+ <polygon class="cls-1" points="409.92 37.72 403.68 27.87 407.85 27.87 411.73 34.4 415.67 27.87 419.73 27.87 413.49 37.64 413.49 44.12 409.92 44.12 409.92 37.72 409.92 37.72"/>
39
+ </g>
40
+ </g>
41
+ </svg>
@@ -0,0 +1,80 @@
1
+ <script setup>
2
+ import { computed } from 'vue'
3
+ import { Icon } from '@iconify/vue'
4
+ const props = defineProps({
5
+ color: {
6
+ type: String,
7
+ default: 'amber-light',
8
+ },
9
+ title: {
10
+ type: String,
11
+ default: 'Note',
12
+ },
13
+ icon: {
14
+ type: String,
15
+ default: 'mdi-information-variant-circle-outline',
16
+ },
17
+ width: {
18
+ type: String,
19
+ default: '100%',
20
+ },
21
+ })
22
+
23
+ const colorscheme = computed(() => {
24
+ return `neversink-${props.color}-scheme`
25
+ })
26
+ </script>
27
+
28
+ <template>
29
+ <div class="markdown-alert markdown-alert-custom" :class="colorscheme">
30
+ <p class="markdown-alert-title-custom">
31
+ <span class="font-size-1.3rem"><Icon :icon="props.icon" /></span>&nbsp;&nbsp;{{ props.title }}
32
+ </p>
33
+ <p><slot></slot></p>
34
+ </div>
35
+ </template>
36
+
37
+ <style scoped>
38
+ .markdown-alert {
39
+ padding: 8px 16px;
40
+ margin: 10px;
41
+ margin-left: 0;
42
+ margin-top: 2px;
43
+ margin-bottom: 5px;
44
+ color: inherit;
45
+ border-radius: 6px;
46
+ font-size: 0.75em;
47
+ width: v-bind(props.width);
48
+ font-family: var(--neversink-main-font);
49
+ font-size: 0.85rem;
50
+ }
51
+
52
+ .markdown-alert p {
53
+ margin: 0;
54
+ margin-bottom: 2px;
55
+ }
56
+ .markdown-alert > :first-child {
57
+ margin-top: 0;
58
+ }
59
+ .markdown-alert > :last-child {
60
+ margin-bottom: 0;
61
+ }
62
+ .markdown-alert.markdown-alert-custom {
63
+ background-color: var(--neversink-admon-bg-color);
64
+ color: var(--neversink-admon-text-color);
65
+ border: 1px solid var(--neversink-admon-border-color);
66
+ border-left: 6px solid var(--neversink-admon-border-color);
67
+ }
68
+ .markdown-alert .markdown-alert-title-custom {
69
+ display: flex;
70
+ align-items: center;
71
+ position: relative;
72
+ font-weight: 700;
73
+ color: var(--neversink-admon-text-color);
74
+ }
75
+ @media print {
76
+ .markdown-alert .markdown-alert-title:before {
77
+ display: none;
78
+ }
79
+ }
80
+ </style>
@@ -0,0 +1,56 @@
1
+ <script setup>
2
+ import { computed } from 'vue'
3
+
4
+ const props = defineProps({
5
+ type: {
6
+ type: String,
7
+ default: 'info',
8
+ },
9
+ width: {
10
+ type: String,
11
+ default: '100%',
12
+ },
13
+ })
14
+
15
+ const admontype = computed(() => {
16
+ switch (props.type) {
17
+ case 'important':
18
+ return {
19
+ icon: 'mdi-message-alert-outline',
20
+ title: 'Important',
21
+ color: 'purple-light',
22
+ }
23
+ case 'tip':
24
+ return {
25
+ icon: 'mdi-lightbulb-outline',
26
+ title: 'Tip',
27
+ color: 'emerald-light',
28
+ }
29
+ case 'warning':
30
+ return {
31
+ icon: 'mdi-alert-outline',
32
+ title: 'Warning',
33
+ color: 'amber-light',
34
+ }
35
+ case 'caution':
36
+ return {
37
+ icon: 'mdi-alert-octagon-outline',
38
+ title: 'Caution',
39
+ color: 'red-light',
40
+ }
41
+ case 'info':
42
+ default:
43
+ return {
44
+ icon: 'mdi-information-variant-circle-outline',
45
+ title: 'Note',
46
+ color: 'sky-light',
47
+ }
48
+ }
49
+ })
50
+ </script>
51
+
52
+ <template>
53
+ <Admonition :title="admontype.title" :color="admontype.color" :icon="admontype.icon" :width="width">
54
+ <slot></slot>
55
+ </Admonition>
56
+ </template>
@@ -0,0 +1,94 @@
1
+ <script setup>
2
+ import { ref, onMounted, onUnmounted } from 'vue'
3
+ import { onSlideEnter, useSlideContext } from '@slidev/client'
4
+
5
+ const { $renderContext } = useSlideContext()
6
+ const props = defineProps({
7
+ speed: {
8
+ default: 0.5,
9
+ },
10
+ loop: {
11
+ default: false,
12
+ },
13
+ })
14
+
15
+ const containerRef = ref(null)
16
+ const scrollPosition = ref(0)
17
+ const isScrolling = ref(false)
18
+
19
+ let animationFrameId = null
20
+
21
+ const scroll = () => {
22
+ scrollPosition.value -= props.speed
23
+ if (Math.abs(scrollPosition.value) >= 550) {
24
+ if (props.loop.value) {
25
+ console.log('resetting loop', props.loop.value)
26
+ resetScroll()
27
+ } else {
28
+ stopScrolling()
29
+ return
30
+ }
31
+ } else {
32
+ animationFrameId = requestAnimationFrame(scroll)
33
+ }
34
+ }
35
+
36
+ const startScrolling = () => {
37
+ animationFrameId = requestAnimationFrame(scroll)
38
+ }
39
+
40
+ const stopScrolling = () => {
41
+ if (animationFrameId) {
42
+ cancelAnimationFrame(animationFrameId)
43
+ }
44
+ }
45
+
46
+ const resetScroll = () => {
47
+ scrollPosition.value = 480 //containerRef.value.offsetHeight * 2.5
48
+ if (animationFrameId) {
49
+ cancelAnimationFrame(animationFrameId)
50
+ }
51
+ }
52
+
53
+ onMounted(() => {
54
+ console.log('mounted')
55
+ // Reset scrolling when entering the slide
56
+ onSlideEnter(() => {
57
+ console.log('context ', $renderContext.value)
58
+ if (['slide', 'presenter'].includes($renderContext.value)) {
59
+ console.log('onSlideEnter')
60
+ resetScroll()
61
+ console.log('starting scrolling')
62
+ startScrolling()
63
+ }
64
+ })
65
+ })
66
+
67
+ onUnmounted(() => {
68
+ if (animationFrameId) {
69
+ cancelAnimationFrame(animationFrameId)
70
+ }
71
+ })
72
+ </script>
73
+
74
+ <template>
75
+ <div class="scroll-container" ref="containerRef">
76
+ <div class="scroll-content" :style="{ transform: `translateY(${scrollPosition}px)` }">
77
+ <slot></slot>
78
+ </div>
79
+ </div>
80
+ </template>
81
+
82
+ <style scoped>
83
+ .scroll-container {
84
+ height: 100vh; /* Use full viewport height */
85
+ overflow: hidden;
86
+ position: relative;
87
+ cursor: pointer;
88
+ }
89
+
90
+ .scroll-content {
91
+ position: absolute;
92
+ width: 100%;
93
+ }
94
+ </style>