diff options
author | Djordje Atlialp <djordje@atlialp.com> | 2021-04-30 00:31:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-30 00:31:03 +0300 |
commit | 7bc931ead246489df9fb4f0311b96e7c3ad54fd2 (patch) | |
tree | 88b93b924bf60669df673d4b94d183465f06c022 | |
parent | 0070fb5fcda737d9b44019970186744d322f351a (diff) | |
parent | 76b1b44665284f42b17051fabac8cdd98eb5daf3 (diff) |
Merge pull request #263 from talbotp/add-audio-for-posts
Added support for blog post audio.
-rw-r--r-- | assets/scss/_single.scss | 11 | ||||
-rw-r--r-- | layouts/posts/single.html | 8 |
2 files changed, 19 insertions, 0 deletions
diff --git a/assets/scss/_single.scss b/assets/scss/_single.scss index 1388471..2359e09 100644 --- a/assets/scss/_single.scss +++ b/assets/scss/_single.scss @@ -91,6 +91,17 @@ } } + &-audio { + display: flex; + justify-content: center; + align-items: center; + padding-top: 20px; + + audio { + width: 90%; + } + } + .flag { border-radius: 50%; margin: 0 5px; diff --git a/layouts/posts/single.html b/layouts/posts/single.html index dccf60d..181d554 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -45,6 +45,14 @@ <hr /> {{- end }} + {{ if .Params.Audio }} + <div class="post-audio"> + <audio controls> + <source src="{{ .Params.Audio }}"> + </audio> + </div> + {{ end }} + <div class="post-content"> {{ .Content }} </div> |