Some fixes in the CSS for printout mode and correct selection of current theme in...
[hacks/simpleWebSlides.git] / simpleWebSlides.css
index 39249a2..3668572 100644 (file)
@@ -1,21 +1,73 @@
 /* default is 4:3 */
 
-@media print {
-    body {
-        width: 4cm;
-        height: 3cm;
-    }
+/*         Common           */
+body {
+    margin: 0 0;
+    padding: 0 0;
+}
+
+.sws-active-slide {
+    display: block;
+}
+.sws-active-object {
+    visibility: visible;
 }
 .sws-canvas {
+    display: block;
+}
+
+.sws-title {
+    vertical-align:middle;
+}
+.sws-inner-canvas {
+   /* white-space: nowrap;*/
+}
+.sws-content {
+    margin: 0vh;
+    padding: 0vh;
+    display:inline-block;
+    width: 100%;
+    vertical-align: middle;
+    max-height: 100%;
+    overflow:hidden;
+}
+.sws-vertical-align {
+    display:inline-block;
+    height: 33%;
+    width: 0%;
+    vertical-align:text-bottom;
+}
+
+
+body > h1, body > h2, body > h3 {
+    display: none;
+}
+/*             Display Mode             */
+/****************************************/
+
+:root.sws-display  .sws-inactive-object {
+        visibility: hidden;
+}
+
+:root.sws-display body {
+    background: black;
+}
+
+:root.sws-display .sws-canvas {
     width:133.3vh;
     height:100vh;
 }
+:root.sws-display .sws-inner-canvas {
+    display:inline-block;
+}
+/* display mode */
+/* Aspect is 4/3, 16/9, 16/10 (default is 4/3) */
 
 :root.sws-aspect-4-3 .sws-canvas {
     width:133.3vh;
     height:100vh;
-
 }
+
 :root.sws-aspect-16-9 .sws-canvas {
     width:177.7vh;
     height:100vh;
     height:100vh;
 }
 
-
-
-
-.sws-canvas {
+:root.sws-display .sws-canvas {
     position: relative;
     margin-left: auto;
     margin-right: auto;
     padding: 0vh;
-    overflow:hidden;
     margin-top: 0vh;
     margin-bottom: 0vh;
 }
 
-.sws-active-slide {
-    display: block;
+:root.sws-display .sws-inactive-slide {
+    display: none;
 }
 
-@media print {
-    .sws-inactive-slide {
-        display: block;
-    }
+
+/*                 Print Mode                 */
+/* ****************************************** */
+
+@page { margin: 0pt 0pt 0pt 0pt; }
+
+:root.sws-print body {
+    background: white;
 }
 
-@media screen {
+:root.sws-print body {
+    width: 297mm;
+    overflow:auto;
+    padding: 0pt 0pt 0pt 0pt;
+    margin: 0pt 0pt 0pt 0pt;
 
-    .sws-inactive-slide {
-        display: none;
-    }
 }
 
-.sws-active-object {
-    visibility: visible;
+:root.sws-print .sws-canvas {
+    position: relative;
+    display:inline-block;
+    width: 297mm;
+    height: 210mm;
+    page-break-after: auto;
+    padding: 0pt 0pt 0pt 0pt;
+    margin: 0pt 0pt 0pt 0pt;
+    overflow: hidden;
 }
 
-@media print {
-    .sws-inactive-object {
-        visibility: visible;
-    }
+:root.sws-print .sws-canvas:last {
+    page-break-after: avoid;
 }
 
-@media screen {
-    .sws-inactive-object {
-        visibility: hidden;
-    }
+
+
+:root.sws-print .sws-inactive-slide {
+    opacity: 1;
+    display: inline-block;
 }
 
+
+p { width: 100%; }
+
 .sws-header, .sws-title, .sws-inner-canvas, .sws-footer {
     position: absolute;
     width: 100%;
-    display:inline-block;
     padding: 0vh;
     margin: 0vh;
     border: 0vh;
 }
-.sws-title {
-    vertical-align:middle;
-}
-.sws-inner-canvas {
-   /* white-space: nowrap;*/
-}
-.sws-content {
-    margin: 0vh;
-    padding: 0vh;
-    display:inline-block;
-    width: 100%;
-    vertical-align: middle;
-    max-height: 100%;
-    overflow:hidden;
-}
-.sws-vertical-align {
-    display:inline-block;
-    height: 33%;
-    width: 0%;
-    vertical-align:text-bottom;
-}
 
-body {
-    overflow:hidden;
-    margin: 0vh;
-    padding: 0vh;
+:root.sws-print .sws-inner-canvas {
+    display:block;
 }
 
-body > h1, body > h2, body > h3 {
-    display: none;
-}
+
+
+/*             Control Panel             */
+/*****************************************/
+
+
 
 @font-face {
   font-family: 'entypo';
@@ -208,3 +249,11 @@ body > h1, body > h2, body > h3 {
 #sws-control-panel-navigation-bar {
     width: 50vh;
 }
+#sws-print-container {
+    top: 0;
+    left: 0;
+    width: 29.7cm;
+    overflow: auto;
+    border: 1px;
+    padding: 1px 1px 1px 1px;
+}
\ No newline at end of file