]> git.localhorst.tv Git - alttp.git/commitdiff
events and tech image and description
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Thu, 2 Oct 2025 15:36:13 +0000 (17:36 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Thu, 2 Oct 2025 15:36:13 +0000 (17:36 +0200)
app/Http/Controllers/EventController.php
app/Http/Controllers/TechniqueController.php
lang/de/pages.php [new file with mode: 0644]
lang/en/pages.php [new file with mode: 0644]
resources/js/i18n/de.js
resources/js/i18n/en.js
resources/js/pages/Events.jsx
resources/js/pages/Front.jsx
resources/js/pages/Techniques.jsx
routes/web.php

index 639932691b5ec6fe686f7fcadfe5d7f83cd3953e..14e746743b8a01afd415e8e0be21f766f1e3169b 100644 (file)
@@ -88,4 +88,11 @@ class EventController extends Controller
                throw new ModelNotFoundException();
        }
 
+       public function webIndex() {
+               return view('app')
+                       ->with('title', __('pages.events.title'))
+                       ->with('description', __('pages.events.description'))
+                       ->with('image', url('/media/alttp/events.png'));
+       }
+
 }
index b88b5a3c21645a94f2370b4ff2b76ab324f96d2a..27cc53dbf9c3fc555ecb855018c4196f54938cad 100644 (file)
@@ -96,6 +96,13 @@ class TechniqueController extends Controller
                throw new ModelNotFoundException();
        }
 
+       public function webIndex() {
+               return view('app')
+                       ->with('title', __('pages.tech.title'))
+                       ->with('description', __('pages.tech.description'))
+                       ->with('image', url('/media/alttp/tech.png'));
+       }
+
        private function applyLocalizedValues($validatedData, $content) {
                foreach (['attribution', 'description', 'short', 'title'] as $name) {
                        if (isset($validatedData[$name])) {
diff --git a/lang/de/pages.php b/lang/de/pages.php
new file mode 100644 (file)
index 0000000..afed2ce
--- /dev/null
@@ -0,0 +1,15 @@
+<?php
+
+return [
+
+       'events' => [
+               'title' => 'Veranstaltungen',
+               'description' => 'Speedrun und Randomizer Veranstaltungen für A Link to the Past',
+       ],
+
+       'tech' => [
+               'title' => 'Techniken',
+               'description' => 'Tricks und Tutorials für A Link to the Past',
+       ],
+
+];
diff --git a/lang/en/pages.php b/lang/en/pages.php
new file mode 100644 (file)
index 0000000..2a3204f
--- /dev/null
@@ -0,0 +1,15 @@
+<?php
+
+return [
+
+       'events' => [
+               'title' => 'Events',
+               'description' => 'Speedrun and randomizer events for A Link to the Past',
+       ],
+
+       'tech' => [
+               'title' => 'Techniques',
+               'description' => 'Tricks and tutorials for A Link to the Past',
+       ],
+
+];
index ed99b7c594e9622f2303ead92ba9980f3741971c..ef57f67e2f1a177683e77c0229b8915c44955a33 100644 (file)
@@ -290,6 +290,7 @@ export default {
                },
                events: {
                        concluded: 'Diese Veranstaltung is abgeschlossen.',
+                       description: 'Speedrun und Randomizer Veranstaltungen für A Link to the Past',
                        end: 'Ende',
                        evergreen: 'Ständige Veranstaltungen',
                        heading: 'Veranstaltungen',
index 55ae12bb01855e1e487c929625c9716f5aaf5e20..028e563a3f1db0cdfe05f5ee852e11e0e18a6e15 100644 (file)
@@ -290,6 +290,7 @@ export default {
                },
                events: {
                        concluded: 'This event has concluded.',
+                       description: 'Speedrun and randomizer events for A Link to the Past',
                        end: 'End',
                        evergreen: 'Evergreen events',
                        heading: 'Events',
index b65652e23bd0541645c14a3be06af32a8227b558..2521476f3deccdb573b6f06bf9212211105f10ea 100644 (file)
@@ -76,9 +76,10 @@ export const Component = () => {
 
        return <ErrorBoundary>
                <Helmet>
-                       <title>
-                               {t('events.heading')}
-                       </title>
+                       <title>{t('events.heading')}</title>
+                       <meta name="description" content={t('events.description')} />
+                       <meta property="og:image" content="/media/alttp/events.png" />
+                       <meta property="twitter:image" content="/media/alttp/events.png" />
                </Helmet>
                <CanonicalLinks base={`/events`} />
                <Container>
index 4150d28d5f5ad0ff9e543394b3423e48b5978946..bf2936cbe3684d9cb493027438b0531d270e389b 100644 (file)
@@ -43,7 +43,7 @@ const Front = () => {
                <Row>
                        <Col sm={6}>
                                <Link className="front-panel" to="/events">
-                                       <Image alt="" className="image" src="/media/alttp/front.png" />
+                                       <Image alt="" className="image" src="/media/alttp/events.png" />
                                        <div className="title">
                                                {t('front.eventlist')}
                                        </div>
@@ -62,7 +62,7 @@ const Front = () => {
                <Row>
                        <Col sm={6}>
                                <Link className="front-panel" to="/tech">
-                                       <Image alt="" className="image" src="/media/alttp/front.png" />
+                                       <Image alt="" className="image" src="/media/alttp/tech.png" />
                                        <div className="title">
                                                {t('front.tech')}
                                        </div>
index 0c5d5b07343ef300433515b9f7bc2822c318f44c..20dba2f66e2bb2553b9a18e0da742bd32d2ebc83 100644 (file)
@@ -80,6 +80,8 @@ const Techniques = ({ namespace, type }) => {
                <Helmet>
                        <title>{i18n.t(`${namespace}.heading`)}</title>
                        <meta name="description" content={i18n.t(`${namespace}.description`)} />
+                       <meta property="og:image" content="/media/alttp/tech.png" />
+                       <meta property="twitter:image" content="/media/alttp/tech.png" />
                </Helmet>
                <CanonicalLinks base="/tech" />
                <Overview
index 075fa81cfcdae99074ae97ce37b3e64874695db1..0e01006ceb9c52f67f0458486376d5e8a6eb6bc2 100644 (file)
@@ -20,6 +20,8 @@ use Jakyeru\Larascord\Http\Controllers\DiscordController;
 
 Route::get('/sitemap.xml', [SitemapXmlController::class, 'index']);
 
+Route::get('/events', 'App\Http\Controllers\EventController@webIndex');
+
 Route::get('/events/{name}', 'App\Http\Controllers\EventController@web');
 
 Route::get('/dungeons/{name}', function ($name) {
@@ -38,6 +40,8 @@ Route::get('/rulesets/{name}', function ($name) {
        return app()->call('App\Http\Controllers\TechniqueController@web', ['type' => 'ruleset', 'name' => $name]);
 });
 
+Route::get('/tech', 'App\Http\Controllers\TechniqueController@webIndex');
+
 Route::get('/tech/{name}', function ($name) {
        return app()->call('App\Http\Controllers\TechniqueController@web', ['type' => 'tech', 'name' => $name]);
 });