Skip to content

Commit

Permalink
Merge pull request #7 from tasmo/highlight.js
Browse files Browse the repository at this point in the history
Adds highlight.js
  • Loading branch information
tasmo authored Oct 26, 2021
2 parents f33a7b7 + eac2f14 commit bbc56c2
Show file tree
Hide file tree
Showing 256 changed files with 37,102 additions and 98 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ trim_trailing_whitespace = true
insert_final_newline = false
charset = utf-8

[*.{json,js,css,scss,yml,htm,html}]
[*.{json,js,css,scss,yml}]
indent_style = space
indent_size = 2

Expand Down
152 changes: 83 additions & 69 deletions README.md

Large diffs are not rendered by default.

17 changes: 8 additions & 9 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ timezone: Europe/Berlin
future: false
# Set baseurl to the base path of the site eg "/mytalk"
baseurl: ""
# The allowed values are 'rouge', 'pygments' or null.
highlighter: rouge
# markdown - Valid options are [ maruku | rdiscount | kramdown | redcarpet ]
highlighter: ""
markdown: kramdown
lsi: false
permalink: "/:title"
Expand Down Expand Up @@ -304,15 +302,16 @@ reveal:
exclude: [
"Gemfile",
"Gemfile.lock",
"default.nix",
"vendor",
"README.md",
"LICENSE",
"reveal.js/test",
"reveal.js/index.html",
"reveal.js/README.md",
"reveal.js/bower.json",
"reveal.js/Gruntfile.js",
"reveal.js/CONTRIBUTING.md",
"reveal.js/LICENSE",
"reveal.js/package.json"
"reveal.js/README.md",
"reveal.js/gulpfile.js",
"reveal.js/index.html",
"reveal.js/package-lock.json",
"reveal.js/package.json",
"reveal.js/test"
]
1 change: 1 addition & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/style.css">
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/highlight/base16/solarized-light.css">
<!-- jQuery -->
<script src="{{ site.github.url }}/assets/js/jquery-3.5.1.min.js"></script>

Expand Down
3 changes: 2 additions & 1 deletion _includes/script.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<script src="{{ site.github.url }}/reveal.js/plugin/notes/notes.js"></script>
<script src="{{ site.github.url }}/reveal.js/plugin/search/search.js"></script>
<script src="{{ site.github.url }}/reveal.js/plugin/markdown/markdown.js"></script>
<script src="{{ site.github.url }}/reveal.js/plugin/highlight/highlight.js"></script>

<!-- reveal.js init -->
<script>
Expand All @@ -13,7 +14,7 @@
{% for attr in site.reveal %}{{attr[0]}}: {% unless {attr[1]} == false or {attr[1]} == true %}'{{attr[1]}}',{% else %}{{attr[1]}},{% endunless %}
{% endfor %}
{% endif %}
plugins: [ RevealZoom, RevealNotes, RevealSearch, RevealMarkdown ]
plugins: [ RevealZoom, RevealNotes, RevealSearch, RevealMarkdown, RevealHighlight ]
});

{% if site.slideNumber.format and site.slideNumber.format != "none" %}
Expand Down
4 changes: 2 additions & 2 deletions _includes/slide.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<section {% if post.slide-id %}id="{{post.slide-id}}"{%endif %} class="step{%if post.classes | size %}{% for class in post.classes %} {{class}}{% endfor %}{% else %} slide{% endif %}" {% unless site.simple-slideshow %}{% for attr in post.data %} data-{{attr[0]}}="{{attr[1]}}"{% endfor %}{% endunless %}>
{% if post.title != "" %}<h1>{{ post.title }}</h1>{% endif %}
{% if post.title != "" %}<h1>{{ post.title }}</h1>{% endif %}

{{ post.content }}
{{ post.content }}
</section>
2 changes: 1 addition & 1 deletion _layouts/presentation.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html class="{% if site.solarized.theme %}{{site.solarized.theme}}{% else %}dark{% endif %}">
<head>
{% include head.html %}
{% include head.html %}
</head>
<body>
<div class="reveal">
Expand Down
8 changes: 4 additions & 4 deletions _layouts/print.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!DOCTYPE html>
<html>
<head>
{% include head.html %}
{% include head.html %}
</head>
<body>
<div class="reveal">
{{ content }}
</div>
<div class="reveal">
{{ content }}
</div>
</body>
</html>

12 changes: 6 additions & 6 deletions _layouts/slide.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<!DOCTYPE html>
<html>
<head>
{% include head.html %}
{% include head.html %}
</head>
<body>
<div class="reveal">
<div class="step">
{{ content }}
</div>
</div>
<div class="reveal">
<div class="slides">
{{ content }}
</div>
</div>
</body>
</html>

