diff --git a/app/bootstrap.php b/app/bootstrap.php index 61dd45c..b534d00 100644 --- a/app/bootstrap.php +++ b/app/bootstrap.php @@ -8,11 +8,11 @@ */ ini_set('display_errors', 'On'); -error_reporting(E_ALL | E_STRICT); +error_reporting(E_ALL); session_start(); -require_once('../app/library.php'); +require_once '../app/library.php'; // ---------------------------------------------------------------------------- // // ---------------------------------------------------------------------------- // @@ -26,6 +26,7 @@ const MAP = [ 'Show' => 'models/Show.php', 'User' => 'models/User.php', + 'Router' => 'router.php', 'Database' => 'modules/Database.php', 'CommunityModule' => 'modules/CommunityModule.php', 'DisplayModule' => 'modules/DisplayModule.php', diff --git a/app/library.php b/app/library.php index 95d8531..1557665 100755 --- a/app/library.php +++ b/app/library.php @@ -71,15 +71,15 @@ // Hash a password thousands of times using a random salt. function hashPass($password, $salt, $username = "failure") { for($round = 0; $round < 124363; $round++) { - $HashedPass = hash("sha512", $username . $salt . $password); + $HashedPass = hash("sha512", $username . $salt . $password); } return $HashedPass; } function generateSalt(int $length = 15): string - { - return bin2hex(random_bytes($length)); + { + return bin2hex(random_bytes($length)); } // Validate the email address inputted! diff --git a/app/modules/DisplayModule.php b/app/modules/DisplayModule.php index 9553720..dc197b5 100755 --- a/app/modules/DisplayModule.php +++ b/app/modules/DisplayModule.php @@ -40,27 +40,18 @@ /* --- Module Functions - the meat and purpose of the module. --- */ public function Articles($limit) { + $articles = Database::select('articles', 'id', '', 'articleDate DESC', $limit)->fetchAll(); - $db = new DatabaseModule(); - - $articles = $db->getData('ms_articles', 'id', '', 'LIMIT ' . $limit, 'ORDER BY articleDate DESC'); - - if($db->countRows('ms_articles', '') > 0) { - + if(count($articles)) { foreach($articles as $articleID) { - $article = new Article($articleID['id']); $author = new User($article->Author); - echo ParseTemplate($this->ListedArticle, array('t' => magicClean($article->Title), 'l' => "blog.php?do=read&article=" . $article->ID, 'd' => BBCode(magicClean($article->Description)), 'co' => $this->BlogCovers . $article->Cover, 'u' => $author->Username, 'pd' => $article->PostDate, 'c' => $article->Comments)); - + echo render('articles/listedarticle', ['t' => magicClean($article->Title), 'l' => "blog.php?do=read&article=" . $article->ID, 'd' => BBCode(magicClean($article->Description)), 'co' => $this->BlogCovers . $article->Cover, 'u' => $author->Username, 'pd' => $article->PostDate, 'c' => $article->Comments]); } - } else { - echo 'Hmm. Strangely enough, we don\'t have any articles!'; } - } /* ------------------------------------------------------------------------------------------------------- */ @@ -68,7 +59,7 @@ /* Display Articles - display a slider-like list of projects. */ public function Projects($type) { - +/* $db = new DatabaseModule(); $projects = $db->getData('ms_projects', 'id', 'WHERE type="' . $type . '"', '', 'ORDER BY id DESC'); @@ -91,7 +82,7 @@ echo "

It seems we have no " . strtolower($type) . "s.

