fixed
This commit is contained in:
1 parent
4194cef934
commit
363127fe9e
3350 files changed
+1284220
-1
No files matched your search
@@ -0,0 +1,15 @@
|
||||
{{define "partials/confirm-dialog"}}
|
||||
<dialog id="confirm-dialog" class="modal" aria-labelledby="confirm-dialog-title">
|
||||
<form method="dialog" class="modal-box">
|
||||
<h2 id="confirm-dialog-title" class="text-lg font-bold" data-confirm-title>Please confirm</h2>
|
||||
<p class="py-4" data-confirm-message>Are you sure you want to continue?</p>
|
||||
<div class="modal-action">
|
||||
<button type="submit" value="cancel" class="btn btn-ghost">Cancel</button>
|
||||
<button type="submit" value="ok" class="btn btn-error" data-confirm-ok>Delete</button>
|
||||
</div>
|
||||
</form>
|
||||
<form method="dialog" class="modal-backdrop">
|
||||
<button value="cancel" aria-label="Close dialog">close</button>
|
||||
</form>
|
||||
</dialog>
|
||||
{{end}}
|
||||
@@ -0,0 +1,36 @@
|
||||
{{define "partials/header"}}
|
||||
<header class="navbar sticky top-0 z-30 border-b border-base-300 bg-base-100 px-4 lg:px-8">
|
||||
<div class="flex-none lg:hidden">
|
||||
<label for="sidebar-drawer" class="btn btn-ghost btn-square" aria-label="Open sidebar">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.8" stroke="currentColor" class="h-6 w-6" aria-hidden="true">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"/>
|
||||
</svg>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="flex-1">
|
||||
<h1 class="text-lg font-semibold lg:text-xl">{{.Title}}</h1>
|
||||
</div>
|
||||
|
||||
<div class="flex-none">
|
||||
<div class="dropdown dropdown-end">
|
||||
<button type="button" tabindex="0" class="btn btn-ghost gap-2 normal-case" aria-haspopup="menu" aria-label="Account menu">
|
||||
<div class="avatar placeholder">
|
||||
<div class="w-8 rounded-full bg-primary text-primary-content">
|
||||
<img id="profile-avatar" class="hidden rounded-full" src="" alt="">
|
||||
<span id="profile-initial">A</span>
|
||||
</div>
|
||||
</div>
|
||||
<span id="profile-name" class="hidden sm:inline">Admin</span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.8" stroke="currentColor" class="h-4 w-4" aria-hidden="true">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m19.5 8.25-7.5 7.5-7.5-7.5"/>
|
||||
</svg>
|
||||
</button>
|
||||
<ul tabindex="0" role="menu" class="menu dropdown-content z-40 mt-2 w-48 rounded-box bg-base-100 p-2 shadow-lg">
|
||||
<li role="none"><a role="menuitem" href="/admin/settings">Settings</a></li>
|
||||
<li role="none"><button role="menuitem" type="button" data-logout class="text-error">Log out</button></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{{end}}
|
||||
@@ -0,0 +1,50 @@
|
||||
{{define "partials/layout-top"}}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" data-theme="tbbank">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<title>{{.Title}} · Bankline Admin</title>
|
||||
<link rel="stylesheet" href="/admin/assets/css/app.css">
|
||||
{{if eq .Page "form"}}
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/quill@2.0.3/dist/quill.snow.css">
|
||||
{{end}}
|
||||
</head>
|
||||
<body class="min-h-screen bg-base-200"
|
||||
data-page="{{.Page}}"
|
||||
{{if .Resource}}data-resource="{{.Resource}}"{{end}}
|
||||
{{if .Mode}}data-mode="{{.Mode}}"{{end}}
|
||||
{{if .Id}}data-id="{{.Id}}"{{end}}>
|
||||
|
||||
<div class="drawer lg:drawer-open">
|
||||
<input id="sidebar-drawer" type="checkbox" class="drawer-toggle" aria-label="Toggle sidebar">
|
||||
|
||||
<div class="drawer-content flex min-h-screen flex-col">
|
||||
{{template "partials/header" .}}
|
||||
<main id="main-content" class="flex-1 p-4 lg:p-8">
|
||||
{{end}}
|
||||
|
||||
{{define "partials/layout-bottom"}}
|
||||
</main>
|
||||
</div>
|
||||
|
||||
{{template "partials/sidebar" .}}
|
||||
</div>
|
||||
|
||||
{{template "partials/confirm-dialog" .}}
|
||||
|
||||
<script src="/admin/assets/js/api.js"></script>
|
||||
<script src="/admin/assets/js/ui.js"></script>
|
||||
<script src="/admin/assets/js/auth.js"></script>
|
||||
<script src="/admin/assets/js/resources.js"></script>
|
||||
<script src="/admin/assets/js/table.js"></script>
|
||||
{{if eq .Page "form"}}
|
||||
<script src="https://cdn.jsdelivr.net/npm/quill@2.0.3/dist/quill.js"></script>
|
||||
{{end}}
|
||||
<script src="/admin/assets/js/form.js"></script>
|
||||
<script src="/admin/assets/js/dashboard.js"></script>
|
||||
<script src="/admin/assets/js/settings.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
{{end}}
|
||||
@@ -0,0 +1,73 @@
|
||||
{{define "partials/sidebar"}}
|
||||
<div class="drawer-side z-40">
|
||||
<label for="sidebar-drawer" aria-label="Close sidebar" class="drawer-overlay"></label>
|
||||
<aside class="flex min-h-full w-64 flex-col bg-base-100">
|
||||
<a href="/admin" class="flex items-center gap-2 px-6 py-5 text-lg font-bold text-primary">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.8" stroke="currentColor" class="h-7 w-7" aria-hidden="true">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M12 21v-8.25M15.75 21v-8.25M8.25 21v-8.25M3 9l9-6 9 6m-1.5 12V10.332A48.36 48.36 0 0 0 12 9.75c-2.551 0-5.056.2-7.5.582V21M3 21h18M12 6.75h.008v.008H12V6.75Z"/>
|
||||
</svg>
|
||||
<span>Bankline</span>
|
||||
</a>
|
||||
|
||||
<nav aria-label="Main navigation" class="flex-1 overflow-y-auto px-3">
|
||||
<ul class="menu gap-1 p-0">
|
||||
<li>
|
||||
<a href="/admin" class="{{if eq .Active "dashboard"}}active{{end}}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.8" stroke="currentColor" class="h-5 w-5" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18v-2.25Z"/></svg>
|
||||
Dashboard
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/admin/categories" class="{{if eq .Active "categories"}}active{{end}}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.8" stroke="currentColor" class="h-5 w-5" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"/></svg>
|
||||
Categories
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/admin/sub-categories" class="{{if eq .Active "sub-categories"}}active{{end}}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.8" stroke="currentColor" class="h-5 w-5" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"/></svg>
|
||||
Sub-categories
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/admin/banners" class="{{if eq .Active "banners"}}active{{end}}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.8" stroke="currentColor" class="h-5 w-5" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"/></svg>
|
||||
Banners
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/admin/news" class="{{if eq .Active "news"}}active{{end}}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.8" stroke="currentColor" class="h-5 w-5" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M12 7.5h1.5m-1.5 3h1.5m-7.5 3h7.5m-7.5 3h7.5m3-9h3.375c.621 0 1.125.504 1.125 1.125V18a2.25 2.25 0 0 1-2.25 2.25M16.5 7.5V18a2.25 2.25 0 0 0 2.25 2.25M16.5 7.5V4.875c0-.621-.504-1.125-1.125-1.125H4.125C3.504 3.75 3 4.254 3 4.875V18a2.25 2.25 0 0 0 2.25 2.25h13.5M6 7.5h3v3H6v-3Z"/></svg>
|
||||
News
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/admin/static" class="{{if eq .Active "static"}}active{{end}}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.8" stroke="currentColor" class="h-5 w-5" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"/></svg>
|
||||
Static pages
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/admin/currency" class="{{if eq .Active "currency"}}active{{end}}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.8" stroke="currentColor" class="h-5 w-5" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M12 6v12m-3-2.818.879.659c1.171.879 3.07.879 4.242 0 1.172-.879 1.172-2.303 0-3.182C13.536 12.219 12.768 12 12 12c-.725 0-1.45-.22-2.003-.659-1.106-.879-1.106-2.303 0-3.182s2.9-.879 4.006 0l.415.33M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/></svg>
|
||||
Currency
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="divider my-2"></div>
|
||||
|
||||
<ul class="menu gap-1 p-0">
|
||||
<li>
|
||||
<a href="/admin/settings" class="{{if eq .Active "settings"}}active{{end}}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.8" stroke="currentColor" class="h-5 w-5" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"/><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"/></svg>
|
||||
Settings
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<div class="px-6 py-4 text-xs text-base-content/50">TBBANK admin</div>
|
||||
</aside>
|
||||
</div>
|
||||
{{end}}
|
||||
Reference in new issue
Block a user