Updated libraries.

This commit is contained in:
flash 2023-11-20 19:03:40 +00:00
parent 20d02abd5e
commit ed8e123361
6 changed files with 76 additions and 13 deletions

1
assets/2023.css/main.css Normal file
View file

@ -0,0 +1 @@
/**/

1
assets/2023.js/main.js Normal file
View file

@ -0,0 +1 @@
/**/

26
composer.lock generated
View file

@ -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": [],

43
src/Blog/BlogRoutes.php Normal file
View file

@ -0,0 +1,43 @@
<?php
namespace Makai\Blog;
use Index\Routing\Route;
use Index\Routing\RouteHandler;
use Sasae\SasaeEnvironment;
use Makai\Contacts\Contacts;
use Makai\Projects\Projects;
class BlogRoutes extends RouteHandler {
public function __construct(
private SasaeEnvironment $templating,
private Contacts $contacts,
private Projects $projects
) {}
#[Route('GET', '/_blog')]
public function getIndex($response, $request) {
$projectInfos = $this->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,
]);
}
}

View file

@ -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));

View file

@ -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 %}
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
{% endblock %}