"; } - +*/ } /* ------------------------------------------------------------------------------------------------------- */ @@ -99,6 +90,7 @@ /* Display Featured - display an assorted set of featured content in the sidebar. */ public function sideFeatured($what) { + /* $db = new DatabaseModule; // prepare SQL statements @@ -116,6 +108,7 @@ // display the article echo ParseTemplate($this->FeaturedArticle, array('id' => $featured->ID, 'c' => $this->BlogCovers . $featured->Cover, 't' => $featured->Title)); } + */ } /* ------------------------------------------------------------------------------------------------------- */ @@ -123,6 +116,7 @@ /* Display Front Page Articles - specially formatted for the front page */ public function frontPageArticles() { + /* $db = new DatabaseModule(); $getArticles = $db->Handle->prepare('SELECT id FROM ms_articles ORDER BY articleDate DESC LIMIT 5'); @@ -168,6 +162,7 @@ FIRST; ARTICLE; } } + */ } /* ------------------------------------------------------------------------------------------------------- */ @@ -175,15 +170,15 @@ ARTICLE; /* Display an article for reading - when a user wants to read an article, we give it to them in this format. */ public function articleForReading($id) { - + /* $article = new Article($id); $author = new User($article->Author); echo ParseTemplate($this->Article4Reading, array('title' => $article->Title, 'date' => $article->PostDate, 'author' => $author->Username, 'cover' => $this->BlogCovers . $article->Cover, 'content' => BBCode(magicClean($article->Content)))); - + */ /* ----------------------------------- */ /* -------- Article Comments --------- */ - + /* echo " "; if($article->Comments == 1) { $oneOrMore = $article->Comments . " Comment"; } else { $oneOrMore = $article->Comments . " Comments"; } @@ -218,7 +213,7 @@ ARTICLE; if(!empty($_COOKIE['UserCookie'])) { echo ParseTemplate($this->CommentForm, array('aid' => $_GET['article'])); } echo ''; - + */ } /* ------------------------------------------------------------------------------------------------------- */ diff --git a/app/router.php b/app/router.php new file mode 100644 index 0000000..eacdcdf --- /dev/null +++ b/app/router.php @@ -0,0 +1,183 @@ +add($routes, 'GET', '/posts/:id', function($id) { echo "Viewing post $id"; });` + */ + public function add(string $method, string $route, callable $handler): Router + { + $this->validateMethod($method); + $this->validateRoute($route); + + $segments = $route === '/' ? [''] : explode('/', trim($route, '/')); + + $node = &$this->routes; + foreach ($segments as $segment) { + $segment = str_starts_with($segment, ':') ? ':x' : $segment; + if ($segment === '') continue; + $node = &$node[$segment]; + } + + $node[$method] = [ + 'handler' => $handler, + 'middleware' => [] + ]; + + $this->last_inserted_node = &$node[$method]; + + return $this; + } + + /** + * Perform a lookup in the route tree for a given method and URI. Returns an array with a result code, + * a handler if found, and any dynamic parameters. Codes are 200 for success, 404 for not found, and + * 405 for method not allowed. + * + * @return array ['code', 'handler', 'params'] + */ + public function lookup(string $method, string $uri): array|int + { + $node = $this->routes; + $params = []; + + if ($uri === '/') return $node[$method] ?? 405; + + foreach (explode('/', trim($uri, '/')) as $segment) { + if (isset($node[$segment])) { + $node = $node[$segment]; + continue; + } + + if (isset($node[':x'])) { + $params[] = $segment; + $node = $node[':x']; + continue; + } + + return 404; + } + + $node[$method]['params'] = $params; + return $node[$method] ?? 405; + } + + /** + * Add a middleware function to the last inserted node's stack. + */ + public function middleware(callable $middleware): Router + { + $this->last_inserted_node['middleware'][] = $middleware; + return $this; + } + + /** + * Shorthand to register a GET route. + */ + public function get(string $route, callable $handler): Router + { + return $this->add('GET', $route, $handler); + } + + /** + * Shorthand to register a POST route. + */ + public function post(string $route, callable $handler): Router + { + return $this->add('POST', $route, $handler); + } + + /** + * Shorthand to register a PUT route. + */ + public function put(string $route, callable $handler): Router + { + return $this->add('PUT', $route, $handler); + } + + /** + * Shorthand to register a DELETE route. + */ + public function delete(string $route, callable $handler): Router + { + return $this->add('DELETE', $route, $handler); + } + + /** + * Shorthand to register a PATCH route. + */ + public function patch(string $route, callable $handler): Router + { + return $this->add('PATCH', $route, $handler); + } + + /** + * Register multiple verbs to the same route. + */ + public function many(array $methods, string $route, callable $handler): Router + { + foreach ($methods as $method) $this->add($method, $route, $handler); + return $this; + } + + /** + * Register all verbs to the same route. + */ + public function any(string $route, callable $handler): Router + { + foreach (SELF::VALID_METHODS as $method) $this->add($method, $route, $handler); + return $this; + } + + /** + * Some pages function entirely as forms; thus we can shorthand a GET/POST route. + */ + public function form(string $route, callable $handler): Router + { + return $this->many(['GET', 'POST'], $route, $handler); + } + + /** + * Validate the given method against valid HTTP verbs. + */ + private function validateMethod(string $method): void + { + if (!in_array($method, self::VALID_METHODS)) { + throw new InvalidArgumentException("Invalid HTTP method: $method"); + } + } + + /** + * Validate that a new route follows expected formatting. + */ + private function validateRoute(string $route): void + { + if ($route === '') { + throw new InvalidArgumentException("Route cannot be empty"); + } + + // Ensure route starts with a slash + if (!str_starts_with($route, '/')) { + throw new InvalidArgumentException("Route must start with a '/'"); + } + } +} diff --git a/app/templates/blog/list.php b/app/templates/blog/list.php index 4078b36..9ee5fcc 100755 --- a/app/templates/blog/list.php +++ b/app/templates/blog/list.php @@ -5,9 +5,7 @@

