diff options
| Commit | 003000620058fca757f15cf4d8a8bcb14a5264e6 (patch) | |
|---|---|---|
| Author | 2020-08-16 08:36:54 +0300 | |
| Committer | 2020-08-16 08:36:54 +0300 | |
| Files | 96b748653dfa812dad769b40b63cfb6aa3d59f1a | |
| IPL-003000620058fca757f15cf4d8a8bcb14a5264e6.tar IPL-003000620058fca757f15cf4d8a8bcb14a5264e6.tar.gz IPL-003000620058fca757f15cf4d8a8bcb14a5264e6.zip | ||
| Parent | b65dbe28ba20a14de4c194e93284f9f1a4aa8858 (diff) | |
Remove project copy of reveal-hugo theme files
14 files changed, 1 insertions, 188 deletions
| -rw-r--r-- | website/config.toml | 2 | ||||
| -rw-r--r-- | website/layouts/_default/baseof.reveal.html | 87 | ||||
| -rw-r--r-- | website/layouts/_default/index.reveal.html | 3 | ||||
| -rw-r--r-- | website/layouts/_default/list.reveal.html | 3 | ||||
| -rw-r--r-- | website/layouts/_default/single.reveal.html | 0 | ||||
| -rw-r--r-- | website/layouts/partials/reveal-hugo/body.html | 1 | ||||
| -rw-r--r-- | website/layouts/partials/reveal-hugo/head.html | 1 | ||||
| -rw-r--r-- | website/layouts/partials/reveal-hugo/slides.html | 24 | ||||
| -rw-r--r-- | website/layouts/shortcodes/frag.html | 4 | ||||
| -rw-r--r-- | website/layouts/shortcodes/fragment.html | 4 | ||||
| -rw-r--r-- | website/layouts/shortcodes/markdown.html | 8 | ||||
| -rw-r--r-- | website/layouts/shortcodes/note.html | 1 | ||||
| -rw-r--r-- | website/layouts/shortcodes/section.html | 3 | ||||
| -rw-r--r-- | website/layouts/shortcodes/slide.html | 48 |
diff --git a/website/config.toml b/website/config.toml index ebd2d37..763a186 100644 --- a/website/config.toml +++ b/website/config.toml @@ -1,7 +1,7 @@ baseURL = "https://sofiacpp.github.io/IPL/" languageCode = "en-us" title = "Implementation of Programming Languages" -theme = "base16" +theme = [ "base16", "reveal-hugo" ] preserveTaxonomyNames = true rssLimit = 10 diff --git a/website/layouts/_default/baseof.reveal.html b/website/layouts/_default/baseof.reveal.html deleted file mode 100644 index 1e3868b..0000000 --- a/website/layouts/_default/baseof.reveal.html +++ /dev/null @@ -1,87 +0,0 @@ -<!doctype html> -{{- $reveal_cdn := "https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.6.0" -}} -{{- $highlight_cdn := "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0" -}} -<html lang="en"> - <head> - <meta charset="utf-8"> - <title>{{ or .Page.Title .Site.Title }}</title> - <meta name="description" content="{{ or .Page.Params.Description .Site.Params.Description }}"> - <meta name="author" content="{{ .Site.Author.name }}"> - <meta name="apple-mobile-web-app-capable" content="yes"> - <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> - <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> - <link rel="stylesheet" href="{{ $reveal_cdn }}/css/reveal.min.css"> - <!-- Theme used for presentation --> - {{- $theme := or .Page.Params.reveal_hugo.theme .Site.Params.reveal_hugo.theme .Site.Data.reveal_hugo.defaults.theme "black" -}} - {{- $custom_theme := or .Page.Params.reveal_hugo.custom_theme .Site.Params.reveal_hugo.custom_theme -}} - {{- if $custom_theme -}} - <link rel="stylesheet" href="{{ $custom_theme | relURL }}" id="theme"> - {{ else -}} - <link rel="stylesheet" href="{{ $reveal_cdn }}/css/theme/{{ $theme }}.css" id="theme"> - {{- end -}} - <!-- Theme used for syntax highlighting of code --> - {{- $highlight_theme := or .Page.Params.reveal_hugo.highlight_theme .Site.Params.reveal_hugo.highlight_theme .Site.Data.reveal_hugo.defaults.highlight_theme "default" -}} - <link rel="stylesheet" href="{{ $highlight_cdn }}/styles/{{ $highlight_theme }}.min.css"> - <!-- Printing and PDF exports --> - <script> - var link = document.createElement( 'link' ); - link.rel = 'stylesheet'; - link.type = 'text/css'; - link.href = window.location.search.match( /print-pdf/gi ) ? '{{ $reveal_cdn}}/css/print/pdf.css' : '{{ $reveal_cdn }}/css/print/paper.css'; - document.getElementsByTagName( 'head' )[0].appendChild( link ); - </script> - <!--[if lt IE 9]> - <script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.js"></script> - <![endif]--> - {{- partial "reveal-hugo/head" . -}} - </head> - <body> - {{- block "main" . -}}{{- end -}} - <script type="application/json" id="reveal-hugo-page-params">{{ jsonify .Page.Params.reveal_hugo | safeJS }}</script> - <script type="application/json" id="reveal-hugo-site-params">{{ jsonify .Site.Params.reveal_hugo | safeJS }}</script> - <script type="application/json" id="reveal-hugo-defaults">{{ jsonify .Site.Data.reveal_hugo.defaults | safeJS }}</script> - <script type="text/javascript"> - window.revealHugoDependencies = { - dependencies: [ - { src: '{{ $reveal_cdn }}/lib/js/classList.js', condition: function() { return !document.body.classList; } }, - { src: '{{ $reveal_cdn }}/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, - { src: '{{ $reveal_cdn }}/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, - { src: '{{ $reveal_cdn }}/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }, - { src: '{{ $reveal_cdn }}/plugin/zoom-js/zoom.js', async: true }, - // the notes plugin can't run off the CDN b/c the HTML file isn't there - { src: '{{ "reveal-hugo/plugin/notes/notes.js" | relURL }}', async: true } - ]}; - </script> - <script src="{{ $reveal_cdn }}/lib/js/head.min.js"></script> - <script src="{{ $reveal_cdn }}/js/reveal.js"></script> - <script type="text/javascript"> - // Hugo lowercases all params and Reveal.js needs camelcase - // So params in Hugo must be stored in snakecase and we camelize them here - function camelize(map) { - if (map) { - Object.keys(map).forEach(function(k) { - newK = k.replace(/(\_\w)/g, function(m) { return m[1].toUpperCase() }); - if (newK != k) { - map[newK] = map[k]; - delete map[k]; - } - }); - } - return map; - } - // pattern inspired by https://github.com/RealOrangeOne/hugo-theme-revealjs - var revealHugoPageParams = JSON.parse(document.getElementById('reveal-hugo-page-params').innerHTML); - var revealHugoSiteParams = JSON.parse(document.getElementById('reveal-hugo-site-params').innerHTML); - var revealHugoDefaults = JSON.parse(document.getElementById('reveal-hugo-defaults').innerHTML); - // See all options - https://github.com/hakimel/reveal.js#configuration - var options = Object.assign({}, - camelize(revealHugoDefaults), - camelize(revealHugoSiteParams), - camelize(revealHugoPageParams), - revealHugoDependencies); - Reveal.initialize(options); - </script> - - {{ partial "reveal-hugo/body" . }} - </body> -</html> diff --git a/website/layouts/_default/index.reveal.html b/website/layouts/_default/index.reveal.html deleted file mode 100644 index 8faa735..0000000 --- a/website/layouts/_default/index.reveal.html +++ /dev/null @@ -1,3 +0,0 @@ -{{ define "main" }} - {{ partial "reveal-hugo/slides" (union (slice .Page) (where .Data.Pages "Type" "home")) }} -{{ end }} diff --git a/website/layouts/_default/list.reveal.html b/website/layouts/_default/list.reveal.html deleted file mode 100644 index 6c3c470..0000000 --- a/website/layouts/_default/list.reveal.html +++ /dev/null @@ -1,3 +0,0 @@ -{{ define "main" }} - {{ partial "reveal-hugo/slides" (union (slice .Page) .Pages) }} -{{ end }} diff --git a/website/layouts/_default/single.reveal.html b/website/layouts/_default/single.reveal.html deleted file mode 100644 index e69de29..0000000 --- a/website/layouts/_default/single.reveal.html +++ /dev/null diff --git a/website/layouts/partials/reveal-hugo/body.html b/website/layouts/partials/reveal-hugo/body.html deleted file mode 100644 index f2dd4bf..0000000 --- a/website/layouts/partials/reveal-hugo/body.html +++ /dev/null @@ -1 +0,0 @@ -<!-- override this partial to add content before the body tag closes -->
\ No newline at end of file diff --git a/website/layouts/partials/reveal-hugo/head.html b/website/layouts/partials/reveal-hugo/head.html deleted file mode 100644 index ed1e892..0000000 --- a/website/layouts/partials/reveal-hugo/head.html +++ /dev/null @@ -1 +0,0 @@ -<!-- override this partial to add content before the head tag closes -->
\ No newline at end of file diff --git a/website/layouts/partials/reveal-hugo/slides.html b/website/layouts/partials/reveal-hugo/slides.html deleted file mode 100644 index e578882..0000000 --- a/website/layouts/partials/reveal-hugo/slides.html +++ /dev/null @@ -1,24 +0,0 @@ -<div class="reveal"> - <!-- Any section element inside of this container is displayed as a slide --> - <div class="slides"> - <!-- Use the array of pages passed as a param --> - {{ range . -}} - <!-- Don't process empty content files --> - {{- if ne (len .Content) 0 -}} - <!-- Remove the <hr /> tag generated by blackfriday for footnotes --> - {{- $content := replace .Content "<div class=\"footnotes\">\n\n<hr />" "<div class=\"footnotes\">" -}} - <!-- Split the processed content by <hr /> tag --> - {{- range (split $content "<hr />") -}} - <!-- Only wrap in <section> tag if not already wrapped by shortcode --> - {{- if in . "data-noprocess" -}} -{{- . | safeHTML -}} - {{- else }} -<section> - {{- . | safeHTML }} -</section> - {{- end -}} - {{- end -}} - {{- end -}} - {{- end }} - </div> -</div>
\ No newline at end of file diff --git a/website/layouts/shortcodes/frag.html b/website/layouts/shortcodes/frag.html deleted file mode 100644 index c1de8c8..0000000 --- a/website/layouts/shortcodes/frag.html +++ /dev/null @@ -1,4 +0,0 @@ -<span class='fragment {{ .Get "class" }}' - {{ with .Get "index" }}data-fragment-index='{{ . }}'{{ end }}> - {{ .Get "c" }} -</span>
\ No newline at end of file diff --git a/website/layouts/shortcodes/fragment.html b/website/layouts/shortcodes/fragment.html deleted file mode 100644 index dc41e03..0000000 --- a/website/layouts/shortcodes/fragment.html +++ /dev/null @@ -1,4 +0,0 @@ -<span class='fragment {{ .Get "class" }}' - {{ with .Get "index" }}data-fragment-index='{{ . }}'{{ end }}> - {{ .Inner }} -</span>
\ No newline at end of file diff --git a/website/layouts/shortcodes/markdown.html b/website/layouts/shortcodes/markdown.html deleted file mode 100644 index f5effbc..0000000 --- a/website/layouts/shortcodes/markdown.html +++ /dev/null @@ -1,8 +0,0 @@ -<section data-noprocess data-markdown - data-separator="^\r?\n---\r?\n$" - data-separator-vertical="^\r?\n------\r?\n$" - data-separator-notes="notes?:"> - <script type="text/template"> - {{ .Inner }} - </script> -</section>
\ No newline at end of file diff --git a/website/layouts/shortcodes/note.html b/website/layouts/shortcodes/note.html deleted file mode 100644 index 5d28fce..0000000 --- a/website/layouts/shortcodes/note.html +++ /dev/null @@ -1 +0,0 @@ -<aside class="notes">{{ .Inner }}</aside>
\ No newline at end of file diff --git a/website/layouts/shortcodes/section.html b/website/layouts/shortcodes/section.html deleted file mode 100644 index 43611a4..0000000 --- a/website/layouts/shortcodes/section.html +++ /dev/null @@ -1,3 +0,0 @@ -<section data-shortcode-section> -{{ .Inner }} -</section>
\ No newline at end of file diff --git a/website/layouts/shortcodes/slide.html b/website/layouts/shortcodes/slide.html deleted file mode 100644 index 7bb41ec..0000000 --- a/website/layouts/shortcodes/slide.html +++ /dev/null @@ -1,48 +0,0 @@ -{{- $scratch := .Scratch -}} -{{- $scratch.Set "slides" slice -}} -{{- if len .Inner -}} - {{- $scratch.Add "slides" .Inner -}} -{{- end -}} -{{- $content := .Get "content" -}} -{{- if $content -}} - {{- $lookup := split $content "." }} - {{- $html := index .Page.Site.Data (index $lookup 0) (index $lookup 1) | markdownify -}} - {{- $slides := split $html "<hr />" -}} - {{- range $slides -}} - {{- $scratch.Add "slides" . -}} - {{- end -}} -{{- end -}} -{{- $params := . -}} -{{- $noPrefix := slice "id" "class" -}} -{{- $noOutput := slice "content" "template" -}} -{{- range $scratch.Get "slides" }} -<section data-noprocess data-shortcode-slide - {{- $template := $params.Get "template" -}} - {{- if $template -}} - {{- $scratch.Add "templateParams" (slice $.Site.Params.reveal_hugo.templates) -}} - {{- if ne $.Page.File.LogicalName "_index.md" -}} - {{- $scratch.Add "templateParams" (slice ($.Site.GetPage $.Page.Section).Params.reveal_hugo.templates) -}} - {{- end -}} - {{- $scratch.Add "templateParams" (slice $.Page.Params.reveal_hugo.templates) -}} - {{- range ($scratch.Get "templateParams") -}} - {{- if (ne . nil) -}} - {{- range $key, $value := (index . $template) -}} - {{- $scratch.SetInMap "template" $key $value | safeHTMLAttr -}} - {{- end -}} - {{- end -}} - {{- end -}} - {{- range $key, $value := ($scratch.Get "template") }} - {{- $attrName := cond (in $noPrefix $key) $key (delimit (slice "data" $key) "-") }} - {{ $attrName | safeHTMLAttr }}="{{ $value }}" - {{- end }} - data-template="{{ $template }}" - {{- end -}} - {{- range $key, $value := $.Params -}} - {{- if not (in $noOutput $key) -}} - {{- $attrName := cond (in $noPrefix $key) $key (delimit (slice "data" $key) "-") }} - {{ $attrName | safeHTMLAttr }}="{{ $value }}" - {{- end -}} - {{- end -}}> - {{ . | safeHTML }} -</section> -{{- end -}}
\ No newline at end of file |
