Remove dynamic age feature

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

@ -8,8 +8,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Raymon Zutekouw</title> <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 rel="dns-prefetch" href="https://cdn.statically.io">
<link defer <link defer
@ -32,7 +30,7 @@
<div> <div>
<p> <p>
Hi there, good to see you on my website. 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>
<p> <p>
@ -48,6 +46,5 @@
</p> </p>
</div> </div>
</div> </div>
<script async type="module" src="index.mjs"></script>
</body> </body>
</html> </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