From 2c4473a0e9ed9c13ace49fc906a869cea58e4cc5 Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Sat, 15 Sep 2007 00:29:20 -0500 Subject: [PATCH] S5 Slide notes Slide notes are now served correctly (as application/xhtml+xml) to compatible browsers. So you can put math in your notes, and the MathML will render. We don't do real content-negotioation. IE gets text/html; everyone else gets application/xhtml+xml. --- public/s5/themes/i18n/pretty.css | 3 +-- public/s5/ui/core/notes.css | 3 ++- public/s5/ui/core/slides.js | 6 +++++- public/s5/ui/s5-notes.html | 2 +- public/s5/ui/s5-notes.xhtml | 2 +- script/server | 1 + 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/public/s5/themes/i18n/pretty.css b/public/s5/themes/i18n/pretty.css index 960b2050..bdd1722f 100644 --- a/public/s5/themes/i18n/pretty.css +++ b/public/s5/themes/i18n/pretty.css @@ -61,8 +61,7 @@ div#controls form {position:absolute;bottom:0;right:0;width:100%; #controls #navLinks a {padding:0;margin:0 0.5em 0;background:#666; border:none;color:#AAC;cursor:pointer} #controls #navList {height:1em} -#controls #navList #jumplist {position:absolute;bottom:0;right:0; - background:#DDD;color:#227} +#controls #navList #jumplist {background:#DDD;color:#227} #currentSlide {font-size:0.5em} #currentSlide span {font-size:13px;color:#fff} diff --git a/public/s5/ui/core/notes.css b/public/s5/ui/core/notes.css index 832a03c2..fc4ea717 100644 --- a/public/s5/ui/core/notes.css +++ b/public/s5/ui/core/notes.css @@ -1,6 +1,7 @@ /* Following are the note styles -- edit away! */ -body { +html { background: #333; color: #FFF; } +body { margin: 0; padding: 1.0em; background: #333; diff --git a/public/s5/ui/core/slides.js b/public/s5/ui/core/slides.js index 704d29cd..4c7faf0c 100644 --- a/public/s5/ui/core/slides.js +++ b/public/s5/ui/core/slides.js @@ -631,7 +631,11 @@ function createNotesWindow() { // creates a window for our notes if (!s5NotesWindow || s5NotesWindow.closed) { // Create the window if it doesn't exist s5NotesWindowLoaded = false; // Note: Safari has a tendency to ignore window options preferring to default to the settings of the parent window, grr. - s5NotesWindow = window.open('/s5/ui/s5-notes.html', 's5NotesWindow', 'top=0,left=0,resizable=yes,scrollbars=auto'); + if (isIE) { + s5NotesWindow = window.open('/s5/ui/s5-notes.html', 's5NotesWindow', 'top=0,left=0,resizable=yes,scrollbars=auto'); + } else { + s5NotesWindow = window.open('/s5/ui/s5-notes.xhtml', 's5NotesWindow', 'top=0,left=0,resizable=yes,scrollbars=auto'); + } } if (s5NotesWindowLoaded) { // Load the current note if the Note HTML has loaded loadNote(); diff --git a/public/s5/ui/s5-notes.html b/public/s5/ui/s5-notes.html index 3d8cc136..16cc7c5a 100644 --- a/public/s5/ui/s5-notes.html +++ b/public/s5/ui/s5-notes.html @@ -4,7 +4,7 @@ Notes - +