1.0.0-dev11292157

Added NGINX server.conf and 404/403 error pages.

Changed default logo size to use 'em' units instead of 'vw'
This commit is contained in:
Victor Westerlund 2020-11-29 21:59:57 +01:00
parent a845af4b3f
commit 83223d66a8
7 changed files with 144 additions and 4 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
.well-known/

View file

@ -46,7 +46,7 @@ main > div {
/* --- */ /* --- */
.logo { .logo {
--size: 3vw; --size: 5em;
--skew: calc(var(--size) / 1.7); --skew: calc(var(--size) / 1.7);
width: 0; width: 0;
@ -186,6 +186,14 @@ nav a:hover {
height: 100%; height: 100%;
} }
@media screen and (max-width: 1010px) {
#myface {
display: none;
}
}
@media screen and (max-width: 800px) { @media screen and (max-width: 800px) {
h1 { h1 {
@ -211,8 +219,8 @@ nav a:hover {
text-align: justify; text-align: justify;
} }
#myface { #intro .block p:last-of-type {
display: none; text-align: initial;
} }
nav a { nav a {
@ -221,4 +229,7 @@ nav a:hover {
font-size: 5vw; font-size: 5vw;
} }
} }
/* Victor Westerlund */

BIN
public/assets/img/where.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 MiB

BIN
public/assets/img/where.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 721 KiB

51
public/not_found.html Normal file
View file

@ -0,0 +1,51 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Full-stack web developer from Stockholm, Sweden.">
<meta name="theme-color" content="#ffffff">
<link href="assets/img/favicon.png" rel="icon">
<link href="assets/css/style.css" rel="stylesheet">
<title>Page Not Found - Victor Westerlund</title>
<style>
#content {
box-sizing: border-box;
padding: 10vh;
}
h1, h2 {
text-align: center;
}
h1 {
font-size: 6em;
}
h2 {
font-size: 3em;
}
img {
position: absolute;
height: 50vh;
bottom: 0px;
left: 50%;
transform: translate(-50%);
pointer-events: none;
}
</style>
</head>
<body>
<div id="content">
<a href="https://victorwesterlund.com"><div class="logo"></div></a>
<h1>404 Not Found</h1>
<h2>idk..</h2>
</div>
<picture>
<source srcset="assets/img/where.webp" type="image/webp">
<source srcset="assets/img/where.gif" type="image/gif">
<img srcset="assets/img/where.png" type="image/png"/>
</picture>
</body>
</html>

77
server.conf Normal file
View file

@ -0,0 +1,77 @@
# == victorwesterlund.com ==
server {
listen 80;
listen [::]:80;
server_name www.victorwesterlund.com victorwesterlund.com;
return 301 https://victorwesterlund.com$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name victorwesterlund.com;
ssl on;
include snippets/ssl.conf;
root /var/www/github_victorwesterlund_victorwesterlund.com/public;
error_page 404 403 /not_found.html;
location \ {
try_files $uri $uri.html $uri/ =404;
}
location ~ \.php$ {
add_header Access-Control-Allow-Origin *;
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
}
location ~ /\.git {
deny all;
return 404;
}
}
# == api.victorwesterlund.com ==
server {
listen 80;
listen [::]:80;
server_name api.victorwesterlund.com;
return 301 https://api.victorwesterlund.com$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name api.victorwesterlund.com;
ssl on;
include snippets/ssl.conf;
root /var/www/github_victorwesterlund_victorwesterlund.com/api;
location \ {
try_files $uri $uri.html $uri/ =404;
}
location ~ \.php$ {
add_header Access-Control-Allow-Origin *;
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
}
location ~ /\.git {
deny all;
return 404;
}
}