X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=simpleWebSlides.css;h=c2c72b72dcd254c52e0961f8180fcebcb350acff;hb=HEAD;hp=29f5f53b2e98dbb794d4d9528c0708b3dcbd809b;hpb=420e180defcf998f358b1fdb86ced1b7c4c71784;p=hacks%2FsimpleWebSlides.git diff --git a/simpleWebSlides.css b/simpleWebSlides.css index 29f5f53..c2c72b7 100644 --- a/simpleWebSlides.css +++ b/simpleWebSlides.css @@ -1,153 +1,332 @@ -:root { - font-size: 3vh; +/* Common */ +body { + margin:0; + padding:0; + box-sizing: border-box; } -@media screen { - .sws-canvas { - position: absolute; - width:133vh; - height:100vh; - margin: auto; - overflow:hidden; - } +.sws-active-object { + visibility: visible; +} +.sws-inactive-object { + opacity: 0; +} - .sws-active-slide { - display: block; - } +.sws-canvas { + display:flex; + justify-content: center; + flex-direction:column; + box-sizing: border-box; +} - .sws-inactive-slide { - display: none; - } +.sws-cover .sws-content { + text-align:center; +} - .sws-active-object { - visibility: visible; - } +/* Layout of a canvas */ +.sws-header , .sws-title,{ + height:5%; +} - .sws-inactive-object { - visibility: hidden; - } +.sws-inner-canvas { + height: 80%; + text-align: justify; +} +.sws-content { + margin: 0; + padding: 0; + display: block; + box-sizing: border-box; } -@media print { +.sws-footer{ + height: 10%; +} - body { - margin: 0pt 0pt 0pt 0pt; - padding: 0pt 0pt 0pt 0pt; - border-width: 0pt; - } - - .sws-canvas { - overflow:hidden; - position:relative; - border-width: 0cm; - border-style: none; - margin:0pt 0pt 0pt 0pt; - page-break-after:always; - width: 297mm; - height: 209.8mm; /* not 210 due to rounding errors */ - padding:0pt; - visibility:visible; - opacity:1.0; - } - .sws-canvas:last-child { - page-break-after: avoid; - } - .sws-active-slide, .sws-inactive-slide { - display: block; - visibility:visible; - opacity:1.0; - - } - .sws-active-object, .sws-inactive-object { - visibility:visible; - opacity:1.0; - } +.sws-header, .sws-title, .sws-inner-canvas, .sws-footer{ + display:block; + margin:0; + padding:0; + width: 100%; + box-sizing: border-box; + overflow:hidden; +} +body > h1, body > h2, body > h3, body > a.sws-previous { + display: none; } +/* Display Mode */ +/****************************************/ -body { + + +/* display mode */ +/* Aspect is 4/3, 16/9, 16/10 (default is 4/3) */ +:root.sws-display .sws-canvas { + max-width: 100vw; + max-height: 100vh; overflow:hidden; + } -.sws-canvas { - top:0pt; - left:0pt; - right:0pt; +:root.sws-by-width body { + font-size: 3.5vh; +} +:root.sws-by-height.sws-aspect-4-3 body { + font-size: 2.625vw; +} +:root.sws-by-height.sws-aspect-16-9 body { + font-size: 1.96875vw; +} +:root.sws-by-height.sws-aspect-16-10 body { + font-size: 2.1875vw; } -.sws-header { - position:absolute; - width:133vh; - left:0pt; - right:0pt; - top:0pt; +:root.sws-by-width.sws-aspect-4-3 .sws-canvas { + width:133.3vh; + height:100vh; } -.sws-footer { - position: absolute; - width:133vh; - left: 0pt; - right: 0pt; - bottom: 0pt; +:root.sws-by-width.sws-aspect-16-9 .sws-canvas { + width:177.7vh; + height:100vh; } -.sws-title, .sws-slide { - display:table-row; - height:1pt; + +:root.sws-by-width.sws-aspect-16-10 .sws-canvas { + width:160vh; + height:100vh; } -.sws-inner-canvas { - display:table; - position:absolute; - left:0pt; - right:0pt; +:root.sws-by-height.sws-aspect-4-3 .sws-canvas { + width:100vw; + height:75vw; +} + +:root.sws-by-height.sws-aspect-16-9 .sws-canvas { + width:100vw; + height:56.25vw; } -.sws-filler { - display:table-row; - height:auto; +:root.sws-by-height.sws-aspect-16-10 .sws-canvas { + width:100vw; + height:62.5vw; } -body > h1, body > h2, body > h3 { +:root.sws-display body::after{ + display:inline-block; + height:100vh; + width:0; + content: ""; + vertical-align:middle; + +} + +:root.sws-display .sws-canvas { + display:inline-block; + padding: 0; + max-width: 100vw; +} + +:root.sws-display .sws-inactive-slide { display: none; } +:root.sws-display body { + background: black; + overflow: hidden; + text-align:center; +} + + +/* Print Mode */ +/* ****************************************** */ + +:root.sws-print body { + background: white; + width: 297mm; + padding: 0; + margin: 0; + font-size: 21pt; +} + +@media print { + + @page { + size: 297mm 210mm; + margin: 0; + padding: 0; + +} + +:root.sws-print .sws-canvas { + width: 297mm; + height: 210mm; + /* not 210mm to avoid rounding errors */ + page-break-after: always; + padding: 0pt 0pt 0pt 0pt; + margin: 0pt 0pt 0pt 0pt; +} + +:root.sws-print .sws-canvas:last { + page-break-after: avoid; +} +} +:root.sws-print .sws-inactive-slide { + opacity: 1; +} + +p { width: 100%; } + +/* counters for the toc */ + +.sws-toc ul { + counter-reset: list-item; +} + +.sws-toc li { + counter-increment: list-item; + +} +.sws-toc li::marker { + content : counters(list-item, '.'); +} + + +/* Control Panel */ +/*****************************************/ + + + +@font-face { + font-family: 'entypo'; + font-style: normal; + font-weight: normal; + src: url('entypo.woff') format('woff'); +} +/* entypo */ +.sws-symbol { + font-family: 'entypo'; +} + +#sws-control-panel-canvas { + position: fixed; + z-index: 100; + left: 0pt; + bottom: 0pt; + width: 100%; + height: 100%; + overflow:hidden; + text-align: center; + display:none; +} + #sws-control-panel { /* visibility: hidden;*/ - display:none; - position: absolute; - bottom: 60pt; - left: 60pt; - text-align: center; - font-size:30pt; - border-radius: 5pt; - background-color: #ffffff; - opacity: 0.8; + font-size:6vmin; + width: 100vmin; + bottom: 0vh; + display:inline-block; + border-radius: 1vmin; + background-color: white; + opacity: 0.9; color: black; z-index: 100; + margin-left: auto; + margin-right:auto; vertical-align:middle; - height: 60pt; -/* width:100%;*/ } -#sws-control-panel:before { - content : ""; - display: inline-block; + + +#sws-control-panel-canvas:after{ + content:""; + display:inline-block; + width: 0vmin; height: 100%; - width: 0pt; - vertical-align: middle; + background:pink; + vertical-align:bottom; +} + +#sws-control-panel-title-bar { + width: 100%; + font-size: 3vmin; + text-align:right; +} + +#sws-control-panel select + { + display: inline-block; + vertical-align: middle; + font-size: 3vmin; + } + +#sws-control-panel-navigation { + text-align: center; } + #sws-control-panel a { + color: black; text-decoration: none; - display:inline-block; - padding:0pt 10pt 0pt 10pt; + display: inline-block; + padding: 0pt 1em 0pt 1em; vertical-align: middle; } + +#sws-control-panel-title-bar a { + padding:0vmin 2vmin 0vmin 0vmin; + margin: 0 0 0 0; +} + #sws-control-panel a:hover { cursor: pointer; } +#sws-control-panel-slide-input +{ + font-size: 3vmin; + width: 3em; + vertical-align:middle; +} +#sws-control-panel-total-slides { + font-size: 3vmin; + vertical-align:middle; +} -@media print { - #sws-control-panel { - display: none; - } +#sws-control-panel-navigation-bar { + width: 50vmin; +} +#sws-print-container { + top: 0; + left: 0; + width: 29.7cm; + overflow: auto; + border: 1px; + padding: 1px 1px 1px 1px; +} + +#sws-help-panel-canvas { + color:white; + background:black; + z-index: 101; + position:fixed; + width:30%; + left:35%; + top:25%; + opacity: 0.9; + border-radius: 1vmin; + display:none; +} +#sws-help-panel-canvas * { + color: white; + font-family: sans; +} +#sws-help-panel-canvas h1 { + font-size: large; } + +/* embedded SVG images are inlined and their height matches twice the font-size */ +object[type="image/svg+xml"] { + display:inline-block; + font-size:inherit; + height: 2em; + vertical-align:middle; +} \ No newline at end of file