More Reveal 3.0 work and upgrade to highlightjs 8.4

This commit is contained in:
Rasmus Lerdorf
2015-01-23 01:06:29 -08:00
parent de62fda9fa
commit a1315c0bd8
5 changed files with 79 additions and 45 deletions

2
highlight.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -106,7 +106,8 @@ EOB;
function render_blurb($e) {
$size = (int)$e['fontsize'];
$class = '';
if($size >= 8) $tag = 'h2';
if($size >= 20) $tag = 'h1';
else if($size >= 8) $tag = 'h2';
else if($size >= 6) { $tag = 'h3'; $class = " class=\"p\""; }
else if($size >= 4) { $tag = 'h4'; $class = " class=\"p\""; }
else { $tag = 'p'; $class = " class=\"p\""; }

View File

@@ -17,8 +17,36 @@
<link rel="stylesheet" href="/reveal.js/css/reveal.css">
<link rel="stylesheet" href="/reveal.js/css/theme/white.css" id="theme">
<!-- For syntax highlighting -->
<link rel="stylesheet" href="/reveal.js/lib/css/zenburn.css">
<!-- For syntax highlighting - note that these are not the generic highlight.js theme files - see https://github.com/nwinkler/reveal-highlight-themes -->
<link rel="stylesheet" href="/styles/xcode.css">
<!-- Override a few styles -->
<style>
/*
Not actually sure why this block isn't being picked up from the syntax highlight css
If you change the syntax highlight theme, copy the first block here
*/
.reveal pre code {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #fff;
color: black;
-webkit-text-size-adjust: none;
}
/* Left-align h3 and h4 if they are p elements */
h3.p {
text-align: left;
}
h4.p {
text-align: left;
}
/* and left-aligned but slightly indented bullet lists */
.reveal ul {
display: block;
margin: 0 0 1em 3em;
}
</style>
<!-- Printing and PDF exports -->
<script>
@@ -74,7 +102,7 @@
{ src: '/reveal.js/lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: '/reveal.js/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: '/reveal.js/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: '/reveal.js/plugin/highlight/highlight.js', async: true, condition: function() { return !!document.querySelector( 'pre code' ); }, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: '/highlight.min.js', async: true, condition: function() { return !!document.querySelector( 'pre code' ); }, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: '/reveal.js/plugin/zoom-js/zoom.js', async: true },
{ src: '/reveal.js/plugin/notes/notes.js', async: true }
]

View File

@@ -5,9 +5,12 @@ github.com style (c) Vasily Polovnyov <vast@whiteants.net>
*/
.hljs {
display: block; padding: 0.5em;
display: block;
overflow-x: auto;
padding: 0.5em;
color: #333;
background: #f8f8f8
background: #f8f8f8;
-webkit-text-size-adjust: none;
}
.hljs-comment,
@@ -15,7 +18,7 @@ github.com style (c) Vasily Polovnyov <vast@whiteants.net>
.diff .hljs-header,
.hljs-javadoc {
color: #998;
font-style: italic
font-style: italic;
}
.hljs-keyword,
@@ -27,43 +30,42 @@ github.com style (c) Vasily Polovnyov <vast@whiteants.net>
.hljs-request,
.hljs-status {
color: #333;
font-weight: bold
font-weight: bold;
}
.hljs-number,
.hljs-hexcolor,
.ruby .hljs-constant {
color: #099;
color: #008080;
}
.hljs-string,
.hljs-tag .hljs-value,
.hljs-phpdoc,
.hljs-dartdoc,
.tex .hljs-formula {
color: #d14
color: #d14;
}
.hljs-title,
.hljs-id,
.coffeescript .hljs-params,
.scss .hljs-preprocessor {
color: #900;
font-weight: bold
font-weight: bold;
}
.javascript .hljs-title,
.lisp .hljs-title,
.clojure .hljs-title,
.hljs-list .hljs-keyword,
.hljs-subst {
font-weight: normal
font-weight: normal;
}
.hljs-class .hljs-title,
.haskell .hljs-type,
.hljs-type,
.vhdl .hljs-literal,
.tex .hljs-command {
color: #458;
font-weight: bold
font-weight: bold;
}
.hljs-tag,
@@ -71,31 +73,31 @@ github.com style (c) Vasily Polovnyov <vast@whiteants.net>
.hljs-rules .hljs-property,
.django .hljs-tag .hljs-keyword {
color: #000080;
font-weight: normal
font-weight: normal;
}
.hljs-attribute,
.hljs-variable,
.lisp .hljs-body {
color: #008080
color: #008080;
}
.hljs-regexp {
color: #009926
color: #009926;
}
.hljs-symbol,
.ruby .hljs-symbol .hljs-string,
.lisp .hljs-keyword,
.clojure .hljs-keyword,
.scheme .hljs-keyword,
.tex .hljs-special,
.hljs-prompt {
color: #990073
color: #990073;
}
.hljs-built_in,
.lisp .hljs-title,
.clojure .hljs-built_in {
color: #0086b3
.hljs-built_in {
color: #0086b3;
}
.hljs-preprocessor,
@@ -105,21 +107,21 @@ github.com style (c) Vasily Polovnyov <vast@whiteants.net>
.hljs-shebang,
.hljs-cdata {
color: #999;
font-weight: bold
font-weight: bold;
}
.hljs-deletion {
background: #fdd
background: #fdd;
}
.hljs-addition {
background: #dfd
background: #dfd;
}
.diff .hljs-change {
background: #0086b3
background: #0086b3;
}
.hljs-chunk {
color: #aaa
color: #aaa;
}

View File

@@ -5,14 +5,17 @@ XCode style (c) Angel Garcia <angelgarcia.mail@gmail.com>
*/
.hljs {
display: block; padding: 0.5em;
background: #fff; color: black;
display: block;
overflow-x: auto;
padding: 0.5em;
background: #fff;
color: black;
-webkit-text-size-adjust: none;
}
.hljs-comment,
.hljs-template_comment,
.hljs-javadoc,
.hljs-comment * {
.hljs-javadoc {
color: #006a00;
}
@@ -61,24 +64,22 @@ XCode style (c) Angel Garcia <angelgarcia.mail@gmail.com>
.hljs-prompt,
.hljs-hexcolor,
.hljs-rules .hljs-value,
.css .hljs-value .hljs-number,
.hljs-symbol,
.hljs-symbol .hljs-string,
.hljs-number,
.css .hljs-function,
.clojure .hljs-title,
.clojure .hljs-built_in,
.hljs-function .hljs-title,
.coffeescript .hljs-attribute {
color: #1c00cf;
}
.hljs-class .hljs-title,
.haskell .hljs-type,
.smalltalk .hljs-class,
.hljs-javadoctag,
.hljs-yardoctag,
.hljs-phpdoc,
.hljs-dartdoc,
.hljs-type,
.hljs-typename,
.hljs-tag .hljs-attribute,
.hljs-doctype,
@@ -102,7 +103,7 @@ XCode style (c) Angel Garcia <angelgarcia.mail@gmail.com>
.css .hljs-class,
.css .hljs-id {
color: #9B703F;
color: #9b703f;
}
.hljs-value .hljs-important {
@@ -111,13 +112,13 @@ XCode style (c) Angel Garcia <angelgarcia.mail@gmail.com>
}
.hljs-rules .hljs-keyword {
color: #C5AF75;
color: #c5af75;
}
.hljs-annotation,
.apache .hljs-sqbracket,
.nginx .hljs-built_in {
color: #9B859D;
color: #9b859d;
}
.hljs-preprocessor,
@@ -127,7 +128,7 @@ XCode style (c) Angel Garcia <angelgarcia.mail@gmail.com>
}
.tex .hljs-formula {
background-color: #EEE;
background-color: #eee;
font-style: italic;
}
@@ -138,15 +139,15 @@ XCode style (c) Angel Garcia <angelgarcia.mail@gmail.com>
}
.diff .hljs-change {
background-color: #BCCFF9;
background-color: #bccff9;
}
.hljs-addition {
background-color: #BAEEBA;
background-color: #baeeba;
}
.hljs-deletion {
background-color: #FFC8BD;
background-color: #ffc8bd;
}
.hljs-comment .hljs-yardoctag {