1
0

direct link to /projecteuler

This commit is contained in:
Mike Schwörer 2020-01-23 20:41:04 +01:00
parent 2e2d4a0d84
commit 5c5b0cd0c0
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF
5 changed files with 23 additions and 2 deletions

View File

@ -46,7 +46,7 @@ require_once (__DIR__ . '/../internals/website.php');
<a class="tab <?php if ($FRAME_OPTIONS->activeHeader === 'home') echo 'tab_active'; ?>" href="/">Home</a> <a class="tab <?php if ($FRAME_OPTIONS->activeHeader === 'home') echo 'tab_active'; ?>" href="/">Home</a>
<a class="tab <?php if ($FRAME_OPTIONS->activeHeader === 'euler') echo 'tab_active'; ?>" href="/blog/1/Project_Euler_with_Befunge">Project Euler</a> <a class="tab <?php if ($FRAME_OPTIONS->activeHeader === 'euler') echo 'tab_active'; ?>" href="/projecteuler">Project Euler</a>
<a class="tab <?php if ($FRAME_OPTIONS->activeHeader === 'blog') echo 'tab_active'; ?>" href="/blog">Blog</a> <a class="tab <?php if ($FRAME_OPTIONS->activeHeader === 'blog') echo 'tab_active'; ?>" href="/blog">Blog</a>

View File

@ -27,7 +27,7 @@ require_once (__DIR__ . '/../internals/website.php');
<div class="tabrow"> <div class="tabrow">
<a class="tab" href="/">Home</a> <a class="tab" href="/">Home</a>
<a class="tab" href="/blog/1/Project_Euler_with_Befunge">Project Euler</a> <a class="tab" href="/projecteuler">Project Euler</a>
<a class="tab" href="/blog">Blog</a> <a class="tab" href="/blog">Blog</a>
<a class="tab" href="/programs">Programs</a> <a class="tab" href="/programs">Programs</a>
<a class="tab" href="/webapps">Tools</a> <a class="tab" href="/webapps">Tools</a>

View File

@ -61,6 +61,8 @@ $URL_RULES =
[ 'url' => ['blogpost', 'view'], 'target' => 'blog_view.php', 'options' => [ ], 'parameter' => [ 'id' => '%GET%', 'subview' => '' ], ], [ 'url' => ['blogpost', 'view'], 'target' => 'blog_view.php', 'options' => [ ], 'parameter' => [ 'id' => '%GET%', 'subview' => '' ], ],
[ 'url' => ['adventofcode'], 'target' => 'adventofcode_year.php', 'options' => [ ], 'parameter' => [ 'year' => '' ], ], [ 'url' => ['adventofcode'], 'target' => 'adventofcode_year.php', 'options' => [ ], 'parameter' => [ 'year' => '' ], ],
[ 'url' => ['projecteuler'], 'target' => 'projecteuler.php', 'options' => [ ], 'parameter' => [ ], ],
[ 'url' => ['adventofcode', '?{year}'], 'target' => 'adventofcode_year.php', 'options' => [ ], 'parameter' => [ 'year' => '%URL%' ], ], [ 'url' => ['adventofcode', '?{year}'], 'target' => 'adventofcode_year.php', 'options' => [ ], 'parameter' => [ 'year' => '%URL%' ], ],
[ 'url' => ['adventofcode', '?{year}', '?{day}'], 'target' => 'adventofcode_day.php', 'options' => [ ], 'parameter' => [ 'year' => '%URL%', 'day' => '%URL%' ], ], [ 'url' => ['adventofcode', '?{year}', '?{day}'], 'target' => 'adventofcode_day.php', 'options' => [ ], 'parameter' => [ 'year' => '%URL%', 'day' => '%URL%' ], ],
@ -89,3 +91,5 @@ $site->serve($URL_RULES);
//TODO support for different color schemes //TODO support for different color schemes
// should be possible to change with just a few constant in config.scss // should be possible to change with just a few constant in config.scss
// a (little) bit more hue in default scheme // a (little) bit more hue in default scheme
//TODO AOC panel not responsive

View File

@ -106,5 +106,10 @@ class Euler implements IWebsiteModule
if ($warn != null) return $warn; if ($warn != null) return $warn;
return ['result'=>'ok', 'message' => '']; return ['result'=>'ok', 'message' => ''];
} }
public function getOverviewURL()
{
return '/blog/1/Project_Euler_with_Befunge';
}
} }

View File

@ -0,0 +1,12 @@
<?php
require_once (__DIR__ . '/../internals/website.php');
/** @var PageFrameOptions $FRAME_OPTIONS */ global $FRAME_OPTIONS;
/** @var URLRoute $ROUTE */ global $ROUTE;
/** @var Website $SITE */ global $SITE;
?>
<?php
$FRAME_OPTIONS->setForcedRedirect($SITE->modules->Euler()->getOverviewURL());
?>