Web-programming_Anisin_R.S..../admin.html
2024-01-10 20:47:54 +04:00

206 lines
12 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<title>golfExude</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="module" src="node_modules/@popperjs/core/dist/umd/popper.min.js"></script>
<script type="module" src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
<link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="node_modules/bootstrap-icons/font/bootstrap-icons.min.css" rel="stylesheet">
<link rel="shortcut icon" href="images/favicon.ico">
<link rel="stylesheet" href="styles/style.css">
<link rel="stylesheet" href="styles/admin-style.css">
</head>
<body>
<header class="text-white text-center pt-4">
<a href="index.html" class="text-decoration-none"><h1 class="display-3 mb-0">golfExude</h1></a>
<nav class="navbar navbar-expand-lg border-top border-2 border-white justify-content-end align-items-center">
<div class="login-cart d-flex align-items-center me-1 me-lg-3 me-xl-4 me-xxl-5">
<div class="dropdown">
<a href="" class="me-3" role="button" id="dropdownMenuLink" data-bs-toggle="dropdown" aria-expanded="false"><i class="bi bi-person fs-3 d-flex align-items-center"></i></a>
<ul class="dropdown-menu dropdown-menu-dark dropdown-menu-end" aria-labelledby="dropdownMenuLink">
<li><a class="dropdown-item fw-bold" href="login.html">Войти</a></li>
<li><a class="dropdown-item fw-bold" href="admin.html">Панель администратора</a></li>
</ul>
</div>
<a href="cart.html"><i class="bi bi-bag fs-4 d-flex align-items-center"></i></a>
</div>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon navbar-dark"></span>
</button>
<div class="container-lg">
<div class="collapse navbar-collapse justify-content-center" id="navbarNavAltMarkup">
<ul class="navbar-nav align-items-center fs-5">
<li class="nav-item m-2"><a href="shirts.html">новинки<div></div></a></li>
<li class="nav-item m-2"><a href="shirts.html">верхняя одежда<div></div></a></li>
<li class="nav-item m-2"><a href="shirts.html">брюки<div></div></a></li>
<li class="nav-item m-2"><a href="shirts.html">футболки<div></div></a></li>
<li class="nav-item m-2"><a href="shirts.html">рубашки<div></div></a></li>
<li class="nav-item m-2"><a href="shirts.html">обувь<div></div></a></li>
<li class="nav-item m-2"><a href="shirts.html">головные уборы<div></div></a></li>
<li class="nav-item m-2"><a href="shirts.html">весь асортимент<div></div></a></li>
</ul>
</div>
</div>
</nav>
</header>
<main>
<h2 class="text-center display-6 my-4">Панель администратора</h2>
<div class="container-lg table-responsive">
<h3>Товары</h3>
<table id="items-table" class="table table-striped table-hover">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Название товара</th>
<th scope="col">Категория</th>
<th scope="col">Цена</th>
<th scope="col">Акция</th>
<th scope="col">Скидка</th>
<th scope="col">Цена с учетом акции</th>
<th scope="col"></th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div id="items-add" class="d-flex justify-content-center">
<button class="btn btn-primary fw-bold px-5 mb-5">Добавить товар</button>
</div>
<div class="container-lg table-responsive">
<h3>Акции</h3>
<table id="discounts-table" class="table table-striped table-hover">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Название акции</th>
<th scope="col">Процент скидки</th>
<th scope="col"></th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div id="discounts-add" class="d-flex justify-content-center">
<button class="btn btn-primary fw-bold px-5 mb-5">Добавить акцию</button>
</div>
</main>
<footer class="container-fluid p-3">
<div class="row fs-5">
<div class="col-sm-6">
<h3 class="display-6">golfExude</h3>
<p class="mb-2"><a class="nav-link" href="about-us.html">О нас</a></p>
<p class="mb-2"><a class="nav-link" href="physical-store.html">Физический магазин</a></p>
</div>
<div class="col-sm-6 text-end fw-bold">
<p class="mb-2">Связь с нами</p>
<p class="mb-2">service@golfexude.com</p>
<a class="link-dark fs-1 mx-1" href=""><i class="bi bi-telegram"></i></a>
<a class="link-dark fs-1 mx-1" href=""><i class="bi bi-instagram"></i></i></a>
<a class="link-dark fs-1 mx-1" href=""><i class="bi bi-twitter-x"></i></i></a>
</div>
</div>
<div class="row">
<div class="text-center">
<p class="m-0">© 2023 golfExude<br>
Все права защищены</p>
</div>
</div>
</footer>
<div id="items-update" class="modal fade" tabindex="-1" data-bs-backdrop="static" data-bs-keyboard="false">
<div class="modal-dialog">
<form id="items-form" class="needs-validation" novalidate>
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="items-update-title"></h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="text-center">
<img id="image-preview" src="https://via.placeholder.com/200" class="rounded"
alt="placeholder">
</div>
<input id="items-line-id" type="number" hidden>
<div class="mb-2">
<label for="item" class="form-label">Категория</label>
<select id="item" class="form-select" name="selected" required>
</select>
</div>
<div class="mb-2">
<label for="discount" class="form-label">Акция</label>
<select id="discount" class="form-select" name="selected" required>
</select>
</div>
<div class="mb-2">
<label class="form-label" for="name">Название</label>
<input id="name" name="name" class="form-control" type="text" required>
</div>
<div class="mb-2">
<label class="form-label" for="price">Цена</label>
<input id="price" name="price" class="form-control" type="number" value="0.00" min="1000.00"
step="10" required>
</div>
<div class="mb-2">
<label class="form-label" for="image">Изображение</label><br>
<label class="btn btn-outline-secondary">
<input id="image" type="file" name="image" class="form-control" accept="image/*">
Выбрать изображение
</label>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Закрыть</button>
<button type="submit" class="btn btn-primary">Сохранить</button>
</div>
</div>
</form>
</div>
</div>
<div id="discounts-update" class="modal fade" tabindex="-1" data-bs-backdrop="static" data-bs-keyboard="false">
<div class="modal-dialog">
<form id="discounts-form" class="needs-validation" novalidate>
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="discounts-update-title"></h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<input id="discounts-line-id" type="number" hidden>
<div class="mb-2">
<label class="form-label" for="discount-name">Название акции</label>
<input id="discount-name" name="discount-name" class="form-control" type="text" required>
</div>
<div class="mb-2">
<label class="form-label" for="percent">Процент</label>
<input id="percent" name="percent" class="form-control" type="number" value="0.00" min="0"
step="1" required>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Закрыть</button>
<button type="submit" class="btn btn-primary">Сохранить</button>
</div>
</div>
</form>
</div>
</div>
<script type="module">
import validation from "./js/validation";
import { linesForm } from "./js/lines";
import { discountsForm } from "./js/discounts-table-logic";
document.addEventListener('DOMContentLoaded', () => {
validation();
linesForm();
discountsForm();
});
</script>
</body>
</html>