Mad Splash Blog

diff --git a/app/templates/blog/read.php b/app/templates/blog/read.php index 86a91ae..b9ac955 100755 --- a/app/templates/blog/read.php +++ b/app/templates/blog/read.php @@ -6,12 +6,6 @@ articleForReading($id); ?> diff --git a/app/templates/footer.php b/app/templates/footer.php index d679d51..0560671 100755 --- a/app/templates/footer.php +++ b/app/templates/footer.php @@ -1,32 +1,30 @@ - - +
+

PROJECTS

+ +
+ + + diff --git a/app/templates/header.php b/app/templates/header.php index 63cc50d..0cd3f66 100755 --- a/app/templates/header.php +++ b/app/templates/header.php @@ -11,31 +11,32 @@ - - + +
+ -
- +
+ -
+
+
+ + + + diff --git a/app/templates/supernav.php b/app/templates/supernav.php index 473a2d6..6c2c3d2 100755 --- a/app/templates/supernav.php +++ b/app/templates/supernav.php @@ -1,16 +1,16 @@
- -
+ +
Heyas, {$user[1]}! You can go to your User CP or logout.
- -
+ +
Hey there, Guest. You can login or register here.
- + -
+
  @@ -20,25 +20,14 @@
  • - + - The RPG
    - Our up-and-coming web-and-text-based RPG. Play! +

    + The RPG
    + Our up-and-coming web-and-text-based RPG. Play! +

  • - -
