X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=simpleWebSlides.css;h=794eed48b3267c09fa60f60b958809960aeed947;hb=b1739fd451abe174305848faa1062edc87e48d1c;hp=345820e8aa342dd7ae2ce4b1d0e14237150a9174;hpb=a24dc2ee36273859bb0799e9d1274c207e3864fb;p=hacks%2FsimpleWebSlides.git diff --git a/simpleWebSlides.css b/simpleWebSlides.css index 345820e..794eed4 100644 --- a/simpleWebSlides.css +++ b/simpleWebSlides.css @@ -1,32 +1,103 @@ -/* default is 4:3 */ -@media print { - body { - width: 297mm; - height: 210mm; - } - .sws-canvas { - height: 210mm; - page-break-after: always; - } - :root.sws-print-4 .sws-canvas { - height: 25vh; - width: 33.3vh; - page-break-after: auto; - } +/* Common */ +body { + margin: 0 0 0 0; + padding: 0 0 0 0; + -webkit-box-sizing: border-box; + box-sizing: border-box; + -moz-box-sizing: border-box; +} +.sws-active-object { + visibility: visible; +} +.sws-inactive-object { + opacity: 0; } + .sws-canvas { + display: -webkit-flex; + display: flex; + flex-direction: column; + -webkit-flex-direction: column; + /* We make the box sizing border-box so that the user can freely add + padding and borders to canvas without changing the overall + layout */ + -webkit-box-sizing: border-box; + box-sizing: border-box; + -moz-box-sizing: border-box; +} + +.sws-cover { + justify-content: center; + -webkit-justify-content: center; + text-align:center; +} + +/* Layout of a canvas */ +.sws-header , .sws-title,{ + -webkit-box-align:start; + display:block; +} + +.sws-inner-canvas { + top-margin: auto; + bottom-margin: auto; + display:flex; + display:-webkit-flex; + flex: 3; + -webkit-flex: 3; + flex-direction: column; + -webkit-flex-direction: column; + justify-content: center; + -webkit-justify-content:center; +} + +.sws-content { + margin: 0vh; + padding: 0vh; + display:block; + width: 100%; +} + +.sws-footer{ + display:block; +} + +.sws-header, .sws-title, .sws-inner-canvas, .sws-footer{ + margin: 0 0 0 0; + padding: 0 0 0 0; + width: 100%; +} + + + +body > h1, body > h2, body > h3 { + display: none; +} +/* Display Mode */ +/****************************************/ + + +:root.sws-display body { + overflow:hidden; +} + +:root.sws-display .sws-canvas { width:133.3vh; height:100vh; } + +/* 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; @@ -37,99 +108,88 @@ 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; - } +:root.sws-display body { + background: black; } -@media screen { - .sws-inactive-slide { - display: none; - } -} +/* Print Mode */ +/* ****************************************** */ -.sws-active-object { - visibility: visible; +@page { margin: 0pt 0pt 0pt 0pt; } + +:root.sws-print body { + background: white; } -@media print { - .sws-inactive-object { - visibility: visible; - } +:root.sws-print body { + width: 297mm; + height: 210mm; + padding: 0pt 0pt 0pt 0pt; + margin: 0pt 0pt 0pt 0pt; + } -@media screen { - .sws-inactive-object { - visibility: hidden; - } +:root.sws-print .sws-canvas { + position: relative; + width: 297mm; + height: 210mm; + clear:both; + float:left; + page-break-after: always; + padding: 0pt 0pt 0pt 0pt; + margin: 0pt 0pt 0pt 0pt; + overflow: hidden; } -.sws-header, .sws-title, .sws-inner-canvas, .sws-footer { - position: absolute; - width: 100%; - display:inline-block; - padding: 0vh; - margin: 0vh; - border: 0vh; +:root.sws-print .sws-canvas:last{ + page-break-after: avoid; } -.sws-title { - vertical-align:middle; +:root.sws-print .sws-inactive-slide { + opacity: 1; } -.sws-inner-canvas { - /* white-space: nowrap;*/ + + +p { width: 100%; } + +/* counters for the toc */ + +.sws-toc ul { + counter-reset: list-item; } -.sws-content { - margin: 0vh; - padding: 0vh; - display:inline-block; - width: 100%; - vertical-align: middle; - max-height: 100%; - overflow:hidden; + +.sws-toc li { + counter-increment: list-item; + } -.sws-vertical-align { - display:inline-block; - height: 33%; - width: 0%; - vertical-align:text-bottom; +.sws-toc li::marker { + content : counters(list-item, '.'); } -body { - overflow:hidden; - margin: 0vh; - padding: 0vh; -} -body > h1, body > h2, body > h3 { - display: none; -} +/* Control Panel */ +/*****************************************/ + + @font-face { font-family: 'entypo'; - font-style: 'normal'; - font-weight: 'normal'; + font-style: normal; + font-weight: normal; src: url('entypo.woff') format('woff'); } - /* entypo */ .sws-symbol { font-family: 'entypo'; @@ -146,6 +206,7 @@ body > h1, body > h2, body > h3 { text-align: center; display:none; } + #sws-control-panel { /* visibility: hidden;*/ font-size:6vh; @@ -192,8 +253,8 @@ body > h1, body > h2, body > h3 { #sws-control-panel a { color: black; text-decoration: none; - display:inline-block; - padding:0pt 1em; 0pt 1em; + display: inline-block; + padding: 0pt 1em 0pt 1em; vertical-align: middle; } @@ -219,3 +280,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