Skip to content

Commit 27fedaa

Browse files
committed
Update documentation.
1 parent 3d2ccf5 commit 27fedaa

File tree

1 file changed

+66
-73
lines changed

1 file changed

+66
-73
lines changed

src/documentation/index.vue

+66-73
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
:pause-on-hover="pauseOnHover"
157157
@autoplay-pause="internalAutoPlaying = false"
158158
@autoplay-resume="internalAutoPlaying = true")
159-
v-icon(slot="pausedIcon" large color="white") pause_circle_outline
159+
v-icon(slot="pause-icon" large color="white") pause_circle_outline
160160
vueper-slide(v-for="(slide, i) in slides1" :key="slide.id" :title="slide.title" :content="slide.content" :style="'background-color: ' + colors[i % 4]")
161161

162162
.subtitle-1.mt-6 Basic autoplay (with pause on mouseover) source code:
@@ -167,7 +167,7 @@
167167
:title="slide.title"
168168
:content="slide.content"
169169
:style="'background-color: ' + colors[i % 4]"></vueper-slide>
170-
<i slot="pausedIcon" class="icon pause_circle_outline"></i>
170+
<i slot="pause-icon" class="icon pause_circle_outline"></i>
171171
</vueper-slides>
172172

173173
.subtitle-1 This example full source code:
@@ -190,7 +190,7 @@
190190
:title="slide.title"
191191
:content="slide.content"
192192
:style="'background-color: ' + colors[i % 4]"></vueper-slide>
193-
<i slot="pausedIcon" class="icon pause_circle_outline"></i>
193+
<i slot="pause-icon" class="icon pause_circle_outline"></i>
194194
</vueper-slides>
195195
ssh-pre(language="js" label="Vue JS component").
196196
data: () => ({
@@ -215,13 +215,13 @@
215215
The bullets are showing slide indexes which is disabled by default.#[br]
216216
You can also disable arrows and/or bullets. E.g. #[span.code :arrows="false"], #[span.code :bullets="false"]
217217
vueper-slides.ex--arrows-and-bullets(:infinite="false" :bullets-outside="true")
218-
v-icon(slot="arrowLeft" color="white" x-large) undo
219-
v-icon(slot="arrowRight" color="white" x-large) redo
218+
v-icon(slot="arrow-left" color="white" x-large) undo
219+
v-icon(slot="arrow-right" color="white" x-large) redo
220220
vueper-slide(v-for="(slide, i) in slides1" :key="slide.id" :title="slide.title" :content="slide.content" :style="'background-color: ' + colors[(i + 1) % 4]")
221221
ssh-pre(language="html-vue" label="HTML Vue Template").
222222
<vueper-slides :infinite="false" :bullets-outside="true">
223-
<v-icon slot="arrowLeft" color="white" large>arrow_left</v-icon>
224-
<v-icon slot="arrowRight" color="white" large>arrow_right</v-icon>
223+
<v-icon slot="arrow-left" color="white" large>arrow_left</v-icon>
224+
<v-icon slot="arrow-right" color="white" large>arrow_right</v-icon>
225225
<vueper-slide
226226
v-for="(slide, i) in slides"
227227
:key="slide.id"
@@ -328,20 +328,13 @@
328328
p.
329329
This example (and the next one #[a(href="#ex--updating-content") Updating Content]) shows how to use a complex html content with interpreted VueJS keywords inside your slides.#[br]
330330
The #[span.code <vueper-slide>] tag accepts 2 slots called #[span.code slide-title] & #[span.code slide-content]
331-
if using the html attribute way (#[span.code <vueper-slide :title="..." :content="...">]) is too restrictive for your content.
331+
if using the html attributes #[span.code :title="..."] & #[span.code :content="..."] is too restrictive for your content.
332332

333333
vueper-slides
334334
vueper-slide(v-for="i in 4" :key="i" :style="'background-color: ' + ['#ff5252', '#42b983'][i % 2]")
335335
template(v-slot:slide-content)
336336
v-icon(color="white") check
337-
| Complex content {{ i.toString() }} with vueJS
338-
| {{ 1 === 1 ? 'interpreted' : 'non-interpreted' }} compilable content like
339-
| components & #[span(v-pre) {{ mustaches }}].
340-
vueper-slides
341-
vueper-slide(v-for="i in 4" :key="i" :style="'background-color: ' + ['#ff5252', '#42b983'][i % 2]")
342-
div(slot="slide-content")
343-
v-icon(color="white") check
344-
| Complex content {{ i.toString() }} with vueJS
337+
| Complex content {{ i.toString() }} with Vue.js
345338
| {{ 1 === 1 ? 'interpreted' : 'non-interpreted' }} compilable content like
346339
| components & #[span(v-pre) {{ mustaches }}].
347340
ssh-pre(language="html-vue" label="HTML Vue Template").
@@ -350,35 +343,16 @@
350343
v-for="i in 4"
351344
:key="i"
352345
:style="'background-color: ' + ['#ff5252', '#42b983'][i % 2]">
353-
<div slot="slide-content">
346+
<template v-slot:slide-content>
354347
<v-icon color="white">check</v-icon>
355-
Complex content with vueJS {{ "\{\{ 1 === 1 ? 'interpreted' : 'non-interpreted' \}\}" }} compilable content & <span v-pre>{{ '\{\{ mustaches \}\}' }}</span>.
356-
</div>
348+
Complex content with Vue.js {{ "\{\{ 1 === 1 ? 'interpreted' : 'non-interpreted' \}\}" }} compilable content & <span v-pre>{{ '\{\{ mustaches \}\}' }}</span>.
349+
</template>
357350
</vueper-slide>
358351
</vueper-slides>
359352
highlight(type="info")
360353
ul.my-0
361-
li if both #[span.code :title="Some title"] and #[span.code slot="slide-title"] are provided, only the title from the attribute will be displayed.
362-
li if both #[span.code :content="Some content"] and #[span.code slot="slide-content"] are provided, only the content from the attribute will be displayed.
363-
highlight(type="warning")
364-
strong Caution if you use the slide slots with the infinite sliding mode
365-
| #[br]At each end of the slideshow, slide clones mirror the original slides.
366-
| For them to display exactly like the original slide, the element with the
367-
| #[span.code slot="slide-content"] attribute should wrap  
368-
| #[strong everything you want to keep]. E.g. (with Vuetify component)#[br]
369-
v-layout
370-
ssh-pre.flex.xs6.my-2.ml-0.mr-2(language="html-vue").
371-
<!-- Wrong way. The v-layout class will be lost. -->
372-
<v-layout slot="slide-content">
373-
Some content.
374-
</v-layout>
375-
ssh-pre.flex.xs6.my-2.ml-2.mr-0(language="html-vue").
376-
<!-- Right way. -->
377-
<div slot="slide-content">
378-
<v-layout>
379-
Some content.
380-
</v-layout>
381-
</div>
354+
li if both #[span.code :title="..."] and #[span.code slot="slide-title"] are provided, the title slot will be displayed.
355+
li if both #[span.code :content="..."] and #[span.code slot="slide-content"] are provided, the content slot will be displayed.
382356

383357
h3
384358
a(href="#ex--updating-content") Updating Content Inside/Outside
@@ -410,7 +384,7 @@
410384
slide-content-outside-class="text-center py-4"
411385
:refresh-clones-on-drag="true")
412386
vueper-slide(v-for="(slide, i) in slides4" :key="i" :style="'background-color: ' + ['#42b983', '#ff5252'][i % 2]")
413-
div(slot="slide-content")
387+
template(v-slot:slide-content)
414388
v-layout(align-center justify-center)
415389
v-icon.pr-3(color="white" size="5em") access_time
416390
div.text-xs-left
@@ -1185,17 +1159,32 @@
11851159

11861160
p See this setting live in the #[a(href="#ex--show-multiple-slides") Show Multiple Slides] example.
11871161

1188-
highlight.
1189-
In some cases like in the first 3 examples bellow, you will not want the default
1190-
inner top and bottom shadow (the fourth example has it). To remove it, add the class
1191-
#[span.code no-shadow] on the #[span.code <vueper-slides>] tag.#[br]
1192-
Refer to the example source code.
1193-
highlight.
1194-
In most cases you will want to have the arrows and bullets outside, so if
1195-
#[span.code.black--text visible-slides] is set, arrows and bullets will be outside
1196-
by default.#[br]
1197-
You can override this by explicitly setting #[span.code :arrows-outside="false"],
1198-
or #[span.code :bullets-outside="false"].
1162+
highlight(type="warning")
1163+
strong.black--text.
1164+
WARNING#[br]
1165+
The #[span.code infinite] mode is not supported with the #[span.code visible-slides] option for now.
1166+
highlight
1167+
ul.pl-3
1168+
li
1169+
strong CSS class #[span.code no-shadow]:
1170+
div.
1171+
In some cases like in the #[a(href="#ex--show-multiple-slides") first 3 examples], you will not want the default
1172+
inner top and bottom shadow (the fourth example has it). To remove it, add the class
1173+
#[span.code no-shadow] on the #[span.code <vueper-slides>] tag.#[br]
1174+
Refer to the example source code.
1175+
li
1176+
strong Arrows & bullets outside by default:
1177+
div.
1178+
In most cases you will want to have the arrows and bullets outside, so if
1179+
#[span.code.black--text visible-slides] is set, arrows and bullets will be outside
1180+
by default.#[br]
1181+
You can override this by explicitly setting #[span.code :arrows-outside="false"],
1182+
or #[span.code :bullets-outside="false"].
1183+
li
1184+
strong Slide 1 by 1 with fading:
1185+
div.
1186+
The #[span.code fade] transition is designed for all the visible slides to change at once (#[span.code :slide-multiple="true"]).#[br]
1187+
If you try to change slides 1 by 1 #[span.code :slide-multiple="false"] with multiple visible slides, you should use the #[span.code slide] transition instead.
11991188
highlight(type="success")
12001189
p.mb-2.
12011190
When the #[span.code.black--text infinite] & #[span.code.black--text slide-multiple]
@@ -1206,16 +1195,9 @@
12061195
li With 3 items, active slide will be at position 2
12071196
li With 5 items, active slide will be at position 3
12081197
li With even numbers of items, active slide will be at position #[span.code visibleItemsCount / 2]
1209-
highlight(type="warning")
1210-
strong.black--text.
1211-
WARNING#[br]
1212-
The #[span.code infinite] mode is not supported with the #[span.code visible-slides] option for now.
1213-
highlight(type="info").
1214-
The #[span.code fade] transition is designed for all the visible slides to change at once (#[span.code :slide-multiple="true"]).#[br]
1215-
If you try to change slides 1 by 1 #[span.code :slide-multiple="false"] with multiple visible slides, you should use the #[span.code slide] transition instead.
12161198

12171199
li
1218-
a(name="vueper-slides-settings--3d") 3D Rotation
1200+
a(name="vueper-slides-settings--3d")
12191201
| #[code 3d], #[strong.mr-1 Type:] #[span.code.mr-1 [Boolean]], #[strong.mr-1 Default:] #[span.code false]
12201202
p.
12211203
Allows you to slide one slide at a time with a 3D effect transition.#[br]
@@ -1241,12 +1223,6 @@
12411223
Here is the list of all the available events. To see them in action you can check
12421224
the #[a(href="#ex--events") Events example].
12431225
ul.max-widthed
1244-
li
1245-
h4
1246-
code before-init
1247-
p.
1248-
Fired in the first place before the initialization of the slideshow.#[br]
1249-
No parameter available.
12501226
li
12511227
h4
12521228
code ready
@@ -1386,7 +1362,7 @@
13861362
h2
13871363
a(href="#notable-version-changes") Notable Version Changes
13881364
a(name="notable-version-changes")
1389-
highlight.
1365+
p.
13901366
Vueper Slides is constantly evolving and some changes might affect the way you use it sometimes.#[br]
13911367
Here is a list of the releases with their changes that might have an impact in your project.
13921368
highlight(type="tips").
@@ -1396,12 +1372,29 @@
13961372
ul.max-widthed
13971373
li
13981374
strong Version 2.0
1399-
p Breaking changes
1400-
ul
1401-
li Remove #[span.code before-init] emitted event
1402-
li Can now use new slot syntax
1403-
li Renamed slots to kebab-case
1404-
li If both slot and attribute are provided now use the attribute source.
1375+
highlight(type="warning")
1376+
strong Breaking changes
1377+
ul
1378+
li Can now use new Vue.js 2.6+ slots syntax
1379+
li Removed the #[span.code before-init] emitted event
1380+
li
1381+
span Renamed slots to kebab-case:
1382+
ul.pl-4.mt-1.mb-3
1383+
li #[span.code slideTitle] to #[span.code slide-title]
1384+
li #[span.code slideContent] to #[span.code slide-content]
1385+
li #[span.code arrowLeft] to #[span.code arrow-left]
1386+
li #[span.code arrowRight] to #[span.code arrow-right]
1387+
li #[span.code pausedIcon] to #[span.code pause-icon]
1388+
li
1389+
span Renamed events to kebab-case:
1390+
ul.pl-4.mt-1.mb-3
1391+
li #[span.code mouseover] to #[span.code mouse-enter]
1392+
li #[span.code mouseout] to #[span.code mouse-leave]
1393+
li If both slide-title slot and title attribute are provided now use the slot.
1394+
li If both slide-content slot and content attribute are provided now use the slot.
1395+
li Improved autoplay pause & resume - manual slide does not resume if paused.
1396+
li TODO: update clones on content/title slots update
1397+
li TODO: update all examples with new slots syntax
14051398

14061399
li.mt-6
14071400
strong Version 1.16.0

0 commit comments

Comments
 (0)