Skip to content

Latest commit

 

History

History
51 lines (47 loc) · 1.52 KB

File metadata and controls

51 lines (47 loc) · 1.52 KB
permalink layout
/404.html
simple
<script src="/assets/js/cowsay.js"></script>

404

{: .align-center}

 _________________________________________ 
/ We seem to have hawked off on the wrong \
\ tuah                                    /
 ----------------------------------------- 
        \   ^__^                           
         \  (oo)\_______                   
            (__)\       )\/\               
                ||----w |                  
                ||     ||                             

{: #cowsay style="text-align: center;"} Anonymous {: #quote-author style="text-align: right;" }

<script> const quotes = {{ site.data.quotes | jsonify }}; const randomIndex = Math.floor(Math.random() * quotes.length); const randomQuote = quotes[randomIndex]; var text = cowsay( default_cow, randomQuote.content, "" ); document.querySelector("#cowsay code").textContent = text; if (randomQuote.hasOwnProperty('author')) { var author = document.querySelector("#quote-author"); if (randomQuote.author.hasOwnProperty('name')) { author.textContent = randomQuote.author.name; } if (randomQuote.author.hasOwnProperty('twitter')) { let twitter_link = document.createElement('a'); twitter_link.href = `https://x.com/${randomQuote.author.twitter}`; twitter_link.style['display'] = 'block'; twitter_link.style['color'] = 'darkgray'; twitter_link.classList.add('small-text'); twitter_link.textContent = `@${randomQuote.author.twitter}`; author.appendChild(twitter_link); } } </script>