AdventOfCode
This commit is contained in:
@@ -1,8 +1,17 @@
|
||||
<?php
|
||||
require_once (__DIR__ . '/../internals/base.php');
|
||||
require_once (__DIR__ . '/../internals/blog.php');
|
||||
require_once (__DIR__ . '/../internals/adventofcode.php');
|
||||
require_once (__DIR__ . '/../internals/ParsedownCustom.php');
|
||||
require_once (__DIR__ . '/../internals/website.php');
|
||||
|
||||
/** @var PageFrameOptions $FRAME_OPTIONS */ global $FRAME_OPTIONS;
|
||||
/** @var URLRoute $ROUTE */ global $ROUTE;
|
||||
/** @var Website $SITE */ global $SITE;
|
||||
|
||||
global $FRAGMENT_PARAM;
|
||||
/** @var array $parameter */
|
||||
$parameter = $FRAGMENT_PARAM;
|
||||
?>
|
||||
|
||||
<?php
|
||||
$post = $parameter['blogpost'];
|
||||
|
||||
$year = $post['extras']['aoc:year'];
|
||||
|
||||
@@ -11,7 +20,7 @@ $year = $post['extras']['aoc:year'];
|
||||
<div class="boxedcontent blogcontent_plain">
|
||||
|
||||
<div style="position: relative;">
|
||||
<a href="<?php echo AdventOfCode::getGithubLink($year); ?>" style="position: absolute; top: 0; right: 0; border: 0;">
|
||||
<a href="<?php echo $SITE->modules->AdventOfCode()->getGithubLink($year); ?>" style="position: absolute; top: 0; right: 0; border: 0;">
|
||||
<img src="/data/images/blog/github_band.png" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png">
|
||||
</a>
|
||||
</div>
|
||||
@@ -21,16 +30,8 @@ $year = $post['extras']['aoc:year'];
|
||||
</div>
|
||||
|
||||
<div class="bc_data">
|
||||
<?php
|
||||
$pd = new ParsedownCustom();
|
||||
echo $pd->text(Blog::getPostFragment($post));
|
||||
?>
|
||||
<?php $SITE->renderMarkdown($SITE->modules->Blog()->getPostFragment($post)); ?>
|
||||
<br/>
|
||||
<?php
|
||||
global $PARAM_AOCCALENDAR;
|
||||
$PARAM_AOCCALENDAR = ['year' => $year, 'nav'=>true, 'linkheader'=>false, 'ajax'=>false];
|
||||
require (__DIR__ . '/../fragments/panel_aoc_calendar.php')
|
||||
?>
|
||||
|
||||
<?php echo $SITE->fragments->PanelAdventOfCodeCalendar($year, true, false, false); ?>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user