PIbd-22_Puchkina_Internet_P.../laba3/page4.html

195 lines
6.4 KiB
HTML
Raw Normal View History

2023-12-02 02:43:00 +04:00
<html lang="ru">
<head>
<meta charset="utf-8" />
<title>Список товаров</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<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/@fortawesome/fontawesome-free/css/all.min.css"
rel="stylesheet"
/>
<link rel="stylesheet" href="./css/style.css" />
</head>
<body class="h-100 d-flex flex-column">
<header>
<a class="navbar-brand p-0" href="catalog.html">
<img src="images/iconCatalog.png" alt="Каталог" width="45" />
</a>
<a class="nav-link active" aria-current="page" href="index.html">ANNA</a>
<nav>
<a class="navbar-brand p-0" href="cart.html">
<img src="images/iconsCor.png" alt="Корзина" width="37" />
</a>
<a class="navbar-brand p-0" href="account.html">
<img src="images/iconsAcc.png" alt="Аккаунт" width="38" />
</a>
</nav>
</header>
<main class="container-fluid p-2">
<button id="items-add" type="submit" class="btn btn-success">
Добавить товар (диалог)
</button>
<a class="btn btn-secondary" href="/page-edit.html"
>Добавить товар (страница)</a
>
<div>
<table id="items-table" class="table table-light table-striped">
<thead>
<th scope="col"></th>
<th scope="col" class="w-25">Категория</th>
<th scope="col" class="w-25">Название</th>
<th scope="col" class="w-25">Цена</th>
<th scope="col" class="w-25">Количество</th>
<th scope="col" class="w-25">Цвет</th>
<th scope="col" class="w-25">Размеры</th>
<th scope="col"></th>
<th scope="col"></th>
<th scope="col"></th>
<th scope="col"></th>
</thead>
<tbody></tbody>
</table>
</div>
</main>
<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 rounded-circle"
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 class="form-label" for="description">Название</label>
<input
id="name"
name="name"
class="form-control"
type="text"
maxlength="100"
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="0.50"
required
/>
</div>
<div class="mb-2">
<label class="form-label" for="count">Количество</label>
<input
id="count"
name="count"
class="form-control"
type="number"
value="0"
min="1"
step="1"
required
/>
<div class="mb-2">
<label class="form-label" for="color">Цвет</label>
<input
id="color"
name="color"
class="form-control"
type="text"
maxlength="100"
required
/>
</div>
<div class="mb-2">
<label class="form-label" for="size">Размеры</label>
<input
id="size"
name="size"
class="form-control"
type="text"
maxlength="100"
required
/>
</div>
</div>
<div class="mb-2">
<label class="form-label" for="image">Изображение</label>
<input
id="image"
type="file"
name="image"
class="form-control"
accept="image/*"
/>
</div>
</div>
<div class="modal-footer">
<button
type="submit-grey"
class="btn btn-secondary"
data-bs-dismiss="modal"
>
Закрыть
</button>
<button type="submit" class="btn btn-success">Сохранить</button>
</div>
</div>
</form>
</div>
</div>
<script type="module">
import validation from "./js/validation";
import { linesForm } from "./js/lines";
document.addEventListener("DOMContentLoaded", () => {
validation();
linesForm();
});
</script>
</body>
</html>