From 44595618b5d162e8bb8362e3891dc694342d1869 Mon Sep 17 00:00:00 2001 From: boredpasta Date: Mon, 13 Jan 2025 06:39:10 +0200 Subject: Add project files --- LICENSE | 25 +++++++ Makefile | 32 ++++++++ README | 0 docs/401.html | 1 + docs/403.html | 1 + docs/404.html | 1 + docs/500.html | 1 + docs/base | 50 +++++++++++++ docs/blog | 1 + docs/contact | 12 +++ docs/links | 33 +++++++++ docs/root | 24 ++++++ docs/status | 1 + perl.cgi | 70 ++++++++++++++++++ static/badge.png | Bin 0 -> 3872 bytes static/banner.png | Bin 0 -> 1555 bytes static/blunt.png | Bin 0 -> 1350 bytes static/created_by_a_human.png | Bin 0 -> 5180 bytes static/cursor.png | Bin 0 -> 1030 bytes static/gay.gif | Bin 0 -> 1329 bytes static/header.png | Bin 0 -> 1688 bytes static/main.css | 168 ++++++++++++++++++++++++++++++++++++++++++ static/mothracompat.gif | Bin 0 -> 7334 bytes static/obsd.jpg | Bin 0 -> 33935 bytes static/tile.png | Bin 0 -> 115727 bytes static/under_construction.png | Bin 0 -> 2552 bytes 26 files changed, 420 insertions(+) create mode 100644 LICENSE create mode 100644 Makefile create mode 100644 README create mode 100644 docs/401.html create mode 100644 docs/403.html create mode 100644 docs/404.html create mode 100644 docs/500.html create mode 100644 docs/base create mode 100644 docs/blog create mode 100644 docs/contact create mode 100644 docs/links create mode 100644 docs/root create mode 100644 docs/status create mode 100755 perl.cgi create mode 100644 static/badge.png create mode 100644 static/banner.png create mode 100644 static/blunt.png create mode 100644 static/created_by_a_human.png create mode 100644 static/cursor.png create mode 100644 static/gay.gif create mode 100644 static/header.png create mode 100644 static/main.css create mode 100644 static/mothracompat.gif create mode 100644 static/obsd.jpg create mode 100644 static/tile.png create mode 100644 static/under_construction.png diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..516bf3a --- /dev/null +++ b/LICENSE @@ -0,0 +1,25 @@ +Below is an example license to be used for new code in OpenBSD, +modeled after the ISC license. + +It is important to specify the year of the copyright. Additional years +should be separated by a comma, e.g. + Copyright (c) 2003, 2004 + +If you add extra text to the body of the license, be careful not to +add further restrictions. + +/* + * Copyright (c) YYYY YOUR NAME HERE + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..bb98d07 --- /dev/null +++ b/Makefile @@ -0,0 +1,32 @@ +PREFIX = /var/www +CGIBINDIR = cgi-bin +HTDOCSDIR = htdocs/pastanoggin.com + +CGIDIR = ${PREFIX}/${CGIBINDIR} +ROOTDIR = ${PREFIX}/${HTDOCSDIR} + +install: + # perl + install -d ${DISTDIR}${PREFIX}/usr/bin + install -g www -m 755 -o www /usr/bin/perl ${DESTDIR}${PREFIX}/usr/bin + install -d ${DISTDIR}${PREFIX}/usr/lib + install -g www -m 755 -o www /usr/lib/libperl.so.* \ + ${DESTDIR}${PREFIX}/usr/lib + install -g www -m 755 -o www /usr/lib/libm.so.* ${DESTDIR}${PREFIX}/usr/lib + install -g www -m 755 -o www /usr/lib/libc.so.* ${DESTDIR}${PREFIX}/usr/lib + install -d ${DISTDIR}${PREFIX}/usr/libexec + install -g www -m 755 -o www /usr/libexec/ld.so \ + ${DESTDIR}${PREFIX}/usr/libexec + install -d ${DISTDIR}${PREFIX}/usr/libdata/perl5 + # cgi + install -d ${DESTDIR}${CGIDIR} + install -g www -m 0555 -o www perl.cgi ${DESTDIR}${CGIDIR} + # documents + install -d ${DESTDIR}${ROOTDIR}/docs + install -g www -m 0555 -o www docs/* ${DESTDIR}${ROOTDIR}/docs + # static files + install -d ${DESTDIR}${ROOTDIR}/static + install -g www -m 0555 -o www static/* ${DESTDIR}${ROOTDIR}/static + +uninstall: + rm -f ${DESTDIR}${PREFIX}/cgi-bin/perl.cgi diff --git a/README b/README new file mode 100644 index 0000000..e69de29 diff --git a/docs/401.html b/docs/401.html new file mode 100644 index 0000000..066cbfe --- /dev/null +++ b/docs/401.html @@ -0,0 +1 @@ +401 diff --git a/docs/403.html b/docs/403.html new file mode 100644 index 0000000..e1a29c1 --- /dev/null +++ b/docs/403.html @@ -0,0 +1 @@ +403 diff --git a/docs/404.html b/docs/404.html new file mode 100644 index 0000000..f1b1cb3 --- /dev/null +++ b/docs/404.html @@ -0,0 +1 @@ +404 diff --git a/docs/500.html b/docs/500.html new file mode 100644 index 0000000..1b79f38 --- /dev/null +++ b/docs/500.html @@ -0,0 +1 @@ +500 diff --git a/docs/base b/docs/base new file mode 100644 index 0000000..5f981ab --- /dev/null +++ b/docs/base @@ -0,0 +1,50 @@ + + + + + + + + + [%title%] + + + +
+ + +
+ +
+ [%content%] +
+
+
status
+
+ [%status%] +
+
+ + + diff --git a/docs/blog b/docs/blog new file mode 100644 index 0000000..5a4a279 --- /dev/null +++ b/docs/blog @@ -0,0 +1 @@ +No blogs here yet!!! diff --git a/docs/contact b/docs/contact new file mode 100644 index 0000000..7ac968b --- /dev/null +++ b/docs/contact @@ -0,0 +1,12 @@ +

how 2 contact?

+ +
+
E-mail
+
[REDACTED] (working on it)
+
IRC
+
anelli (not registered everywhere though)
+
XMPP
+
anelli@pastanoggin.com
+
+ +

yay!

diff --git a/docs/links b/docs/links new file mode 100644 index 0000000..0d7174a --- /dev/null +++ b/docs/links @@ -0,0 +1,33 @@ +

-because search engines suck :b

+ +

my button :3

+
+ button to https://pastanoggin.com +
<a href="https://pastanoggin.com"><img src="https://pastanoggin.com/static/badge.png" alt="button to https://pastanoggin.com"></a>
+
+ +

kin

+ + +

preddy

+ + +

tech

+ + +

other

+ diff --git a/docs/root b/docs/root new file mode 100644 index 0000000..8bd8e37 --- /dev/null +++ b/docs/root @@ -0,0 +1,24 @@ +
+

"DO YOU HAVE A GRIMOIRE, SHITASS????"

+- My friend +
+
+ +

Hello, this is alex/anelli/noodle/etc,

+

I think personal websites are way cooler than social media so hi. After surfing some neocities-like websites i was like "daym this is fun" (check out my favourites in the links page); so I'm trying to make a funny website too with blackjack and hookers as the cool kids say. I'll also blog and host code here for the lols.

+ +

Likes:

+ + +

Dislikes:

+ diff --git a/docs/status b/docs/status new file mode 100644 index 0000000..500b2c2 --- /dev/null +++ b/docs/status @@ -0,0 +1 @@ +openbsd vs freebsd rap battle diff --git a/perl.cgi b/perl.cgi new file mode 100755 index 0000000..d7a1476 --- /dev/null +++ b/perl.cgi @@ -0,0 +1,70 @@ +#!/usr/bin/perl +use strict; +use warnings; +use open qw< :encoding(UTF-8) >; + +my $BASEDIR = "/htdocs/pastanoggin.com"; +my $base_filename = "$BASEDIR/docs/base"; +my $status_filename = "$BASEDIR/docs/status"; + +sub print_file { + my $filename = shift; + my $file = undef; + open($file, "<", $filename) + or die "$0: can't open $filename for reading: $!"; + print while (<$file>); + die "unexpected error while reading from $filename: $!" if $! +} + +sub print_header { + my $code = shift; + print <<~END; + Status: $code + Content-Type: text/html + + END +} + +sub render_page { + my ($docname, $doctitle) = @_; + my $doc_filename = "$BASEDIR/docs/$docname"; + + my $base_file = undef; + open($base_file, "<", $base_filename) + or die "$0: can't open $base_filename for reading: $!"; + + # print header and contents + print_header 200; + while (<$base_file>) { + if (/\[%title%\]/) { + print "$doctitle"; + } elsif (/\[%content%\]/) { + print_file $doc_filename; + } elsif (/\[%status%\]/) { + print_file "$status_filename"; + } else { + print; + } + } + die "unexpected error while reading from $base_filename: $!" if $! +} + +sub render_error { + my $errcode = shift; + print_header $errcode; + print_file "$BASEDIR/docs/${errcode}.html"; +} + +my $path = $ENV{'PATH_INFO'} || '/'; + +if ($path =~ /^\/?$/) { + render_page 'root', 'pastanoggin!!'; +} elsif ($path =~ /^\/contact\/?$/) { + render_page 'contact', 'hello, is it me you\'re looking for?'; +} elsif ($path =~ /^\/blog\/?$/) { + render_page 'blog', 'yapyapyapyap :D'; +} elsif ($path =~ /^\/links\/?$/) { + render_page 'links', 'the interwebs'; +} else { + render_error '404'; +} diff --git a/static/badge.png b/static/badge.png new file mode 100644 index 0000000..08375c5 Binary files /dev/null and b/static/badge.png differ diff --git a/static/banner.png b/static/banner.png new file mode 100644 index 0000000..1f8960d Binary files /dev/null and b/static/banner.png differ diff --git a/static/blunt.png b/static/blunt.png new file mode 100644 index 0000000..b0cff36 Binary files /dev/null and b/static/blunt.png differ diff --git a/static/created_by_a_human.png b/static/created_by_a_human.png new file mode 100644 index 0000000..4dca2c0 Binary files /dev/null and b/static/created_by_a_human.png differ diff --git a/static/cursor.png b/static/cursor.png new file mode 100644 index 0000000..bf18a13 Binary files /dev/null and b/static/cursor.png differ diff --git a/static/gay.gif b/static/gay.gif new file mode 100644 index 0000000..7bfa068 Binary files /dev/null and b/static/gay.gif differ diff --git a/static/header.png b/static/header.png new file mode 100644 index 0000000..5f4d9b7 Binary files /dev/null and b/static/header.png differ diff --git a/static/main.css b/static/main.css new file mode 100644 index 0000000..f54c149 --- /dev/null +++ b/static/main.css @@ -0,0 +1,168 @@ +:root { + --color-grey: #222222; + --text-color: #f9f9f9; + --color-purple: #8f60af; + --background-img: url(/static/tile.png); + --banner-img: url(/static/banner.png); +} + +* { + cursor: url("/static/cursor.png"), auto; +} + +body { + min-width: 20rem; + max-width: 60rem; + margin: auto; + padding: 1em; + color: var(--text-color); + background-image: var(--background-img); + display: flex; + gap: 1em; + flex-wrap: wrap; + flex-direction: row-reverse; +} + +header { + flex-basis: 100%; + display: flex; + position: relative; + justify-content: center; +} + +nav { + flex-basis: 10%; + flex-grow: 1; + display: flex; + align-items: start; +} + +main { + flex-basis: 70%; + flex-grow: 1; +} + +footer { + flex-basis: 100%; + display: flex; + flex-wrap: wrap; + gap: 0.5em; +} + +a { + color: lightblue; +} + +.nav-list { + width: 100%; + margin: 0; + padding: 0; + list-style: none; + display: flex; + gap: 1em; + flex-wrap: wrap; +} + +.nav-item { + flex-grow: 1; + flex-shrink: 1; + flex-basis: 0; + display: flex; +} + +.box { + padding: 1em; + border-style: groove; + border-width: 0.5em; + background-color: var(--color-grey); + border-color: var(--color-purple); +} + +.lighten:hover { + filter: brightness(110%); +} + +.nav-link { + width: 100%; + text-align: center; + align-content: center; + color: var(--color-grey); + text-decoration: none; + background: var(--color-purple); + border-style: outset; + border-color: var(--color-purple); + padding: 0.5em; + font-family: monospace; + font-weight: bold; + font-size: 1.5em; +} + +.nav-link:hover { + filter: brightness(130%); +} + +.buttonbadge { + width: 88px; + height: 31px; + vertical-align: middle; +} + +.codeblock { + white-space: pre-wrap; + word-break: break-all; + background: black; + color: lightgreen; +} + +#banner { + max-width: 100%; + object-fit: contain; + image-rendering: pixelated; +} + +#construction { + position: absolute; + bottom: 0; + right: 0; + height: auto; + width: 30%; + max-width: 125px; + max-height: 100%; +} + +#status { + margin: 0; + background-color: #8f60af; + color: var(--color-grey); + border-radius: 1.5em; + padding: 0.5em; + display: flex; + align-items: center; + gap: 1em; + flex-basis: 100%; + border-color: var(--color-grey); + border-width: 0.1em; + border-style: solid; +} + +#status-header { + padding: 0.1em 1em; + background: white; + height: 100%; + border-radius: 1em; + text-align: center; + align-content: center; +} + +#status-body { + margin: 0; + font-size: 1.2em; + color: white; + word-break: break-word; +} + +@media only screen and (min-width: 800px) { + ul { + flex-direction: column; + } +} diff --git a/static/mothracompat.gif b/static/mothracompat.gif new file mode 100644 index 0000000..3ec3731 Binary files /dev/null and b/static/mothracompat.gif differ diff --git a/static/obsd.jpg b/static/obsd.jpg new file mode 100644 index 0000000..c7edfef Binary files /dev/null and b/static/obsd.jpg differ diff --git a/static/tile.png b/static/tile.png new file mode 100644 index 0000000..a5ddb12 Binary files /dev/null and b/static/tile.png differ diff --git a/static/under_construction.png b/static/under_construction.png new file mode 100644 index 0000000..27189c0 Binary files /dev/null and b/static/under_construction.png differ -- cgit v1.2.3