From 08857ebe8e0c6d088f18f9d6da3071ae820e5ff8 Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Fri, 14 Sep 2007 18:09:24 -0500 Subject: [PATCH] Fix Markdown (non-math) Engine, Tweak Themes More tweaks to the supplied S5 themes. Fixed a minor regression in the non-Math Markdown engine. --- lib/chunks/engines.rb | 3 ++- public/s5/themes/blue/pretty.css | 1 + public/s5/themes/flower/pretty.css | 17 ++++++++++------- public/s5/themes/i18n/pretty.css | 8 ++++---- public/s5/themes/nautilus/pretty.css | 2 +- public/s5/themes/pixel/pretty.css | 6 +++--- 6 files changed, 21 insertions(+), 16 deletions(-) diff --git a/lib/chunks/engines.rb b/lib/chunks/engines.rb index 5f07be45..7d82a18d 100644 --- a/lib/chunks/engines.rb +++ b/lib/chunks/engines.rb @@ -52,8 +52,9 @@ module Engines @content.options[:renderer].s5_theme = my_content.s5_theme sanitize_xhtml(my_content.to_s5) else - sanitize_rexml(Maruku.new(@content.delete("\r"), + html = sanitize_rexml(Maruku.new(@content.delete("\r"), {:math_enabled => false}).to_html_tree) + html.gsub(/\A
\n?(.*?)\n?<\/div>\Z/m, '\1') end end diff --git a/public/s5/themes/blue/pretty.css b/public/s5/themes/blue/pretty.css index fcf068a4..d02c3472 100644 --- a/public/s5/themes/blue/pretty.css +++ b/public/s5/themes/blue/pretty.css @@ -93,6 +93,7 @@ img.incremental {visibility:hidden} .slide .current {color:#B02} .flushtop {margin-top:0px} .slide .plaintable td {border:1px solid #FFF!important} +.slide .noborder td, .slide .noborder th {border:0!important} /* diagnostics li:after {content:" [" attr(class) "]";color:#F88} diff --git a/public/s5/themes/flower/pretty.css b/public/s5/themes/flower/pretty.css index ceb865ba..0bf2115a 100644 --- a/public/s5/themes/flower/pretty.css +++ b/public/s5/themes/flower/pretty.css @@ -40,16 +40,17 @@ div#header, div#footer {width:100%;top:0px;left:0px} div#header, div#footer {color:#BA9384;font-family:Verdana,Helvetica,sans-serif} div#header {background:transparent;height:10px} div#footer {background:#fff0cf;top:auto;bottom:0px; - font-size:0.5em;font-weight:bold;padding:.75em 0;border-top:1px solid #999} + font-size:0.5em;font-weight:bold;padding:.75em 0; + height:2em;border-top:1px solid #999} #footer h1, #footer h2 {display:block;padding:0 1em} #footer h2 {font-style:italic} -div.slide {top:0px;left:0px;padding:48px 4% 4%;height:100%;width:92%; +div.slide {top:0px;left:0px;padding:40px 4% 4% 76px;width:88%; background:transparent url(rightbg.jpg) right top no-repeat;overflow:visible; font-family:georgia,times,'Times New Roman',serif} div.slide h1 {position:absolute;z-index:1;background:transparent; - margin:0;padding:0.3em 0 0 50px;white-space:nowrap; - text-transform:capitalize;top:0;left:60px;color:#4A040A; + margin:0;padding:5px 0 0 64px;white-space:nowrap; + text-transform:capitalize;top:0;left:64px;color:#4A040A; font:150%/1em georgia, times, 'Times New Roman', serif} div.slide h3 {font-size:130%} div.long {font-size:0.75em} @@ -58,20 +59,22 @@ div.long {font-size:0.75em} #controls :focus {outline:1px dotted #227} div#controls {position: absolute; left: 60%; bottom: 0; width: 40%; - text-align: right; font: bold 0.9em Verdana, Helvetica, sans-serif;} + text-align: right; font: bold 0.8em Verdana, Helvetica, sans-serif;} html>body div#controls {position: fixed; padding: 0; top: auto;} #controls :active {color:#88A !important} #controls :focus {outline:1px dotted #227} +#controls #navlist {padding:0lmargin:0;lineheight: 0.5em} #controls #navLinks a {padding: 0; margin: 0 0.5em; border: none; color: #BA9384; cursor: pointer;} +#controls #navList {height:1em} #controls #navList #jumplist {background: #DDD; color: #227;} #currentSlide {text-align:center;font-size:0.5em; color:#646587;font-family:Verdana,Helvetica,sans-serif;font-weight:bold} -#slide0 {padding-top:3.5em;font-size:90%} -#slide0 h1 {position:static;margin:1em 0 1.33em;padding:0; +#slide0 {padding:96px 128px;font-size:90%} +#slide0 h1 {position:static;margin:16px 0 24px;padding:0; white-space:normal;color:#000;background:transparent; font:2em georgia, times, 'Times New Roman', serif} #slide0 h3 {margin-top:0.5em;font-size:1.5em} diff --git a/public/s5/themes/i18n/pretty.css b/public/s5/themes/i18n/pretty.css index ac0b7e27..960b2050 100644 --- a/public/s5/themes/i18n/pretty.css +++ b/public/s5/themes/i18n/pretty.css @@ -1,7 +1,7 @@ /* Following is i18n theme -- edit away! */ html {background:#95A7D4 url(bodybg.jpg) no-repeat;} -body {color:#210;font:25px Arial, sans-serif} +body {color:#210;font-family: Arial, sans-serifi;font-size: 1.6em} a {text-decoration:none;color:#336;border-bottom:1px dotted} :link, :visited {text-decoration:none;color:#00C} html, body {margin:0;padding:0} @@ -30,7 +30,7 @@ sup {font-size:0.75em;font-weight:normal;vertical-align:0.5em;line-height:1px} .slide code.old {color:silver} .slide pre {padding:0;margin:0.25em 0 0.5em 0.5em;color:#533;font-size:90%} .slide pre code {display:block} -.slide ul {margin-left:5%;margin-right:7%;list-style:disc} +.slide ul {margin-left:5%;margin-right:5%;list-style:disc} .slide li {margin-top:0.75em;margin-right:0} .slide ul ul {line-height:1} .slide ul ul li {margin:.2em;font-size:85%;list-style:square} @@ -38,7 +38,7 @@ sup {font-size:0.75em;font-weight:normal;vertical-align:0.5em;line-height:1px} div#header, div#footer, div.slide {width:100%;top:0px;left:0px} div#header, div#footer {color:#AAB;font-size:0.5em} -div#header {background:#666;color:#BBB;height:1em;padding-bottom:.5em} +div#header {background:#666;color:#BBB;height:.25em;padding-bottom:.5em} div#footer {background:#666;color:#BBB;height:3.25em;top:auto;bottom:0px;} #footer h1, #footer h2 {display:block;padding:0.5em 0.75em; font-weight:normal;font-style:italic} @@ -47,7 +47,7 @@ div#footer {background:#666;color:#BBB;height:3.25em;top:auto;bottom:0px;} div.slide {top:0px;width:92%;padding:.5em 4% 4%} div.slide h1 {font-size:1.66em;line-height:1;letter-spacing:-1px; - margin:0px;padding:0.25em 0px;border-bottom:2px solid rgb(90,94,120)} + margin:0px;padding:0.125em 0px;border-bottom:2px solid rgb(90,94,120)} div.slide h3 {font-size:130%} div.long {font-size:0.75em} diff --git a/public/s5/themes/nautilus/pretty.css b/public/s5/themes/nautilus/pretty.css index 2e64d5c7..18bbaf4b 100644 --- a/public/s5/themes/nautilus/pretty.css +++ b/public/s5/themes/nautilus/pretty.css @@ -45,7 +45,7 @@ div#footer {background:#005;height:2.5em;top:auto;bottom:0px; #footer h2 {font-style:italic} div.slide {top:0px;width:92%;padding:2.5em 4% 4%} -div.slide h1 {position:absolute;top:0;left:135px;z-index:1;color:#DDE; +div.slide h1 {position:absolute;top:0;left:145px;z-index:1;color:#DDE; text-align:left;white-space:nowrap;text-transform:capitalize; margin:0px;padding:0.3em 0 0 50px;font:bold 150%/1em Helvetica,sans-serif} div.slide h3 {font-size:130%} diff --git a/public/s5/themes/pixel/pretty.css b/public/s5/themes/pixel/pretty.css index f627134a..ec34c1dd 100644 --- a/public/s5/themes/pixel/pretty.css +++ b/public/s5/themes/pixel/pretty.css @@ -44,7 +44,7 @@ div#footer {background:#fff;font-size:0.5em;font-weight:bold;padding:.5em 0; #footer h1, #footer h2 {display:block;padding:0 1em} #footer h2 {font-style:italic} -div.slide {top:0px;width:92%;padding:48px 4% 4%; +div.slide {top:0px;width:88%;padding:48px 4% 4% 72px; font-family:Verdana, Helvetica, Arial, sans-serif} div.slide h1 {position:absolute;top:24px;left:64px;z-index:1;color:#FFF; background:transparent;margin:0px;padding:0 0 0 50px;white-space:nowrap; @@ -86,9 +86,9 @@ html>body div#controls {position: fixed; padding: 0; top: auto;} #currentSlide #csHere:before {content:"#";font-weight:normal} #currentSlide #csTotal:before {content:" of "} -#slide0 {padding-top:3.5em;font-size:90%} +#slide0 {padding-top:3.5em;3em;font-size:90%; width:96%} #slide0 h1 {position:static;white-space:normal; - margin:0;padding:60px 60px 0 150px;text-align:right; + margin:0;padding:128px 60px 0 150px;text-align:right; font:bold 2em Helvetica,sans-serif;white-space:normal;height:281px; color:#fff;background:transparent url(slide0bg.gif) no-repeat} #slide0 h3 {margin-bottom:20px;margin-top:0.5em;font-size:1.5em}