Initial Commit
This commit is contained in:
commit
1d85bf6663
7 changed files with 377 additions and 0 deletions
61
index.php
Normal file
61
index.php
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
<?php
|
||||
$db = new SQLite3(__DIR__ . '/mentalnet_funnies.db');
|
||||
$res = $db->query('SELECT * FROM comics ORDER BY date_added DESC');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>MentalNet Funnies</title>
|
||||
<style>
|
||||
body {
|
||||
background:#111;
|
||||
color:#eee;
|
||||
font-family: monospace;
|
||||
text-align: center;
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
h1 {
|
||||
margin: 1rem 0;
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
h2 {
|
||||
font-size: 1.1rem;
|
||||
margin: 0.5rem 0;
|
||||
}
|
||||
img {
|
||||
width: 95%;
|
||||
max-width: 640px;
|
||||
border-radius: 8px;
|
||||
margin: 0.75rem auto;
|
||||
box-shadow: 0 0 10px #222;
|
||||
}
|
||||
p {
|
||||
margin: 0.5rem auto;
|
||||
width: 90%;
|
||||
line-height: 1.4;
|
||||
}
|
||||
small {
|
||||
color: #888;
|
||||
}
|
||||
@media (max-width: 600px) {
|
||||
h1 { font-size: 1.3rem; }
|
||||
img { width: 98%; border-radius: 6px; }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>🧠 MentalNet Funnies</h1>
|
||||
<?php while($row=$res->fetchArray()): ?>
|
||||
<div>
|
||||
<h2><?= htmlspecialchars($row['title']) ?></h2>
|
||||
<img src="uploads/<?= htmlspecialchars($row['filename']) ?>" alt="<?= htmlspecialchars($row['title']) ?>">
|
||||
<p><?= nl2br(htmlspecialchars($row['description'])) ?></p>
|
||||
<p><small><?= htmlspecialchars($row['date_added']) ?></small></p>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue