1
0

added AOC 2020 data

This commit is contained in:
2020-12-02 08:32:04 +01:00
parent 647e78575c
commit 8207ece48c
16 changed files with 1467 additions and 14 deletions

View File

@@ -32,7 +32,7 @@ $FRAME_OPTIONS->alternative_url = "/adventofcode/$year";
</div>
<div class="bc_data">
<?php $SITE->renderMarkdown($SITE->modules->Blog()->getPostFragment($post)); ?>
<?php echo $SITE->renderMarkdown($SITE->modules->Blog()->getPostFragment($post)); ?>
<br/>
<?php echo $SITE->fragments->PanelAdventOfCodeCalendar($year, true, false, false); ?>
</div>

View File

@@ -45,18 +45,34 @@ $FRAME_OPTIONS->alternative_url = $day['url-alternative'];
<div class="bc_aoc_input"><?php echo nl2br(htmlspecialchars(file_get_contents($day['file_input']))); ?></div>
<br/>
<?php for ($i=1; $i<=$day['parts']; $i++): ?>
<?php if ($day['single_solution_file']): ?>
<b>Part <?php echo $i; ?>:</b>
<div class="bc_aoc_solution_parent">
<div class="bc_aoc_solution_code">
<pre><code class="<?php echo $SITE->modules->AdventOfCode()->getLanguageCSS($day) ?>"><?php echo htmlspecialchars($SITE->modules->AdventOfCode()->getSolutionCode($day, $i-1)); ?></code></pre>
<pre><code class="<?php echo $SITE->modules->AdventOfCode()->getLanguageCSS($day) ?>"><?php echo htmlspecialchars($SITE->modules->AdventOfCode()->getSolutionCode($day, 0)); ?></code></pre>
</div>
<div class="bc_aoc_solution_value"><b>Result:</b> <?php echo $day['solutions'][$i-1]; ?></div>
<?php for ($i=1; $i<=$day['parts']; $i++): ?>
<div class="bc_aoc_solution_value multi"><b>Result Part <?= $i ?>:</b> <?php echo $day['solutions'][$i-1]; ?></div>
<?php endfor; ?>
</div>
<br/>
<?php endfor; ?>
<?php else: ?>
<?php for ($i=1; $i<=$day['parts']; $i++): ?>
<b>Part <?php echo $i; ?>:</b>
<div class="bc_aoc_solution_parent">
<div class="bc_aoc_solution_code">
<pre><code class="<?php echo $SITE->modules->AdventOfCode()->getLanguageCSS($day) ?>"><?php echo htmlspecialchars($SITE->modules->AdventOfCode()->getSolutionCode($day, $i-1)); ?></code></pre>
</div>
<div class="bc_aoc_solution_value"><b>Result:</b> <?php echo $day['solutions'][$i-1]; ?></div>
</div>
<br/>
<?php endfor; ?>
<?php endif; ?>
<?php $FRAME_OPTIONS->addScript("/data/javascript/prism.js", true); ?>
<?php $FRAME_OPTIONS->addStylesheet("/data/rawcss/prism.css"); ?>