]> git.plutz.net Git - clickslide/blobdiff - clickslide.css
use checkbox hack for cleaner item uncovering
[clickslide] / clickslide.css
diff --git a/clickslide.css b/clickslide.css
new file mode 100644 (file)
index 0000000..e545208
--- /dev/null
@@ -0,0 +1,199 @@
+* {
+  box-sizing: border-box;
+  margin: 0; padding: 0;
+}
+
+body {
+  font-family: sans-serif;
+  padding: 2em 1em 6em 1em;
+  background-color: #555;
+  text-align: center;
+  overflow-x: hidden;
+}
+body * { text-align: left; }
+
+body:after {
+  position: fixed;
+  bottom: 0; left: 0;
+  width: 100%;
+  background-color: #EEE;
+  height: 30pt;
+  content: ' ';
+}
+
+a.previous, a.next ,a.toplevel {
+  text-decoration: none;
+}
+
+footer {
+  position: fixed;
+  bottom: 0; left: 0;
+  width: 100%;
+  font-size: 14pt; line-height: 14pt;
+  padding: .5em 4em .5em 12em;
+  text-align: center;
+  #background-color: #EEE;
+  color: #888;
+  z-index: 3;
+}
+footer:before {
+  content: ' ';
+  position: absolute;
+  top: 0; left: 0;
+  bottom: 28pt;
+  width: 100%;
+  background-color: #EEE;
+  z-index: -1;
+}
+
+body a.toplevel {
+  position: fixed;
+  bottom: 0; left: 8em;
+  width: 2ex; overflow: hidden;
+  font-size: 18pt;
+  padding-bottom: .25em;
+  color: #EEE;
+  z-index: 4;
+}
+body a.toplevel:before {
+  color: #888;
+  content: '\2ba4'
+}
+
+body span.count {
+  position: fixed;
+  bottom: 0; left: 6.25em;
+  font-size: 18pt;
+  padding-bottom: .125em;
+  color: #888;
+  z-index: 4;
+}
+
+/* ==== Overview Screen ==== */
+
+div.slide {
+  position: relative;
+  display: inline-block;
+  overflow: hidden;
+  width: 20em; height: 15em;
+  margin-left: -20em;
+  border: 1px solid black;
+  font-size: 6pt;
+}
+
+div.slide + a { display: none; }
+a.nextslide {
+  display: inline-block;
+  position: relative;
+  vertical-align: top;
+  font-size: 6pt;
+  width: 20em; line-height: 15em;
+  color: rgba(0, 0, 0, 0);
+  z-index: 1;
+}
+div.slide:nth-of-type(1) { margin-right: .5em; }
+
+/* ==== Slide Appearance ==== */
+
+div.slide {
+  background: #FFF no-repeat center;
+  text-align: center;
+  line-height: 1.5em;
+}
+
+div.slide:after {
+  position: absolute;
+  bottom: 0; left: 0;
+  width: 100%;
+  font-size: .75em;
+  line-height: 1.5em;
+  text-align: left;
+  content: attr(count) " /";
+  padding-left: 4em;
+  background-color: #EEE;
+  color: #888;
+}
+
+div.slide > * {
+  margin-top: 1em;
+  text-align: left;
+  max-width: 100%;
+  z-index: 3;
+}
+
+div.slide h1, div.slide h2 {
+  display: block;
+  background-color: #EEE;
+  text-align: center;
+  font-size: 1.5em;
+  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;
+}
+
+div.slide ul,
+div.slide ol {
+  width: fit-content;
+  margin: .25em auto;
+}
+
+/* ==== Slide Display ==== */
+
+div.slide:target {
+  position: fixed;
+  z-index: 2;
+  top: 0; bottom: 0; left: 0; right: 0;
+  width: auto; height: 100%;
+  margin: 0;
+  border: none;
+  font-size: 24pt;
+}
+div.slide:target + a,
+div.slide:target + a + a {
+  position: static;
+  display: block;
+  font-size: 18pt;
+  line-height: 1em;
+  color: #888;
+}
+:target + a:before, :target + a + a:before {
+  display: block;
+  position: fixed;
+  bottom: 0;
+  font-size: 18pt;
+  color: #888;
+  padding: 0 1em .25em 1em;
+  z-index: 3;
+}
+:target + a:before { left:  0; }
+:target + a:before { content: '\22d8'; }
+:target + a + a:before { right: 0; }
+:target + a + a:before { content: '\22d9'; }
+
+.uncover[type="checkbox"] + * { opacity: .2; }
+.uncover[type="checkbox"]:checked + * { opacity: 1; }
+
+.uncover[type="checkbox"] {
+  position: fixed;
+  top: 0; bottom: 0; left: 0; right: 0;
+  width: 100%; height: 100%;
+  opacity: 0;
+}
+
+.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; }
+