diff options
author | zzossig <zzossig@gmail.com> | 2020-11-05 17:36:06 +0300 |
---|---|---|
committer | zzossig <zzossig@gmail.com> | 2020-11-05 17:36:06 +0300 |
commit | 574f6c3d26d54855dea4ab472eda28a77d06211c (patch) | |
tree | 49cdc5d1531d527e9fedaaa53dbcbec14f049017 | |
parent | 71d26cb70da8470d19010224e2b8b465ca92b1fc (diff) |
-rw-r--r-- | exampleSite/content/en/blog/rich-content.md | 4 | ||||
-rw-r--r-- | exampleSite/content/ko/blog/rich-content.md | 4 | ||||
-rw-r--r-- | layouts/partials/main/list.html | 3 | ||||
-rw-r--r-- | layouts/partials/script/codeblock-script.html | 25 | ||||
-rw-r--r-- | layouts/partials/script/single-script.html | 23 |
5 files changed, 28 insertions, 31 deletions
diff --git a/exampleSite/content/en/blog/rich-content.md b/exampleSite/content/en/blog/rich-content.md index f10610c..db73c3d 100644 --- a/exampleSite/content/en/blog/rich-content.md +++ b/exampleSite/content/en/blog/rich-content.md @@ -19,10 +19,6 @@ Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-manageme <!--more--> --- -## Instagram Simple Shortcode - -{{< instagram_simple BGvuInzyFAe hidecaption >}} - <br> --- diff --git a/exampleSite/content/ko/blog/rich-content.md b/exampleSite/content/ko/blog/rich-content.md index f10610c..db73c3d 100644 --- a/exampleSite/content/ko/blog/rich-content.md +++ b/exampleSite/content/ko/blog/rich-content.md @@ -19,10 +19,6 @@ Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-manageme <!--more--> --- -## Instagram Simple Shortcode - -{{< instagram_simple BGvuInzyFAe hidecaption >}} - <br> --- diff --git a/layouts/partials/main/list.html b/layouts/partials/main/list.html index caf16f6..657d498 100644 --- a/layouts/partials/main/list.html +++ b/layouts/partials/main/list.html @@ -22,6 +22,9 @@ </div> </div> +{{ partial "script/codeblock-script.html" . }} +{{ partial "script/single-script.html" . }} + <script> var listMenu = document.getElementById('list-menu'); var listMain = document.getElementById('list-main'); diff --git a/layouts/partials/script/codeblock-script.html b/layouts/partials/script/codeblock-script.html index df6ed91..54f6291 100644 --- a/layouts/partials/script/codeblock-script.html +++ b/layouts/partials/script/codeblock-script.html @@ -34,4 +34,29 @@ }) : null; })(); // ================================================================= + + + + // ================ codeblock line number to symbol ================ + var dollarCodeElem = document.querySelectorAll('div.language-\\$'); + var gtCodeElem = document.querySelectorAll('div.language-\\>'); + + dollarCodeElem ? + dollarCodeElem.forEach(function(elem) { + var lnts = elem.parentNode.parentNode ? elem.parentNode.parentNode.querySelectorAll('.lnt') : null; + lnts ? + lnts.forEach(function(lnt) { + lnt.innerHTML = '$<br/>'; + }) : null; + }) : null; + + gtCodeElem ? + gtCodeElem.forEach(function(elem) { + var lnts = elem.parentNode.parentNode ? elem.parentNode.parentNode.querySelectorAll('.lnt') : null; + lnts ? + lnts.forEach(function(lnt) { + lnt.innerHTML = '><br/>'; + }) : null; + }) : null; + // ================================================================= </script>
\ No newline at end of file diff --git a/layouts/partials/script/single-script.html b/layouts/partials/script/single-script.html index b1d400d..794966c 100644 --- a/layouts/partials/script/single-script.html +++ b/layouts/partials/script/single-script.html @@ -83,29 +83,6 @@ // ================================================================= - // ================ codeblock line number to symbol ================ - var dollarCodeElem = document.querySelectorAll('div.language-\\$'); - var gtCodeElem = document.querySelectorAll('div.language-\\>'); - - dollarCodeElem ? - dollarCodeElem.forEach(function(elem) { - var lnts = elem.parentNode.parentNode ? elem.parentNode.parentNode.querySelectorAll('.lnt') : null; - lnts ? - lnts.forEach(function(lnt) { - lnt.innerHTML = '$<br/>'; - }) : null; - }) : null; - - gtCodeElem ? - gtCodeElem.forEach(function(elem) { - var lnts = elem.parentNode.parentNode ? elem.parentNode.parentNode.querySelectorAll('.lnt') : null; - lnts ? - lnts.forEach(function(lnt) { - lnt.innerHTML = '><br/>'; - }) : null; - }) : null; - // ================================================================= - // ============================ mermaid ============================ {{ $lib := .Params.libraries }} |