Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update about me
- change Go to Rust
- update age using js
  • Loading branch information
nalsai committed Nov 29, 2022
1 parent 0badc0f commit bc187c0
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 71 deletions.
6 changes: 3 additions & 3 deletions content/de/_index.md
@@ -1,6 +1,6 @@
+++
title = "Startseite"
menu = "main"
draft = false
weight = 1
[menu]
[menu.main]
weight = 1
+++
6 changes: 3 additions & 3 deletions content/en/_index.md
@@ -1,6 +1,6 @@
+++
title = "Home"
menu = "main"
draft = false
weight = 1
[menu]
[menu.main]
weight = 1
+++
1 change: 1 addition & 0 deletions layouts/index.de.html
Expand Up @@ -5,4 +5,5 @@
{{ partial "index/projects" . }}
{{ partial "index/sns" . }}
</div>
{{ partial "index/js" . }}
{{ end }}
4 changes: 2 additions & 2 deletions layouts/partials/index/about.de.html
Expand Up @@ -39,9 +39,9 @@
<p class="mb-3 h3">Über Mich</p>
<p>
Hallo, ich bin Nils Fürniß.
Ich bin {{ (now.AddDate -2002 -11 -12).Year }}
Ich bin <span id="age">{{ (now.AddDate -2002 -11 -12).Year }}</span>
Jahre alt und studiere an der Uni Heidelberg. Ich fotografiere und programmiere gerne (hauptsΓ€chlich in
C# und Go) und schreibe gerne Webseiten.
C# und Rust) und schreibe gerne Webseiten.
</p>
<p>
In meiner Freizeit spiele ich gerne The Elder Scrolls Online und schaue Anime.
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/index/about.html
Expand Up @@ -39,8 +39,8 @@
<p class="mb-3 h3">About Me</p>
<p>
Hello, I am Nils Fürniß.
I am {{ (now.AddDate -2002 -11 -12).Year }}
years old and am a student at Heidelberg University. I like to photograph and program (mainly in C# and Go)
I am <span id="age">{{ (now.AddDate -2002 -11 -12).Year }}</span>
years old and am a student at Heidelberg University. I like to photograph and program (mainly in C# and Rust)
and like to write websites.
</p>
<p>
Expand Down
61 changes: 0 additions & 61 deletions layouts/partials/index/header.html
Expand Up @@ -100,64 +100,3 @@ <h1 class="d-block d-sm-none font-weight-normal pb-3 animate animate-slide">{{ .
</div>
<img src="/img/header-wave.svg" class="bottom-svg">
</header>

<script>
// make navbar opaque/transparent on scroll
let o = document.getElementById("main-nav");
window.addEventListener("scroll", (function (e) {
var scrollPos = window.scrollY || window.scrollTop || document.getElementsByTagName("html")[0].scrollTop;
scrollPos > 120 ? o.classList.remove("nav-at-top") : o.classList.add("nav-at-top")
}))

// change to daytime image between 10 and 20 o'clock
if(new Date().getHours() > 9 && new Date().getHours() < 20) {
document.getElementById("intro").style.backgroundImage = "url('/img/TH969382.jpg')";
}

// random quotes
var d = new Date();
var n = d.getDay();
var Mo = d.getMonth();
var Da = d.getDate();
if (Mo == 11 && Da == 13) {
document.getElementById("QuotesEtc").innerHTML = "Ich habe Geburtstag!";
}
else if (Mo == 11 && Da == 24 || Mo == 11 && Da == 25 || Mo == 11 && Da == 26) {
quotes = [];
quotes[0] = "<a href=\"https://www.youtube.com/watch?v=dQ_d_VKrFgM\" target=\"_blank\" rel=\"noopener\">Frohe Weihnachten<\a>";
quotes[1] = "<a href=\"https://www.youtube.com/watch?v=dQ_d_VKrFgM\" target=\"_blank\" rel=\"noopener\">Merry Christmas<\a>";
quotes[2] = "<a href=\"https://www.youtube.com/watch?v=dQ_d_VKrFgM\" target=\"_blank\" rel=\"noopener\">パγƒͺγƒΌγ‚―γƒͺγ‚Ήγƒžγ‚Ή<\a>";
quotes[3] = "<a href=\"https://www.youtube.com/watch?v=efdN69QscAg\" target=\"_blank\" rel=\"noopener\">hashire sori yo kaze no you ni tsukimihara wo padoru padoru<\a>";
index = Math.floor(Math.random() * quotes.length);
document.getElementById("QuotesEtc").innerHTML = quotes[index];
}
else if (Mo == 11 && Da == 31 || Mo == 0 && Da == 1) {
quotes = [];
quotes[0] = "Frohes neues Jahr!";
quotes[1] = "Happy new year";
quotes[2] = "ζ˜Žγ‘γΎγ—γ¦γŠγ‚γ§γ¨γ†γ”γ–γ„γΎγ™γ€‚";
index = Math.floor(Math.random() * quotes.length);
document.getElementById("QuotesEtc").innerHTML = quotes[index];
}
else {
quotes = [];
quotes[0] = "&nbsp;";
quotes[1] = "Why do Java Developers need glasses? Because they can't C#.";
quotes[2] = "β€žDas Problem mit Zitaten im Internet ist, dass man nie weiß, ob sie echt sind.β€œ - Goethe";
quotes[3] = "seven ate nine";
quotes[4] = "Fall.net";
quotes[5] = "Have a nice trip, see you next fall!";
quotes[6] = "Illuminati confirmed!";
quotes[7] = "γŠε‰γ―γ‚‚γ†ζ­»γ‚“γ§γ„γ‚‹";
quotes[8] = "けゅんけゅんまる";
quotes[9] = "え γ‚’γ‚Ώγ‚·οΌοΌŸ";
quotes[10] = "εˆ†γ‹γ‚“γͺい";
quotes[11] = "<a href=\"https://www.youtube.com/watch?v=dQw4w9WgXcQ\" target=\"_blank\" rel=\"noopener\">https://www.youtube.com/watch?v=dQw4w9WgXcQ</a>";
if (n == 3)
quotes[quotes.length++] = "It's wednesday my dudes!";
if (Mo == 10 | Mo == 11)
quotes[quotes.length++] = "<a href=\"https://www.youtube.com/watch?v=efdN69QscAg\" target=\"_blank\" rel=\"noopener\">hashire sori yo kaze no you ni tsukimihara wo padoru padoru<\a>";
index = Math.floor(Math.random() * quotes.length);
document.getElementById("QuotesEtc").innerHTML = quotes[index];
}
</script>
73 changes: 73 additions & 0 deletions layouts/partials/index/js.html
@@ -0,0 +1,73 @@
<script>
// make navbar opaque/transparent on scroll
let o = document.getElementById("main-nav");
window.addEventListener("scroll", (function (e) {
var scrollPos = window.scrollY || window.scrollTop || document.getElementsByTagName("html")[0].scrollTop;
scrollPos > 120 ? o.classList.remove("nav-at-top") : o.classList.add("nav-at-top")
}))

// get date
var d = new Date();
var Year = d.getFullYear();
var Month = d.getMonth();
var DayOfWeek = d.getDay();
var DayOfMonth = d.getDate();
var Hours = d.getHours();

// change to daytime image between 10 and 20 o'clock
if (Hours > 9 && Hours < 20) {
document.getElementById("intro").style.backgroundImage = "url('/img/TH969382.jpg')";
}

// update age
var birthDate = new Date("2002-12-13");
var age = Year - birthDate.getFullYear();
var m = Month - birthDate.getMonth();
if (m < 0 || (m === 0 && DayOfMonth < birthDate.getDate())) {
age--;
}
document.getElementById("age").innerHTML = age;

// random quotes
if (Month === 11 && DayOfMonth === 13) {
document.getElementById("QuotesEtc").innerHTML = "Ich habe Geburtstag!";
}
else if (Month === 11 && DayOfMonth === 24 || Month === 11 && DayOfMonth === 25 || Month === 11 && DayOfMonth === 26) {
quotes = [];
quotes[0] = "<a href=\"https://www.youtube.com/watch?v=dQ_d_VKrFgM\" target=\"_blank\" rel=\"noopener\">Frohe Weihnachten<\a>";
quotes[1] = "<a href=\"https://www.youtube.com/watch?v=dQ_d_VKrFgM\" target=\"_blank\" rel=\"noopener\">Merry Christmas<\a>";
quotes[2] = "<a href=\"https://www.youtube.com/watch?v=dQ_d_VKrFgM\" target=\"_blank\" rel=\"noopener\">パγƒͺγƒΌγ‚―γƒͺγ‚Ήγƒžγ‚Ή<\a>";
quotes[3] = "<a href=\"https://www.youtube.com/watch?v=efdN69QscAg\" target=\"_blank\" rel=\"noopener\">hashire sori yo kaze no you ni tsukimihara wo padoru padoru<\a>";
index = Math.floor(Math.random() * quotes.length);
document.getElementById("QuotesEtc").innerHTML = quotes[index];
}
else if (Month === 11 && DayOfMonth === 31 || Month === 0 && DayOfMonth === 1) {
quotes = [];
quotes[0] = "Frohes neues Jahr!";
quotes[1] = "Happy new year";
quotes[2] = "ζ˜Žγ‘γΎγ—γ¦γŠγ‚γ§γ¨γ†γ”γ–γ„γΎγ™γ€‚";
index = Math.floor(Math.random() * quotes.length);
document.getElementById("QuotesEtc").innerHTML = quotes[index];
}
else {
quotes = [];
quotes[0] = "&nbsp;";
quotes[1] = "Why do Java Developers need glasses? Because they can't C#.";
quotes[2] = "β€žDas Problem mit Zitaten im Internet ist, dass man nie weiß, ob sie echt sind.β€œ - Goethe";
quotes[3] = "seven ate nine";
quotes[4] = "Fall.net";
quotes[5] = "Have a nice trip, see you next fall!";
quotes[6] = "Illuminati confirmed!";
quotes[7] = "γŠε‰γ―γ‚‚γ†ζ­»γ‚“γ§γ„γ‚‹";
quotes[8] = "けゅんけゅんまる";
quotes[9] = "え γ‚’γ‚Ώγ‚·οΌοΌŸ";
quotes[10] = "εˆ†γ‹γ‚“γͺい";
quotes[11] = "<a href=\"https://www.youtube.com/watch?v=dQw4w9WgXcQ\" target=\"_blank\" rel=\"noopener\">https://www.youtube.com/watch?v=dQw4w9WgXcQ</a>";
if (DayOfWeek === 3)
quotes[quotes.length++] = "It's wednesday my dudes!";
if (Month === 10 | Month === 11)
quotes[quotes.length++] = "<a href=\"https://www.youtube.com/watch?v=efdN69QscAg\" target=\"_blank\" rel=\"noopener\">hashire sori yo kaze no you ni tsukimihara wo padoru padoru<\a>";
index = Math.floor(Math.random() * quotes.length);
document.getElementById("QuotesEtc").innerHTML = quotes[index];
}
</script>
Binary file removed static/img/padoru-minecraft.png
Binary file not shown.

0 comments on commit bc187c0

Please sign in to comment.