diff options
Diffstat (limited to '_layouts')
-rw-r--r-- | _layouts/postlist.html | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/_layouts/postlist.html b/_layouts/postlist.html index 67a1d48..24909d1 100644 --- a/_layouts/postlist.html +++ b/_layouts/postlist.html @@ -39,6 +39,9 @@ layout: default {%- elsif site.show_excerpts -%} {{ post.excerpt }} {%- assign showsep = true -%} + {%- elsif post.description -%} + {{ post.description }} + {%- assign showsep = true -%} {%- endif -%} </div> </li> @@ -54,26 +57,4 @@ layout: default </div> -<script> - document.addEventListener("DOMContentLoaded", function() { - const ids = [ "AdBlock", "news1" ]; - for (currId of ids) { - const currentBanner = document.getElementById(currId); - const closeLink = currentBanner.firstElementChild; - const currentNewsClosed = localStorage.getItem(currId+"closed"); - if (currentNewsClosed === "true") { - currentBanner.style.display = "none"; - } - - function closeBanner(evt) { - currentBanner.style.display = "none"; - const storId = evt.currentTarget.closeArg + "closed"; - localStorage.setItem(storId, "true"); - } - - closeLink.closeArg=currId; - closeLink.addEventListener("click", closeBanner); - } - - }); -</script> +<script src="/assets/js/newsbanner.js"></script> |