1
0

ajax aoc panel (main site)

This commit is contained in:
2020-01-06 21:58:09 +01:00
parent c12b217b37
commit a6539cf081
11 changed files with 99 additions and 17 deletions

View File

@@ -1,20 +1,20 @@
<?php
require_once(__DIR__ . '/../internals/adventofcode.php');
global $PARAM_AOCPANEL;
$year = $PARAM_AOCPANEL['year'];
$years = AdventOfCode::listYears();
$year = end($years);
?>
<div class="index_pnl_base">
<div class="index_pnl_header">
<a href="<?php echo AdventOfCode::getURLForYear($year); ?>">Advent of Code <?php echo $year; ?></a>
<a href="<?php echo AdventOfCode::getURLForYear($year); ?>">Advent of Code</a>
</div>
<div class="index_pnl_content">
<?php
global $PARAM_AOCCALENDAR;
$PARAM_AOCCALENDAR = ['year' => $year, 'nav'=>false];
$PARAM_AOCCALENDAR = ['year' => $year, 'nav'=>true, 'linkheader'=>true, 'ajax'=>true];
require (__DIR__ . '/../fragments/panel_aoc_calendar.php')
?>