initial upload

This commit is contained in:
~keith 2024-05-04 15:04:02 -04:00
commit 1678e933cb
Signed by: keith
GPG key ID: 5BEBEEAB2C73D520
231 changed files with 1918 additions and 0 deletions

19
README.md Normal file
View file

@ -0,0 +1,19 @@
# Public PHP for ~keith's Web site
This repository contains the core PHP scripts that power [my Web site](https://keithhacks.cyou/).
It's a bit of a spaghetti monster in here - I want to clean this up and turn it into a nice, shiny framework eventually.
BTW, this is [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/) like the rest of my site. I'd be happy to see this help other people make their own Web sites.
## What The Hell Am I Looking At?!
Pretty much everything of note is in the `sys/` directory.
`sys/templating.php` is a simple template system. It lets you define the layout of your site in one place, so you don't have to rewrite all the `<html> <head> </head> <body> ...` nonsense on every single page. Check out `sys/default_template.php` and `about_copyleft.php` to see how it's used.
`sys/navbar.php` is the code that renders the navigator. `sys/site.php` holds the sitemap it uses, and a couple other things.
Outside of `sys/`, there's also:
- SCSS stylesheets in `css/`. Just run `make` in that directory.
- `git-post-receive-hook.sh`, which needs to be placed at `.git/hooks/post-receive` on your Web server if you're using the site changelog.
- Assets which we won't worry about :-) (The icons in `assets/hicolor/` are from KDE 3, though.)

29
about_copyleft.php Normal file
View file

@ -0,0 +1,29 @@
<?php
require_once $_SERVER["DOCUMENT_ROOT"]."/sys/site.php";
$page = Page::this("Copyleft");
require_once $_SERVER["DOCUMENT_ROOT"]."/sys/default_template.php";
default_template($page);
slot_begin("main"); ?>
<main>
<section id="summary">
<h1>The gist</h1>
<p>Almost everything on this Web site is <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a>.</p>
<p>Basically, you can do whatever you want with my stuff. I <b>encourage</b> you to repost it, edit it, anything you like! As long as you:</p>
<ul>
<li>Allow others to modify and redistribute your version, too.</li>
<li>Don't sell it, monetize it, or otherwise try to make money from it.</li>
<li>Credit me - it's as easy as saying "~keith made the original" and linking to this Web site.</li>
</ul>
</section>
<section id="sourcecode">
<h1>Source code</h1>
<p><b>However</b>, any code I publish is licensed under the <a href="https://www.gnu.org/licenses/agpl-3.0.html">GNU AGPLv3</a> instead (unless I say otherwise).</p>
</p>Essentially, this means that if you publish a modified version of my software, or a program that uses my software, you have to publish your source code along with it, under the same license. You also have to disclose the source code if you run my software as an online service.</p>
</section>
</main>
<?php slot_end(); ?>

4
assets/.htaccess Normal file
View file

@ -0,0 +1,4 @@
<IfModule mod_headers.c>
# Cache assets for a week
Header set Cache-Control "max-age=604800,public,no-transform"
</IfModule>

BIN
assets/b_btn.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 B

BIN
assets/b_btnpush.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

BIN
assets/b_btnring.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

BIN
assets/b_defbtn.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

BIN
assets/b_frame.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 B

BIN
assets/b_gen.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 B

BIN
assets/b_genpush.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 B

BIN
assets/b_keycap.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 B

BIN
assets/b_keycap2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 B

BIN
assets/b_text.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 B

BIN
assets/b_textdis.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 B

BIN
assets/b_winframe.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 B

BIN
assets/b_winframe2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

BIN
assets/b_winframe2err.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 B

BIN
assets/b_winnote.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 B

BIN
assets/b_wintitle.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B

BIN
assets/b_wintitle2err.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 B

BIN
assets/ball.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
assets/bull_arrow.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 B

BIN
assets/bull_arrow_down.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 B

BIN
assets/bull_arrow_in.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 B

BIN
assets/bull_diamond.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 B

BIN
assets/bull_diamond_in.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 B

BIN
assets/bull_diamond_red.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 B

BIN
assets/canyon.mid Normal file

Binary file not shown.

BIN
assets/checkbox.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 B

BIN
assets/coffeebean.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

BIN
assets/coffeebean2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 777 B

BIN
assets/coffeebean_dark.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
assets/coffeebean_dark2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
assets/coffeebean_light.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

BIN
assets/coin_bch.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

BIN
assets/coin_btc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 B

BIN
assets/coin_eth.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 409 B

BIN
assets/coin_ltc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 B

BIN
assets/coin_wow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 439 B

BIN
assets/coin_xmr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

BIN
assets/colarrow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

BIN
assets/error.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

BIN
assets/error_big.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/error_big2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,42 @@
@font-face {
font-family: 'IBM Plex Serif';
font-style: normal;
font-weight: 400;
src: url(/assets/fonts/IBMPlexSerif-400.woff2) format('woff2');
font-display: swap;
}
@font-face {
font-family: 'IBM Plex Serif';
font-style: italic;
font-weight: 400;
src: url(/assets/fonts/IBMPlexSerif-400i.woff2) format('woff2');
font-display: swap;
}
@font-face {
font-family: 'IBM Plex Serif';
font-style: normal;
font-weight: 500;
src: url(/assets/fonts/IBMPlexSerif-500.woff2) format('woff2');
font-display: swap;
}
@font-face {
font-family: 'IBM Plex Serif';
font-style: italic;
font-weight: 500;
src: url(/assets/fonts/IBMPlexSerif-500i.woff2) format('woff2');
font-display: swap;
}
@font-face {
font-family: 'IBM Plex Serif';
font-style: normal;
font-weight: 700;
src: url(/assets/fonts/IBMPlexSerif-700.woff2) format('woff2');
font-display: swap;
}
@font-face {
font-family: 'IBM Plex Serif';
font-style: italic;
font-weight: 700;
src: url(/assets/fonts/IBMPlexSerif-700i.woff2) format('woff2');
font-display: swap;
}

4
assets/hicolor/.htaccess Normal file
View file

@ -0,0 +1,4 @@
<IfModule mod_headers.c>
# Cache icons for 2 months
Header set Cache-Control "max-age=5184000,public,no-transform"
</IfModule>

BIN
assets/hicolor/applix.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 888 B

BIN
assets/hicolor/binary2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/hicolor/cdtrack.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 968 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 664 B

BIN
assets/hicolor/colorscm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/hicolor/core.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

BIN
assets/hicolor/deb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 929 B

BIN
assets/hicolor/document.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 762 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 777 B

BIN
assets/hicolor/dvi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,023 B

BIN
assets/hicolor/exec.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 857 B

BIN
assets/hicolor/folder.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 870 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 796 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 800 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 796 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 684 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 777 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 925 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 978 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,016 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 829 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 946 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 796 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 725 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 800 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 945 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 724 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 800 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 956 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 944 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,021 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 796 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 927 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 721 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 800 B

Some files were not shown because too many files have changed in this diff Show more