File tree Expand file tree Collapse file tree 4 files changed +56
-18
lines changed Expand file tree Collapse file tree 4 files changed +56
-18
lines changed Original file line number Diff line number Diff line change @@ -826,6 +826,8 @@ extra features. The following is a table of MoinMoin's macros.
826
826
+-------------------------------------------+------------------------------------------------------------+
827
827
| ``<<ShowWikiDict()>> `` | Displays metadata defined in wikidict attribute |
828
828
+-------------------------------------------+------------------------------------------------------------+
829
+ | ``<<SlideShow()>> `` | Displays a link to start a slideshow for the current item |
830
+ +-------------------------------------------+------------------------------------------------------------+
829
831
| ``<<TableOfContents(2)>> `` | Shows a table of contents up to level 2 |
830
832
+-------------------------------------------+------------------------------------------------------------+
831
833
| ``<<TitleIndex()>> `` | Lists all itemnames for the namespace of the current item, |
@@ -896,6 +898,11 @@ fixed_height and anniversary.
896
898
- <<MonthCalendar(month=12)>> Calendar of current Page, this year's december
897
899
- <<MonthCalendar(year=2022,month=12)>> Calendar of December, 2022
898
900
901
+ The **SlideShow ** macro creates a link to start a presentation for the current item. The slides
902
+ are separated by level 1 and 2 headings. The text before the first heading is ignored. Navigation
903
+ within the slideshow can be controlled via corresponding buttons at the edge or bottom of the
904
+ browser screen or using the left and right arrow keys.
905
+
899
906
900
907
Smileys and Icons
901
908
=================
Original file line number Diff line number Diff line change @@ -548,6 +548,28 @@ represents sample output.
548
548
549
549
{'dog': 'Hund', 'cat': 'Katze'}
550
550
551
+ === SlideShow ===
552
+
553
+ A slideshow can be defined on a single wiki page, with the slides separated by level 1 and 2 headings.
554
+ The text before the first heading is ignored. The macro creates a link to start the presentation.
555
+
556
+ Navigating through the slides works by various means:
557
+
558
+ * Use the left and right arrow keys to move to the previous and next slide
559
+ * Alternatively, you can click on the gray navigation links on the left and right edges of the screen
560
+ * There are icons at the bottom to switch to the first or last slide and to exit presentation mode
561
+ * Use the up and down arrow keys to scroll up and down within the content if it does not fit in the browser window
562
+ * The browser's built-in zoom function can be used to adjust the size of the presentation to your needs
563
+
564
+ '''Markup:'''
565
+
566
+ {{{
567
+ <<SlideShow()>>
568
+ }}}
569
+
570
+ '''Result:'''
571
+
572
+ <<SlideShow()>>
551
573
552
574
=== TitleIndex ===
553
575
Original file line number Diff line number Diff line change 3
3
" address " : " 127.0.0.1" ,
4
4
" comment " : " " ,
5
5
" contenttype " : " text/x.moin.wiki;charset=utf-8" ,
6
- " dataid " : " f1524f1f521a4600b3cb55caa557b558 " ,
6
+ " dataid " : " e5c04311b38c46029e237c0c12f3aa40 " ,
7
7
" externallinks " : [
8
8
" https://fontawesome.com/search?o=r&m=free" ,
9
9
" https://moinmo.in/HelpOnMacros/Include"
19
19
],
20
20
" itemtype " : " default" ,
21
21
" language " : " en" ,
22
- " mtime " : 1710879680 ,
22
+ " mtime " : 1723402687 ,
23
23
" name " : [
24
24
" MoinWikiMacros"
25
25
],
26
26
" name_old " : [],
27
27
" namespace " : " help-en" ,
28
28
" rev_number " : 1,
29
- " revid " : " d61a54ba4e924b418d421b6b27c74616 " ,
30
- " sha1 " : " f3443067aeb6adf5ef47ec171052bfb01b0855d3 " ,
31
- " size " : 13603 ,
29
+ " revid " : " dfc263543dd84e4b9fbe6b64dd983b58 " ,
30
+ " sha1 " : " 0064f57340dac2f337760e88e5bd57fc9ef550b1 " ,
31
+ " size " : 14479 ,
32
32
" summary " : " " ,
33
33
" tags " : [
34
34
" macros" ,
Original file line number Diff line number Diff line change 27
27
let slides = document . getElementsByClassName ( "moin-slides" ) ;
28
28
showSlide ( slideNo ) ;
29
29
30
+ document . addEventListener ( "keydown" , ( event ) => {
31
+ if ( event . code === "ArrowLeft" ) {
32
+ prevSlide ( ) ;
33
+ }
34
+ if ( event . code === "ArrowRight" ) {
35
+ nextSlide ( ) ;
36
+ }
37
+ } ) ;
38
+
30
39
function nextSlide ( ) {
31
- if ( slideNo < slides . length ) {
32
- showSlide ( slideNo += 1 ) ;
33
- }
40
+ if ( slideNo < slides . length ) {
41
+ showSlide ( ( slideNo += 1 ) ) ;
42
+ }
34
43
}
35
44
36
45
function prevSlide ( ) {
37
- if ( slideNo > 1 ) {
38
- showSlide ( slideNo -= 1 ) ;
39
- }
46
+ if ( slideNo > 1 ) {
47
+ showSlide ( ( slideNo -= 1 ) ) ;
48
+ }
40
49
}
41
50
42
51
function lastSlide ( ) {
43
- showSlide ( slides . length ) ;
52
+ showSlide ( slides . length ) ;
44
53
}
45
54
46
55
function showSlide ( n ) {
47
- let i ;
48
- slideNo = n ;
49
- for ( i = 0 ; i < slides . length ; i ++ ) {
50
- slides [ i ] . style . display = "none" ;
51
- }
52
- slides [ slideNo - 1 ] . style . display = "block" ;
56
+ let i ;
57
+ slideNo = n ;
58
+ for ( i = 0 ; i < slides . length ; i ++ ) {
59
+ slides [ i ] . style . display = "none" ;
60
+ }
61
+ slides [ slideNo - 1 ] . style . display = "block" ;
53
62
}
54
63
</ script >
55
64
{% endblock %}
You can’t perform that action at this time.
0 commit comments