From 3c70fc13da0c911d97e8712343b6dfaffd42588f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kim=20Nguy=E1=BB=85n?= Date: Tue, 11 Jun 2013 21:22:32 +0200 Subject: [PATCH] Make the style as resolution independent as possible. Work around some insane shortcommings of CSS (vertical centering). --- doc/demo.xhtml | 9 +-- simpleWebSlides.css | 146 ++++++++++++++-------------------------- simpleWebSlides.js | 24 +++---- themes/webTwoPointO.css | 101 +++++++++++++-------------- 4 files changed, 118 insertions(+), 162 deletions(-) diff --git a/doc/demo.xhtml b/doc/demo.xhtml index 490173b..472982b 100644 --- a/doc/demo.xhtml +++ b/doc/demo.xhtml @@ -2,7 +2,9 @@ - + SimpleWebSlides @@ -15,11 +17,10 @@ - - + h1, body > h2, body > h3 { display: none; } + #sws-control-panel { /* visibility: hidden;*/ display:none; @@ -146,8 +107,3 @@ body > h1, body > h2, body > h3 { cursor: pointer; } -@media print { - #sws-control-panel { - display: none; - } -} diff --git a/simpleWebSlides.js b/simpleWebSlides.js index 3b96882..c015249 100644 --- a/simpleWebSlides.js +++ b/simpleWebSlides.js @@ -501,31 +501,29 @@ SWS.Presentation = new function () { var canvas = $('
'); if (!($(this).hasClass("sws-option-noheader"))) { - canvas.append($('
')); + canvas.append($('

')); }; + var inner = $('
'); + var content = $('
'); + var title = $('
'); var h1 = $(this).children("h1"); if (h1) { - var title = $('
'); h1.detach(); title.append(h1); - inner.append(title); } + canvas.append(title); + canvas.append($("
")); $(this).find('script[type="text/javascript"]').remove(); - if (!($(this).hasClass("sws-option-nofiller"))) { - inner.append('
'); - inner.append('
'); - }; - inner.append($(this)); - if (!($(this).hasClass("sws-option-nofiller"))) { - inner.append('
'); - inner.append('
'); - }; - inner.append('
'); + content.append($(this)); + inner.append(content); + inner.append($('
')); canvas.append(inner); + if (!($(this).hasClass("sws-option-nofooter"))) { canvas.append($('