You are seeing an HTML page that has been prepared by a
JavaScript
to be a slide show.
Use the right and left side arrow-buttons to navigate. For keyboard navigation use CURSOR-RIGHT or ENTER, and CURSOR-LEFT or BACKSPACE.
Firefox 22
Chrome 29
Opera 16
IE-11
Safari 6.1
The navigation controls will appear when you move the mouse.
The number of the current slide, and the total number of slides, is to be seen on top.
You can go to slide 99 by writing #99
at end of browser address line and press the Reload
button after.
Keyboard navigation will not work when a web page is displayed in a slide, and input focus has been set to that page.
The optional "Down" button on bottom would toggle the visibility of the underlying document. This is useful for intermediate text searches.
class="slide"
in document,
these are the slides<body>
are slides, excluding the slide frame and its controls, and empty elements<a>
element (hyperlink)
will be displayed as its actual href
location1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | <html> <head> <link href="slideshow.css" rel="stylesheet" type="text/css"> </head> <body> <div class="slide"> <h1>Example: Image</h1> <p>Let's see how images fit into viewport ...</p> </div> <img class="slide" src="http://upload.wikimedia.org/wikipedia/commons/4/48/Anna_Atkins_1861.jpg"/> <div class="slide"> <h1>Example: Hyperlink</h1> <p>Display a web page ....</p> </div> <a class="slide" href="https://css-tricks.com/centering-css-complete-guide/"> css-tricks </a> <script type="text/javascript" src="slideshow.js"></script> </body> </html> |
You can find slideshow.js and slideshow.css on slide 12 and following.
But mind slideshow.js
is an AMD module,
so you may also want to view its caller
slideshowcaller.js and the
AMD loader
define.js.
Best will be you use your browser's "View Page Source" menu item.
... showing the capabilities of this slide show.
A slide show is like a vacation from losing yourself in endless details
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse
<a class="slide" href="../lib/slideshow/slideshow.js">slideshow.js</a> <a class="slide" href="../lib/slideshow/slidecontrols.js">slidecontrols.js</a> <a class="slide" href="../lib/queue.js">queue.js</a> <a class="slide" href="../lib/slideshow/slideshow.css">slideshow.css</a>
Images should fill the viewport without losing their original aspect ratio. Try to change width and height of the browser window. The image never should be distorted during such an action (IE may behave as it likes). Further the image dimension should not provoke browser scroll bars.
Useful for image galleries!
<img class="slide" src="http://somesite/somefolder/BEAUTIFUL.JPG"/>
The next slide should show a scrollable web page that explains how to center elements ....
<a class="slide" href="https://css-tricks.com/centering-css-complete-guide/">CSS Tricks</a>
The next slide should show a video player ...
<a class="slide" href="https://www.youtube.com/embed/IVpOyKCNZYw">youtube</a>
All layout and text attributation within a slide is done by the author using HTML and CSS.
What the script does is ...
<div class = "slide">
(reserved CSS class name)Not finding any means ...
body
children are slides,SCRIPT
and empty elements, id="slideshow"
,
and all other "slide..."
ids.id = "slideframe"
frame where slides are shown inid = "slideforward"
button navigating to next slideid = "slidebackward"
button navigating to previous slideid = "slidedownward"
optional button toggling document visibilityid = "slideindex"
current slide-index displayid = "slidecount"
total slide-count displayid = "slidetools"
the element containing index and countNot finding one of these means generating it.
Finding one means the author is responsible for its shape.
The slidedownward
button can be avoided by
providing slideforward
and slidebackward
in HTML.
The elements slideindex and slidecount must be children of slidetools.
The optional element id = "slideshow"
is considered to be
a custom slide frame layout container and is ignored in any way.
Normally the show is "full-screen", taking 100% of browser height and width. The underlying document is set invisible.
By providing a custom HTML element id="slideshow"
,
containing slideframe, slideforward, ....
controls,
the layout and shape of the slide show can be taken over
completely by the HTML document and its CSS.
That way it is possible to embed the slide show as part of a web page.
<div id="slideshow" class="myslideshow"> <div id="slideframe" class="slideframe"></div> <div id="slidetools" class="myslidetools"> <span id="slideindex" style="font-weight: bold;"></span> of <span id="slidecount"></span> </div> <input id="slidebackward" class="myslidebackward" type="button" value="<" /> <input id="slideforward" class="myslideforward" type="button" value=">" /> <input id="slidedownward" class="myslidedownward" type="button" value="V" /> </div>
<head> <meta charset="UTF-8"/> <meta name="viewport" content="initial-scale=1"/> <title>JS Slide Show</title> <style type="text/css"> .myslideshow { position: relative; top: 5%; width: 90%; height: 90%; overflow: auto; margin: auto; border: 4px solid gray; border-radius: 10px; } .myslidetools { position: absolute; top: 2%; right: 2%; background-color: white; padding: 0.3em; border: 1px solid lightGray; } .myslidebackward { position: absolute; top: 50%; left: 1%; transform: translateY(-50%); } .myslideforward { position: absolute; top: 50%; right: 1%; transform: translateY(-50%); } .myslidedownward { position: absolute; bottom: 0; left: 50%; transform: translateY(-50%); } </style> </head>
JS does no layout except some text- and image-centering fixes that can not be done by CSS because they rely on current viewport dimensions.
JS just assigns classes to slide-controls when it generates them by itself (when there is no custom slideshow in HTML)
id=slideframe
-> class="slideframe"
id=slideforward
-> class="navigation slideforward"
id=slidebackward
-> class="navigation slidebackward"
id=slidedownward
-> class="navigation slidedownward"
id=slidetools
-> class="navigation slidetools"
But JS sets elements and slide controls visible and invisible.
TODO: introduce the source piece by piece ....