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
+ # `layout: section`
2
+
3
+ <img src="/screenshots/27.png" alt="section slide example" width="600" class="screenshot mb-10 mt-10"/>
4
+
5
+ ## Description
6
+
7
+ The `layout: section` is used to provide a break between sections of a talk. This section slide might provide a new sub-title for the upcoming section or summarize some key points from the previous section. The section slide is centered vertically on the slide and can be customized with a color scheme.
8
+
9
+ ## Frontmatter
10
+
11
+ - `layout: section` (required).
12
+ - `color:` (optional) can be any of the [color scheme](/colors) options. If not provided, the default color is `light`.
13
+ Example:
14
+
15
+ ```yaml
16
+ ---
17
+ layout: section
18
+ color: sky-light
19
+ ---
20
+ ```
21
+
22
+ ## Slots
23
+
24
+ This slide just uses the default slot for the content.
25
+
26
+ ## Examples
27
+
28
+ ### Basic example
29
+
30
+ ```md
31
+ ---
32
+ layout: section
33
+ ---
34
+
35
+ # The `section` layout
36
+
37
+ This is a section slide. It can be use to make a noticable point or break between sections.
38
+ ```
39
+
40
+ Renders as:
41
+
42
+ <img src="/screenshots/27.png" alt="section slide example" width="600" class="screenshot"/>
43
+
44
+ ### Customized example
45
+
46
+ ```md
47
+ ---
48
+ layout: section
49
+ color: navy
50
+ ---
51
+
52
+ <div class="w-1/2 ml-30">
53
+
54
+ # The `section` layout
55
+
56
+ <hr>
57
+
58
+ <span class='text-amber-300'>
59
+ You can use HTML and inline CSS to modify the look and feel.
60
+ </span>
61
+
62
+ </div>
63
+ ```
64
+
65
+ Renders as:
66
+
67
+ <img src="/screenshots/28.png" alt="section slide example" width="600" class="screenshot"/>
@@ -0,0 +1,180 @@
1
+ # `layout: side-title`
2
+
3
+ <img src="/screenshots/22.png" alt="side-title slide example" width="600" class="screenshot mb-10 mt-10"/>
4
+
5
+ ## Description
6
+
7
+ With `layout: side-title` the title is anchored to the left or right side of the slide. This can add a more dramatic burst of color since more of the slide's visible area is devoted to the title color block. Because the spacing and alignment of columns often needs to be adjusted on a case-by-case basis, this layout provides a lot of flexibility by creating a simple design system you can use to fine-tune the two column/title arrangement.
8
+
9
+ In the conception of this design system, the entire slide is divided into 12 equally spaced units. Frontmatter determines how many of those 12 units are allocated to the title versus the content.
10
+
11
+ <img src="/layouts/side-title-12row.svg" alt="side-title slide example" width="600" />
12
+
13
+ For example, if `columns: is-6` is specified in the frontmatter, the title will be allocated 6 units and the main content will be allocated 6 units like this:
14
+
15
+ <img src="/layouts/side-title-is-6.svg" alt="side-title slide example" width="600" />
16
+
17
+ If `columns: is-3` is specified, the title will be allocated 3 units and the content will be allocated 9 units like this:
18
+
19
+ <img src="/layouts/side-title-is-3.svg" alt="side-title slide example" width="600" />
20
+
21
+ You can bump the width of the columns quickly to fit your content.
22
+
23
+ The alignment of the content in each column is also configurable. Content can be vertically aligned to the top, middle, or bottom of the slide. In addition the content can be horizontally aligned to the left, center, or right aligned within the column:
24
+
25
+ <img src="/layouts/two-col-title-align.svg" alt="side-title slide example" width="300" />
26
+
27
+ You can also configure if the title block is attached to the left or right side of the slide:
28
+
29
+ <img src="/layouts/side-title-side.svg" alt="side-title slide example" width="450" />
30
+
31
+ A default slot is provided for content that appears before a named slot. This content will appear at the bottom of the content column.
32
+
33
+ ## Frontmatter
34
+
35
+ - `layout: side-title` (required).
36
+ - `color:` (optional) can be any of the [color scheme](/colors) options. If not provided, the default color is `light`.
37
+ - `titlewidth:` (optional) gives the width of the title. The default value is `is-one-third`. As described above, the slide is divided into 12 column units. With <code>titlewidth: is-3</code> the title column is 3/12 wide and the the content column is 9/12 wide. Here is a full list of the available shorthands:
38
+
39
+ <div class="ml-auto mr-auto">
40
+
41
+ | Title:Content Size | Frontmatter short names |
42
+ | :----------------- | :---------------------------------------------------------------------------------------- |
43
+ | 1:11 | `is-1`<br>`is-1-11`<br>`is-one-twelfth` |
44
+ | 2:10 | `is-2`<br>`is-2-10`<br>`is-one-sixth` |
45
+ | 3:9 | `is-3`<br>`is-3-9`<br>`is-one-quarter` |
46
+ | 4:8 | `is-4`<br>`is-4-8`<br>`is-one-third` |
47
+ | 5:7 | `is-5`<br>`is-5-7` |
48
+ | 6:6 | `is-6`<br>`is-6-6`<br>`is-two-quarters`<br>`is-two-fourths`<br>`is-one-half`<br>`is-half` |
49
+ | 7:5 | `is-7`<br>`is-7-5` |
50
+ | 8:4 | `is-8`<br>`is-8-4`<br>`is-two-thirds` |
51
+ | 9:3 | `is-9`<br>`is-9-3`<br>`is-three-quarters`<br>`three-fourths` |
52
+ | 10:2 | `is-10`<br>`is-10-2` |
53
+ | 11:1 | `is-11`<br>`is-11-1` |
54
+
55
+ </div>
56
+
57
+ - `align:` (optional) determines the alignment of the content in different parts of the slides. The options are usually specified in two parts using [kebab notation](https://www.theserverside.com/definition/Kebab-case). The first segment applies to the left side, the second to the right side. The first letter of each segment is either `l` for left, `c` for center, or `r` for right. This sets the text alignment of that section. The second letter of the left and right segments are either `t` for top, `m` for middle, or `b` for bottom. This sets the vertical alignment of the content in that column. **Notice means the alignment applies to columns not to the title/content. So if the `align: lm-rt` then the title column will be `lm`. But if `side: r` then the title will be on the right side of the slide and `rt` will apply to the title.** To simplify this, the default value is `auto` which adopts the `rm-lt` alignment when the `side: l` and the `lt-lm` alignment when the `side: r`.
58
+
59
+ - `side:` (optional) is either `l` (left attached) or `r` (right attached). This determines the position of the title. The default value is `l`.
60
+
61
+ Example:
62
+
63
+ ```yaml
64
+ ---
65
+ layout: side-title
66
+ align: l
67
+ color: light
68
+ ---
69
+ ```
70
+
71
+ ## Slots
72
+
73
+ This `side-title` slide has two named slots which are all optional:
74
+ `:: title ::`, and `:: content ::`. In addition, the `:: default ::` slot exits for any content that appears before a named slot. It will appear at the bottom of the content side of the slide.
75
+ If the title is not provided the color space for it will still appear.
76
+ If content is not provided the default slot will reclaim the space.
77
+
78
+ A common use case for the default slot is to include things like [StickyNotes](/components/stickynote) in this default section and then use Slidev's `v-drag` directive to move them into position on the slide. An example below make use of this technique.
79
+
80
+ ## Examples
81
+
82
+ ### Basic example
83
+
84
+ ```md
85
+ ---
86
+ layout: side-title
87
+ side: l
88
+ color: violet
89
+ titlewidth: is-4
90
+ align: rm-lm
91
+ title: Side Title Layout (Another)
92
+ ---
93
+
94
+ :: title ::
95
+
96
+ # `side-title`
97
+
98
+ # <mdi-arrow-right />
99
+
100
+ :: content ::
101
+
102
+ This is `layout: side-title` with `side: l` in the front matter.
103
+ ```
104
+
105
+ Renders as:
106
+
107
+ <img src="/screenshots/22.png" alt="two-cols-header slide example" width="600" style="border: 1px solid #ccc;"/>
108
+
109
+ ### Anchor title to the right
110
+
111
+ ```md
112
+ ---
113
+ layout: side-title
114
+ side: r
115
+ color: pink-light
116
+ titlewidth: is-6
117
+ align: lm-lb
118
+ title: Side Title Layout (Another)
119
+ ---
120
+
121
+ :: title ::
122
+
123
+ # `side-title`
124
+
125
+ # <mdi-arrow-left />
126
+
127
+ :: content ::
128
+
129
+ This is `layout: side-title` with `side: r` in the front matter
130
+ and the right column `lb` (left-bottom) aligned.
131
+ ```
132
+
133
+ Renders as:
134
+
135
+ <img src="/screenshots/23.png" alt="side-title slide example" width="600" style="border: 1px solid #ccc;"/>
136
+
137
+ ### Putting things on opposite corners
138
+
139
+ ```md
140
+ ---
141
+ layout: side-title
142
+ side: l
143
+ color: amber-light
144
+ titlewidth: is-6
145
+ align: lt-lb
146
+ ---
147
+
148
+ :: title ::
149
+
150
+ # `side-title`
151
+
152
+ # <mdi-arrow-right />
153
+
154
+ :: content ::
155
+
156
+ This is `layout: side-title` with `side: l` in the front matter
157
+ and the left column `lt` (left-top) and the right column `lb` (left-bottom) aligned.
158
+ ```
159
+
160
+ <img src="/screenshots/24.png" alt="side-title slide example" width="600" style="border: 1px solid #ccc;"/>
161
+
162
+ ### No title at all
163
+
164
+ ```md
165
+ ---
166
+ layout: side-title
167
+ side: l
168
+ color: green-light
169
+ titlewidth: is-3
170
+ align: auto
171
+ ---
172
+
173
+ \* This is the default content
174
+
175
+ :: content ::
176
+
177
+ This slide doesn't have a title but still has a color block.
178
+ ```
179
+
180
+ <img src="/screenshots/25.png" alt="side-title slide example" width="600" style="border: 1px solid #ccc;"/>
@@ -0,0 +1,171 @@
1
+ # `layout: top-title-two-cols`
2
+
3
+ <img src="/screenshots/18.png" alt="Top title slide example" width="600" class="screenshot mb-10 mt-10"/>
4
+
5
+ ## Description
6
+
7
+ The `layout: top-title-two-cols` adds a configurable two column layout to the [`top-title` layout](/layouts/top-title). The title is displayed in a color band anchored to the top of the slide and the two column content is displayed below. Because the spacing and alignment of columns often needs to be adjusted on a case-by-case basis, this layout provides a lot of flexibility by creating a simple design system you can use to fine-tune the two column arrangement.
8
+
9
+ <!--@include: ../parts/columnsystem.md-->
10
+
11
+ A default slot is provided for content that appears before a named slot. This content will appear at the bottom of the slide.
12
+
13
+ ## Frontmatter
14
+
15
+ - `layout: top-title-two-cols` (required).
16
+ - `color:` (optional) can be any of the [color scheme](/colors) options. If not provided, the default color is `light`.
17
+ - `columns:` (optional) gives the width to the left and right column. The default value is `is-one-half`. As described above, the slide is divided into 12 column units. With <code>columns: is-1-11</code> the left column is 1/12 wide and the the right columns is 11/12 wide. The component admits a short hand of only specifying the left column (<code>columns: is-1</code> does the same thing). Here is a full list of the available shorthands:
18
+
19
+ <div class="ml-auto mr-aut w-full">
20
+
21
+ | Left:Right Column Size | Frontmatter short names |
22
+ | :--------------------- | :---------------------------------------------------------------------------------------- |
23
+ | 1:11 | `is-1`<br>`is-1-11`<br>`is-one-twelfth` |
24
+ | 2:10 | `is-2`<br>`is-2-10`<br>`is-one-sixth` |
25
+ | 3:9 | `is-3`<br>`is-3-9`<br>`is-one-quarter` |
26
+ | 4:8 | `is-4`<br>`is-4-8`<br>`is-one-third` |
27
+ | 5:7 | `is-5`<br>`is-5-7` |
28
+ | 6:6 | `is-6`<br>`is-6-6`<br>`is-two-quarters`<br>`is-two-fourths`<br>`is-one-half`<br>`is-half` |
29
+ | 7:5 | `is-7`<br>`is-7-5` |
30
+ | 8:4 | `is-8`<br>`is-8-4`<br>`is-two-thirds` |
31
+ | 9:3 | `is-9`<br>`is-9-3`<br>`is-three-quarters`<br>`three-fourths` |
32
+ | 10:2 | `is-10`<br>`is-10-2` |
33
+ | 11:1 | `is-11`<br>`is-11-1` |
34
+
35
+ </div>
36
+
37
+ - `align:` (optional) determines the alignment of the content in different parts of the slides. The options are specified in three parts using [kebab notation](https://www.theserverside.com/definition/Kebab-case). The first segment applies to the title, the second to the left column, and the third to the right column. i.e., `title-left-right`. The first letter of each segment is either `l` for left, `c` for center, or `r` for right. This sets the text alignment of that section. The second letter of the left and right segments are either `t` for top, `m` for middle, or `b` for bottom. This sets the vertical alignment of the content in that column. **The title segment only can configure the `l/c/r` alignment** since it only occupies a narrow band at the top of the slide. The default value is `l-lt-lt` which aligns the content in the title to left margin, the content of the left column to the left, the content in the left column to the top, and the content in the right column to the top.
38
+
39
+ Example:
40
+
41
+ ```yaml
42
+ ---
43
+ layout: top-title-two-cols
44
+ columns: is-5
45
+ align: l-lr-lr
46
+ color: amber-light
47
+ ---
48
+ ```
49
+
50
+ ## Slots
51
+
52
+ This `top-title-two-cols` slide has three named slots which are all optional:
53
+ `:: title ::`, `:: left ::`, and `:: right ::`. In addition, the `:: default ::` slot exits for any content that appears before a named slot. It will appear at the bottom of the slide.
54
+ If the title is not provided the color space for it will still appear.
55
+
56
+ A common use case for the default slot is to include things like [StickyNotes](/components/stickynote) in this default section and then use Slidev's `v-drag` directive to move them into position on the slide. An example below make use of this technique.
57
+
58
+ ## Examples
59
+
60
+ ### Basic example
61
+
62
+ ```md
63
+ ---
64
+ layout: top-title-two-cols
65
+ columns: is-6
66
+ align: l-lt-lt
67
+ color: violet
68
+ ---
69
+
70
+ \* Default slot content is here!
71
+
72
+ :: title ::
73
+
74
+ # This is `two-cols-title`
75
+
76
+ :: left ::
77
+
78
+ This is a configurable layout which is very common in presentations. It differs from `two-cols-title` in that there is a color band for the title.
79
+
80
+ - There are three slots: `:: title ::`, `:: left ::`, and `:: right ::` along with the default which is implicit before any named slots.
81
+
82
+ :: right ::
83
+
84
+ In terms of parameters:
85
+
86
+ - `columns` is the relative spacing given to the left versus right column ([see docs](https://gureckis.github.io/slidev-theme-neversink/layouts/two-cols-title))
87
+
88
+ - The <code>align</code> parameter determines how the columns look. The notation is for example
89
+ <code>align: l-cm-cm</code>. The first part is for the header, the second for the left column, the third part is for the right column ([see docs](https://gureckis.github.io/slidev-theme-neversink/layouts/top-title-two-cols))
90
+
91
+ - `color` is the color scheme to the title bar.
92
+ ```
93
+
94
+ Renders as:
95
+
96
+ <img src="/screenshots/18.png" alt="two-cols-header slide example" width="600" style="border: 1px solid #ccc;"/>
97
+
98
+ ### Missing slots
99
+
100
+ ```md
101
+ ---
102
+ layout: top-title-two-cols
103
+ color: pink
104
+ ---
105
+
106
+ :: right ::
107
+
108
+ This has no title or left column, but still has a color band.
109
+ ```
110
+
111
+ Renders as:
112
+
113
+ <img src="/screenshots/19.png" alt="top-title-two-cols slide example" width="600" style="border: 1px solid #ccc;"/>
114
+
115
+ ### Alignment changes
116
+
117
+ ```md
118
+ ---
119
+ layout: top-title-two-cols
120
+ color: violet-light
121
+ align: r-rm-lt
122
+ columns: is-3
123
+ ---
124
+
125
+ :: title ::
126
+
127
+ # This is `two-cols-title`
128
+
129
+ :: left ::
130
+ This is a note
131
+
132
+ :: right ::
133
+ About this content on the right
134
+
135
+ - Which has various things to say
136
+ - This layout is nice to look at!
137
+ ```
138
+
139
+ <img src="/screenshots/20.png" alt="top-title-two-cols slide example" width="600" style="border: 1px solid #ccc;"/>
140
+
141
+ ### Matchy-matchy sticky
142
+
143
+ ```md
144
+ ---
145
+ layout: top-title-two-cols
146
+ columns: is-2
147
+ align: l-rm-lt
148
+ color: violet-light
149
+ ---
150
+
151
+ <StickyNote color="violet-light" textAlign="left" width="180px" title="Hi" v-drag="[689,277,180,180,18]">
152
+
153
+ Hello, I'm a matchy-matchy **sticky note**.
154
+ </StickyNote>
155
+
156
+ :: title ::
157
+
158
+ ### This is a smaller title
159
+
160
+ :: left ::
161
+
162
+ The left column is `rm` which means right-middle.
163
+
164
+ :: right ::
165
+
166
+ The right content is left-top aligned `lt`.
167
+
168
+ The sticky note appears in the `:: default ::` slot and then used v-drag to move it into position.
169
+ ```
170
+
171
+ <img src="/screenshots/21.png" alt="top-title-two-cols slide example" width="600" style="border: 1px solid #ccc;"/>
@@ -0,0 +1,103 @@
1
+ # `layout: top-title`
2
+
3
+ <img src="/screenshots/15.png" alt="Top title slide example" width="600" class="screenshot mb-10 mt-10"/>
4
+
5
+ ## Description
6
+
7
+ The `layout: top-title` layout adds a bit of color to the default layout. The title is anchored to the top of the slide and the content appears below.
8
+
9
+ A default slot is provided for content that appears before a named slot. This content will appear at the bottom of the slide.
10
+
11
+ ## Frontmatter
12
+
13
+ - `layout: top-title` (required).
14
+ - `color:` (optional) can be any of the [color scheme](/colors) options. If not provided, the default color is `light`.
15
+ - `align:` (optional) determines the text alignment of the title. The options are `l` for left, `c` for center, or `r` for right. The default is `l`.
16
+
17
+ Example:
18
+
19
+ ```yaml
20
+ ---
21
+ layout: top-title
22
+ align: l
23
+ color: light
24
+ ---
25
+ ```
26
+
27
+ ## Slots
28
+
29
+ This `top-title` slide has two named slots which are all optional:
30
+ `:: title ::`, and `:: content ::`. In addition, the `:: default ::` slot exits for any content that appears before a named slot. It will appear at the bottom of the slide.
31
+ If the title is not provided the color space for it will still appear.
32
+ If content is not provided the default slot will reclaim the space.
33
+
34
+ A common use case for the default slot is to include things like [StickyNotes](/components/stickynote) in this default section and then use Slidev's `v-drag` directive to move them into position on the slide. An example below make use of this technique.
35
+
36
+ ## Examples
37
+
38
+ ### Basic example
39
+
40
+ ```md
41
+ ----
42
+ layout: top-title
43
+ color: amber
44
+ align: l
45
+ ---
46
+
47
+ \* This is the default slot.
48
+
49
+ :: title ::
50
+
51
+ # This is `top-title`
52
+
53
+ :: content ::
54
+
55
+ - There are two slots: `:: title ::` and `:: content ::` along with the default which is implicit before any named slots.
56
+
57
+ - The `color` parameter determines the color scheme of the slide.
58
+
59
+ - The <code>align</code> parameter determines the alignment of the title.
60
+
61
+ If the title is missing a reasonable ribbon of color will remain.
62
+ ```
63
+
64
+ Renders as:
65
+
66
+ <img src="/screenshots/15.png" alt="two-cols-header slide example" width="600" style="border: 1px solid #ccc;"/>
67
+
68
+ ### Right align the title
69
+
70
+ ```md
71
+ ---
72
+ layout: top-title
73
+ color: sky
74
+ align: r
75
+ ---
76
+
77
+ :: title ::
78
+
79
+ # This is `top-title`
80
+
81
+ :: content ::
82
+
83
+ The title is right aligned.
84
+ ```
85
+
86
+ Renders as:
87
+
88
+ <img src="/screenshots/16.png" alt="Cover slide example" width="600" style="border: 1px solid #ccc;"/>
89
+
90
+ ### No title at all
91
+
92
+ ```md
93
+ ---
94
+ layout: top-title
95
+ color: pink
96
+ ---
97
+
98
+ :: content ::
99
+
100
+ See this has no title, but still has a color band.
101
+ ```
102
+
103
+ <img src="/screenshots/17.png" alt="Cover slide example" width="600" style="border: 1px solid #ccc;"/>