Templatize pages and implement layout

This commit is contained in:
swaggboi 2021-02-28 01:33:35 -05:00
parent fa07331503
commit d7254205e8
6 changed files with 269 additions and 72 deletions

18
templates/die.html.ep Normal file
View File

@ -0,0 +1,18 @@
% title 'Deprecation of Internet Explorer';
% layout 'swagg';
<div class="outer">
<h2>Deprecation of Internet Explorer (D.I.E.) Clock</h2>
<h3>Internet Explorer is sentenced to D.I.E. in:</h3>
</div>
<div class="inner">
<h4><span id="dethKlok"></span></h4>
</div>
<div class="outer">
<p>Good riddance to bad rubbish...<br>
<br>
<b>Fun fact</b>: Microsoft killed
<a href="https://www.jwz.org/xscreensaver/xscreensaver-windows.html">
the first usable web browser to the general public</a></p><br>
<img src="/Pictures/f9e.gif"></img><br>
</div>
<script src="/js/die.js"></script>

View File

@ -1,56 +1,17 @@
<!DOCTYPE HTML> % title 'Swagg::Net Homepage';
<html lang="en"> % layout 'swagg';
<head> <div class="inner">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=0.4">
<title>Swagg::Net Homepage</title>
<link rel="stylesheet" type="text/css" href="/css/swagg.css">
</head>
<body>
<!-- Soundtrack -->
<!-- <embed> doesn't work anymore SAD
<embed src="/misc/Smashmouth_-_All_Star.mid" width="100%" height="60">-->
<audio src="/Music/Smashmouth-All-Star.mp3" autoplay controls
preload="auto"></audio>
<!-- Bonzi buddy -->
<div id="bonzi">
<img alt="a purple gorilla" src="/Pictures/Bonzi_Buddy.png">
</div>
<div class="outer">
<center>
<h1>
<img alt="fireworks" src="/Pictures/fireworks.gif" height="20">
Welcome to the Swagg::Net
<img alt="more fireworks" src="/Pictures/fireworks.gif" height="20">
</h1>
<h2>
(<u>S</u>waggNet <u>W</u>ide <u>A</u>rea <u>G</u>igabit <u>G</u>ame
<u>Net</u>work)!!
</h2>
</center>
</div>
<marquee>
<img alt="a padlock" src="/Pictures/lock1.gif" height="20">
Now in <span style="color:fuchsia">HTTPS</span>!!
</marquee><br>
<div class="outer">
<center> <center>
<img src="/Pictures/5consbar2_e0.gif" <img src="/Pictures/5consbar2_e0.gif"
alt="Under contruction" height="40"><br> alt="Under contruction" height="40">
</center> </center>
<br> <h2>Homepage</h2>
<hr><br> </div>
<div class="outer">
+--------------------------+<br> +--------------------------+<br>
</div> </div>
<div class="inner"> <div class="inner">
<p> <p>
Did you hear the
<a href="/news">news</a>? <strong>Downtime</strong> happening soon
<img alt="update" src="/Pictures/updat4.gif"><br>
<br>
Looking for a network/Linux admin? Read about <a href="/me">me</a>
<img alt="BSOD" src="/Pictures/bluscrn.gif" height="16"><br>
<br>
Looking for the game servers? Check out Looking for the game servers? Check out
the <a href="https://mirror.swagg.net/motd">message of the day</a> the <a href="https://mirror.swagg.net/motd">message of the day</a>
<img alt="character from Doom video game" src="/Pictures/Doom.gif" <img alt="character from Doom video game" src="/Pictures/Doom.gif"
@ -128,18 +89,3 @@
+--------------------------+<br> +--------------------------+<br>
<br> <br>
</div> </div>
<footer>
<center>
<img alt="Electronic mail - WOW!" src="/Pictures/mailput.gif">
<p>
<i>contact:</i>
<a href="mailto:swaggboi@slackware.uk">swaggboi@slackware.uk</a> -
<a href="https://eattherich.club/@swaggboi">Mastodon (@swaggboi)</a> -
<a href="https://steamcommunity.com/id/danielbowling">Steam</a> -
<a href="https://chat.swagg.net">Chat (Mattermost)</a>
</p>
<img alt="Y2k ready!" src="/Pictures/y2kready.gif" height="85">
</center>
</footer>
</body>
</html>