4 changes: 2 additions & 2 deletions _posts/2014-1-1-9-markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ title: Markdown support

Every Markdown file in `_posts` becomes a single slide in "reveal-jekyll".

{% highlight markdown %}
<pre><code class="language-markdown" data-trim data-noescape data-line-numbers="1-4|6">
---
layout: slide
title: Markdown support
---

Every Markdown file in `_posts` becomes a single slide in "reveal-jekyll".
{% endhighlight %}
</code></pre>
7 changes: 5 additions & 2 deletions _sass/solarized/solarized.scss
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,18 @@ html * {
font-weight: normal;
}
pre code {
padding: 0;
padding: .7em 1em .8em;
overflow: hidden;
word-wrap: break-word;
white-space: pre-wrap;
}
:not(figure) > pre.code-wrapper > code {
@include border-radius( 0.4em );
}
:not(figure) > pre.code-wrapper,
figure.highlight {
width: 90%;
margin: .5em auto;
padding: .7em 1em .8em;
text-shadow: none;
box-shadow: 0px 0px 6px rgba( 0,0,0,0.3 );
@include border-radius( 0.4em );
Expand Down
98 changes: 98 additions & 0 deletions assets/css/highlight/a11y-dark.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
/*!
Theme: a11y-dark
Author: @ericwbailey
Maintainer: @ericwbailey
Based on the Tomorrow Night Eighties theme: https://github.com/isagalaev/highlight.js/blob/master/src/styles/tomorrow-night-eighties.css
*/

.hljs {
background: #2b2b2b;
color: #f8f8f2;
}

/* Comment */
.hljs-comment,
.hljs-quote {
color: #d4d0ab;
}

/* Red */
.hljs-variable,
.hljs-template-variable,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-regexp,
.hljs-deletion {
color: #ffa07a;
}

/* Orange */
.hljs-number,
.hljs-built_in,
.hljs-literal,
.hljs-type,
.hljs-params,
.hljs-meta,
.hljs-link {
color: #f5ab35;
}

/* Yellow */
.hljs-attribute {
color: #ffd700;
}

/* Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-addition {
color: #abe338;
}

/* Blue */
.hljs-title,
.hljs-section {
color: #00e0e0;
}

/* Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #dcc6e0;
}

.hljs-emphasis {
font-style: italic;
}

.hljs-strong {
font-weight: bold;
}

@media screen and (-ms-high-contrast: active) {
.hljs-addition,
.hljs-attribute,
.hljs-built_in,
.hljs-bullet,
.hljs-comment,
.hljs-link,
.hljs-literal,
.hljs-meta,
.hljs-number,
.hljs-params,
.hljs-string,
.hljs-symbol,
.hljs-type,
.hljs-quote {
color: highlight;
}

.hljs-keyword,
.hljs-selector-tag {
font-weight: bold;
}
}
98 changes: 98 additions & 0 deletions assets/css/highlight/a11y-light.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
/*!
Theme: a11y-light
Author: @ericwbailey
Maintainer: @ericwbailey
Based on the Tomorrow Night Eighties theme: https://github.com/isagalaev/highlight.js/blob/master/src/styles/tomorrow-night-eighties.css
*/

.hljs {
background: #fefefe;
color: #545454;
}

/* Comment */
.hljs-comment,
.hljs-quote {
color: #696969;
}

/* Red */
.hljs-variable,
.hljs-template-variable,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-regexp,
.hljs-deletion {
color: #d91e18;
}

/* Orange */
.hljs-number,
.hljs-built_in,
.hljs-literal,
.hljs-type,
.hljs-params,
.hljs-meta,
.hljs-link {
color: #aa5d00;
}

/* Yellow */
.hljs-attribute {
color: #aa5d00;
}

/* Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-addition {
color: #008000;
}

/* Blue */
.hljs-title,
.hljs-section {
color: #007faa;
}

/* Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #7928a1;
}

.hljs-emphasis {
font-style: italic;
}

.hljs-strong {
font-weight: bold;
}

@media screen and (-ms-high-contrast: active) {
.hljs-addition,
.hljs-attribute,
.hljs-built_in,
.hljs-bullet,
.hljs-comment,
.hljs-link,
.hljs-literal,
.hljs-meta,
.hljs-number,
.hljs-params,
.hljs-string,
.hljs-symbol,
.hljs-type,
.hljs-quote {
color: highlight;
}

.hljs-keyword,
.hljs-selector-tag {
font-weight: bold;
}
}
Loading

0 comments on commit bbc56c2

Please sign in to comment.