This commit is contained in:
William 2022-12-29 01:53:33 +00:00
parent e03e17d293
commit f696c2505a
12 changed files with 102 additions and 59 deletions

View File

@ -1,4 +0,0 @@
FROM php:latest
COPY . /usr/src/myapp
WORKDIR /usr/src/myapp/public/
CMD [ "php", "./index.php" ]

View File

@ -1,3 +1,7 @@
# Very kewl website
Made by yours truly
Made by yours truly
# Setup
See [docker/README.md](./docker/README.md)

17
docker/Dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM alpine:latest
# Nginx package is available in the Alpine Linux repositories. To install it run:
RUN apk update && \
apk add nginx php-fpm
# Creating new user and group 'www' for nginx
RUN adduser -D -g 'www' www
# Create a directory for html files
RUN mkdir /www && \
chown -R www:www /var/lib/nginx && \
chown -R www:www /www
COPY nginx.conf /etc/nginx/nginx.conf
CMD ["nginx"]

1
docker/README.md Normal file
View File

@ -0,0 +1 @@
# Docker install

33
docker/nginx.conf Normal file
View File

@ -0,0 +1,33 @@
user www;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
access_log /var/log/nginx/access.log;
keepalive_timeout 3000;
server {
listen 8080;
root /www;
index index.html index.htm index.php;
server_name localhost;
client_max_body_size 32m;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/lib/nginx/html;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

BIN
public/static/img/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

@ -1,9 +1,7 @@
/**
* Cool snow that was TOTALLY NOT stolen from someone else :-)
*/
// Cool snow that was TOTALLY NOT stolen from someone else :-)
// Amount of Snowflakes
var snowMax = 100;
var snowMax = 64;
// Snowflake Colours
var snowColor = ["#fff"];
@ -15,10 +13,10 @@ var snowEntity = "*";
var snowSpeed = 0.75;
// Minimum Flake Size
var snowMinSize = 8;
var snowMinSize = 16;
// Maximum Flake Size
var snowMaxSize = 24;
var snowMaxSize = 32;
// Refresh Rate (in milliseconds)
var snowRefresh = 75;

View File

@ -1,41 +1,27 @@
html, body {
height: 100%;
}
body {
margin: 0;
background: #560707;
color: #431718;
background: midnightblue;
color: #111;
font-size: 1rem;
font-family: 'Times New Roman', Times, serif;
line-height: 1.5;
font-family: Arial, Helvetica, sans-serif;
line-height: 1.75;
}
header {
image-rendering: pixelated;
}
h1 {
margin-top: .5rem;
margin-bottom: .5rem;
border-bottom: 1px solid;
}
a {
color: blue;
}
.container {
margin: auto;
max-width: 600px;
background: bisque;
}
main {
max-width: 37rem;
background: #fff;
padding: 1rem;
padding-top: 0;
}
img {
display: block;
max-width: 100%;
@ -52,19 +38,18 @@ td, th {
padding: 8px;
}
tr:nth-child(even) {
background: #eed3b3;
background: #eee;
}
@media (max-width: 600px) {
@media (max-width: 39rem) {
.container {
min-height: 100%;
}
}
pre, code {
font-family: "DejaVu Sans Mono", Consolas, monospace;
background: #431718;
color: bisque;
background: #111;
color: #fff;
padding: .5rem;
max-width: 100%;
display: block;

View File

@ -1,8 +1,12 @@
<?=view('templates/header', ['title' => 'Welcome to the willy club'])?>
<?=view('templates/header', ['title' => 'Welcome to the Willy Club'])?>
<h1>Welcome to the willy club</h1>
<h1>Welcome to the Willy Club</h1>
<p>Theres more than just willies! This site hosts some services for me and friends.</p>
<p>Theres more than just willies! Most of the time.</p>
<p>Not at all associated with thewilly.club ASSHOLES squatting my domain name with their shitty NFTs, this is the original.</p>
<p>This space hosts some services for me and friends, maybe it will host some other stuff down the line if I'm not too lazy.</p>
<table>
<tr>
@ -11,30 +15,26 @@
</tr>
<tr>
<td><a href="//git.willy.club">Gitea</a></td>
<td>Unknown</td>
<td>TBD</td>
</tr>
<tr>
<td><a href="<?=url('/matrix')?>">Matrix</a></td>
<td>Unknown</td>
<td>TBD</td>
</tr>
<tr>
<td><a href="mumble://mumble.willy.club">Mumble</a></td>
<td>Unknown</td>
<td>TBD</td>
</tr>
</table>
<h1>Contact</h1>
<h1>Flirt with the WEBMASTER</h1>
<p>Send me a nice and positive message at <a href="#">@william:willy.club</a></p>
<p>Send me a nice and positive message on matrix: <a href="#">@william:willy.club</a></p>
<h1>Webring</h1>
<h1>Awesome webring or something</h1>
<p>Check out any of these other websites</p>
<p>Check out any of these other aweeesome websites!</p>
<p>Well maybe there will be a webring here in the future.</p>
<h1>I don't know what more to put here</h1>
<p>This is just some text to make the page feel more complete? Yeah</p>
<?=view('templates/footer')?>

View File

@ -2,12 +2,14 @@
<h1>Matrix Homeserver</h1>
<p>Come solve all of the worlds problems on the willy club public matrix homeserver.</p>
<p>Come hang out with the other terminally online losers and bitch about all of the worlds problems on the Willy Club matrix homeserver. You can also use it to communicate freely or whatever.</p>
<p>You can register on a client that supports it by adding:</p>
<code>https://matrix.willy.club</code>
<p>as the homeserver, enjoy!</p>
<p>as the homeserver, have fun and be nice!</p>
<p>There is an Element web client hosted here but it's recommended you use your own client for security as a compromised client may leak your private keys potentially allowing hackers to decrypt messages in the case of a data breach or by logging into your account.</p>
<?=view('templates/footer')?>

View File

@ -1,6 +1,9 @@
<?php
function special_events(): string {
return 'Christmas';
if (in_array(date('m'), ['12', '1', '2'])) {
return 'Winter';
}
return 'Nothing';
}
?>
<!DOCTYPE html>
@ -14,16 +17,20 @@ function special_events(): string {
</head>
<body>
<?php if (special_events() === 'Christmas'): ?>
<?php if (special_events() === 'Winter'): ?>
<script src="<?=url('/static/js/snow.js')?>"></script>
<?php endif; ?>
<div class="container">
<header>
<a href="<?=url('/')?>">
<img src="<?=url('/static/img/banner.png')?>" width="600" height="150" alt="Click here to go to the homepage.">
</a>
</header>
<a href="<?=url('/')?>">
<img src="<?=url('/static/img/logo.png')?>">
</a>
<div>
<nav>
<!-- the image holds for now... -->
</nav>
</div>
<main>