just mb ready lab 3
This commit is contained in:
parent
c547f91887
commit
07e51455ad
140
admin.html
140
admin.html
@ -1,56 +1,32 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<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"
|
||||
/>
|
||||
<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="stylesheet" href="./static/css/base.css" />
|
||||
<link rel="stylesheet" href="./static/css/admin.css" />
|
||||
<title>Админка</title>
|
||||
<link
|
||||
rel="shortcut icon"
|
||||
href="./static/images/favicon.svg"
|
||||
type="image/x-icon"
|
||||
/>
|
||||
</head>
|
||||
<link rel="shortcut icon" href="./static/images/favicon.svg" type="image/x-icon" />
|
||||
</head>
|
||||
|
||||
<body class="d-flex flex-column min-vh-100">
|
||||
<body class="d-flex flex-column min-vh-100">
|
||||
<header class="sticky-top">
|
||||
<nav class="navbar navbar-expand-lg navbar-dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand d-flex align-items-center">
|
||||
<img
|
||||
src="./static/images/logo-livecinema-small.png"
|
||||
class="d-inline-block align-text-top me-4 d-none d-sm-block"
|
||||
/>
|
||||
<img src="./static/images/logo-livecinema-small.png"
|
||||
class="d-inline-block align-text-top me-4 d-none d-sm-block" />
|
||||
LiveCinema
|
||||
</a>
|
||||
<button
|
||||
class="navbar-toggler"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#navbarNavDropdown"
|
||||
aria-controls="navbarNavDropdown"
|
||||
aria-expanded="false"
|
||||
aria-label="Toggle navigation"
|
||||
>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavDropdown"
|
||||
aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div
|
||||
class="collapse navbar-collapse justify-content-end"
|
||||
id="navbarNavDropdown"
|
||||
>
|
||||
<div class="collapse navbar-collapse justify-content-end" id="navbarNavDropdown">
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="index.html">Главная</a>
|
||||
@ -81,10 +57,7 @@
|
||||
Добавить фильм (диалог)
|
||||
</button>
|
||||
</div>
|
||||
<table
|
||||
class="table table-sm table-responsive table-bordered border-primary table-hover"
|
||||
id="table"
|
||||
>
|
||||
<table class="table table-sm table-responsive table-bordered border-primary table-hover" id="table">
|
||||
<div class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -92,12 +65,10 @@
|
||||
<th scope="col">Название</th>
|
||||
<th scope="col">Жанр</th>
|
||||
<th scope="col" class="text-center">
|
||||
<span class="d-none d-sm-block">Описание</span
|
||||
><i class="bi bi-clock-history d-block d-sm-none"></i>
|
||||
<span class="d-none d-sm-block">Описание</span><i class="bi bi-clock-history d-block d-sm-none"></i>
|
||||
</th>
|
||||
<th scope="col" class="text-center">
|
||||
<span class="d-none d-sm-block"> Длительность </span
|
||||
><i class="bi bi-clock-history d-block d-sm-none"></i>
|
||||
<span class="d-none d-sm-block"> Длительность </span><i class="bi bi-clock-history d-block d-sm-none"></i>
|
||||
</th>
|
||||
<th scope="col" class="text-center">
|
||||
<span>Действие</span>
|
||||
@ -126,93 +97,45 @@
|
||||
</table>
|
||||
</main>
|
||||
|
||||
<div
|
||||
id="modal-movie"
|
||||
class="modal fade"
|
||||
tabindex="-1"
|
||||
data-bs-backdrop="static"
|
||||
data-bs-keyboard="false"
|
||||
>
|
||||
<div id="modal-movie" class="modal fade" tabindex="-1" data-bs-backdrop="static" data-bs-keyboard="false">
|
||||
<div class="modal-dialog">
|
||||
<form id="movie-form" class="needs-validation" novalidate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-5" id="movie-modal-title"></h1>
|
||||
<button
|
||||
type="button"
|
||||
class="btn-close"
|
||||
data-bs-dismiss="modal"
|
||||
aria-label="Close"
|
||||
></button>
|
||||
<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="./static/images/cover-placeholder160x230.png"
|
||||
class="rounded-2 img-fluid"
|
||||
alt="placeholder"
|
||||
/>
|
||||
<img id="image-preview" src="./static/images/cover-placeholder160x230.png" class="rounded-2 img-fluid"
|
||||
alt="placeholder" />
|
||||
</div>
|
||||
<input id="movie-id" type="number" hidden />
|
||||
<div class="mb-2">
|
||||
<label for="category" class="form-label">Жанр</label>
|
||||
<select
|
||||
id="category"
|
||||
class="form-select"
|
||||
name="selected"
|
||||
required
|
||||
></select>
|
||||
<select id="category" 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
|
||||
/>
|
||||
<input id="name" name="name" class="form-control" type="text" required />
|
||||
</div>
|
||||
<div class="mb-2">
|
||||
<label class="form-label" for="description"> Описание </label>
|
||||
<input
|
||||
id="description"
|
||||
name="description"
|
||||
class="form-control"
|
||||
type="text"
|
||||
required
|
||||
/>
|
||||
<input id="description" name="description" class="form-control" type="text" required />
|
||||
</div>
|
||||
<div class="mb-2">
|
||||
<label class="form-label" for="duration">
|
||||
Продолжителность
|
||||
</label>
|
||||
<input
|
||||
id="duration"
|
||||
name="duration"
|
||||
class="form-control"
|
||||
type="text"
|
||||
required
|
||||
/>
|
||||
<input id="duration" name="duration" class="form-control" type="text" required />
|
||||
</div>
|
||||
<div class="mb-2">
|
||||
<label class="form-label" for="image">Изображение</label>
|
||||
<input
|
||||
id="image"
|
||||
type="file"
|
||||
name="image"
|
||||
class="form-control"
|
||||
accept="image/*"
|
||||
/>
|
||||
<input id="image" type="file" name="image" class="form-control" accept="image/*" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-secondary"
|
||||
data-bs-dismiss="modal"
|
||||
>
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
|
||||
Закрыть
|
||||
</button>
|
||||
<button type="submit" class="btn btn-primary">Сохранить</button>
|
||||
@ -226,6 +149,13 @@
|
||||
<span> © 2023, Live Cinema. All rights reserved. </span>
|
||||
</footer>
|
||||
|
||||
<script type="module" src="./static/js/admin.js"></script>
|
||||
</body>
|
||||
<script type="module" src="./static/js/admin.js">
|
||||
import validation from "./static./js/validation.js";
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
validation();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,56 +1,32 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<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"
|
||||
/>
|
||||
<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="stylesheet" href="./static/css/base.css" />
|
||||
<link rel="stylesheet" href="./static/css/caregoryfilm.css" />
|
||||
<title>LiveCinema</title>
|
||||
<link
|
||||
rel="shortcut icon"
|
||||
href="./static/images/favicon.svg"
|
||||
type="image/x-icon"
|
||||
/>
|
||||
</head>
|
||||
<link rel="shortcut icon" href="./static/images/favicon.svg" type="image/x-icon" />
|
||||
</head>
|
||||
|
||||
<body class="d-flex flex-column">
|
||||
<body class="d-flex flex-column">
|
||||
<header class="sticky-top">
|
||||
<nav class="navbar navbar-expand-lg navbar-dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand d-flex align-items-center">
|
||||
<img
|
||||
src="./static/images/logo-livecinema-small.png"
|
||||
class="d-inline-block align-text-top me-4 d-none d-sm-block"
|
||||
/>
|
||||
<img src="./static/images/logo-livecinema-small.png"
|
||||
class="d-inline-block align-text-top me-4 d-none d-sm-block" />
|
||||
LiveCinema
|
||||
</a>
|
||||
<button
|
||||
class="navbar-toggler"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#navbarNavDropdown"
|
||||
aria-controls="navbarNavDropdown"
|
||||
aria-expanded="false"
|
||||
aria-label="Toggle navigation"
|
||||
>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavDropdown"
|
||||
aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div
|
||||
class="collapse navbar-collapse justify-content-end"
|
||||
id="navbarNavDropdown"
|
||||
>
|
||||
<div class="collapse navbar-collapse justify-content-end" id="navbarNavDropdown">
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/">Главная</a>
|
||||
@ -77,56 +53,15 @@
|
||||
</header>
|
||||
|
||||
<main class="flex-fill d-flex justify-content-center">
|
||||
<div
|
||||
class="content d-flex w-100 flex-column justify-content-around mb-5"
|
||||
id="films"
|
||||
>
|
||||
<div
|
||||
class="categories-row d-flex flex-column flex-md-row justify-content-around mt-5 mb-5"
|
||||
>
|
||||
<div
|
||||
class="category-card d-flex flex-column justify-content-center align-items-center mb-5 mb-md-0"
|
||||
>
|
||||
<img
|
||||
src="./static/img/img2.webp"
|
||||
class="img-fluid rounded-3"
|
||||
id="img1"
|
||||
/>
|
||||
<div class="content d-flex w-100 flex-column justify-content-around mb-5" id="films">
|
||||
<div class="categories-row d-flex flex-column flex-md-row justify-content-around mt-5 mb-5">
|
||||
<div class="category-card d-flex flex-column justify-content-center align-items-center mb-5 mb-md-0">
|
||||
<img src="./static/img/img2.webp" class="img-fluid rounded-3" id="img1" />
|
||||
<div class="icons w-50 d-flex justify-content-around mt-1 mb-1">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
fill="currentColor"
|
||||
class="bi bi-heart"
|
||||
viewBox="0 0 16 16"
|
||||
id="heart-icons"
|
||||
>
|
||||
<path
|
||||
d="m8 2.748-.717-.737C5.6.281 2.514.878 1.4 3.053c-.523 1.023-.641 2.5.314 4.385.92 1.815 2.834 3.989 6.286 6.357 3.452-2.368 5.365-4.542 6.286-6.357.955-1.886.838-3.362.314-4.385C13.486.878 10.4.28 8.717 2.01L8 2.748zM8 15C-7.333 4.868 3.279-3.04 7.824 1.143c.06.055.119.112.176.171a3.12 3.12 0 0 1 .176-.17C12.72-3.042 23.333 4.867 8 15z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
fill="currentColor"
|
||||
class="bi bi-clock-history"
|
||||
viewBox="0 0 16 16"
|
||||
id="time-icons"
|
||||
>
|
||||
<path
|
||||
d="M8.515 1.019A7 7 0 0 0 8 1V0a8 8 0 0 1 .589.022l-.074.997zm2.004.45a7.003 7.003 0 0 0-.985-.299l.219-.976c.383.086.76.2 1.126.342l-.36.933zm1.37.71a7.01 7.01 0 0 0-.439-.27l.493-.87a8.025 8.025 0 0 1 .979.654l-.615.789a6.996 6.996 0 0 0-.418-.302zm1.834 1.79a6.99 6.99 0 0 0-.653-.796l.724-.69c.27.285.52.59.747.91l-.818.576zm.744 1.352a7.08 7.08 0 0 0-.214-.468l.893-.45a7.976 7.976 0 0 1 .45 1.088l-.95.313a7.023 7.023 0 0 0-.179-.483zm.53 2.507a6.991 6.991 0 0 0-.1-1.025l.985-.17c.067.386.106.778.116 1.17l-1 .025zm-.131 1.538c.033-.17.06-.339.081-.51l.993.123a7.957 7.957 0 0 1-.23 1.155l-.964-.267c.046-.165.086-.332.12-.501zm-.952 2.379c.184-.29.346-.594.486-.908l.914.405c-.16.36-.345.706-.555 1.038l-.845-.535zm-.964 1.205c.122-.122.239-.248.35-.378l.758.653a8.073 8.073 0 0 1-.401.432l-.707-.707z"
|
||||
/>
|
||||
<path
|
||||
d="M8 1a7 7 0 1 0 4.95 11.95l.707.707A8.001 8.001 0 1 1 8 0v1z"
|
||||
/>
|
||||
<path
|
||||
d="M7.5 3a.5.5 0 0 1 .5.5v5.21l3.248 1.856a.5.5 0 0 1-.496.868l-3.5-2A.5.5 0 0 1 7 9V3.5a.5.5 0 0 1 .5-.5z"
|
||||
/>
|
||||
</svg>
|
||||
<svg width="16" height="16" class="bi bi-heart" id="icons"></svg>
|
||||
<svg width="16" height="16" class="bi bi-clock-history" id="icons"></svg>
|
||||
</div>
|
||||
<div class="tooltip-content text-center w-50">
|
||||
<div class="tooltip-content text-center w-50 d-flex justify-content-center align-items-center">
|
||||
<p>
|
||||
Некая информация об этом фильме. Вы сможете узнать всю
|
||||
информацию чуть позже, когда будет в процессе приготовления 3
|
||||
@ -135,48 +70,16 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="category-card d-flex flex-column justify-content-center align-items-center mb-5 mb-md-0"
|
||||
>
|
||||
<div class="category-card d-flex flex-column justify-content-center align-items-center mb-5 mb-md-0">
|
||||
<img src="./static/img/img2.webp" class="rounded-3" />
|
||||
|
||||
<!-- <img onmouseover="imgText_Visible()" src="./static/img/img2.webp" class="rounded-3"> -->
|
||||
<div class="icons w-50 d-flex justify-content-around mt-1 mb-1">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
fill="currentColor"
|
||||
class="bi bi-heart"
|
||||
viewBox="0 0 16 16"
|
||||
id="heart-icons"
|
||||
>
|
||||
<path
|
||||
d="m8 2.748-.717-.737C5.6.281 2.514.878 1.4 3.053c-.523 1.023-.641 2.5.314 4.385.92 1.815 2.834 3.989 6.286 6.357 3.452-2.368 5.365-4.542 6.286-6.357.955-1.886.838-3.362.314-4.385C13.486.878 10.4.28 8.717 2.01L8 2.748zM8 15C-7.333 4.868 3.279-3.04 7.824 1.143c.06.055.119.112.176.171a3.12 3.12 0 0 1 .176-.17C12.72-3.042 23.333 4.867 8 15z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
fill="currentColor"
|
||||
class="bi bi-clock-history"
|
||||
viewBox="0 0 16 16"
|
||||
id="time-icons"
|
||||
>
|
||||
<path
|
||||
d="M8.515 1.019A7 7 0 0 0 8 1V0a8 8 0 0 1 .589.022l-.074.997zm2.004.45a7.003 7.003 0 0 0-.985-.299l.219-.976c.383.086.76.2 1.126.342l-.36.933zm1.37.71a7.01 7.01 0 0 0-.439-.27l.493-.87a8.025 8.025 0 0 1 .979.654l-.615.789a6.996 6.996 0 0 0-.418-.302zm1.834 1.79a6.99 6.99 0 0 0-.653-.796l.724-.69c.27.285.52.59.747.91l-.818.576zm.744 1.352a7.08 7.08 0 0 0-.214-.468l.893-.45a7.976 7.976 0 0 1 .45 1.088l-.95.313a7.023 7.023 0 0 0-.179-.483zm.53 2.507a6.991 6.991 0 0 0-.1-1.025l.985-.17c.067.386.106.778.116 1.17l-1 .025zm-.131 1.538c.033-.17.06-.339.081-.51l.993.123a7.957 7.957 0 0 1-.23 1.155l-.964-.267c.046-.165.086-.332.12-.501zm-.952 2.379c.184-.29.346-.594.486-.908l.914.405c-.16.36-.345.706-.555 1.038l-.845-.535zm-.964 1.205c.122-.122.239-.248.35-.378l.758.653a8.073 8.073 0 0 1-.401.432l-.707-.707z"
|
||||
/>
|
||||
<path
|
||||
d="M8 1a7 7 0 1 0 4.95 11.95l.707.707A8.001 8.001 0 1 1 8 0v1z"
|
||||
/>
|
||||
<path
|
||||
d="M7.5 3a.5.5 0 0 1 .5.5v5.21l3.248 1.856a.5.5 0 0 1-.496.868l-3.5-2A.5.5 0 0 1 7 9V3.5a.5.5 0 0 1 .5-.5z"
|
||||
/>
|
||||
</svg>
|
||||
<svg width="16" height="16" class="bi bi-heart" id="icons"></svg>
|
||||
<svg width="16" height="16" class="bi bi-clock-history" id="icons"></svg>
|
||||
</div>
|
||||
<!-- <span class="category-name text-center mt-2">Комедия</span> -->
|
||||
<div class="tooltip-content text-center w-50">
|
||||
<div class="tooltip-content text-center w-50 d-flex justify-content-center align-items-center">
|
||||
<p>
|
||||
Некая информация об этом фильме. Вы сможете узнать всю
|
||||
информацию чуть позже, когда будет в процессе приготовления 3
|
||||
@ -186,49 +89,15 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="categories-row d-flex flex-column flex-md-row justify-content-around mt-5"
|
||||
>
|
||||
<div
|
||||
class="category-card d-flex flex-column justify-content-center align-items-center mb-5 mb-md-0"
|
||||
>
|
||||
<div class="categories-row d-flex flex-column flex-md-row justify-content-around mt-5">
|
||||
<div class="category-card d-flex flex-column justify-content-center align-items-center mb-5 mb-md-0">
|
||||
<img src="./static/img/img2.webp" class="rounded-3" />
|
||||
<div class="icons w-50 d-flex justify-content-around mt-1 mb-1">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
fill="currentColor"
|
||||
class="bi bi-heart"
|
||||
viewBox="0 0 16 16"
|
||||
id="heart-icons"
|
||||
>
|
||||
<path
|
||||
d="m8 2.748-.717-.737C5.6.281 2.514.878 1.4 3.053c-.523 1.023-.641 2.5.314 4.385.92 1.815 2.834 3.989 6.286 6.357 3.452-2.368 5.365-4.542 6.286-6.357.955-1.886.838-3.362.314-4.385C13.486.878 10.4.28 8.717 2.01L8 2.748zM8 15C-7.333 4.868 3.279-3.04 7.824 1.143c.06.055.119.112.176.171a3.12 3.12 0 0 1 .176-.17C12.72-3.042 23.333 4.867 8 15z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
fill="currentColor"
|
||||
class="bi bi-clock-history"
|
||||
viewBox="0 0 16 16"
|
||||
id="time-icons"
|
||||
>
|
||||
<path
|
||||
d="M8.515 1.019A7 7 0 0 0 8 1V0a8 8 0 0 1 .589.022l-.074.997zm2.004.45a7.003 7.003 0 0 0-.985-.299l.219-.976c.383.086.76.2 1.126.342l-.36.933zm1.37.71a7.01 7.01 0 0 0-.439-.27l.493-.87a8.025 8.025 0 0 1 .979.654l-.615.789a6.996 6.996 0 0 0-.418-.302zm1.834 1.79a6.99 6.99 0 0 0-.653-.796l.724-.69c.27.285.52.59.747.91l-.818.576zm.744 1.352a7.08 7.08 0 0 0-.214-.468l.893-.45a7.976 7.976 0 0 1 .45 1.088l-.95.313a7.023 7.023 0 0 0-.179-.483zm.53 2.507a6.991 6.991 0 0 0-.1-1.025l.985-.17c.067.386.106.778.116 1.17l-1 .025zm-.131 1.538c.033-.17.06-.339.081-.51l.993.123a7.957 7.957 0 0 1-.23 1.155l-.964-.267c.046-.165.086-.332.12-.501zm-.952 2.379c.184-.29.346-.594.486-.908l.914.405c-.16.36-.345.706-.555 1.038l-.845-.535zm-.964 1.205c.122-.122.239-.248.35-.378l.758.653a8.073 8.073 0 0 1-.401.432l-.707-.707z"
|
||||
/>
|
||||
<path
|
||||
d="M8 1a7 7 0 1 0 4.95 11.95l.707.707A8.001 8.001 0 1 1 8 0v1z"
|
||||
/>
|
||||
<path
|
||||
d="M7.5 3a.5.5 0 0 1 .5.5v5.21l3.248 1.856a.5.5 0 0 1-.496.868l-3.5-2A.5.5 0 0 1 7 9V3.5a.5.5 0 0 1 .5-.5z"
|
||||
/>
|
||||
</svg>
|
||||
<svg width="16" height="16" class="bi bi-heart" id="icons"></svg>
|
||||
<svg width="16" height="16" class="bi bi-clock-history" id="icons"></svg>
|
||||
</div>
|
||||
<!-- <span class="category-name text-center mt-2">Драма</span> -->
|
||||
<div class="tooltip-content text-center w-50">
|
||||
<div class="tooltip-content text-center w-50 d-flex justify-content-center align-items-center">
|
||||
<p>
|
||||
Некая информация об этом фильме. Вы сможете узнать всю
|
||||
информацию чуть позже, когда будет в процессе приготовления 3
|
||||
@ -236,46 +105,14 @@
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="category-card d-flex flex-column justify-content-center align-items-center mb-5 mb-md-0"
|
||||
>
|
||||
<div class="category-card d-flex flex-column justify-content-center align-items-center mb-5 mb-md-0">
|
||||
<img src="./static/img/img2.webp" class="rounded-3" />
|
||||
<div class="icons w-50 d-flex justify-content-around mt-1 mb-1">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
fill="currentColor"
|
||||
class="bi bi-heart"
|
||||
viewBox="0 0 16 16"
|
||||
id="heart-icons"
|
||||
>
|
||||
<path
|
||||
d="m8 2.748-.717-.737C5.6.281 2.514.878 1.4 3.053c-.523 1.023-.641 2.5.314 4.385.92 1.815 2.834 3.989 6.286 6.357 3.452-2.368 5.365-4.542 6.286-6.357.955-1.886.838-3.362.314-4.385C13.486.878 10.4.28 8.717 2.01L8 2.748zM8 15C-7.333 4.868 3.279-3.04 7.824 1.143c.06.055.119.112.176.171a3.12 3.12 0 0 1 .176-.17C12.72-3.042 23.333 4.867 8 15z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
fill="currentColor"
|
||||
class="bi bi-clock-history"
|
||||
viewBox="0 0 16 16"
|
||||
id="time-icons"
|
||||
>
|
||||
<path
|
||||
d="M8.515 1.019A7 7 0 0 0 8 1V0a8 8 0 0 1 .589.022l-.074.997zm2.004.45a7.003 7.003 0 0 0-.985-.299l.219-.976c.383.086.76.2 1.126.342l-.36.933zm1.37.71a7.01 7.01 0 0 0-.439-.27l.493-.87a8.025 8.025 0 0 1 .979.654l-.615.789a6.996 6.996 0 0 0-.418-.302zm1.834 1.79a6.99 6.99 0 0 0-.653-.796l.724-.69c.27.285.52.59.747.91l-.818.576zm.744 1.352a7.08 7.08 0 0 0-.214-.468l.893-.45a7.976 7.976 0 0 1 .45 1.088l-.95.313a7.023 7.023 0 0 0-.179-.483zm.53 2.507a6.991 6.991 0 0 0-.1-1.025l.985-.17c.067.386.106.778.116 1.17l-1 .025zm-.131 1.538c.033-.17.06-.339.081-.51l.993.123a7.957 7.957 0 0 1-.23 1.155l-.964-.267c.046-.165.086-.332.12-.501zm-.952 2.379c.184-.29.346-.594.486-.908l.914.405c-.16.36-.345.706-.555 1.038l-.845-.535zm-.964 1.205c.122-.122.239-.248.35-.378l.758.653a8.073 8.073 0 0 1-.401.432l-.707-.707z"
|
||||
/>
|
||||
<path
|
||||
d="M8 1a7 7 0 1 0 4.95 11.95l.707.707A8.001 8.001 0 1 1 8 0v1z"
|
||||
/>
|
||||
<path
|
||||
d="M7.5 3a.5.5 0 0 1 .5.5v5.21l3.248 1.856a.5.5 0 0 1-.496.868l-3.5-2A.5.5 0 0 1 7 9V3.5a.5.5 0 0 1 .5-.5z"
|
||||
/>
|
||||
</svg>
|
||||
<svg width="16" height="16" class="bi bi-heart" id="icons"></svg>
|
||||
<svg width="16" height="16" class="bi bi-clock-history" id="icons"></svg>
|
||||
</div>
|
||||
<!-- <span class="category-name text-center mt-2">Комедия</span> -->
|
||||
<div class="tooltip-content text-center w-50">
|
||||
<div class="tooltip-content text-center w-50 d-flex justify-content-center align-items-center">
|
||||
<p>
|
||||
Некая информация об этом фильме. Вы сможете узнать всю
|
||||
информацию чуть позже, когда будет в процессе приготовления 3
|
||||
@ -285,96 +122,32 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="categories-row d-flex flex-column flex-md-row justify-content-around mt-5"
|
||||
>
|
||||
<div
|
||||
class="category-card d-flex flex-column justify-content-center align-items-center mb-5 mb-md-0"
|
||||
>
|
||||
<div class="categories-row d-flex flex-column flex-md-row justify-content-around mt-5">
|
||||
<div class="category-card d-flex flex-column justify-content-center align-items-center mb-5 mb-md-0">
|
||||
<img src="./static/img/img2.webp" class="rounded-3" />
|
||||
<div class="icons w-50 d-flex justify-content-around mt-1 mb-1">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
fill="currentColor"
|
||||
class="bi bi-heart"
|
||||
viewBox="0 0 16 16"
|
||||
id="heart-icons"
|
||||
>
|
||||
<path
|
||||
d="m8 2.748-.717-.737C5.6.281 2.514.878 1.4 3.053c-.523 1.023-.641 2.5.314 4.385.92 1.815 2.834 3.989 6.286 6.357 3.452-2.368 5.365-4.542 6.286-6.357.955-1.886.838-3.362.314-4.385C13.486.878 10.4.28 8.717 2.01L8 2.748zM8 15C-7.333 4.868 3.279-3.04 7.824 1.143c.06.055.119.112.176.171a3.12 3.12 0 0 1 .176-.17C12.72-3.042 23.333 4.867 8 15z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
fill="currentColor"
|
||||
class="bi bi-clock-history"
|
||||
viewBox="0 0 16 16"
|
||||
id="time-icons"
|
||||
>
|
||||
<path
|
||||
d="M8.515 1.019A7 7 0 0 0 8 1V0a8 8 0 0 1 .589.022l-.074.997zm2.004.45a7.003 7.003 0 0 0-.985-.299l.219-.976c.383.086.76.2 1.126.342l-.36.933zm1.37.71a7.01 7.01 0 0 0-.439-.27l.493-.87a8.025 8.025 0 0 1 .979.654l-.615.789a6.996 6.996 0 0 0-.418-.302zm1.834 1.79a6.99 6.99 0 0 0-.653-.796l.724-.69c.27.285.52.59.747.91l-.818.576zm.744 1.352a7.08 7.08 0 0 0-.214-.468l.893-.45a7.976 7.976 0 0 1 .45 1.088l-.95.313a7.023 7.023 0 0 0-.179-.483zm.53 2.507a6.991 6.991 0 0 0-.1-1.025l.985-.17c.067.386.106.778.116 1.17l-1 .025zm-.131 1.538c.033-.17.06-.339.081-.51l.993.123a7.957 7.957 0 0 1-.23 1.155l-.964-.267c.046-.165.086-.332.12-.501zm-.952 2.379c.184-.29.346-.594.486-.908l.914.405c-.16.36-.345.706-.555 1.038l-.845-.535zm-.964 1.205c.122-.122.239-.248.35-.378l.758.653a8.073 8.073 0 0 1-.401.432l-.707-.707z"
|
||||
/>
|
||||
<path
|
||||
d="M8 1a7 7 0 1 0 4.95 11.95l.707.707A8.001 8.001 0 1 1 8 0v1z"
|
||||
/>
|
||||
<path
|
||||
d="M7.5 3a.5.5 0 0 1 .5.5v5.21l3.248 1.856a.5.5 0 0 1-.496.868l-3.5-2A.5.5 0 0 1 7 9V3.5a.5.5 0 0 1 .5-.5z"
|
||||
/>
|
||||
</svg>
|
||||
<svg width="16" height="16" class="bi bi-heart" id="icons"></svg>
|
||||
<svg width="16" height="16" class="bi bi-clock-history" id="icons"></svg>
|
||||
</div>
|
||||
<!-- <span class="category-name text-center mt-2">Драма</span> -->
|
||||
<div class="tooltip-content text-center w-50">
|
||||
<div class="tooltip-content text-center w-50 d-flex justify-content-center align-items-center">
|
||||
<p>
|
||||
<!-- <span> -->
|
||||
Некая информация об этом фильме. Вы сможете узнать всю
|
||||
информацию чуть позже, когда будет в процессе приготовления 3
|
||||
лаба...
|
||||
<!-- </span> -->
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="category-card d-flex flex-column justify-content-center align-items-center mb-5 mb-md-0"
|
||||
>
|
||||
<div class="category-card d-flex flex-column justify-content-center align-items-center mb-5 mb-md-0">
|
||||
<img src="./static/img/img2.webp" class="rounded-3" />
|
||||
<div class="icons w-50 d-flex justify-content-around mt-1 mb-1">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
fill="currentColor"
|
||||
class="bi bi-heart"
|
||||
viewBox="0 0 16 16"
|
||||
id="heart-icons"
|
||||
>
|
||||
<path
|
||||
d="m8 2.748-.717-.737C5.6.281 2.514.878 1.4 3.053c-.523 1.023-.641 2.5.314 4.385.92 1.815 2.834 3.989 6.286 6.357 3.452-2.368 5.365-4.542 6.286-6.357.955-1.886.838-3.362.314-4.385C13.486.878 10.4.28 8.717 2.01L8 2.748zM8 15C-7.333 4.868 3.279-3.04 7.824 1.143c.06.055.119.112.176.171a3.12 3.12 0 0 1 .176-.17C12.72-3.042 23.333 4.867 8 15z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
fill="currentColor"
|
||||
class="bi bi-clock-history"
|
||||
viewBox="0 0 16 16"
|
||||
id="time-icons"
|
||||
>
|
||||
<path
|
||||
d="M8.515 1.019A7 7 0 0 0 8 1V0a8 8 0 0 1 .589.022l-.074.997zm2.004.45a7.003 7.003 0 0 0-.985-.299l.219-.976c.383.086.76.2 1.126.342l-.36.933zm1.37.71a7.01 7.01 0 0 0-.439-.27l.493-.87a8.025 8.025 0 0 1 .979.654l-.615.789a6.996 6.996 0 0 0-.418-.302zm1.834 1.79a6.99 6.99 0 0 0-.653-.796l.724-.69c.27.285.52.59.747.91l-.818.576zm.744 1.352a7.08 7.08 0 0 0-.214-.468l.893-.45a7.976 7.976 0 0 1 .45 1.088l-.95.313a7.023 7.023 0 0 0-.179-.483zm.53 2.507a6.991 6.991 0 0 0-.1-1.025l.985-.17c.067.386.106.778.116 1.17l-1 .025zm-.131 1.538c.033-.17.06-.339.081-.51l.993.123a7.957 7.957 0 0 1-.23 1.155l-.964-.267c.046-.165.086-.332.12-.501zm-.952 2.379c.184-.29.346-.594.486-.908l.914.405c-.16.36-.345.706-.555 1.038l-.845-.535zm-.964 1.205c.122-.122.239-.248.35-.378l.758.653a8.073 8.073 0 0 1-.401.432l-.707-.707z"
|
||||
/>
|
||||
<path
|
||||
d="M8 1a7 7 0 1 0 4.95 11.95l.707.707A8.001 8.001 0 1 1 8 0v1z"
|
||||
/>
|
||||
<path
|
||||
d="M7.5 3a.5.5 0 0 1 .5.5v5.21l3.248 1.856a.5.5 0 0 1-.496.868l-3.5-2A.5.5 0 0 1 7 9V3.5a.5.5 0 0 1 .5-.5z"
|
||||
/>
|
||||
</svg>
|
||||
<svg width="16" height="16" class="bi bi-heart" id="icons"></svg>
|
||||
<svg width="16" height="16" class="bi bi-clock-history" id="icons"></svg>
|
||||
</div>
|
||||
<!-- <span class="category-name text-center mt-2">Комедия</span> -->
|
||||
<div class="tooltip-content text-center w-50">
|
||||
<div class="tooltip-content text-center w-50 d-flex justify-content-center align-items-center">
|
||||
<p>
|
||||
Некая информация об этом фильме. Вы сможете узнать всю
|
||||
информацию чуть позже, когда будет в процессе приготовления 3
|
||||
@ -390,5 +163,6 @@
|
||||
</footer>
|
||||
|
||||
<script type="module" src="./static/js/categoryfilm.js"></script>
|
||||
</body>
|
||||
</body>
|
||||
|
||||
</html>
|
204
katalog.html
204
katalog.html
@ -1,56 +1,32 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<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"
|
||||
/>
|
||||
<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="stylesheet" href="./static/css/base.css" />
|
||||
<link rel="stylesheet" href="./static/css/catalog.css" />
|
||||
<title>Каталог</title>
|
||||
<link
|
||||
rel="shortcut icon"
|
||||
href="./static/images/favicon.svg"
|
||||
type="image/x-icon"
|
||||
/>
|
||||
</head>
|
||||
<link rel="shortcut icon" href="./static/images/favicon.svg" type="image/x-icon" />
|
||||
</head>
|
||||
|
||||
<body class="d-flex flex-column">
|
||||
<body class="d-flex flex-column">
|
||||
<header class="sticky-top">
|
||||
<nav class="navbar navbar-expand-lg navbar-dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand d-flex align-items-center">
|
||||
<img
|
||||
src="./static/images/logo-livecinema-small.png"
|
||||
class="d-inline-block align-text-top me-4 d-none d-sm-block"
|
||||
/>
|
||||
<img src="./static/images/logo-livecinema-small.png"
|
||||
class="d-inline-block align-text-top me-4 d-none d-sm-block" />
|
||||
LiveCinema
|
||||
</a>
|
||||
<button
|
||||
class="navbar-toggler"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#navbarNavDropdown"
|
||||
aria-controls="navbarNavDropdown"
|
||||
aria-expanded="false"
|
||||
aria-label="Toggle navigation"
|
||||
>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavDropdown"
|
||||
aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div
|
||||
class="collapse navbar-collapse justify-content-end"
|
||||
id="navbarNavDropdown"
|
||||
>
|
||||
<div class="collapse navbar-collapse justify-content-end" id="navbarNavDropdown">
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/">Главная</a>
|
||||
@ -77,76 +53,39 @@
|
||||
</header>
|
||||
|
||||
<main class="flex-fill d-flex justify-content-center">
|
||||
<div
|
||||
class="content d-flex flex-column justify-content-around"
|
||||
id="content"
|
||||
>
|
||||
<div class="content d-flex flex-column justify-content-around" id="content">
|
||||
<div id="categories" class="d-flex flex-column justify-content-around">
|
||||
<div
|
||||
class="categories-row d-flex flex-column flex-md-row justify-content-around mt-5"
|
||||
>
|
||||
<a
|
||||
class="category-card d-flex flex-column justify-content-center align-items-center mb-5 mb-md-0"
|
||||
href="/categoryfilm.html"
|
||||
>
|
||||
<img
|
||||
src="./static/images/cover-bez-pravil.webp"
|
||||
class="rounded-3 category-img"
|
||||
/>
|
||||
<div class="categories-row d-flex flex-column flex-md-row justify-content-around mt-5">
|
||||
<a class="category-card d-flex flex-column justify-content-center align-items-center mb-5 mb-md-0"
|
||||
href="/categoryfilm.html">
|
||||
<img src="./static/images/cover-bez-pravil.webp" class="rounded-3 category-img" />
|
||||
<span class="category-name text-center mt-2">Драма</span>
|
||||
</a>
|
||||
<a
|
||||
class="category-card d-flex flex-column justify-content-center align-items-center mb-5 mb-md-0"
|
||||
href="/categoryfilm.html"
|
||||
>
|
||||
<img
|
||||
src="./static/images/cover-dva-holma.webp"
|
||||
class="rounded-3 category-img"
|
||||
/>
|
||||
<a class="category-card d-flex flex-column justify-content-center align-items-center mb-5 mb-md-0"
|
||||
href="/categoryfilm.html">
|
||||
<img src="./static/images/cover-dva-holma.webp" class="rounded-3 category-img" />
|
||||
<span class="category-name text-center mt-2">Боевик</span>
|
||||
</a>
|
||||
<a
|
||||
class="category-card d-flex flex-column justify-content-center align-items-center mb-5 mb-md-0"
|
||||
href="/categoryfilm.html"
|
||||
>
|
||||
<img
|
||||
src="./static/images/cover-kiberderevnya.webp"
|
||||
class="rounded-3 category-img"
|
||||
/>
|
||||
<a class="category-card d-flex flex-column justify-content-center align-items-center mb-5 mb-md-0"
|
||||
href="/categoryfilm.html">
|
||||
<img src="./static/images/cover-kiberderevnya.webp" class="rounded-3 category-img" />
|
||||
<span class="category-name text-center mt-2">Триллер</span>
|
||||
</a>
|
||||
</div>
|
||||
<div
|
||||
class="categories-row d-flex flex-column flex-md-row justify-content-around mt-5"
|
||||
>
|
||||
<a
|
||||
class="category-card d-flex flex-column justify-content-center align-items-center mb-5 mb-md-0"
|
||||
href="/categoryfilm.html"
|
||||
>
|
||||
<img
|
||||
src="./static/images/cover-apgreyd.jpeg"
|
||||
class="rounded-3 category-img"
|
||||
/>
|
||||
<div class="categories-row d-flex flex-column flex-md-row justify-content-around mt-5">
|
||||
<a class="category-card d-flex flex-column justify-content-center align-items-center mb-5 mb-md-0"
|
||||
href="/categoryfilm.html">
|
||||
<img src="./static/images/cover-apgreyd.jpeg" class="rounded-3 category-img" />
|
||||
<span class="category-name text-center mt-2">Ужасы</span>
|
||||
</a>
|
||||
<a
|
||||
class="category-card d-flex flex-column justify-content-center align-items-center mb-5 mb-md-0"
|
||||
href="/categoryfilm.html"
|
||||
>
|
||||
<img
|
||||
src="./static/images/cover-57-sekund.jpeg"
|
||||
class="rounded-3 category-img"
|
||||
/>
|
||||
<a class="category-card d-flex flex-column justify-content-center align-items-center mb-5 mb-md-0"
|
||||
href="/categoryfilm.html">
|
||||
<img src="./static/images/cover-57-sekund.jpeg" class="rounded-3 category-img" />
|
||||
<span class="category-name text-center mt-2">Детектив</span>
|
||||
</a>
|
||||
<a
|
||||
class="category-card d-flex flex-column justify-content-center align-items-center mb-5 mb-md-0"
|
||||
href="/categoryfilm.html"
|
||||
>
|
||||
<img
|
||||
src="./static/images/cover-cherniy-lotos.jpg"
|
||||
class="rounded-3 category-img"
|
||||
/>
|
||||
<a class="category-card d-flex flex-column justify-content-center align-items-center mb-5 mb-md-0"
|
||||
href="/categoryfilm.html">
|
||||
<img src="./static/images/cover-cherniy-lotos.jpg" class="rounded-3 category-img" />
|
||||
<span class="category-name text-center mt-2">Фантастика</span>
|
||||
</a>
|
||||
</div>
|
||||
@ -155,34 +94,16 @@
|
||||
<div class="premiers-row d-flex justify-content-center my-5">
|
||||
<div id="carouselExampleCaptions" class="carousel slide w-100">
|
||||
<div class="carousel-indicators">
|
||||
<button
|
||||
type="button"
|
||||
data-bs-target="#carouselExampleCaptions"
|
||||
data-bs-slide-to="0"
|
||||
class="active"
|
||||
aria-current="true"
|
||||
aria-label="Slide 1"
|
||||
></button>
|
||||
<button
|
||||
type="button"
|
||||
data-bs-target="#carouselExampleCaptions"
|
||||
data-bs-slide-to="1"
|
||||
aria-label="Slide 2"
|
||||
></button>
|
||||
<button
|
||||
type="button"
|
||||
data-bs-target="#carouselExampleCaptions"
|
||||
data-bs-slide-to="2"
|
||||
aria-label="Slide 3"
|
||||
></button>
|
||||
<button type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide-to="0" class="active"
|
||||
aria-current="true" aria-label="Slide 1"></button>
|
||||
<button type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide-to="1"
|
||||
aria-label="Slide 2"></button>
|
||||
<button type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide-to="2"
|
||||
aria-label="Slide 3"></button>
|
||||
</div>
|
||||
<div class="carousel-inner">
|
||||
<div class="carousel-item active">
|
||||
<img
|
||||
src="./static/images/poster-posle-navsegda.webp"
|
||||
class="d-block w-100"
|
||||
alt="..."
|
||||
/>
|
||||
<img src="./static/images/poster-posle-navsegda.webp" class="d-block w-100" alt="..." />
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<h5>После навсегда</h5>
|
||||
<p>
|
||||
@ -192,11 +113,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
<img
|
||||
src="./static/images/poster-posredniki.webp"
|
||||
class="d-block w-100"
|
||||
alt="..."
|
||||
/>
|
||||
<img src="./static/images/poster-posredniki.webp" class="d-block w-100" alt="..." />
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<h5>Посредники</h5>
|
||||
<p>
|
||||
@ -206,11 +123,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
<img
|
||||
src="./static/images/poster-korolevskiy-korgi.webp"
|
||||
class="d-block w-100"
|
||||
alt="..."
|
||||
/>
|
||||
<img src="./static/images/poster-korolevskiy-korgi.webp" class="d-block w-100" alt="..." />
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<h5>Королевский корги</h5>
|
||||
<p>
|
||||
@ -220,28 +133,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
class="carousel-control-prev"
|
||||
type="button"
|
||||
data-bs-target="#carouselExampleCaptions"
|
||||
data-bs-slide="prev"
|
||||
>
|
||||
<span
|
||||
class="carousel-control-prev-icon"
|
||||
aria-hidden="true"
|
||||
></span>
|
||||
<button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleCaptions"
|
||||
data-bs-slide="prev">
|
||||
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Previous</span>
|
||||
</button>
|
||||
<button
|
||||
class="carousel-control-next"
|
||||
type="button"
|
||||
data-bs-target="#carouselExampleCaptions"
|
||||
data-bs-slide="next"
|
||||
>
|
||||
<span
|
||||
class="carousel-control-next-icon"
|
||||
aria-hidden="true"
|
||||
></span>
|
||||
<button class="carousel-control-next" type="button" data-bs-target="#carouselExampleCaptions"
|
||||
data-bs-slide="next">
|
||||
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Next</span>
|
||||
</button>
|
||||
</div>
|
||||
@ -251,7 +150,8 @@
|
||||
<footer class="container-fluid py-1">
|
||||
<span> © 2023 LiveCinema Бакальская Е. Д. </span>
|
||||
</footer>
|
||||
</body>
|
||||
</body>
|
||||
|
||||
<script type="module" src="./static/js/katalog.js"></script>
|
||||
|
||||
<script type="module" src="./static/js/katalog.js"></script>
|
||||
</html>
|
@ -41,3 +41,13 @@ main {
|
||||
#item-show {
|
||||
background-image: url("../images/barbie-dumaet.jpg");
|
||||
}
|
||||
|
||||
#icons {
|
||||
direction: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.img-fluid {
|
||||
height: 300px;
|
||||
}
|
@ -14,8 +14,6 @@ document
|
||||
const modal = document.getElementById("modal-movie");
|
||||
const myModal = modal ? new Modal(modal, {}) : null;
|
||||
|
||||
// myModal.show();
|
||||
|
||||
function createItemsOption(name, value = "", isSelected = false) {
|
||||
const option = document.createElement("option");
|
||||
option.value = value || "";
|
||||
@ -53,7 +51,6 @@ async function readFile(file) {
|
||||
});
|
||||
}
|
||||
|
||||
// TODO
|
||||
// функция для обновления блока с превью выбранного изображения
|
||||
async function updateImagePreview() {
|
||||
// получение выбранного файла
|
||||
@ -69,14 +66,15 @@ async function updateImagePreview() {
|
||||
const imagePlaceholder = "./static/images/cover-placeholder160x230.png";
|
||||
|
||||
modalControls.form.addEventListener("submit", async (event) => {
|
||||
console.info("Form onSubmit");
|
||||
// отключение стандартного поведения формы при отправке
|
||||
// при отправке страница обновляется и JS перестает работать
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
// если форма не прошла валидацию, то ничего делать не нужно
|
||||
// if (!cntrls.form.checkValidity()) {
|
||||
// return;
|
||||
// }
|
||||
if (!modalControls.form.checkValidity()) {
|
||||
return;
|
||||
}
|
||||
|
||||
let imageBase64 = "";
|
||||
// Получение выбранного пользователем изображения в виде base64 строки
|
||||
@ -115,14 +113,19 @@ modalControls.form.addEventListener("submit", async (event) => {
|
||||
);
|
||||
await moviesApiEndpoint.createObject(movie);
|
||||
} else {
|
||||
// TODO
|
||||
// await editLine(
|
||||
// currentId,
|
||||
// cntrls.itemsType.value,
|
||||
// cntrls.price.value,
|
||||
// cntrls.count.value,
|
||||
// imageBase64,
|
||||
// );
|
||||
// чтобы обновить запись, нужно сначала получить ее текущее состояние
|
||||
var movieObj = await moviesApiEndpoint.getObject(currentId);
|
||||
// затем изменяем нужные поля
|
||||
movieObj.name = modalControls.inputName.value;
|
||||
movieObj.description = modalControls.inputDescription.value;
|
||||
movieObj.duration = modalControls.inputDuration.value;
|
||||
movieObj.categoryId = modalControls.selectCategory.value;
|
||||
// если картинка поменялась, то она будет храниться в переменной imageBase64 (см. код выше)
|
||||
if (imageBase64 != "") {
|
||||
movieObj.img = imageBase64;
|
||||
}
|
||||
// обновляем запись
|
||||
await moviesApiEndpoint.updateObject(movieObj);
|
||||
}
|
||||
|
||||
// после выполнения добавления/обновления модальное окно скрывается
|
||||
@ -133,6 +136,9 @@ modalControls.form.addEventListener("submit", async (event) => {
|
||||
async function buttonMovieAddClicked(e) {
|
||||
modalControls.title.innerText = "Добавить фильм";
|
||||
modalControls.selectCategory.innerHTML = "";
|
||||
|
||||
resetValues();
|
||||
|
||||
const categories = await categoriesApiEndpoint.getObjects();
|
||||
modalControls.selectCategory.appendChild(
|
||||
createItemsOption("Выберите жанр", "", true)
|
||||
@ -147,19 +153,54 @@ async function buttonMovieAddClicked(e) {
|
||||
}
|
||||
|
||||
async function movieDeleteButtonClicked(e) {
|
||||
console.log(e.target);
|
||||
const movieId = parseInt(e.target.id.split("-")[3]);
|
||||
await moviesApiEndpoint.deleteObject(movieId);
|
||||
await loadMoviesTableData();
|
||||
}
|
||||
|
||||
async function movieEditButtonClicked(e) {
|
||||
// TODO
|
||||
// получить объект по id
|
||||
// заполнение модального окна по данным объекта
|
||||
// показ модального окна
|
||||
// функция для показа модального окна
|
||||
// перед показом происходит заполнение формы для редактирования
|
||||
// если объект item не пуст
|
||||
async function showUpdateModal(itemId) {
|
||||
// Получаем нужный объект по его id из базы
|
||||
const item = await moviesApiEndpoint.getObject(itemId);
|
||||
|
||||
if (item != null) {
|
||||
// Заполняем поля модального окна
|
||||
modalControls.movieId.value = item.id;
|
||||
|
||||
modalControls.selectCategory.innerHTML = "";
|
||||
const categories = await categoriesApiEndpoint.getObjects();
|
||||
for (let i = 0; i < categories.length; i++) {
|
||||
const category = categories[i];
|
||||
modalControls.selectCategory.appendChild(
|
||||
createItemsOption(category.name, category.id, category.id == item.categoryId)
|
||||
);
|
||||
}
|
||||
|
||||
modalControls.inputName.value = item.name;
|
||||
modalControls.inputDuration.value = item.duration;
|
||||
modalControls.inputDescription.value = item.description;
|
||||
|
||||
// заполнение превью
|
||||
// Если пользователь выбрал изображение, то оно загружается
|
||||
// в тэг image с id image - preview
|
||||
// иначе устанавливается заглушка, адрес которой указан в imagePlaceholder
|
||||
modalControls.imagePreview.src = item.img ? item.img : imagePlaceholder;
|
||||
} else {
|
||||
resetValues();
|
||||
}
|
||||
myModal.show();
|
||||
}
|
||||
|
||||
async function movieEditButtonClicked(e) {
|
||||
modalControls.title.innerText = "Отредактируйте содержимое";
|
||||
const movieId = parseInt(e.target.id.split("-")[3]);
|
||||
await showUpdateModal(movieId);
|
||||
}
|
||||
|
||||
|
||||
// функция заполняет данными и отрисовывает таблицу
|
||||
async function loadMoviesTableData() {
|
||||
const movies = await moviesApiEndpoint.getObjects();
|
||||
const category = await categoriesApiEndpoint.getObjects();
|
||||
@ -202,3 +243,21 @@ async function loadMoviesTableData() {
|
||||
movieEditButtons[i].addEventListener("click", movieEditButtonClicked);
|
||||
}
|
||||
}
|
||||
|
||||
export function hideUpdateModal() {
|
||||
resetValues();
|
||||
// удаление класса was-validated для скрытия результатов валидации
|
||||
modalControls.form.classList.remove("was-validated");
|
||||
myModal.hide();
|
||||
}
|
||||
// обнуление значений модального окна, т. к.
|
||||
// используется одно окно для всех операций
|
||||
function resetValues() {
|
||||
modalControls.movieId.value = null;
|
||||
modalControls.inputName.value = "";
|
||||
modalControls.inputImage.value = null;
|
||||
modalControls.selectCategory.value = null;
|
||||
modalControls.inputDuration.value = "";
|
||||
modalControls.inputDescription.value = "";
|
||||
modalControls.imagePreview.src = imagePlaceholder;
|
||||
}
|
||||
|
@ -64,10 +64,7 @@ export class ApiEndpoint {
|
||||
},
|
||||
};
|
||||
|
||||
const response = await fetch(
|
||||
`${serverUrl}/${this.endpoint}/${obj.id}`,
|
||||
options
|
||||
);
|
||||
const response = await fetch(`${serverUrl}/${this.endpoint}/${obj.id}`, options);
|
||||
if (!response.ok) {
|
||||
throw response.statusText;
|
||||
}
|
||||
|
25
static/js/validation.js
Normal file
25
static/js/validation.js
Normal file
@ -0,0 +1,25 @@
|
||||
// модуль используется для валидации форма на странице
|
||||
|
||||
function validation() {
|
||||
// поиск всех форма с классом .needs-validation
|
||||
const forms = document.querySelectorAll("form.needs-validation");
|
||||
|
||||
for (let i = 0; i < forms.length; i += 1) {
|
||||
const form = forms[i];
|
||||
// для каждой формы добавляется обработчик события отправки
|
||||
form.addEventListener("submit", (event) => {
|
||||
// если форма не прошла валидацию
|
||||
// то выключить стандартное действие
|
||||
if (!form.checkValidity()) {
|
||||
event.preventDefault();
|
||||
// предотвращает распространение preventDefault
|
||||
// на другие объекты
|
||||
event.stopPropagation();
|
||||
}
|
||||
// добавляет к форме класс was-validated
|
||||
form.classList.add("was-validated");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default validation;
|
Loading…
x
Reference in New Issue
Block a user