View File

@ -0,0 +1,55 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=0.4">
<title><%= title %></title>
<link rel="stylesheet" type="text/css" href="/css/swagg.css">
</head>
<body>
<!-- Soundtrack -->
<!-- <embed> doesn't work anymore SAD
<embed src="/misc/Smashmouth_-_All_Star.mid" width="100%" height="60">-->
<audio src="/Music/Smashmouth-All-Star.mp3" controls preload="auto"></audio>
<!-- Bonzi buddy -->
<div id="bonzi">
<img alt="a purple gorilla" src="/Pictures/Bonzi_Buddy.png">
</div>
<marquee>
<img alt="a padlock" src="/Pictures/lock1.gif" height="20">
Now in <span style="color:fuchsia">HTTPS</span>!!
</marquee>
<div class="outer">
<center>
<h1>
<img alt="fireworks" src="/Pictures/fireworks.gif" height="20">
Welcome to the Swagg::Net
<img alt="more fireworks" src="/Pictures/fireworks.gif" height="20">
</h1>
</center>
</div>
<div class="outer">
<center>
<a href="/">Home</a> -
<a href="/me">Me <img alt="BSOD" src="/Pictures/bluscrn.gif" height="16"></a> -
<a href="/news">News <img alt="update" src="/Pictures/updat4.gif"></a><br>
<br>
</center>
<hr>
</div>
<%= content %>
<footer>
<center>
<img alt="Electronic mail - WOW!" src="/Pictures/mailput.gif">
<p>
<i>contact:</i>
<a href="mailto:swaggboi@slackware.uk">swaggboi@slackware.uk</a> -
<a href="https://eattherich.club/@swaggboi">Mastodon (@swaggboi)</a> -
<a href="https://steamcommunity.com/id/danielbowling">Steam</a> -
<a href="https://chat.swagg.net">Chat (Mattermost)</a>
</p>
<img alt="Y2k ready!" src="/Pictures/y2kready.gif" height="85">
</center>
</footer>
</body>
</html>

View File

@ -0,0 +1,74 @@
% title 'About Me';
% layout 'swagg';
<div class="inner">
<h2>All about Daniel</h2>
<h3>
Northern Virginia (near DC)
- <a href="mailto:danielbowling424@msn.com">mail</a>
- <a href="/resume/dbowling-resume.odt">Resume</a>
</h3>
<h4>
My name is Daniel and I want to be a Perl / Unix hacker when I grow up.<br>
</h4>
</div>
<div class="outer">
+--------------------------+<br>
</div>
<div class="inner">
<h4>
These are old and bad, please check out
my <a href="https://codeberg.org/swaggboi">git repos</a>
</h4>
</div>
<div class="outer">
+--------------------------+<br>
</div>
<div class="inner">
<p>
<s><h4>Here are some shell scripts I've written:</h4>
<a href="/bin/apt-up.sh">apt-up.sh</a> - shell script that waits 10
min for a user to log into a Debian/Ubuntu system then proceeds to
update the system via the apt-get package manager if no one logs in,
finishing with a system shutdown<br>
<a href="/bin/tf2server01-bup.bash">tf2server01-bup.bash</a> - bash
script to tarball, encrypt, and upload a back-up of a game
server<br>
<a href="/bin/fedup-swagg.sh">fedup-swagg.sh</a> - shell script to
upgrade Fedora releases<br>
<a href="/bin/yum-up.sh">yum-up.sh</a> - shell script to update
system via yum package manager and email me if a (service) restart
is required<br>
<a href="/bin/stripe-cache-sizer.sh">stripe-cache-sizer.sh</a> -
small shell script with a simple for-loop that sets the stripe cache
size on an mdraid array
</p>
</div>
<div class="outer">
+--------------------------+<br>
</div>
<div class="inner">
<p>
<h4>I'm learning Perl now too</h4>
<a href="/bin/papicat.pl">papicat.pl</a> - (perpetually
work-in-progress) CLI client for Akamai's OPEN EdgeGrid API<br>
<a href="/bin/cpcodes.pl">cpcodes.pl</a> - simple script to extract
some info from debug headers for Akamaized hostnames<br>
<a href="/bin/ula6-swagg.pl">ula6-swagg.pl</a> - turns a MAC address
into an IPv6 ULA prefix<br>
<a href="/bin/smac.pl">smac.pl</a> - takes a list of misformatted
MAC addresses from arguments or standard input and substitutes them
for the correct format<br>
<a href="/bin/pingy.pl">pingy.pl</a> - sends a couple pings to
IP(v6) addresses and restarts routing services if host(s) are
unreachable
</s></p>
</div>
<div class="outer">
+--------------------------+<br>
</div>
<div class="inner">
<p>
<i>Warranty: If my script breaks your system, you get to keep both
pieces.</i>
</p>
</div>

