From 81e129effa77ae0580e830c0e6ac08c1bdf71334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Fri, 17 Jan 2020 00:36:37 +0100 Subject: [PATCH] AdventOfCode --- www/fragments/blogview_aoc_list.php | 31 ++++++++++++----------- www/fragments/blogview_aoc_single.php | 35 +++++++++++++++----------- www/internals/modules/adventofcode.php | 6 ++--- 3 files changed, 39 insertions(+), 33 deletions(-) diff --git a/www/fragments/blogview_aoc_list.php b/www/fragments/blogview_aoc_list.php index ad487af..b5a0eb9 100644 --- a/www/fragments/blogview_aoc_list.php +++ b/www/fragments/blogview_aoc_list.php @@ -1,8 +1,17 @@ + +
- + Fork me on GitHub
@@ -21,16 +30,8 @@ $year = $post['extras']['aoc:year'];
- text(Blog::getPostFragment($post)); - ?> + renderMarkdown($SITE->modules->Blog()->getPostFragment($post)); ?>
- $year, 'nav'=>true, 'linkheader'=>false, 'ajax'=>false]; - require (__DIR__ . '/../fragments/panel_aoc_calendar.php') - ?> - + fragments->PanelAdventOfCodeCalendar($year, true, false, false); ?>
\ No newline at end of file diff --git a/www/fragments/blogview_aoc_single.php b/www/fragments/blogview_aoc_single.php index 179d668..12a37be 100644 --- a/www/fragments/blogview_aoc_single.php +++ b/www/fragments/blogview_aoc_single.php @@ -1,23 +1,28 @@ + +modules->AdventOfCode()->getDayFromStrIdent($year, $subview); +if ($day === NULL) { $FRAME_OPTIONS->forceResult(404, 'AdventOfCode entry not found'); return; } ?>
- + Fork me on GitHub
@@ -43,7 +48,7 @@ $pd = new ParsedownCustom(); Part :
-
+
modules->AdventOfCode()->getSolutionCode($day, $i-1)); ?>
Result:
@@ -51,12 +56,12 @@ $pd = new ParsedownCustom(); - - + addScript("/data/javascript/prism.js", true); ?> + addStylesheet("/data/rawcss/prism.css"); ?>