first commit

This commit is contained in:
小喵 2022-07-11 19:56:44 +08:00
commit 788cf3e917
Signed by: mt
GPG key ID: 2BCF198BD3341FB3
47 changed files with 2007 additions and 0 deletions

View file

@ -0,0 +1,39 @@
<?php $this->layout('template', ['title' => $title ?? null, 'nav' => $nav ?? null]) ?>
<?php $this->push('styles') ?>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.5.1/styles/default.min.css"/>
<?php $this->end() ?>
<?php $this->push('scripts') ?>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.5.1/highlight.min.js"></script>
<!--suppress JSUnresolvedVariable -->
<script>hljs.highlightAll()</script>
<?php $this->end() ?>
<div class="dropdown my-2">
<button class="btn btn-outline-secondary dropdown-toggle"
type="button"
id="file-selector"
data-bs-toggle="dropdown"
aria-expanded="false">
<?= $this->e($file ?? '') ?>
</button>
<ul class="dropdown-menu" aria-labelledby="file-selector">
<?php if (isset($list) && is_array($list)): ?>
<?php foreach ($list as $filename): ?>
<li>
<?php if (isset($file) && $file === $filename): ?>
<a class="dropdown-item active" href="view.php?file=<?= $this->e($filename) ?>">
<?= $this->e($filename) ?>
</a>
<?php else: ?>
<a class="dropdown-item" href="view.php?file=<?= $this->e($filename) ?>">
<?= $this->e($filename) ?>
</a>
<?php endif ?>
</li>
<?php endforeach ?>
<?php endif ?>
</ul>
</div>
<pre class="file-content"><code class="language-<?= $this->e($type ?? 'plaintext') ?>"><?= $this->e($content ?? '') ?></code></pre>