diff options
author | Baron Schwartz <xaprb@users.noreply.github.com> | 2018-09-08 22:28:49 +0300 |
---|---|---|
committer | Baron Schwartz <xaprb@users.noreply.github.com> | 2018-09-08 22:28:49 +0300 |
commit | b1c6a42487d297542ca01d4c313b5fc6902af3db (patch) | |
tree | f78058f44850f8cd56c8ac64606717a62a23adfc /layouts | |
parent | 403df3ff62d2c68795cb71a80180431e87a4ac76 (diff) |
patch for https://github.com/gnab/remark/issues/539
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/slides/single.html | 44 |
1 files changed, 27 insertions, 17 deletions
diff --git a/layouts/slides/single.html b/layouts/slides/single.html index 1742d5f..b951006 100644 --- a/layouts/slides/single.html +++ b/layouts/slides/single.html @@ -1,13 +1,22 @@ {{ define "title" }}{{ cond (eq .Site.Params.titlecase true) (.Title | title | markdownify) (.Title | markdownify) }}{{ end }} {{ define "layout" }} - {{- with .Params.themes -}} - {{- range . }} - <link rel="stylesheet" href="{{ "/css/" | absURL }}{{ . }}.css"></style> - {{- end -}} - {{- else }} - <link rel="stylesheet" href="{{ "/css/" | absURL }}{{ .Params.theme }}.css"></style> - {{- end }} + {{- with .Params.less -}} + {{- with .Params.themes -}} + {{- range . }} + <link rel="stylesheet" href="{{ "/css/" | absURL }}{{ . }}.less"></style> + {{- end -}} + <script src="{{ "/js/less.min.js" | absURL }}"></script> + {{- end }} + {{ else }} + {{- with .Params.themes -}} + {{- range . }} + <link rel="stylesheet" href="{{ "/css/" | absURL }}{{ . }}.css"></style> + {{- end -}} + {{- else }} + <link rel="stylesheet" href="{{ "/css/" | absURL }}{{ .Params.theme }}.css"></style> + {{- end }} + {{- end -}} <style type="text/css"> @page { size: {{ if .Params.ratio }} 1216px 684px; {{ else }} 912px 684px; {{ end }} @@ -26,7 +35,7 @@ {{ end }} {{ define "header" }} -<!-- simply override the "header" from baseof.html to make it empty --> + <!-- simply override the "header" from baseof.html to make it empty --> {{ end }} {{ define "main" }} @@ -59,13 +68,14 @@ } if ( needsToggle ) $p.toggleClass('remark-visible'); }); - new QRCode( - document.getElementById("qrcode"), - { - "useSVG": true, - "text": window.location.href.replace(/#\d*$/, "") - } - ); + $( function() { + if ( $( "body.feature-qrcode:not(.feature-noqrcode)" ).length ) { + new QRCode($("#qrcode"), { + "useSVG": true, + "text": window.location.href.replace(/#\d*$/, "") + }); + } + }); </script> {{ end }} @@ -81,8 +91,8 @@ {{ end }} {{ define "about" }} - + <!-- simply override the "header" from baseof.html to make it empty --> {{ end }} {{ define "footer" }} - + <!-- simply override the "header" from baseof.html to make it empty --> {{ end }} |