The code and data behind xeiaso.net
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

_includes/blog: return visible captions for hero images

Signed-off-by: Xe Iaso <me@xeiaso.net>

Xe Iaso 5a647fca 4aaa4854

+7 -7
+7 -7
lume/src/_includes/blog.njk
··· 6 6 7 7 <article class="prose dark:prose-invert max-w-none"> 8 8 <h1>{{title}}</h1> 9 - <p class="text-sm text-fg-3 dark:text-fgDark-3"> 9 + <p class="text-sm text-fg-3 dark:text-fgDark-3 mb-2"> 10 10 Published on {{date.toLocaleDateString("en-US", { year: "numeric", month: "2-digit", day: "2-digit" })}}, {{ readingInfo.words }} words, {{ readingInfo.minutes }} minutes to read 11 11 </p> 12 12 13 13 {% if hero %} 14 14 {{ comp.XeblogHero(hero) | safe }} 15 + <small class="text-xs text-fg-3 dark:text-fgDark-3 mb-2 mx-auto">{{hero.prompt}} - {{hero.ai}}</small> 15 16 {% endif %} 16 17 17 18 {{content | safe}} ··· 38 39 <script> 39 40 const shareButton = document.getElementById("shareButton"); 40 41 function doShareButton() { 41 - console.log("got here"); 42 42 const shareData = { 43 43 title: document.title, 44 44 url: window.location.href ··· 51 51 console.log("Thanks for sharing!"); 52 52 }) 53 53 .catch(console.error); 54 - } 55 - else if (navigator.clipboard) { 54 + } else if (navigator.clipboard) { 56 55 // console.log("(via navigator.clipboard)"); 57 - navigator.clipboard.writeText(shareData.url) 56 + navigator 57 + .clipboard 58 + .writeText(shareData.url) 58 59 .then(() => { 59 60 console.log("Thanks for sharing!"); 60 61 }) 61 62 .catch(console.error); 62 - } 63 - else { 63 + } else { 64 64 console.log("can't share directly, but feel free to copy the url from addressbar manually"); 65 65 } 66 66 }