initial upload
19
README.md
Normal 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
|
@ -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
|
@ -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
After Width: | Height: | Size: 128 B |
BIN
assets/b_btnpush.gif
Normal file
After Width: | Height: | Size: 129 B |
BIN
assets/b_btnring.gif
Normal file
After Width: | Height: | Size: 170 B |
BIN
assets/b_defbtn.gif
Normal file
After Width: | Height: | Size: 209 B |
BIN
assets/b_frame.gif
Normal file
After Width: | Height: | Size: 120 B |
BIN
assets/b_gen.gif
Normal file
After Width: | Height: | Size: 103 B |
BIN
assets/b_genpush.gif
Normal file
After Width: | Height: | Size: 124 B |
BIN
assets/b_keycap.gif
Normal file
After Width: | Height: | Size: 116 B |
BIN
assets/b_keycap2.gif
Normal file
After Width: | Height: | Size: 116 B |
BIN
assets/b_text.gif
Normal file
After Width: | Height: | Size: 67 B |
BIN
assets/b_textdis.gif
Normal file
After Width: | Height: | Size: 64 B |
BIN
assets/b_winframe.gif
Normal file
After Width: | Height: | Size: 118 B |
BIN
assets/b_winframe2.gif
Normal file
After Width: | Height: | Size: 111 B |
BIN
assets/b_winframe2err.gif
Normal file
After Width: | Height: | Size: 115 B |
BIN
assets/b_winnote.gif
Normal file
After Width: | Height: | Size: 151 B |
BIN
assets/b_wintitle.gif
Normal file
After Width: | Height: | Size: 104 B |
BIN
assets/b_wintitle2err.gif
Normal file
After Width: | Height: | Size: 103 B |
BIN
assets/ball.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
assets/bull_arrow.gif
Normal file
After Width: | Height: | Size: 77 B |
BIN
assets/bull_arrow_down.gif
Normal file
After Width: | Height: | Size: 75 B |
BIN
assets/bull_arrow_down_in.gif
Normal file
After Width: | Height: | Size: 75 B |
BIN
assets/bull_arrow_in.gif
Normal file
After Width: | Height: | Size: 77 B |
BIN
assets/bull_diamond.gif
Normal file
After Width: | Height: | Size: 100 B |
BIN
assets/bull_diamond_blue.gif
Normal file
After Width: | Height: | Size: 79 B |
BIN
assets/bull_diamond_cyan.gif
Normal file
After Width: | Height: | Size: 79 B |
BIN
assets/bull_diamond_green.gif
Normal file
After Width: | Height: | Size: 79 B |
BIN
assets/bull_diamond_in.gif
Normal file
After Width: | Height: | Size: 79 B |
BIN
assets/bull_diamond_magenta.gif
Normal file
After Width: | Height: | Size: 79 B |
BIN
assets/bull_diamond_red.gif
Normal file
After Width: | Height: | Size: 79 B |
BIN
assets/bull_diamond_yellow.gif
Normal file
After Width: | Height: | Size: 79 B |
BIN
assets/canyon.mid
Normal file
BIN
assets/checkbox.gif
Normal file
After Width: | Height: | Size: 377 B |
BIN
assets/coffeebean.gif
Normal file
After Width: | Height: | Size: 7 KiB |
BIN
assets/coffeebean2.gif
Normal file
After Width: | Height: | Size: 777 B |
BIN
assets/coffeebean_dark.gif
Normal file
After Width: | Height: | Size: 6.6 KiB |
BIN
assets/coffeebean_dark2.gif
Normal file
After Width: | Height: | Size: 6.6 KiB |
BIN
assets/coffeebean_light.gif
Normal file
After Width: | Height: | Size: 7 KiB |
BIN
assets/coin_bch.png
Normal file
After Width: | Height: | Size: 437 B |
BIN
assets/coin_btc.png
Normal file
After Width: | Height: | Size: 395 B |
BIN
assets/coin_eth.png
Normal file
After Width: | Height: | Size: 409 B |
BIN
assets/coin_ltc.png
Normal file
After Width: | Height: | Size: 388 B |
BIN
assets/coin_wow.png
Normal file
After Width: | Height: | Size: 439 B |
BIN
assets/coin_xmr.png
Normal file
After Width: | Height: | Size: 441 B |
BIN
assets/colarrow.png
Normal file
After Width: | Height: | Size: 265 B |
BIN
assets/entry_of_the_gladiators.mp3
Normal file
BIN
assets/error.png
Normal file
After Width: | Height: | Size: 627 B |
BIN
assets/error_big.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/error_big2.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/favicon.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
assets/fonts/IBMPlexSerif-400.woff2
Normal file
BIN
assets/fonts/IBMPlexSerif-400i.woff2
Normal file
BIN
assets/fonts/IBMPlexSerif-500.woff2
Normal file
BIN
assets/fonts/IBMPlexSerif-500i.woff2
Normal file
BIN
assets/fonts/IBMPlexSerif-700.woff2
Normal file
BIN
assets/fonts/IBMPlexSerif-700i.woff2
Normal file
42
assets/fonts/plex-serif.css
Normal 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
|
@ -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
After Width: | Height: | Size: 888 B |
BIN
assets/hicolor/binary2.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/hicolor/cdtrack.png
Normal file
After Width: | Height: | Size: 968 B |
BIN
assets/hicolor/clipboard.png
Normal file
After Width: | Height: | Size: 664 B |
BIN
assets/hicolor/colorscm.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/hicolor/core.png
Normal file
After Width: | Height: | Size: 1 KiB |
BIN
assets/hicolor/deb.png
Normal file
After Width: | Height: | Size: 929 B |
BIN
assets/hicolor/document.png
Normal file
After Width: | Height: | Size: 762 B |
BIN
assets/hicolor/document2.png
Normal file
After Width: | Height: | Size: 777 B |
BIN
assets/hicolor/dvi.png
Normal file
After Width: | Height: | Size: 1,023 B |
BIN
assets/hicolor/exec.png
Normal file
After Width: | Height: | Size: 857 B |
BIN
assets/hicolor/folder.png
Normal file
After Width: | Height: | Size: 870 B |
BIN
assets/hicolor/folder_blue.png
Normal file
After Width: | Height: | Size: 730 B |
BIN
assets/hicolor/folder_blue_open.png
Normal file
After Width: | Height: | Size: 796 B |
BIN
assets/hicolor/folder_cyan.png
Normal file
After Width: | Height: | Size: 726 B |
BIN
assets/hicolor/folder_cyan_open.png
Normal file
After Width: | Height: | Size: 800 B |
BIN
assets/hicolor/folder_green.png
Normal file
After Width: | Height: | Size: 726 B |
BIN
assets/hicolor/folder_green_open.png
Normal file
After Width: | Height: | Size: 796 B |
BIN
assets/hicolor/folder_grey.png
Normal file
After Width: | Height: | Size: 684 B |
BIN
assets/hicolor/folder_grey_open.png
Normal file
After Width: | Height: | Size: 777 B |
BIN
assets/hicolor/folder_home.png
Normal file
After Width: | Height: | Size: 925 B |
BIN
assets/hicolor/folder_html.png
Normal file
After Width: | Height: | Size: 978 B |
BIN
assets/hicolor/folder_image.png
Normal file
After Width: | Height: | Size: 1,016 B |
BIN
assets/hicolor/folder_locked.png
Normal file
After Width: | Height: | Size: 829 B |
BIN
assets/hicolor/folder_man.png
Normal file
After Width: | Height: | Size: 946 B |
BIN
assets/hicolor/folder_open.png
Normal file
After Width: | Height: | Size: 796 B |
BIN
assets/hicolor/folder_orange.png
Normal file
After Width: | Height: | Size: 725 B |
BIN
assets/hicolor/folder_orange_open.png
Normal file
After Width: | Height: | Size: 800 B |
BIN
assets/hicolor/folder_print2.png
Normal file
After Width: | Height: | Size: 945 B |
BIN
assets/hicolor/folder_red.png
Normal file
After Width: | Height: | Size: 724 B |
BIN
assets/hicolor/folder_red_open.png
Normal file
After Width: | Height: | Size: 800 B |
BIN
assets/hicolor/folder_sound.png
Normal file
After Width: | Height: | Size: 967 B |
BIN
assets/hicolor/folder_tar.png
Normal file
After Width: | Height: | Size: 956 B |
BIN
assets/hicolor/folder_txt.png
Normal file
After Width: | Height: | Size: 944 B |
BIN
assets/hicolor/folder_video.png
Normal file
After Width: | Height: | Size: 1,021 B |
BIN
assets/hicolor/folder_violet.png
Normal file
After Width: | Height: | Size: 726 B |
BIN
assets/hicolor/folder_violet_open.png
Normal file
After Width: | Height: | Size: 796 B |
BIN
assets/hicolor/folder_wordprocessing.png
Normal file
After Width: | Height: | Size: 927 B |
BIN
assets/hicolor/folder_yellow.png
Normal file
After Width: | Height: | Size: 721 B |
BIN
assets/hicolor/folder_yellow_open.png
Normal file
After Width: | Height: | Size: 800 B |