add gnu freefont, fix nsfw css, add header function

This commit is contained in:
Your Name 2025-10-13 16:49:39 -04:00
parent 5ae683fccd
commit f114e23c4b
10 changed files with 35 additions and 22 deletions

View file

@ -1,4 +1,4 @@
/css/img/bg.png: * /css/img/bg.png:
https://commons.wikimedia.org/wiki/File:Snowflake11_2.png https://commons.wikimedia.org/wiki/File:Snowflake11_2.png
Captcha font: * /static/captchafont.ttf:
https://www.gnu.org/software/freefont/ https://www.gnu.org/software/freefont/

View file

@ -3,6 +3,10 @@ error_reporting(E_ERROR | E_PARSE);
define("bannedhosts", array("google.com")); define("bannedhosts", array("google.com"));
define("sitename", "Eternal Winter"); define("sitename", "Eternal Winter");
define("dbfile", "secrets/eternalwinter.db"); define("dbfile", "secrets/eternalwinter.db");
define("static", "/static");
define("banner", "banner.jpg");
define("css", "main.css");
define("captchafont", "captchafont.ttf");
define("footer", '<small>- 🄯 <a href="https://www.xmpub.org">xmpub</a> -<br>Est. Oct 12, 2025</small>'); define("footer", '<small>- 🄯 <a href="https://www.xmpub.org">xmpub</a> -<br>Est. Oct 12, 2025</small>');
define("categories", array( define("categories", array(
"blog" => "Blog", "blog" => "Blog",
@ -26,5 +30,16 @@ define("categories", array(
"other-nothttp" => "Other (nonhttp)" "other-nothttp" => "Other (nonhttp)"
)); ));
function head($title=null) {
echo("<head>");
echo('<link rel="stylesheet" href="' . constant("static") . "/css/" . constant("css") . '" id="pagestyle">');
echo('<title>' . constant("sitename"));
if ($title) {
echo(" | " . $title);
}
echo("</title>");
echo("</head>");
}
?> ?>

View file

@ -1,13 +1,10 @@
<html>
<?php <?php
include 'config.php'; include 'config.php';
head();
?> ?>
<html>
<head>
<link rel="stylesheet" href="/css/main.css" id="pagestyle">
<title><?php echo constant("sitename"); ?></title>
</head>
<body> <body>
<img class="banner" src="/banner.webp" /><br> <img class="banner" src="<?php echo constant('static') . '/img/' . constant('banner'); ?>" /><br>
<div class="about"> <div class="about">
<p><?php echo constant("sitename"); ?> lets you discover and share niche, non-corporate, hobby websites with others by submitting them to our database.<br>It's intended to help small forum operators, blog authors, and anyone else with a small website recieve traffic without having to market their site.</p> <p><?php echo constant("sitename"); ?> lets you discover and share niche, non-corporate, hobby websites with others by submitting them to our database.<br>It's intended to help small forum operators, blog authors, and anyone else with a small website recieve traffic without having to market their site.</p>
</div> </div>

View file

@ -1,11 +1,8 @@
<html>
<?php <?php
include 'config.php'; include 'config.php';
head("Rules");
?> ?>
<html>
<head>
<link rel="stylesheet" href="/css/main.css" id="pagestyle">
<title><?php echo constant("sitename"); ?> | Rules</title>
</head>
<body> <body>
<h1>Rules</h1> <h1>Rules</h1>
<div style="text-align: left;"> <div style="text-align: left;">

View file

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 118 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 972 B

After

Width:  |  Height:  |  Size: 972 B

Before After
Before After

View file

@ -3,7 +3,7 @@ html {
font-family: "MS Gothic"; font-family: "MS Gothic";
margin: auto; margin: auto;
background-color: #a9f; background-color: #a9f;
background-image: url("/css/img/bg.png"); background-image: url("/static/css/img/bg.png");
background-size: 100px 100px; background-size: 100px 100px;
} }
@ -27,7 +27,7 @@ hr {
.about { .about {
background-color: lightyellow; background-color: lightyellow;
border: 1px dashed black; border: 1px dashed black;
background-image: url("/css/img/paper.webp"); background-image: url("/static/css/img/paper.webp");
background-blend-mode: multiply; background-blend-mode: multiply;
margin-top: 10px; margin-top: 10px;
margin-bottom: 10px; margin-bottom: 10px;
@ -74,7 +74,14 @@ td {
} }
tr:nth-child(even) { tr:nth-child(even) {
background-color: #ffe; background-color: #ffe;
.nsfw {
background-color: #f99;
}
} }
.nsfw {
background-color: #f99;
}
th { th {
border-bottom: 1px solid #177; border-bottom: 1px solid #177;
background-color: #9f9; background-color: #9f9;
@ -99,9 +106,6 @@ input[type=text] {
select { select {
background-color: #fcf; background-color: #fcf;
} }
.nsfw {
background-color: #f99;
}
.selectedpage { .selectedpage {
background-color: #ef9; background-color: #ef9;
} }

BIN
static/img/banner.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View file

@ -72,12 +72,12 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
die(); die();
} }
} }
?> ?>
<html> <html>
<head> <?php
<link rel="stylesheet" href="/css/main.css" id="pagestyle"> head("Submit");
<title><?php echo constant("sitename"); ?> | Submit</title> ?>
</head>
<body> <body>
<h1>Submit Site</h1> <h1>Submit Site</h1>
<div class="about" style="background-color: #eef;"> <div class="about" style="background-color: #eef;">