diff --git a/assets/2023.css/main.css b/assets/2023.css/main.css new file mode 100644 index 0000000..9d6f459 --- /dev/null +++ b/assets/2023.css/main.css @@ -0,0 +1 @@ +/**/ diff --git a/assets/2023.js/main.js b/assets/2023.js/main.js new file mode 100644 index 0000000..9d6f459 --- /dev/null +++ b/assets/2023.js/main.js @@ -0,0 +1 @@ +/**/ diff --git a/composer.lock b/composer.lock index 4fa7a4f..9d0fb66 100644 --- a/composer.lock +++ b/composer.lock @@ -61,8 +61,8 @@ "version": "dev-master", "source": { "type": "git", - "url": "https://git.flash.moe/flash/index.git", - "reference": "82a350a5c719cc83aa22382201683a68a2629f2a" + "url": "https://patchii.net/flash/index.git", + "reference": "e31781c69f0b13fe251771c8e7e529222630a44f" }, "require": { "ext-mbstring": "*", @@ -100,15 +100,15 @@ ], "description": "Composer package for the common library for my projects.", "homepage": "https://railgun.sh/index", - "time": "2023-09-15T22:44:36+00:00" + "time": "2023-11-20T19:01:19+00:00" }, { "name": "flashwave/sasae", "version": "dev-master", "source": { "type": "git", - "url": "https://git.flash.moe/flash/sasae.git", - "reference": "739669fc8ce7ea862ed2129cb24976ceebd0f4c7" + "url": "https://patchii.net/flash/sasae.git", + "reference": "9ead82d72fcdde72694e25ede468a4f686d3abc9" }, "require": { "flashwave/index": "dev-master", @@ -141,11 +141,11 @@ ], "description": "A wrapper for Twig with added common functionality.", "homepage": "https://railgun.sh/sasae", - "time": "2023-08-24T23:24:45+00:00" + "time": "2023-11-20T18:49:10+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.3.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", @@ -192,7 +192,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" }, "funding": [ { @@ -845,16 +845,16 @@ "packages-dev": [ { "name": "phpstan/phpstan", - "version": "1.10.38", + "version": "1.10.43", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "5302bb402c57f00fb3c2c015bac86e0827e4b691" + "reference": "2c4129f6ca8c7cfa870098884b8869b410a5a361" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/5302bb402c57f00fb3c2c015bac86e0827e4b691", - "reference": "5302bb402c57f00fb3c2c015bac86e0827e4b691", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/2c4129f6ca8c7cfa870098884b8869b410a5a361", + "reference": "2c4129f6ca8c7cfa870098884b8869b410a5a361", "shasum": "" }, "require": { @@ -903,7 +903,7 @@ "type": "tidelift" } ], - "time": "2023-10-06T14:19:14+00:00" + "time": "2023-11-19T19:55:25+00:00" } ], "aliases": [], diff --git a/src/Blog/BlogRoutes.php b/src/Blog/BlogRoutes.php new file mode 100644 index 0000000..a4b5236 --- /dev/null +++ b/src/Blog/BlogRoutes.php @@ -0,0 +1,43 @@ +projects->getProjects( + featuredOnly: true, + deleted: false, + take: 3, + random: true, + ); + + $projects = []; + foreach($projectInfos as $projectInfo) + $projects[] = [ + 'info' => $projectInfo, + 'colour' => $projectInfo->hasColour() ? $projectInfo->getColour() : $this->projects->getProjectColour($projectInfo), + ]; + + $contacts = $this->contacts->getContacts( + homePageOnly: true, + take: 3, + ); + + return $this->templating->render('dev/index', [ + 'projects' => $projects, + 'contacts' => $contacts, + ]); + } +} diff --git a/src/MakaiContext.php b/src/MakaiContext.php index bf83e3d..7606e86 100644 --- a/src/MakaiContext.php +++ b/src/MakaiContext.php @@ -94,6 +94,7 @@ final class MakaiContext { $routingCtx->register(new DeveloperRoutes($this->templating, $this->contacts, $this->projects)); $routingCtx->register(new AssetsRoutes($this->siteInfo)); + $routingCtx->register(new Blog\BlogRoutes($this->templating, $this->contacts, $this->projects)); $routingCtx->register(new Whois\WhoisRoutes($this->templating, $this->csrfp)); $routingCtx->register(new SSHKeys\SSHKeysRoutes($this->sshKeys)); $routingCtx->register(new Tools\AsciiRoutes($this->templating)); diff --git a/templates/master-2023.twig b/templates/master-2023.twig new file mode 100644 index 0000000..c0f523b --- /dev/null +++ b/templates/master-2023.twig @@ -0,0 +1,17 @@ +{% extends 'master.twig' %} + +{% set master_title = (header_title is defined ? (header_title ~ ' // ') : '') ~ 'flash.moe' %} + +{% set styles = styles|default([])|merge([ + globals.assetsInfo.get('2023.css'), + globals.assetsInfo.get('common.css'), +]) %} + +{% set scripts = scripts|default([])|merge([ + globals.assetsInfo.get('2023.js'), + globals.assetsInfo.get('common.js'), +]) %} + +{% block master_head %} + +{% endblock %}