Compare commits

...

22 Commits

Author SHA1 Message Date
865da229fe Update conf/nginx.conf 2024-03-22 09:43:49 +00:00
580bd62211 Update owlboard info on projects page 2023-08-14 21:37:13 +01:00
52ea700ec8 Update projects to include map-dots 2023-08-14 21:35:47 +01:00
7779cc0050 Update OwlBoard link 2023-03-06 21:14:50 +00:00
a0e9b27b84 Updated copyright notice 2023-03-05 23:31:22 +00:00
8fe20933b8 Add git links to projects page 2023-03-05 23:19:12 +00:00
224891d2b5 Update deployment types 2023-02-16 20:40:42 +00:00
b65914487f Remove migration notice 2023-02-16 20:23:14 +00:00
65f23aee56 Fix nginx conf 2023-02-16 17:43:27 +00:00
dff69933c4 Update gzip_types 2023-02-16 15:42:09 +00:00
091ad334d2 Fix styling on projects page 2023-02-16 15:26:58 +00:00
62a03587e9 Add migration notice 2023-01-13 13:57:37 +00:00
b91381e822 Update docker nginx configuration 2023-01-13 13:54:34 +00:00
deb0156c1b Prepare and publish Docker container 2023-01-13 12:54:56 +00:00
eca91fc94d Add initial dockerfile 2023-01-12 19:11:29 +00:00
5a3cfa1e21 Update fallback header colour to look less garish 2023-01-12 14:50:26 +00:00
7ff3e91a3e Update projects - fix formatting 2023-01-12 14:49:21 +00:00
6840ab3d26 Update projects page 2023-01-11 23:57:13 +00:00
b67b1ca1b5 Update styling for <dl> 2023-01-11 23:56:01 +00:00
85d6f9a73e Add face picture 2023-01-11 23:51:54 +00:00
8a89c887bf Fix typo 2023-01-11 23:37:16 +00:00
5912ce0ff7 Update projects 2023-01-11 23:36:23 +00:00
19 changed files with 181 additions and 13 deletions

4
.dockerignore Normal file
View File

@ -0,0 +1,4 @@
*.md
*.Dockerfile
.git
.dockerignore

43
conf/deploy.sh Normal file
View File

