}
body {
+ font-family: sans-serif;
padding: 2em 1em 6em 1em;
background-color: #555;
text-align: center;
display: inline-block;
position: relative;
vertical-align: top;
- #margin-left: 2em;
font-size: 6pt;
width: 20em; line-height: 15em;
color: rgba(0, 0, 0, 0);
/* ==== Slide Appearance ==== */
div.slide {
- padding: 0 1em;
- background-color: #FFF;
+ background: #FFF no-repeat center;
text-align: center;
+ line-height: 1.5em;
}
div.slide:after {
}
div.slide > * {
- vertical-align: middle;
+ margin-top: 1em;
text-align: left;
+ max-width: 100%;
+ z-index: 3;
}
-div.slide h1 {
- left: 0; right: 0;
+div.slide h1, div.slide h2 {
display: block;
+ background-color: #EEE;
text-align: center;
font-size: 1.5em;
- background-color: #EEE;
+ margin-top: 0;
+ margin-bottom: 1em;
+ width: 100%;
+}
+
+div.slide h1 {
+ position: absolute;
+ top: 50%; left: 0; right: 0;
+ transform: translate(0, -50%);
+ padding: .5em 2em;
+ z-index: 0;
+}
+
+div.slide h2 {
padding: .25em 1em;
- margin-left: -1em;
- margin-right: -1em;
}
div.slide ul,
position: fixed;
z-index: 2;
top: 0; bottom: 0; left: 0; right: 0;
- width: auto; height: auto;
+ width: auto; height: 100%;
margin: 0;
border: none;
font-size: 24pt;
:target + a + a:before { right: 0; }
:target + a + a:before { content: '\22d9'; }
-:target .uncover { color: #DDD; }
-:target .uncover:hover { color: #000; }
-:target .uncover *:first-child { height: 0; }
-:target .uncover *:first-child:before,
-:target .uncover *:hover:before,
-:target .uncover *:active + *:before {
- content: ' ';
+.uncover[type="checkbox"] + * { opacity: .2; }
+.uncover[type="checkbox"]:checked + * { opacity: 1; }
+
+.uncover[type="checkbox"] {
position: fixed;
- top: 0; bottom: 0;
- left: 0; right: 0;
+ top: 0; bottom: 0; left: 0; right: 0;
+ width: 100%; height: 100%;
+ opacity: 0;
}
-:target .uncover *:hover ~ * { color: #DDD; }
-:target .uncover *:active:before { display: none; }
+
+.uncover[type="checkbox"] + * + .uncover[type="checkbox"] { display: none; }
+.uncover[type="checkbox"]:checked + * + .uncover[type="checkbox"] { display: inline; }
+.uncover[type="checkbox"]:checked + * + .uncover[type="checkbox"]:checked,
+.uncover[type="checkbox"]:checked { display: none; }
+
#!/bin/sh
prev='' next='' idoff=0
+depth=0 ucdepth=-1
-"${0%/*}"/cgilite/html-sh.sed | {
+{ "${0%/*}"/cgilite/html-sh.sed || cat; } \
+| {
line="$(line)"
while :; do
tag="${tag}${line%%>*}"
fi
case $tag in
+ *\<head\>*|\*\<head\ *\>)
+ printf '%s<meta name="viewport" content="width=device-width">
+ <style type="text/css"><!--\n' "${tag%${tag#*<head*>}}"
+ cat "${0%/*}/clickslide.css"
+ printf '\n--></style>%s' "${tag#*<head*>}"
+ tag='' depth=$((depth + 1))
+ ;;
*\<slide\ *id=\"?*\"*\>*)
prev="$next"
next="${tag#*<slide }" next="${next#*id=\"}" next="${next%\"*}"
idoff="$((idoff + 1))"
printf '%s<a class="nextslide" href="#%s">next</a><div class="slide" count="%i" id="%s" %s' \
"${tag%<slide *}" "$next" "$idoff" "$next" "${tag#*<slide }"
- tag=''
+ tag='' depth=$((depth + 1))
;;
*\<slide\ *\>*|*\<slide\>*)
prev="$next"
idoff="$((idoff + 1))"
printf '%s<a class="nextslide" href="#%s">next</a><div class="slide" count="%i" id="%s" %s' \
"${tag%<slide*}" "$next" "$idoff" "$next" "${tag#*<slide}"
- tag=''
+ tag='' depth=$((depth + 1))
;;
*\</slide\>*)
printf '%s</div><a class="prevslide" href="#%s">previous</a>%s' \
"${tag%</slide>*}" "$prev" "${tag#*</slide>}"
- tag=''
+ tag='' depth=$((depth - 1))
;;
*\<*class=\"uncover\"*\>*)
- printf '%s<span></span>' "$tag"
- tag=''
+ #printf '%s<li></li>' "$tag"
+ printf '%s' "$tag"
+ tag='' depth=$((depth + 1))
+ ucdepth=$depth
;;
*\<body*\>*)
printf '%s<a href="#" class="toplevel">overview</a>' "$tag"
- tag=''
+ tag='' depth=$((depth + 1))
;;
*\</body*\>*)
printf '<span class="count">%i</span>%s' "$idoff" "$tag"
- tag=''
+ tag='' depth=$((depth - 1))
;;
- *\<*\>*)
+ *\</*\>*)
printf %s "$tag"
+ tag='' depth=$((depth - 1))
+ [ $depth -lt $ucdepth ] && ucdepth=-1
+ ;;
+ *\<*\>*)
+ if [ $ucdepth = $depth ]; then
+ printf '%s<input type="checkbox" class="uncover"/><%s' "${tag%<*}" "${tag#*<}"
+ else
+ printf %s "$tag"
+ fi
+ [ "${tag}" = "${tag%/>}" ] && depth=$((depth + 1))
tag=''
;;
*) :
[!DOCTYPE HTML]
[html [head
- [meta name="viewport" content="width=device-width"]
[title Demo]
- [link rel="stylesheet" type="text/css" href="autoslide.css"]
][body
[footer Paul Hänsch | Linux-Grundkurs | VHS Chemnitz]
[slide
giraffe sabertooth kitten vegetarian
]
[slide [h1 Slide]] [slide [h1 Slide]] [slide [h1 Slide]] [slide [h1 Slide]]
- [slide [h1 Slide]] [slide [h1 Slide]] [slide [h1 Slide]] [slide [h1 Slide]]
- [slide [h1 Slide]] [slide [h1 Slide]] [slide [h1 Slide]] [slide [h1 Slide]]
- [slide [h1 Slide]] [slide [h1 Slide]] [slide [h1 Slide]] [slide [h1 Slide]]
- [slide [h1 Slide]] [slide [h1 Slide]] [slide [h1 Slide]] [slide [h1 Slide]]
- [slide [h1 Slide]] [slide [h1 Slide]] [slide [h1 Slide]] [slide [h1 Slide]]
- [slide [h1 Slide]] [slide [h1 Slide]] [slide [h1 Slide]] [slide [h1 Slide]]
]]