Remove dynamic age feature
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user