Remove dynamic age feature

master
Raymonzut 3 years ago
parent 6c31c8752d
commit a0eb56e115
No known key found for this signature in database
GPG Key ID: 1E9BCC39EDD1DD53
  1. 7
      client/nginx.conf
  2. 5
      client/public/index.html
  3. 4
      client/public/index.mjs
  4. 17
      client/public/lib/me.mjs

@ -7,9 +7,6 @@ events {
}
http {
include /etc/nginx/mime.types;
types {
application/javascript mjs;
}
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
@ -29,10 +26,6 @@ http {
alias /app/assets/styling;
}
location /js {
alias /app/lib;
}
location /posts {
alias /app/gen/;
}

@ -8,8 +8,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Raymon Zutekouw</title>
<link rel="preload" href="./lib/me.mjs" as="script" crossorigin="anonymous" type="application/javascript">
<link rel="preload" href="index.mjs" as="script" crossorigin="anonymous" type="application/javascript">
<link rel="dns-prefetch" href="https://cdn.statically.io">
<link defer
@ -32,7 +30,7 @@
<div>
<p>
Hi there, good to see you on my website.
My name is Raymon Zutekouw (<span id="age">born on 29-08-2002</span>)
My name is Raymon Zutekouw; Self-thaught programmer by heart.
</p>
<p>
@ -48,6 +46,5 @@
</p>
</div>
</div>
<script async type="module" src="index.mjs"></script>
</body>
</html>

@ -1,4 +0,0 @@
import { age } from "./lib/me.mjs"
const age_span = document.getElementById("age")
age_span.textContent = age().toString()

@ -1,17 +0,0 @@
export function age() {
let birthdate = new Date("29 August 2002")
let now = new Date()
let age = now.getFullYear() - birthdate.getFullYear()
if (now.getMonth() < birthdate.getMonth())
age--
if (
birthdate.getMonth() === now.getMonth() &&
now.getDate() < birthdate.getDate()
)
age--
return age
}
Loading…
Cancel
Save