first commit

This commit is contained in:
小喵 2022-07-11 18:09:15 +08:00 committed by Ming Tsay
commit db313f5eef
Signed by: mt
GPG key ID: 2BCF198BD3341FB3
47 changed files with 2006 additions and 0 deletions

View file

@ -0,0 +1,12 @@
<?php $this->layout('template', ['title' => $title ?? null, 'nav' => $nav ?? null]) ?>
<div class="list-group text-start mt-5 mx-auto w-fit-content">
<div class="list-group-item">請選擇檔案:</div>
<?php if (isset($list) && is_array($list)): ?>
<?php foreach ($list as $file): ?>
<a class="list-group-item list-group-item-action" href="view.php?file=<?= $this->e($file) ?>">
<?= $this->e($file) ?>
</a>
<?php endforeach ?>
<?php endif ?>
</div>

View file

@ -0,0 +1,35 @@
<?php $this->layout('template', ['title' => $title ?? null, 'nav' => $nav ?? null]) ?>
<div class="m-5">
<div class="dropdown">
<button class="btn btn-outline-secondary dropdown-toggle" type="button" id="file-selector"
data-bs-toggle="dropdown" aria-expanded="false">
請選擇檔案
</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>
<div class="alert alert-warning mt-5 m-auto d-table" role="alert">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor"
class="bi bi-exclamation-triangle-fill flex-shrink-0 me-2" viewBox="0 0 16 16" role="img"
aria-label="Warning:">
<path d="M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"/>
</svg>
檔案不存在,請從上方選單選取欲查看之檔案。
</div>
</div>

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>

View file

@ -0,0 +1,56 @@
<nav class="navbar navbar-expand-lg bg-light">
<div class="container-fluid">
<div class="navbar-brand">功能選單</div>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#nav"
aria-controls="nav" aria-expanded="false" aria-label="顯示/隱藏選單">
<i class="fa-solid fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="nav">
<ul class="navbar-nav me-auto">
<li class="nav-item">
<a
<?php if (isset($nav) && $nav === 'index'): ?>
class="nav-link active"
aria-current="page"
<?php else: ?>
class="nav-link"
<?php endif ?>
href="/index.php"
>
<i class="fa-solid fa-house"></i>
首頁
</a>
</li>
<li class="nav-item">
<a
<?php if (isset($nav) && $nav === 'configurations'): ?>
class="nav-link active"
aria-current="page"
<?php else: ?>
class="nav-link"
<?php endif ?>
href="/configurations/list.php"
>
<i class="fa-solid fa-file-code"></i>
檢視設定檔
</a>
</li>
<li class="nav-item">
<a
<?php if (isset($nav) && $nav === 'logs'): ?>
class="nav-link active"
aria-current="page"
<?php else: ?>
class="nav-link"
<?php endif ?>
href="/logs/list.php"
>
<i class="fa-solid fa-file-lines"></i>
檢視日誌
</a>
</li>
</ul>
</div>
</div>
</nav>
<div>您已使用 <code><?= $this->e($whoami ?? '') ?></code> 登入,點選此處以<a href="/logout.php">登出系統</a>。</div>