Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xaprb/story.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaron Schwartz <xaprb@users.noreply.github.com>2019-01-07 00:55:36 +0300
committerBaron Schwartz <xaprb@users.noreply.github.com>2019-01-07 00:55:36 +0300
commit47373342b91a0aee45fb04e466ecc0317798a471 (patch)
treea43d3a6a060d9ca9a3e807c10c5a97a5d4988861 /layouts
parent671af0db39f1c1fedb29d104f9be7e74c7d192ba (diff)
add support for abc music notation
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/baseof.html5
-rw-r--r--layouts/shortcodes/music.html1
2 files changed, 6 insertions, 0 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 0a16466..d99ff1b 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -42,6 +42,11 @@
<script src="{{ "js/auto-render.min.js" | absURL }}"></script> <!-- for KaTeX -->
{{- end -}}
{{- end -}}
+ {{ if or (in .Site.Params.classes "feature-music") (in .Params.classes "feature-music") -}}
+ {{- if not (or (in .Site.Params.classes "feature-nomusic") (in .Params.classes "feature-nomusic") ) -}}
+ <script src="{{ "js/abcjs_basic_5.6.1-min.js" | absURL }}"></script>
+ {{- end -}}
+ {{- end -}}
{{ with .Site.Params.head }}{{ range . }}
{{ . | safeHTML }}{{ end }}{{ end }}
<script src="{{ "js/story.js" | absURL }}"></script>
diff --git a/layouts/shortcodes/music.html b/layouts/shortcodes/music.html
new file mode 100644
index 0000000..85d8ff8
--- /dev/null
+++ b/layouts/shortcodes/music.html
@@ -0,0 +1 @@
+<pre><code class="language-abc">{{ .Get 0 | readFile}}</code></pre> \ No newline at end of file