diff --git a/public/assets/css/CustomFonts.css b/public/assets/css/CustomFonts.css index bed82e6..cf9fc87 100755 --- a/public/assets/css/CustomFonts.css +++ b/public/assets/css/CustomFonts.css @@ -1,56 +1,56 @@ @font-face { font-family: 'Bebas'; - src: url('/assets/fonts/BebasNeue-webfont.eot'); - src: url('/assets/fonts/BebasNeue-webfont.eot?#iefix') format('embedded-opentype'), - url('/assets/fonts/BebasNeue-webfont.woff') format('woff'), - url('/assets/fonts/BebasNeue-webfont.ttf') format('truetype'), - url('/assets/fonts/BebasNeue-webfont.svg#BebasNeueRegular') format('svg'); + src: url('../fonts/BebasNeue-webfont.eot'); + src: url('../fonts/BebasNeue-webfont.eot?#iefix') format('embedded-opentype'), + url('../fonts/BebasNeue-webfont.woff') format('woff'), + url('../fonts/BebasNeue-webfont.ttf') format('truetype'), + url('../fonts/BebasNeue-webfont.svg#BebasNeueRegular') format('svg'); font-weight: normal; font-style: normal; } @font-face { font-family: "Minecraft"; - src: url("/assets/fonts/Minecraft_font.eot?") format("eot"), - url("/assets/fonts/Minecraft_font.woff") format("woff"), - url("/assets/fonts/Minecraft_font.ttf") format("truetype"), - url("/assets/fonts/Minecraft_font.svg#Minecraft") format("svg"); + src: url("../fonts/Minecraft_font.eot?") format("eot"), + url("../fonts/Minecraft_font.woff") format("woff"), + url("../fonts/Minecraft_font.ttf") format("truetype"), + url("../fonts/Minecraft_font.svg#Minecraft") format("svg"); font-weight:normal; font-style:normal; } @font-face { font-family: 'Candara'; - src: url('/assets/fonts/candara-webfont.eot'); - src: url('/assets/fonts/candara-webfont.eot?#iefix') format('embedded-opentype'), - url('/assets/fonts/candara-webfont.woff') format('woff'), - url('/assets/fonts/candara-webfont.ttf') format('truetype'), - url('/assets/fonts/candara-webfont.svg#CandaraRegular') format('svg'); + src: url('../fonts/candara-webfont.eot'); + src: url('../fonts/candara-webfont.eot?#iefix') format('embedded-opentype'), + url('../fonts/candara-webfont.woff') format('woff'), + url('../fonts/candara-webfont.ttf') format('truetype'), + url('../fonts/candara-webfont.svg#CandaraRegular') format('svg'); } @font-face { font-family: 'CandaraB'; - src: url('/assets/fonts/candarab-webfont.eot'); - src: url('/assets/fonts/candarab-webfont.eot?#iefix') format('embedded-opentype'), - url('/assets/fonts/candarab-webfont.woff') format('woff'), - url('/assets/fonts/candarab-webfont.ttf') format('truetype'), - url('/assets/fonts/candarab-webfont.svg#CandaraBold') format('svg'); + src: url('../fonts/candarab-webfont.eot'); + src: url('../fonts/candarab-webfont.eot?#iefix') format('embedded-opentype'), + url('../fonts/candarab-webfont.woff') format('woff'), + url('../fonts/candarab-webfont.ttf') format('truetype'), + url('../fonts/candarab-webfont.svg#CandaraBold') format('svg'); } @font-face { font-family: 'Handwriting'; - src: url('/assets/fonts/SF_Arch_Rival-webfont.eot'); - src: url('/assets/fonts/SF_Arch_Rival-webfont.eot?#iefix') format('embedded-opentype'), - url('/assets/fonts/SF_Arch_Rival-webfont.woff') format('woff'), - url('/assets/fonts/SF_Arch_Rival-webfont.ttf') format('truetype'), - url('/assets/fonts/SF_Arch_Rival-webfont.svg#sf_arch_rivalregular') format('svg'); + src: url('../fonts/SF_Arch_Rival-webfont.eot'); + src: url('../fonts/SF_Arch_Rival-webfont.eot?#iefix') format('embedded-opentype'), + url('../fonts/SF_Arch_Rival-webfont.woff') format('woff'), + url('../fonts/SF_Arch_Rival-webfont.ttf') format('truetype'), + url('../fonts/SF_Arch_Rival-webfont.svg#sf_arch_rivalregular') format('svg'); } @font-face { font-family: 'ZeroNero'; - src: url('/assets/fonts/zeronero-webfont.eot'); - src: url('/assets/fonts/zeronero-webfont.eot?#iefix') format('embedded-opentype'), - url('/assets/fonts/zeronero-webfont.woff') format('woff'), - url('/assets/fonts/zeronero-webfont.ttf') format('truetype'), - url('/assets/fonts/zeronero-webfont.svg#zeroneroblack') format('svg'); + src: url('../fonts/zeronero-webfont.eot'); + src: url('../fonts/zeronero-webfont.eot?#iefix') format('embedded-opentype'), + url('../fonts/zeronero-webfont.woff') format('woff'), + url('../fonts/zeronero-webfont.ttf') format('truetype'), + url('../fonts/zeronero-webfont.svg#zeroneroblack') format('svg'); } diff --git a/public/assets/css/MadSplash_v3.css b/public/assets/css/MadSplash_v3.css index 4a8e71e..d7877d7 100755 --- a/public/assets/css/MadSplash_v3.css +++ b/public/assets/css/MadSplash_v3.css @@ -1,11 +1,19 @@ +:root { + --std-box-shadow: rgba(0, 0, 0, 0.1); +} + /* @group High level */ -* { margin: 0; padding: 0; border: none; } +* { margin: 0; padding: 0; border: none; box-sizing: border-box; } *:focus { outline: none !important; } -html { background: #cacbca url(/assets/images/Backgrounds/NewOceanWave.jpg) fixed; +html { background: #cacbca url(/assets/images/Backgrounds/oceanwave.jpg) fixed; -webkit-background-size: cover; -o-background-size: cover; background-size: cover; } -body { font: 14px Arial, Helvetica, Geneva, sans-serif; margin: 0px 0px 0px 0px; color: #444; line-height: 18px; } +body { + color: #333; + font-size: 16px; + font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; +} a, a:visited { text-decoration: none; color: #4aa1ef; } a:hover { text-decoration: none; color: #008be8; cursor: pointer; } @@ -16,31 +24,52 @@ img.Emote { position: relative; top: 3px; } /* ------------------------------------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------------------------------------- */ +/* @group Container */ +.container { + width: 100%; + padding: 0 calc(var(--grid-gutter) / 2); + margin: 0 auto; +} + +@media (min-width: 576px) { .container { max-width: 540px; } } +@media (min-width: 768px) { .container { max-width: 720px; } } +@media (min-width: 992px) { .container { max-width: 960px; } } +@media (min-width: 1200px) { .container { max-width: 1170px; } } + +.container-fluid { + width: 100%; + padding: 0 calc(var(--grid-gutter) / 2); + margin: 0 auto; +} + +/* @end */ + +/* ------------------------------------------------------------------------------------------------------- */ +/* ------------------------------------------------------------------------------------------------------- */ + /* @group Header */ header { - width: 960px; - z-index: 100; + width: 100%; height: 100px; - margin: 0px auto; + z-index: 1; position: relative; - border-top: 4px solid #4aa1ef; + margin-top: 2rem; + border-radius: 4px; - background: #fffffe url('../Images/Backgrounds/Wave3.png') no-repeat right top; + background: #fffffe url('/assets/images/Backgrounds/Wave3.png') no-repeat center top; + background-size: cover; - box-shadow: 0px 2px 5px rgba(100, 100, 100, 0.5); + box-shadow: 0px 2px 5px var(--std-box-shadow); } img.Logo { right: 24px; float: left; bottom: 10px; - z-index: 5000; height: 130px; position: relative; margin-right: 24px; transform: rotate(-2deg); - -ms-transform: rotate(-2deg); /* IE 9 */ - -webkit-transform: rotate(-2deg); /* Safari and Chrome */ } /* @end */ @@ -102,14 +131,14 @@ div.drop a:after { content: none !important; } /* @group Slider */ section#slider { width: 100%; - bottom: 48px; height: 424px; - z-index: 1; - min-width: 960px; + width: 100%; position: relative; - margin-bottom: -86px; background-color: #666; - border-bottom: 2px solid #fffffe; + margin-top: 2rem; + border-radius: 4px; + overflow: hidden; + box-shadow: 0px 2px 5px var(--std-box-shadow); } section#slider div.slide { @@ -137,14 +166,15 @@ section#slider div.slide a.slideLink:hover { /* ------------------------------------------------------------------------------------------------------- */ section#body { - width: 960px; - z-index: 100; + width: 100%; + z-index: 1; min-height: 240px; - margin: 0px auto; + margin-top: 2rem; + border-radius: 4px; overflow: hidden; position: relative; background-color: #fffffe; - border-top: 3px solid #4aa1ef; + box-shadow: 0px 2px 5px var(--std-box-shadow), inset 0 1px 1px rgba(0, 0, 0, 0.05); } section#leftColumn { width: 600px; float: left; padding: 2px 8px 8px 8px; } @@ -454,89 +484,98 @@ a.projectThumb:hover { cursor: pointer; } /* ------------------------------------------------------------------------------------------------------- */ footer { + margin: 2rem 0; + border-radius: 4px; width: 100%; - height: 200px; - overflow: hidden; - background-color: #666; + z-index: 2; + display: flex; + justify-content: space-around; + padding: 2rem; + color: white; + background-color: #1b1b1b; + background-image: linear-gradient(to bottom, #222222, #111111); + box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1); } -footer div.box { - width: 960px; - height: 180px; + +footer ul { + list-style: none; +} + +footer .logo { + display: block; margin: 0px auto; - max-height: 180px; - background-color: #008be8; } -footer div section { color: #666; display: inline-block; margin-right: 34px; margin-top: 16px; } -footer a { color: #333 !important; } -footer a:hover { color: #fffffe !important; } -footer h2 { color: #fffffe; font: bold 28px 'Bebas', Arial, Geneva, sans-serif; } -footer div section ul { list-style: none; } -footer div section.splash { width: 240px; float: left; text-align: center; color: #fffffe; font-size: 12px; - margin-right: 8px; margin-top: 4px; } -footer div section.splash a { border: none; color: #fffffe; padding-left: 0; font-size: 14px; font-weight: bold; } -footer div section.splash a:hover { border: none; color: orange; } + +footer .copy { + margin-top: 1rem; + max-width: 300px; + text-align: center; +} + +footer h2 { + color: white; + text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); +} /* ------------------------------------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------------------------------------- */ section#SuperNav { - width: 960px; - color: #bbb; - height: 34px; - z-index: 4000; - font-size: 12px; - background: #666; - margin: 0px auto; - line-height: 32px; - font-weight: bold; - position: relative; + display: flex; + align-items: center; + justify-content: space-between; + width: 100%; + height: 40px; + padding: 0 1rem; + color: #999; + background-color: #1b1b1b; + background-image: linear-gradient(to bottom, #222222, #111111); + box-shadow: 0px 2px 5px var(--std-box-shadow); + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; +} + +section#SuperNav .socials { + display: flex; + align-items: center; } div.CrossNav { + height: 100%; + display: flex; + align-items: center; color: #bbb; - margin: 3px; - width: 41px; - height: 28px; - float: right; - z-index: 1000; - font-size: 11px; - line-height: 11px; - padding: 0px 12px; - padding-left: 12px; position: relative; - border-left: 1px solid #888; + padding-left: 0.75rem; + margin-left: 1rem; + border-left: 1px solid rgba(255, 255, 255, 0.2); } -div.CrossNav:after { content: ' ยป'; color: #bbb; position: relative; bottom: 10px; left: 1px; font: bold 16px sans-serif; } -div.CrossNav:hover { cursor: pointer; } div.CrossNav ul { top: 28px; - padding: 0; - opacity: 0; - right: -3px; + padding: 1rem; + right: -1rem; z-index: 999; - width: 240px; + min-width: 160px; display: none; position: absolute; - visibility: hidden; - background-color: #666; + color: #999; + background-color: #1b1b1b; + background-image: linear-gradient(to bottom, #222222, #111111); + border-radius: 4px; + box-shadow: 0px 2px 5px rgba(100, 100, 100, 0.5); } div.CrossNav ul:hover { cursor: default; } div.CrossNav ul li { - width: 232px; - display: block; - margin: 0px auto; - padding: 6px 6px; -} -div.CrossNav ul li.footer { - margin: 0; - padding: 0; - color: #fff; - width: 240px; - font-size: 12px; - line-height: 12px; - font-weight: normal; - background-color: #888; + display: flex; + + &:not(:last-child) { + margin-bottom: 1rem; + } + + p { + min-width: 200px; + } } div.CrossNav:hover ul { display: block; @@ -544,20 +583,19 @@ div.CrossNav:hover ul { visibility: visible; } -div.CrossNav ul li.RPG { padding-bottom: 8px; cursor: pointer; } +div.CrossNav ul li.RPG { cursor: pointer; } +div.CrossNav ul li.RPG img { margin-right: 1rem; } div.CrossNav ul li.RPG:hover { color: white; } div.CrossNav ul li.RPG a.RPGLink { color: #ff7e00; font-weight: bold; text-shadow: 0 1px 1px rgba(60, 60, 60, 0.3); font-size: 14px; line-height: 16px; margin-bottom: 4px; } div.CrossNav ul li.RPG:hover a.RPGLink { color: inherit; } -a.Twitter { height: 32px; width: 32px; display: inline-block; - background-image: url('../Images/Icons/Social/Twitter.png'); } -a.Twitter:hover { width: 32px; height: 32px; - background-image: url('../Images/Icons/Social/TwitterHOV.png'); } -a.YouTube { height: 32px; width: 32px; display: inline-block; - background-image: url('../Images/Icons/Social/YouTube.png'); } -a.YouTube:hover { width: 32px; height: 32px; - background-image: url('../Images/Icons/Social/YouTubeHOV.png');} +a.Twitter { height: 28px; width: 28px; display: inline-block; + background-image: url('../images/Icons/Social/Twitter.png'); background-size: cover; } +a.Twitter:hover { background-image: url('../images/Icons/Social/TwitterHOV.png'); } +a.YouTube { height: 28px; width: 28px; display: inline-block; margin-right: 0.5rem; + background-image: url('../images/Icons/Social/YouTube.png'); background-size: cover; } +a.YouTube:hover { background-image: url('../images/Icons/Social/YouTubeHOV.png');} /* ------------------------------------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------------------------------------- */ diff --git a/public/assets/images/Backgrounds/oceanwave.jpg b/public/assets/images/Backgrounds/oceanwave.jpg new file mode 100644 index 0000000..e8cc9c7 Binary files /dev/null and b/public/assets/images/Backgrounds/oceanwave.jpg differ diff --git a/public/assets/images/Logos/TheRPG.jpg b/public/assets/images/Logos/TheRPG.jpg new file mode 100644 index 0000000..01ee1ca Binary files /dev/null and b/public/assets/images/Logos/TheRPG.jpg differ diff --git a/public/blog/index.php b/public/blog/index.php deleted file mode 100755 index 0f2a047..0000000 --- a/public/blog/index.php +++ /dev/null @@ -1,13 +0,0 @@ -get('/', function() { + echo render('header'); echo render('slider'); -} + echo render('home'); + echo render('footer'); +}); -echo render($page); +$r->get('/privacy', function() { + echo render('header'); + echo render('privacy'); + echo render('footer'); +}); -echo render('footer'); +$r->get('/tandc', function() { + echo render('header'); + echo render('tandc'); + echo render('footer'); +}); + +$r->get('/blog', function() { + echo render('header'); + $dm = new DisplayModule(); + echo render('blog/list', ['display' => $dm]); + echo render('footer'); +}); + +$r->get('/blog/:id', function($id) { + echo render('header'); + $dm = new DisplayModule(); + echo render('blog/read', ['id' => $id, 'display' => $dm]); + echo render('footer'); +}); + +$res = $r->lookup($_SERVER['REQUEST_METHOD'], $_SERVER['REQUEST_URI']); +if (is_int($res)) exit("Error: $res"); +$res['handler'](); diff --git a/public/projects/index.php b/public/projects/index.php index 9180c21..0b4e4d1 100755 --- a/public/projects/index.php +++ b/public/projects/index.php @@ -1,5 +1,6 @@