@ -0,0 +1,43 @@
#!/bin/bash
ROOTIN="/data/in"
ROOTOUT="/data/out"
echo "Running UglifyJS on /data/in folder"
uglifyjs-folder "$ROOTIN" -x ".js" -eo "$ROOTOUT"
echo "Running UglifyCSS"
CSSIN="/data/in/style/"
CSSOUT="/data/out/style"
cd $CSSIN
echo "Changed directory"
for f in *
do
if [ -f "$f" ]; then
uglifycss "$f" --output "$f";
fi
done
echo "Moving 'styles' to 'out'"
cp -r $CSSIN $CSSOUT
echo "Running html-minifier-terser on /folder"
HTMLIN="/data/in/"
HTMLOUT="/data/out"
html-minifier-terser --collapse-whitespace --remove-comments --file-ext html --input-dir /data/in/ --output-dir /data/out/
#echo "Moving JSON Manifest file from root to output"
#cat /data/in/manifest.json | jq -c > /data/out/manifest.json
echo "Moving other files folder from in/ to out/"
cp -r /data/in/images /data/out/images
cp -r /data/in/error-pages/*.php /data/out/error-pages/
cp -r /data/in/downloads /data/out/downloads
cp -r /data/in/*.php /data/out/
cp -r /data/in/*.ico /data/out/
cp -r /data/in/page-blocks /data/out/page-blocks
cp -r /data/in/php /data/out/php
echo "Running GZIP & Brotli on all HTML, JS, CSS, JSON, SVG, TTF, VCF, PUB files"
find /data/out -type f -name \*.html -or -name \*.vcf -or -name \*.pub -or -name \*.js -or -name \*.css -or -name \*.json -or -name \*.svg -or -name \*.ttf | while read file; do gzip -k -9 $file; brotli -k -q 11 $file; done

57
conf/nginx.conf Normal file
View File

@ -0,0 +1,57 @@
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;
events {
worker_connections 128;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
keepalive_timeout 65;
gzip_static on;
brotli_static on;
server {
listen 80;
server_name localhost;
access_log /var/log/nginx/access.log;
root /site;
location ~ /(.git|php|page-blocks) {
deny all;
}
location / {
index index.php;
try_files $uri $uri/ $uri/index.php &uri/index.html =404;
break;
expires 7d;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass fpm:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
error_page 403 /error-pages/403.php;
error_page 404 /error-pages/404.php;
error_page 500 501 502 503 504 /error-pages/50x.html;
}
}

View File

@ -7,6 +7,5 @@ EMAIL;CHARSET=UTF-8;type=HOME,INTERNET:fred@fjla.uk
TEL;TYPE=HOME,VOICE:03331126831 TEL;TYPE=HOME,VOICE:03331126831
ADR;CHARSET=UTF-8;TYPE=HOME:;;;Bath;;;United Kingdom ADR;CHARSET=UTF-8;TYPE=HOME:;;;Bath;;;United Kingdom
URL;CHARSET=UTF-8:https://fredboniface.co.uk URL;CHARSET=UTF-8:https://fredboniface.co.uk
NOTE;CHARSET=UTF-8:vCard generated at vcardmaker.com
REV:2022-10-06T21:38:40.052Z REV:2022-10-06T21:38:40.052Z
END:VCARD END:VCARD

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

12
nginx.Dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM fedora:latest as compressor
RUN dnf install brotli nodejs npm jq -y
RUN npm i uglifyjs-folder uglifycss html-minifier-terser -g
COPY . /data/in
RUN bash /data/in/conf/deploy.sh
FROM fholzer/nginx-brotli:latest
RUN rm /etc/nginx/nginx.conf
RUN apk update
RUN apk add --upgrade libxml2 libxslt
COPY ./conf/nginx.conf /etc/nginx/nginx.conf
COPY --from=compressor /data/out/ /site/

View File

@ -1,5 +1,5 @@
<footer> <footer>
<p> <p>
&copy; Fred Boniface 2022 &copy; Fred Boniface 2022-2023
</p> </p>
</footer> </footer>

View File

@ -3,8 +3,13 @@
<?php <?php
if (strcmp($page_title, 'home') == 0){ if (strcmp($page_title, 'home') == 0){
echo '<picture id="header_face">'; echo '<picture id="header_face">';
echo '<source srcset="/images/headers/index/face-150.webp" type="image/webp">'; echo '<source media="(max-width:600px)" srcset="/images/headers/index/face-200.jxl" type="image/jxl">';
echo '<img src="/images/headers/index/face-100.webp" alt="Face image">'; echo '<source media="(max-width:600px)" srcset="/images/headers/index/face-200.webp" type="image/webp">';
echo '<source media="(max-width:600px)" srcset="/images/headers/index/face-200.jpg" type="image/jpeg">';
echo '<source srcset="/images/headers/index/face-500.jxl" type="image/jxl">';
echo '<source srcset="/images/headers/index/face-500.webp" type="image/webp">';
echo '<source srcset="/images/headers/index/face-500.jpg" type="image/jpeg">';
echo '<img src="/images/headers/index/face-500.jpg" alt="Face image">';
echo '</picture>'; echo '</picture>';
} ?> <!-- Moved from separate include to inline --> } ?> <!-- Moved from separate include to inline -->
<h1><?php echo ucwords($page_title); ?></h1> <h1><?php echo ucwords($page_title); ?></h1>

3
php.Dockerfile Normal file
View File

@ -0,0 +1,3 @@
FROM php:8.2.1-fpm-alpine
COPY . /site

View File

@ -10,10 +10,33 @@
<?php include "./page-blocks/micro-content.php"; ?> <?php include "./page-blocks/micro-content.php"; ?>
<div class="content hide_micro"> <div class="content hide_micro">
<p> <p>
I haven't written any content here yet. This isn't a complete list of all my projects, but check out my
<br> <a href="https://git.fjla.uk/fred.boniface/">Gitea</a> to see more.
In the meantime, <a href="https://git.fjla.uk">visit my Gitea Server</a>.
</p> </p>
<p>
Most of my projects involve web development of some kind, you can find some software projects below
though. Besides this website, which is written in PHP - mainly for easy
templating rather than for dynamic content - I have created the following:
</p>
<dl>
<dt><a href="https://athena.fb-infra.uk">Athena</a> <a href="https://git.fjla.uk/fred.boniface/athena.fb-infra.uk">Git Repo</a></dt>
<dd>Written in PHP, a simple gateway to get easy access to train departures</dd>
<dt><a href="https://owlboard.info">OwlBoard</a> <a href="https://git.fjla.uk/OwlBoard">Git Repos</a></dt>
<dd>A suite of containerised applications offering live departure boards for UK Rail.
Consists of an Express.JS API Server utilising JS and TS, a Python db-manager script, a Go message-broker and a modern PWA frontend
written using SvelteKit and utilising compression to reduce payload size, and making use of ServiceWorker caching,
to increase reliability over low quality mobile data links. Designed for Kubernetes deployment.
</dd>
<dt><a href="https://git.fjla.uk/fred.boniface/trandom">tRandom</a> <a href="https://git.fjla.uk/fred.boniface/tRandom">Git Repo</a></dt>
<dd>Written in Python, a simple cross-platform GUI based random number
generator. Using the tkinter library for the interface.</dd>
<dt><a href="https://git.fjla.uk/fred.boniface/map-dots">map-dots</a></dt>
<dd>Written in Go, an application that can consume location history data and produce images from the data. map-dots can be run as a CLI
program or as a web-server offering a simple API. <a href="https://git.fjla.uk/fred.boniface/map-dots-fetch">map-dots-fetch</a> is
a simple script designed to request images from map-dots when it is being run as a server.
Originally designed to provide images that can be used as wallpaper images.
</dl>
<br>
</div> </div>
<?php include "./page-blocks/footer.php"; ?> <?php include "./page-blocks/footer.php"; ?>
</body> </body>

View File

@ -68,11 +68,11 @@ body {
@media(min-width:1025px){#home{background-image:url("/images/headers/index/1920.webp")}} @media(min-width:1025px){#home{background-image:url("/images/headers/index/1920.webp")}}
@media(min-width:1921px){#home{background-image:url("/images/headers/index/2800.webp")}} @media(min-width:1921px){#home{background-image:url("/images/headers/index/2800.webp")}}
@media(min-width:2801px){#home{background-image:url("/images/headers/index/4096.webp")}} @media(min-width:2801px){#home{background-image:url("/images/headers/index/4096.webp")}}
#contact{background-color: blue} #contact{background-color: #a04911}
#keys{background-color: blue} #keys{background-color: #a04911}
#projects{background-color: blue} #projects{background-color: #a04911}
#email-safety{background-color: blue} #email-safety{background-color: #a04911}
#about{background-color: blue} #about{background-color: #a04911}
#header_face { #header_face {
display: flex; display: flex;
position: absolute; position: absolute;
@ -214,6 +214,28 @@ body {
.content a:hover { .content a:hover {
color: var(--link-visited-color) color: var(--link-visited-color)
} }
.content dl {
width: 90%;
margin: auto;
margin-top: 20px;
margin-bottom: 40px;
text-align: center;
color: var(--main-text-color);
font-family: oxygen, sans-serif;
font-weight: normal;
}
.content dt {
margin: auto;
font-weight: bolder;
}
.content dd {
margin: auto;
padding-bottom: 15px;
}
/* FOOTER */ /* FOOTER */
footer { footer {
position: relative; position: relative;