flush -- WIP admin panel

This commit is contained in:
Tony Yang
2019-05-30 14:18:07 +08:00
parent 75af7df7b4
commit 84fb4180c9
53 changed files with 9104 additions and 2 deletions

51
theme/default.html Normal file
View File

@@ -0,0 +1,51 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{part} | {title}</title>
<!-- Tocas UICSS 與元件 -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tocas-ui/2.3.3/tocas.css">
<!-- Tocas JS模塊與 JavaScript 函式 -->
<script src="include/js/lib/tocas.js"></script>
<!-- jQuery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@7.26.11/dist/sweetalert2.all.min.js"></script>
<link rel="stylesheet" href="https://pandao.github.io/editor.md/css/editormd.css" />
<link rel="stylesheet" href="include/css/cavern.css">
</head>
<body>
{nav}
<div class="ts large vertically padded fluid heading slate">
<div class="ts narrow container">
<div class="header">{title}</div>
<div class="description">Welcome to {title}</div>
</div>
</div>
<div class="ts narrow container" id="main">
<div class="ts stackable grid">
<div class="twelve wide column" id="content">
{message}
{content}
</div>
<div class="four wide column" id="sidebar">
{sidebar}
</div>
</div>
</div>
<footer>
<div class="ts divider"></div>
<div class="ts center aligned basic segment">
Powered by <a href="https://app.stoneapp.tech/#cavern">Cavern</a>
</div>
</footer>
<!-- Anchor -->
<div class="ts bottom right snackbar">
<div class="content"></div>
<a class="action"></a>
</div>
<!-- Scripts -->
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
{script}
</body>
</html>

16
theme/nav/default.html Normal file
View File

@@ -0,0 +1,16 @@
<div class="ts top attached pointing secondary large menu" id="menu">
<div class="ts narrow container">
<a href="index.php" class="active item">首頁</a>
<form class="right fitted item" action="login.php" method="POST" name="login">
<div class="tablet or large device only">
<div class="ts small underlined input">
<input placeholder="Username" type="text" name="username">
<input placeholder="Password" type="password" name="password">
</div>
</div>
<button class="ts small primary login icon button">
<i class="sign in icon"></i>
</button>
</form>
</div>
</div>

28
theme/nav/util.php Normal file
View File

@@ -0,0 +1,28 @@
<?php
$self = @end(explode('/',$_SERVER['PHP_SELF']));
?>
<div class="ts top attached pointing secondary large menu" id="menu">
<div class="ts narrow container">
<a href="index.php" class="<?php if ($self == 'index.php') { echo "active "; } ?>item">首頁</a>
<div class="ts <?php if ($self == 'post.php') { echo "active "; } ?>dropdown item">
<div class="text">文章</div>
<div class="menu">
<a href="post.php?new" class="item">新增</a>
<a href="post.php" class="item">列表</a>
</div>
</div>
<a href="account.php" class="<?php if ($self == 'account.php') { echo "active "; } ?>item">帳號</a>
<div class="right menu">
<a href="#" class="notification icon item"><i class="bell outline icon"></i></a>
<a href="#" class="item" id="logout">登出</a>
</div>
</div>
</div>
<div class="ts narrow container" id="notification-wrapper">
<div class="notification container">
<div class="ts borderless top attached segment">通知</div>
<div class="ts relaxed divided feed"></div>
<a class="ts bottom attached fluid button" href="notification.php">看所有通知</a>
</div>
</div>
<script src="include/js/notification.js"></script>

40
theme/sidebar.php Normal file
View File

@@ -0,0 +1,40 @@
<?php
require_once('connection/SQL.php');
require_once('include/user.php');
require_once('config.php');
$user = validate_user();
if(!$user->islogin){ ?>
<div class="ts basic center aligned padded segment">
登入或是<a href="account.php?new">註冊</a>
</div>
<?php } else { ?>
<a class="ts center aligned big header" data-username="<?= $user->username ?>" href="user.php?username=<?= $user->username ?>">
<img class="ts circular avatar image" src="https://www.gravatar.com/avatar/<?= md5(strtolower($user->email)) ?>?d=https%3A%2F%2Ftocas-ui.com%2Fassets%2Fimg%2F5e5e3a6.png&s=150"> <?= $user->name ?>
<?php if ($user->muted) { ?>
<div class="negative sub header">
<i class="ban icon"></i>你已被禁言!
</div>
<?php } ?>
</a>
<?php } ?>
<div class="ts fluid icon input">
<input type="text" placeholder="在這搜尋人、事、物">
<i class="inverted circular search link icon"></i>
</div>
<!-- Segment 1 -->
<div class="ts tertiary top attached center aligned segment">名稱</div>
<div class="ts bottom attached segment">
<p>項目</p>
<p>項目</p>
<p>項目</p>
</div>
<!-- Segment 2 -->
<div class="ts tertiary top attached center aligned segment">名稱</div>
<div class="ts bottom attached segment">
<p>項目</p>
<p>項目</p>
<p>項目</p>
</div>

BIN
theme/thinking.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB