/[suikacvs]/markup/slide/implementation/slide-show-winie.css
Suika

Contents of /markup/slide/implementation/slide-show-winie.css

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download) (as text)
Sat Oct 15 08:45:34 2005 UTC (19 years ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +19 -0 lines
File MIME type: text/css
Error occurred while calculating annotation data.
Page number for WinIE implemented

1
2 /* s|slides */
3 slides {
4 position: absolute;
5 overflow: hidden;
6 height: 100%;
7 width: 100%;
8 left: 0; right: 0;
9 top: 0; bottom: 0;
10 margin: 0;
11 border-width: 0;
12 padding: 0;
13 font-family: "MS Gothic", "Arial", sans-serif;
14 behavior: expression(function (element) {
15 element.currentSlide = 0;
16
17 // h|head { display : none }
18 var head = element.getElementsByTagName ('head')[0];
19 head.style.display = 'none';
20
21 var pageNumbers = document.createElement ('pageNumbers');
22 var currentPageNumber = document.createElement ('currentPageNumber');
23 currentPageNumber.innerText = '1';
24 pageNumbers.appendChild (currentPageNumber);
25 var allPageNumber = document.createElement ('allPageNumber');
26 pageNumbers.appendChild (allPageNumber);
27 pageNumbers.appendChild (allPageNumber);
28 setTimeout (function () {
29 pageNumbers.insertBefore (document.createTextNode (' / '), allPageNumber);
30 allPageNumber.innerText = document.getElementsByTagName ('slide').length;
31 }, 3000);
32
33 pageNumbers.style.display = 'block';
34 pageNumbers.style.position = 'absolute';
35 pageNumbers.style.bottom = '0.4em';
36 pageNumbers.style.right = '0.4em';
37 setTimeout (function () {element.appendChild (pageNumbers)}, 1000);
38
39 document.onkeydown = function () {
40 var slide = getSlideList ();
41 if (event.keyCode == 13 || event.keyCode == 39) {
42 element.currentSlide++;
43 if (element.currentSlide >= slide.length) element.currentSlide = 0;
44 showSlide (element.currentSlide);
45 event.returnValue = false;
46 } else if (event.keyCode == 8 || event.keyCode == 37) {
47 element.currentSlide--;
48 if (element.currentSlide < 0) element.currentSlide = slide.length - 1;
49 showSlide (element.currentSlide);
50 event.returnValue = false;
51 }
52 } /* keydown */
53
54 element.ondblclick = function () {
55 var slide = getSlideList ();
56 element.currentSlide++;
57 if (element.currentSlide >= slide.length) element.currentSlide = 0;
58 showSlide (element.currentSlide);
59 event.returnValue = false;
60 }
61
62 function showSlide (n) {
63 var slide = getSlideList ();
64 for (var i = 0; i < slide.length; i++) {
65 slide[i].runtimeStyle.display = (i == n) ? 'block' : 'none';
66 }
67 currentPageNumber.innerText = n + 1;
68 }
69
70 function getSlideList () {
71 return window.document.getElementsByTagName ('slide');
72 }
73
74 runtimeStyle.behavior = 'none';
75 } (this)); /* NOTE: See also slide-style-winie.css */
76 }
77
78 /* s|slide */
79 slide {
80 width: 100%;
81 height: 100%;
82 border: groove 1px #C0C0C0;
83 font-size: 200%;
84 }

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24