AoC prep finished
This commit is contained in:
parent
bdda2001e3
commit
bbf29f440a
@ -26,7 +26,7 @@ $year = $post['extras']['aoc:year'];
|
||||
|
||||
<?php
|
||||
global $PARAM_AOCCALENDAR;
|
||||
$PARAM_AOCCALENDAR = ['year' => $year];
|
||||
$PARAM_AOCCALENDAR = ['year' => $year, 'nav'=>true];
|
||||
require (__DIR__ . '/../fragments/panel_aoc_calendar.php')
|
||||
?>
|
||||
|
||||
|
@ -59,7 +59,7 @@ $pd = new ParsedownCustom();
|
||||
|
||||
<?php
|
||||
global $PARAM_AOCCALENDAR;
|
||||
$PARAM_AOCCALENDAR = ['year' => $year];
|
||||
$PARAM_AOCCALENDAR = ['year' => $year, 'nav'=>false];
|
||||
require (__DIR__ . '/../fragments/panel_aoc_calendar.php')
|
||||
?>
|
||||
|
||||
|
23
www/fragments/panel_aoc.php
Normal file
23
www/fragments/panel_aoc.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
require_once(__DIR__ . '/../internals/adventofcode.php');
|
||||
|
||||
global $PARAM_AOCPANEL;
|
||||
$year = $PARAM_AOCPANEL['year'];
|
||||
?>
|
||||
|
||||
<div class="index_pnl_base">
|
||||
|
||||
<div class="index_pnl_header">
|
||||
<a href="<?php echo AdventOfCode::getURLForYear($year); ?>">Advent of Code <?php echo $year; ?></a>
|
||||
</div>
|
||||
<div class="index_pnl_content">
|
||||
|
||||
<?php
|
||||
global $PARAM_AOCCALENDAR;
|
||||
$PARAM_AOCCALENDAR = ['year' => $year, 'nav'=>false];
|
||||
require (__DIR__ . '/../fragments/panel_aoc_calendar.php')
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
@ -3,10 +3,11 @@
|
||||
global $PARAM_AOCCALENDAR;
|
||||
|
||||
$year = $PARAM_AOCCALENDAR['year'];
|
||||
$shownav = $PARAM_AOCCALENDAR['nav'];
|
||||
|
||||
$assocdays = AdventOfCode::listSingleYearAssociative($year);
|
||||
$prev_year = AdventOfCode::getPrevYear($year);
|
||||
$next_year = AdventOfCode::getNextYear($year);
|
||||
$prev_year = $shownav ? AdventOfCode::getPrevYear($year) : null;
|
||||
$next_year = $shownav ? AdventOfCode::getNextYear($year) : null;
|
||||
|
||||
?>
|
||||
|
||||
|
@ -24,6 +24,9 @@
|
||||
|
||||
<?php include (__DIR__ . '/../fragments/panel_books.php'); ?>
|
||||
|
||||
<?php /* global $PARAM_AOCPANEL; $PARAM_AOCPANEL=['year'=>2018]; include (__DIR__ . '/../fragments/panel_aoc.php'); */ ?>
|
||||
<?php global $PARAM_AOCPANEL; $PARAM_AOCPANEL=['year'=>2019]; include (__DIR__ . '/../fragments/panel_aoc.php'); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php include (__DIR__ . '/../fragments/footer.php'); ?>
|
||||
|
@ -1 +0,0 @@
|
||||
//TODO ENTER TEXT HERE
|
Loading…
Reference in New Issue
Block a user