{% extends "base.html" %}

{% block title %}404 Not Found &#8211; {{ tr.sitename|safe }}{% endblock title %}


{% block main %}
<h1>404 Not Found</h1>

<p id="lyrics"></p>

<noscript id="lyrics-noscript">
<p>We're no strangers to love<br/>
You know the rules and so do I<br/>
A full commitment's what I'm thinking of<br/>
You wouldn't get this from any other guy</p>

<p>I just wanna tell you how I'm feeling<br/>
Gotta make you understand</p>

<p>Never gonna give you up<br/>
Never gonna let you down<br/>
Never gonna run around and desert you<br/>
Never gonna make you cry<br/>
Never gonna say goodbye<br/>
Never gonna tell a lie and hurt you</p>

<p>We've known each other for so long<br/>
Your heart's been aching, but you're too shy to say it<br/>
Inside, we both know what's been going on<br/>
We know the game and we're gonna play it</p>

<p>And if you ask me how I'm feeling<br/>
Don't tell me you're too blind to see</p>

<p>Never gonna give you up<br/>
Never gonna let you down<br/>
Never gonna run around and desert you<br/>
Never gonna make you cry<br/>
Never gonna say goodbye<br/>
Never gonna tell a lie and hurt you</p>

<p>Never gonna give you up<br/>
Never gonna let you down<br/>
Never gonna run around and desert you<br/>
Never gonna make you cry<br/>
Never gonna say goodbye<br/>
Never gonna tell a lie and hurt you</p>

<p>(Ooh, give you up)<br/>
(Ooh, give you up)<br/>
Never gonna give, never gonna give<br/>
(Give you up)<br/>
Never gonna give, never gonna give<br/>
(Give you up)</p>

<p>We've known each other for so long<br/>
Your heart's been aching, but you're too shy to say it<br/>
Inside, we both know what's been going on<br/>
We know the game and we're gonna play it</p>

<p>I just wanna tell you how I'm feeling<br/>
Gotta make you understand</p>

<p>Never gonna give you up<br/>
Never gonna let you down<br/>
Never gonna run around and desert you<br/>
Never gonna make you cry<br/>
Never gonna say goodbye<br/>
Never gonna tell a lie and hurt you</p>

<p>Never gonna give you up<br/>
Never gonna let you down<br/>
Never gonna run around and desert you<br/>
Never gonna make you cry<br/>
Never gonna say goodbye<br/>
Never gonna tell a lie and hurt you</p>

<p>Never gonna give you up<br/>
Never gonna let you down<br/>
Never gonna run around and desert you<br/>
Never gonna make you cry<br/>
Never gonna say goodbye<br/>
Never gonna tell a lie and hurt you</p>

</noscript>

<script type="text/javascript">
var lyrics = document.getElementById("lyrics");
var text = document.getElementById("lyrics-noscript").innerHTML;
var counter = 0;
var interval;
// OK this is awful but I'm already overengineering this joke.
text = text.replace(/<br\s*\/?>/gi, "$");
text = text.replace(/<\/p>[\s\n\t]*<p>/gi, "@");
text = text.replace(/<p>/gi, "");
text = text.replace(/<\/p>/gi, "");
console.log(text);

function sing() {
	if(counter < text.length) {
		var char = text.charAt(counter);
		if(char == "$") {
			char = "<br/>";
		} else if(char == "@") {
			char = "<br/><br/>";
		}
		lyrics.innerHTML += char;
		counter ++;
	} else {
		clearInterval(interval);
	}
}

interval = setInterval(sing, 50);

</script>

{% endblock main %}