View File

@ -0,0 +1,110 @@
% title 'News';
% layout 'swagg';
<div class="inner">
<h2>News</h2>
</div>
<div class="outer">
+--------------------------+<br>
</div>
<div class="inner">
<br>
6/25/2020 - <b>Major Downtime Coming</b><br>
<br>
</div>
<div class="outer">
+--------------------------+<br>
</div>
<div class="inner">
<p>
I am going to be moving equipment this weekend (6/26/2020 to
6/28/2020) so there may be a full day or two of downtime while I piece
everything together. In the future I'm going to move the MOTD and this
little news section to another server because this message kind of
defeats the purpose (didn't help I posted it at the last minute
WHOOPS)
</p>
</div>
<div class="outer">
+--------------------------+<br>
</div>
<div class="inner">
<br>
1/17/2020 - <b>New Domain Name</b><br>
<br>
</div>
<div class="outer">
+--------------------------+<br>
</div>
<div class="inner">
<p>
I purchased the swagg.net domain name last year but never go
around to cutting over from the old one. As with the move from
swagg.ddns.net, I'm going to hold onto swagg.cc to serve redirects
but eventually I'll be letting it go as swagg.cc actually costs me
money
</p>
</div>
<div class="outer">
+--------------------------+<br>
</div>
<div class="inner">
<br>
7/26/2019 - <b>Now serving HTTPS</b><br>
<br>
</div>
<div class="outer">
+--------------------------+<br>
</div>
<div class="inner">
<p>I got bored and changed stuff and now there's HTTPS</p>
</div>
<div class="outer">
+--------------------------+<br>
</div>
<div class="inner">
<br>
7/17/2019 - <b>New IP addresses</b><br>
<br>
</div>
<div class="outer">
+--------------------------+<br>
</div>
<div class="inner">
<p>
Due to me physically moving my server (and everything) to my new
place in Northern VA, there was some downtime (2 days) and
SwaggNet now has all new IP addresses. I think it's done now but
there may be some more downtime at night during the weekend as I
have to clean up my cabling as things got a bit spaghettified
during the move and I haven't had the time to unravel it all.
</p>
</div>
<div class="outer">
+--------------------------+<br>
</div>
<div class="inner">
<br>
5/13/2019 - <b>New domain name</b> (and IPv6!!)<br>
<br>
</div>
<div class="outer">
+--------------------------+<br>
</div>
<div class="inner">
<p>
I've been quietly playing around with IPv6 for some time and
finally felt comfortable going "global" with it, however the old
domain name (swagg.ddns.net) was a free Dynamic DNS name and thus
was not configurable as an AAAA (IPv6)
record. Therefore <a href="http://swagg.cc">swagg.cc</a> is now
the new domain name for SwaggNet and swagg.ddns.net has be
reconfigured to simply point to swagg.cc and will stay that way as
long as I can hold on to that name. swagg.cc should now resolve to
IPv4 or IPv6 and if you're curious or want to test your own IPv6
configuration, I've also
created <a href="http://ipv6.swagg.cc">ipv6.swagg.cc</a> which
will only be used for IPv6 records so using ipv6.swagg.cc should
essentially force an IPv6 session if everything's been set up
correctly.
</p>
</div>

View File

@ -4,21 +4,15 @@ use Mojolicious::Lite;
get '/' => sub { get '/' => sub {
my ($c) = @_; my ($c) = @_;
my $fortune = `fortune`; my $fortune = `fortune` || 'huh??';
$c->render(fortune => $fortune) $c->render(fortune => $fortune)
} => 'index'; } => 'index';
get '/me' => sub { get '/die';
my ($c) = @_;
$c->render(); get '/me';
};
get '/news' => sub { get '/news';
my ($c) = @_;
$c->render();
};
app->start(); app->start();