Skip to content

Commit

Permalink
adding a railscast theme
Browse files Browse the repository at this point in the history
  • Loading branch information
eschulte committed Jun 2, 2011
1 parent c156c49 commit 5c12357
Show file tree
Hide file tree
Showing 6 changed files with 189 additions and 0 deletions.
61 changes: 61 additions & 0 deletions 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 "<link rel=\"stylesheet\" href=\"%href\""
" type=\"text/css\" media=\"%media\" id=\"%id\" />")
`(("href" . ,href)
("media" . ,media)
("id" . ,id)))))
(let ((org-export-html-style-extra
(join `("<!-- configuration parameters -->"
"<meta name=\"defaultView\" content=\"slideshow\" />"
"<meta name=\"controlVis\" content=\"hidden\" />"
"<!-- style sheet links -->"
,(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")
"<!-- S5 JS -->"
,(concat "<script src=\"ui/default/slides.js\" "
"type=\"text/javascript\"></script>"))))
(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 "<div id=\"content\">")
(mapconcat #'identity
`("<div class=\"layout\">"
"<div id=\"controls\"><!-- no edit --></div>"
"<div id=\"currentSlide\"><!-- no edit --></div>"
"<div id=\"header\"></div>"
"<div id=\"footer\">"
,(format "<h1>%s</h1>" title)
"</div>"
"</div>"
""
"<div class=\"presentation\">") "\n"))))
(lambda ()
(save-excursion
(replace-regexp
(regexp-quote "<div id=\"table-of-contents\">")
"<div id=\"table-of-contents\" class=\"slide\">"))))))
(org-export-as-html arg hidden ext-plist to-buffer body-only pub-dir))))
1 change: 1 addition & 0 deletions ui/railscast/bg-shade.png
1 change: 1 addition & 0 deletions ui/railscast/framing.css
124 changes: 124 additions & 0 deletions 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;
}
1 change: 1 addition & 0 deletions ui/railscast/s5-core.css
1 change: 1 addition & 0 deletions ui/railscast/slides.css

0 comments on commit 5c12357

Please sign in to comment.