This commit is contained in:
Aritra Banik 2024-03-10 14:18:51 +05:30
parent efb92d259e
commit e929323f1f
4 changed files with 38 additions and 23 deletions

BIN
src/a3

Binary file not shown.

View File

@ -5,7 +5,8 @@ import
nimja/parser,
strutils,
./a3pkg/[models, mics, htmx],
./a3c/[products, users, cart, orders]
./a3c/[products, users, cart, orders],
./admin
"/" -> [get, post]:
@ -577,6 +578,9 @@ import
compileTemplateFile(getScriptDir() / "a3a" / "signup.nimja")
"/admin/dashboard" -> get:
ctx.admin()
servePublic("src/a3b", "/a3b")
run()

View File

@ -6,28 +6,28 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Connect Plus</title>
<!-- plugins:css -->
<link rel="stylesheet" href="assets/vendors/mdi/css/materialdesignicons.min.css">
<link rel="stylesheet" href="assets/vendors/flag-icon-css/css/flag-icon.min.css">
<link rel="stylesheet" href="assets/vendors/css/vendor.bundle.base.css">
<link rel="stylesheet" href="/a3b/admin/vendors/mdi/css/materialdesignicons.min.css">
<link rel="stylesheet" href="/a3b/admin/vendors/flag-icon-css/css/flag-icon.min.css">
<link rel="stylesheet" href="/a3b/admin/vendors/css/vendor.bundle.base.css">
<!-- endinject -->
<!-- Plugin css for this page -->
<link rel="stylesheet" href="assets/vendors/font-awesome/css/font-awesome.min.css" />
<link rel="stylesheet" href="assets/vendors/bootstrap-datepicker/bootstrap-datepicker.min.css">
<link rel="stylesheet" href="/a3b/admin/vendors/font-awesome/css/font-awesome.min.css" />
<link rel="stylesheet" href="/a3b/admin/vendors/bootstrap-datepicker/bootstrap-datepicker.min.css">
<!-- End plugin css for this page -->
<!-- inject:css -->
<!-- endinject -->
<!-- Layout styles -->
<link rel="stylesheet" href="assets/css/style.css">
<link rel="stylesheet" href="/a3b/admin/css/style.css">
<!-- End layout styles -->
<link rel="shortcut icon" href="assets/images/favicon.png" />
<link rel="shortcut icon" href="/a3b/admin/images/favicon.png" />
</head>
<body>
<div class="container-scroller">
<!-- partial:partials/_navbar.html -->
<nav class="navbar default-layout-navbar col-lg-12 col-12 p-0 fixed-top d-flex flex-row">
<div class="text-center navbar-brand-wrapper d-flex align-items-center justify-content-center">
<a class="navbar-brand brand-logo" href="index.html"><img src="assets/images/logo.svg" alt="logo" /></a>
<a class="navbar-brand brand-logo-mini" href="index.html"><img src="assets/images/logo-mini.svg" alt="logo" /></a>
<a class="navbar-brand brand-logo" href="index.html"><img src="/a3b/admin/images/logo.svg" alt="logo" /></a>
<a class="navbar-brand brand-logo-mini" href="index.html"><img src="/a3b/admin/images/logo-mini.svg" alt="logo" /></a>
</div>
<div class="navbar-menu-wrapper d-flex align-items-stretch">
<button class="navbar-toggler navbar-toggler align-self-center" type="button" data-toggle="minimize">
@ -99,7 +99,7 @@
<li class="nav-item nav-profile dropdown">
<a class="nav-link dropdown-toggle" id="profileDropdown" href="#" data-toggle="dropdown" aria-expanded="false">
<div class="nav-profile-img">
<img src="assets/images/faces/face28.png" alt="image">
<img src="/a3b/admin/images/faces/face28.png" alt="image">
</div>
<div class="nav-profile-text">
<p class="mb-1 text-black">Henry Klein</p>
@ -107,7 +107,7 @@
</a>
<div class="dropdown-menu navbar-dropdown dropdown-menu-right p-0 border-0 font-size-sm" aria-labelledby="profileDropdown" data-x-placement="bottom-end">
<div class="p-3 text-center bg-primary">
<img class="img-avatar img-avatar48 img-avatar-thumb" src="assets/images/faces/face28.png" alt="">
<img class="img-avatar img-avatar48 img-avatar-thumb" src="/a3b/admin/images/faces/face28.png" alt="">
</div>
<div class="p-2">
<h5 class="dropdown-header text-uppercase pl-2 text-dark">User Options</h5>
@ -152,7 +152,7 @@
<div class="dropdown-divider"></div>
<a class="dropdown-item preview-item">
<div class="preview-thumbnail">
<img src="assets/images/faces/face4.jpg" alt="image" class="profile-pic">
<img src="/a3b/admin/images/faces/face4.jpg" alt="image" class="profile-pic">
</div>
<div class="preview-item-content d-flex align-items-start flex-column justify-content-center">
<h6 class="preview-subject ellipsis mb-1 font-weight-normal">Mark send you a message</h6>
@ -162,7 +162,7 @@
<div class="dropdown-divider"></div>
<a class="dropdown-item preview-item">
<div class="preview-thumbnail">
<img src="assets/images/faces/face2.jpg" alt="image" class="profile-pic">
<img src="/a3b/admin/images/faces/face2.jpg" alt="image" class="profile-pic">
</div>
<div class="preview-item-content d-flex align-items-start flex-column justify-content-center">
<h6 class="preview-subject ellipsis mb-1 font-weight-normal">Cregh send you a message</h6>
@ -172,7 +172,7 @@
<div class="dropdown-divider"></div>
<a class="dropdown-item preview-item">
<div class="preview-thumbnail">
<img src="assets/images/faces/face3.jpg" alt="image" class="profile-pic">
<img src="/a3b/admin/images/faces/face3.jpg" alt="image" class="profile-pic">
</div>
<div class="preview-item-content d-flex align-items-start flex-column justify-content-center">
<h6 class="preview-subject ellipsis mb-1 font-weight-normal">Profile picture updated</h6>
@ -316,7 +316,7 @@
<div>
<div class="d-flex align-items-center">
<div class="sidebar-profile-img">
<img src="assets/images/faces/face28.png" alt="image">
<img src="/a3b/admin/images/faces/face28.png" alt="image">
</div>
<div class="sidebar-profile-text">
<p class="mb-1">Henry Klein</p>
@ -574,19 +574,19 @@
</div>
<!-- container-scroller -->
<!-- plugins:js -->
<script src="assets/vendors/js/vendor.bundle.base.js"></script>
<script src="/a3b/admin/vendors/js/vendor.bundle.base.js"></script>
<!-- endinject -->
<!-- Plugin js for this page -->
<script src="assets/vendors/chart.js/Chart.min.js"></script>
<script src="assets/vendors/jquery-circle-progress/js/circle-progress.min.js"></script>
<script src="/a3b/admin/vendors/chart.js/Chart.min.js"></script>
<script src="/a3b/admin/vendors/jquery-circle-progress/js/circle-progress.min.js"></script>
<!-- End plugin js for this page -->
<!-- inject:js -->
<script src="assets/js/off-canvas.js"></script>
<script src="assets/js/hoverable-collapse.js"></script>
<script src="assets/js/misc.js"></script>
<script src="/a3b/admin/js/off-canvas.js"></script>
<script src="/a3b/admin/js/hoverable-collapse.js"></script>
<script src="/a3b/admin/js/misc.js"></script>
<!-- endinject -->
<!-- Custom js for this page -->
<script src="assets/js/dashboard.js"></script>
<script src="/a3b/admin/js/dashboard.js"></script>
<!-- End custom js for this page -->
</body>
</html>

11
src/admin.nim Normal file
View File

@ -0,0 +1,11 @@
import
mike,
nimja
proc admin*(ctx: Context): string=
# var ctx: Context # Replace YourContextType with the actual type of ctx
# ctx.send "Namaste! I am Mike, your personal assistant. How can I help you today?"
compileTemplateFile(getScriptDir() / "a3a" / "admin" / "index.html")