Skip to content

Commit

Permalink
switch to monokai as default syntax highlight theme
Browse files Browse the repository at this point in the history
  • Loading branch information
hakimel committed Mar 12, 2019
1 parent 7b66abd commit fbbae1d
Show file tree
Hide file tree
Showing 18 changed files with 92 additions and 21 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ Reveal.addEventListener( 'fragmenthidden', function( event ) {

### Code syntax highlighting

By default, Reveal is configured with [highlight.js](https://highlightjs.org/) for code syntax highlighting. To enable syntax highlighting, you'll have to load the highlight plugin ([plugin/highlight/highlight.js](plugin/highlight/highlight.js)) and a highlight.js CSS theme (Reveal comes packaged with the zenburn theme: [lib/css/zenburn.css](lib/css/zenburn.css)).
By default, Reveal is configured with [highlight.js](https://highlightjs.org/) for code syntax highlighting. To enable syntax highlighting, you'll have to load the highlight plugin ([plugin/highlight/highlight.js](plugin/highlight/highlight.js)) and a highlight.js CSS theme (Reveal comes packaged with the Monokai themes: [lib/css/monokai.css](lib/css/monokai.css)).

```javascript
Reveal.initialize({
Expand Down
2 changes: 1 addition & 1 deletion css/theme/beige.css
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ body {
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }

.reveal code {
font-family: monospace;
Expand Down
8 changes: 4 additions & 4 deletions css/theme/black.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ section.has-light-background, section.has-light-background h1, section.has-light
* GLOBAL STYLES
*********************************************/
body {
background: #222;
background-color: #222; }
background: #191919;
background-color: #191919; }

.reveal {
font-family: "Source Sans Pro", Helvetica, sans-serif;
Expand Down Expand Up @@ -149,7 +149,7 @@ body {
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }

.reveal code {
font-family: monospace;
Expand Down Expand Up @@ -270,4 +270,4 @@ body {
*********************************************/
@media print {
.backgrounds {
background-color: #222; } }
background-color: #191919; } }
2 changes: 1 addition & 1 deletion css/theme/blood.css
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ body {
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }

.reveal code {
font-family: monospace;
Expand Down
2 changes: 1 addition & 1 deletion css/theme/league.css
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ body {
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }

.reveal code {
font-family: monospace;
Expand Down
2 changes: 1 addition & 1 deletion css/theme/moon.css
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ body {
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }

.reveal code {
font-family: monospace;
Expand Down
2 changes: 1 addition & 1 deletion css/theme/night.css
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ body {
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }

.reveal code {
font-family: monospace;
Expand Down
2 changes: 1 addition & 1 deletion css/theme/serif.css
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ body {
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }

.reveal code {
font-family: monospace;
Expand Down
2 changes: 1 addition & 1 deletion css/theme/simple.css
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ body {
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }

.reveal code {
font-family: monospace;
Expand Down
2 changes: 1 addition & 1 deletion css/theme/sky.css
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ body {
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }

.reveal code {
font-family: monospace;
Expand Down
2 changes: 1 addition & 1 deletion css/theme/solarized.css
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ body {
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }

.reveal code {
font-family: monospace;
Expand Down
2 changes: 1 addition & 1 deletion css/theme/source/black.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


// Override theme settings (see ../template/settings.scss)
$backgroundColor: #222;
$backgroundColor: #191919;

$mainColor: #fff;
$headingColor: #fff;
Expand Down
2 changes: 1 addition & 1 deletion css/theme/template/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ body {

word-wrap: break-word;

box-shadow: 0px 0px 6px rgba(0,0,0,0.3);
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
}

.reveal code {
Expand Down
2 changes: 1 addition & 1 deletion css/theme/white.css
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ body {
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }

.reveal code {
font-family: monospace;
Expand Down
2 changes: 1 addition & 1 deletion demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<link rel="stylesheet" href="css/theme/black.css" id="theme">

<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<link rel="stylesheet" href="lib/css/monokai.css">

<!-- Printing and PDF exports -->
<script>
Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<link rel="stylesheet" href="css/theme/black.css">

<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<link rel="stylesheet" href="lib/css/monokai.css">

<!-- Printing and PDF exports -->
<script>
Expand Down Expand Up @@ -41,7 +41,7 @@
{ src: 'plugin/markdown/marked.js' },
{ src: 'plugin/markdown/markdown.js' },
{ src: 'plugin/notes/notes.js', async: true },
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }
{ src: 'plugin/highlight/highlight.js', async: true }
]
});
</script>
Expand Down
71 changes: 71 additions & 0 deletions lib/css/monokai.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/*
Monokai style - ported by Luigi Maselli - http://grigio.org
*/

.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #272822;
color: #ddd;
}

.hljs-tag,
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-strong,
.hljs-name {
color: #f92672;
}

.hljs-code {
color: #66d9ef;
}

.hljs-class .hljs-title {
color: white;
}

.hljs-attribute,
.hljs-symbol,
.hljs-regexp,
.hljs-link {
color: #bf79db;
}

.hljs-string,
.hljs-bullet,
.hljs-subst,
.hljs-title,
.hljs-section,
.hljs-emphasis,
.hljs-type,
.hljs-built_in,
.hljs-builtin-name,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-addition,
.hljs-variable,
.hljs-template-tag,
.hljs-template-variable {
color: #a6e22e;
}

.hljs-comment,
.hljs-quote,
.hljs-deletion,
.hljs-meta {
color: #75715e;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-doctag,
.hljs-title,
.hljs-section,
.hljs-type,
.hljs-selector-id {
font-weight: bold;
}
2 changes: 1 addition & 1 deletion plugin/markdown/example.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<link rel="stylesheet" href="../../css/reveal.css">
<link rel="stylesheet" href="../../css/theme/white.css" id="theme">

<link rel="stylesheet" href="../../lib/css/zenburn.css">
<link rel="stylesheet" href="../../lib/css/monokai.css">
</head>

<body>
Expand Down

0 comments on commit fbbae1d

Please sign in to comment.