diff --git a/org-export-as-s5.el b/org-export-as-s5.el new file mode 100644 index 0000000..c73a0ee --- /dev/null +++ b/org-export-as-s5.el @@ -0,0 +1,61 @@ +(defvar org-s5-theme "default") ;; based off of the color-theme + +(defun org-export-as-s5 + (arg &optional hidden ext-plist to-buffer body-only pub-dir) + "Wrap `org-export-as-html' in setting for S5 export." + (interactive "P") + (flet ((join (lst) (mapconcat #'identity lst "\n")) + (sheet (href media id) + (org-fill-template + (concat "") + `(("href" . ,href) + ("media" . ,media) + ("id" . ,id))))) + (let ((org-export-html-style-extra + (join `("" + "" + "" + "" + ,(sheet (concat "ui/" org-s5-theme "/slides.css") + "projection" "slideProj") + ,(sheet "ui/default/outline.css" "screen" "outlineStyle") + ,(sheet "ui/default/print.css" "print" "slidePrint") + ,(sheet "ui/default/opera.css" "projection" "operaFix") + "" + ,(concat "")))) + (org-export-html-toplevel-hlevel 1) + (org-export-headline-levels 1) + (org-export-preprocess-hook + (list + (lambda () + (let ((class "slide")) + (org-map-entries + (lambda () (save-excursion + (org-back-to-heading t) + (put-text-property (point-at-bol) (point-at-eol) + 'html-container-class class)))))))) + (org-export-html-final-hook + (list + (lambda () + (save-excursion + (replace-regexp + (regexp-quote "
") + (mapconcat #'identity + `("
" + "
" + "
" + "
" + "
" + ,(format "

%s

" title) + "
" + "
" + "" + "
") "\n")))) + (lambda () + (save-excursion + (replace-regexp + (regexp-quote "
") + "
")))))) + (org-export-as-html arg hidden ext-plist to-buffer body-only pub-dir)))) diff --git a/ui/railscast/bg-shade.png b/ui/railscast/bg-shade.png new file mode 120000 index 0000000..1dc2611 --- /dev/null +++ b/ui/railscast/bg-shade.png @@ -0,0 +1 @@ +../i18n/bg-shade.png \ No newline at end of file diff --git a/ui/railscast/framing.css b/ui/railscast/framing.css new file mode 120000 index 0000000..418ad0a --- /dev/null +++ b/ui/railscast/framing.css @@ -0,0 +1 @@ +../i18n/framing.css \ No newline at end of file diff --git a/ui/railscast/pretty.css b/ui/railscast/pretty.css new file mode 100644 index 0000000..03ec25d --- /dev/null +++ b/ui/railscast/pretty.css @@ -0,0 +1,124 @@ +/* Following are the presentation styles -- edit away! + Note that the 'body' font size may have to be changed if the resolution is + different than expected. */ + +body { + background: #232323 100% 100% no-repeat; + color: #E6E1DC; + font: 29px Arial, sans-serif; +} +a { + text-decoration: none; + color: #A9F5F2; + border-bottom: 1px dotted; +} +h1, h2, h3, h4, h5, h6 { + font-size: 1em; + margin: 0; +} +code { + color: #A4A4A4; +} +b { + color: white; +} +sup { + font-size: 0.75em; + font-weight: normal; + vertical-align: 0.5em; + line-height: 1px; +} +ul { + margin-left: 1em; + padding-left: 0; +} +li { + margin-bottom: 0.66em; +} +li li { + margin: 0.33em 0; + font-size: smaller; +} + +#header { +} +#footer { + background: url(bg-shade.png); + color: #BBB; + border-top: 1px solid #333; +} +#header, #footer { + font-size: 0.5em; +} +#footer h1, #footer h2 { + padding: 0.5em 0.75em; + font-weight: normal; + font-style: italic; +} +#footer h1 { + left: 0; + font-size: 1em; + letter-spacing: 1px; +} +#footer h2 { + position: absolute; + bottom: 0; + right: 0; +} + +#controls a { + display: none; +} +#controls select { + visibility: hidden; +} +#controls div:hover select { + visibility: visible; +} + +#currentSlide { + font-size: 0.5em; +} +#currentSlide span { + font-size: 13px; + color: rgb(49%,47%,66%); +} +#currentSlide #csSep { + display: none; +} +#currentSlide #csHere { + font-weight: bold; +} +#currentSlide #csHere:before { + content: "#"; + font-weight: normal; +} +#currentSlide #csTotal:before { + content: " of "; +} + +.slide h1 { + font-size: 1.66em; + line-height: 1; + letter-spacing: -1px; + margin: 0 -15% 1em 0; + padding: 0 15% 0.06125em 0; + border-bottom: 0.06125em solid rgb(90,94,120); +} +#slide0 h1 { + border: none; + font-size: 2.25em; + letter-spacing: 0; + margin: 0 0 1em; +} +#slide0 h3 { + margin-bottom: 0; +} +#slide0 h4 { + margin-top: 0; + font-size: smaller; +} +#slide0 a { + color: #E6E1DC; + border-bottom: none; +} \ No newline at end of file diff --git a/ui/railscast/s5-core.css b/ui/railscast/s5-core.css new file mode 120000 index 0000000..a1fb3e0 --- /dev/null +++ b/ui/railscast/s5-core.css @@ -0,0 +1 @@ +../i18n/s5-core.css \ No newline at end of file diff --git a/ui/railscast/slides.css b/ui/railscast/slides.css new file mode 120000 index 0000000..b4eaf37 --- /dev/null +++ b/ui/railscast/slides.css @@ -0,0 +1 @@ +../i18n/slides.css \ No newline at end of file