Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
34cf66833b | |||
3af4a0bd8b | |||
e1c758a46b | |||
cfaf0e4953 | |||
83e35316e3 | |||
0823ed978b | |||
7ef57df568 | |||
94505e2a61 | |||
8240e51af9 | |||
e4de913a50 | |||
fab58b2e30 | |||
5650c55a67 | |||
20003cf6a2 | |||
9c9d9b35d5 |
20
3 proba/.eslintrc.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es2021": true
|
||||
},
|
||||
"extends": "airbnb-base",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 12,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"rules": {
|
||||
"quotes": "off",
|
||||
"indent": "off",
|
||||
"no-console": "off",
|
||||
"no-use-before-define": "off",
|
||||
"no-alert": "off",
|
||||
"no-restricted-globals": "off",
|
||||
"quote-props": "off"
|
||||
}
|
||||
}
|
87
3 proba/LK.html
Normal file
@ -0,0 +1,87 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Elitist</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<script src="./node_modules/bootstrap/dist/js/bootstrap.min.js" type="text/javascript"></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">
|
||||
<script>
|
||||
function saveData() {
|
||||
var lastname = document.getElementById("lastname").value;
|
||||
var firstname = document.getElementById("firstname").value;
|
||||
var status = document.getElementById("status").value;
|
||||
|
||||
localStorage.setItem("lastname", lastname);
|
||||
localStorage.setItem("firstname", firstname);
|
||||
localStorage.setItem("status", status);
|
||||
|
||||
alert("Данные успешно сохранены!");
|
||||
}
|
||||
|
||||
function editData() {
|
||||
var lastname = localStorage.getItem("lastname");
|
||||
var firstname = localStorage.getItem("firstname");
|
||||
var status = localStorage.getItem("status");
|
||||
|
||||
document.getElementById("lastname").value = lastname;
|
||||
document.getElementById("firstname").value = firstname;
|
||||
document.getElementById("status").value = status;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body class="LK">
|
||||
<header>
|
||||
<nav class="navbar navbar-expand-md navbar-dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="./index.html">
|
||||
<i class="fa-solid fa-microchip"></i>
|
||||
Elitist
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
|
||||
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="navbar-collapse collapse justify-content-end" id="navbarNav">
|
||||
<div class="navbar-nav">
|
||||
<a class="nav-link active" href="./index.html">Главная страница</a>
|
||||
<a class="nav-link" href="./page2.html">Жанры</a>
|
||||
<a class="nav-link" href="./page3.html">Бестселлеры</a>
|
||||
<a class="nav-link" href="./page4.html">Админ</a>
|
||||
<a class="nav-link" href="./page5.html">Войти</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
<article class="container-fluid p-2">
|
||||
<div class="row justify-content-center align-items-center h-75">
|
||||
<h1 class="text-center">Личный кабинет</h1>
|
||||
<form class="col-md-6 m-0">
|
||||
<div class="mb-3">
|
||||
<label for="lastname" class="form-label">Фамилия</label>
|
||||
<input type="text" class="form-control" id="lastname" placeholder="Введите вашу фамилию">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="firstname" class="form-label">Имя</label>
|
||||
<input type="text" class="form-control" id="firstname" placeholder="Введите ваше имя">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="status" class="form-label">Статус</label>
|
||||
<select class="form-control" id="status">
|
||||
<option>Студент</option>
|
||||
<option>Школьник</option>
|
||||
<option>Работающий</option>
|
||||
</select>
|
||||
</div>
|
||||
<button class="btn btn-custom d-flex justify-content-center">Сохранить</button>
|
||||
</form>
|
||||
</div>
|
||||
</article>
|
||||
<footer class="footer mt-auto d-flex flex-shrink-0 justify-content-center align-items-center fixed-bottom">
|
||||
Жирнова Алена ПИбд-21
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
441
3 proba/css/style.css
Normal file
@ -0,0 +1,441 @@
|
||||
header nav {
|
||||
background-color: #382F1E;
|
||||
color: #000000;
|
||||
font-family: Santa Catarina;
|
||||
}
|
||||
|
||||
.book {
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
flex: 0 0 calc(25% - 30px);
|
||||
}
|
||||
|
||||
.book img {
|
||||
max-width: 60%;
|
||||
max-height: 340px;
|
||||
border-radius: 5px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.book h3 {
|
||||
color: black;
|
||||
text-align: center;
|
||||
font-size: 30px;
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
line-height: normal;
|
||||
margin-bottom: 10px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
header nav {
|
||||
font-family: 'Santa Catarina', Arial, sans-serif;
|
||||
height: 64px;
|
||||
}
|
||||
}
|
||||
body {
|
||||
overflow-x: hidden;
|
||||
background-color: #403928;
|
||||
color: black;
|
||||
font-family: Santa Catarina;
|
||||
}
|
||||
|
||||
.img-fluid {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
header nav a:hover {
|
||||
font-family: Santa Catarina;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
footer {
|
||||
width: 100%;
|
||||
font-family: Santa Catarina;
|
||||
background-color: #382F1E;
|
||||
color: white;
|
||||
text-align: center;
|
||||
padding: 10px 0;
|
||||
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-family: Santa Catarina;
|
||||
color: black;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-family: Santa Catarina;
|
||||
color: black;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-family: Santa Catarina;
|
||||
color: black;
|
||||
}
|
||||
|
||||
h4 {
|
||||
color: #000000;
|
||||
font-family: Santa Catarina;
|
||||
}
|
||||
|
||||
h5 {
|
||||
color: #000000;
|
||||
font-family: Santa Catarina;
|
||||
}
|
||||
|
||||
|
||||
.index .navbar-toggler {
|
||||
display: none;
|
||||
}
|
||||
.index .btn-custom {
|
||||
font-family: 'Santa Catarina', Arial, sans-serif;
|
||||
background-color: #382F1E;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.index .navbar-toggler {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
@media (max-width: 576px) {
|
||||
.index h1 {
|
||||
font-size: 48px;
|
||||
text-align: center;
|
||||
}
|
||||
.index h2 {
|
||||
font-size: 24px;
|
||||
text-align: center;
|
||||
}
|
||||
.index h3 {
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
}
|
||||
.index .btn-custom {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 576px) {
|
||||
.index h1 {
|
||||
font-size: 248px;
|
||||
text-align: center;
|
||||
margin-top: 30px;
|
||||
}
|
||||
.index h2 {
|
||||
font-size: 62px;
|
||||
text-align: center;
|
||||
margin-top: 15px;
|
||||
}
|
||||
.index h3 {
|
||||
font-size: 30px;
|
||||
text-align: center;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.index .btn-custom {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.page2 .img-fluid {
|
||||
width: 260px;
|
||||
height: 372px;
|
||||
}
|
||||
|
||||
.page2 .navbar-toggler {
|
||||
display: none;
|
||||
}
|
||||
.page2 .img-fluid {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.page2 .navbar-toggler {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
@media (max-width: 576px) {
|
||||
.page2 h2 {
|
||||
font-size: 2em;
|
||||
}
|
||||
.page2 h1 {
|
||||
font-size: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 576px) {
|
||||
.page2 h2 {
|
||||
font-size: 10em;
|
||||
}
|
||||
.page2 h1 {
|
||||
font-size: 2.5em;
|
||||
}
|
||||
}
|
||||
|
||||
.page3 .navbar-toggler {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.page3 .navbar-toggler {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.page4 .navbar-toggler {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.page4 .navbar-toggler {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
@media (max-width: 576px) {
|
||||
.page4 h1 {
|
||||
font-size: 36px;
|
||||
|
||||
}
|
||||
.page4 h2 {
|
||||
font-size: 36px;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 576px) {
|
||||
.page4 h1 {
|
||||
font-size: 80px;
|
||||
|
||||
}
|
||||
.page4 h2 {
|
||||
font-size: 60px;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.page5 .form-control {
|
||||
font-size: 20px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.page5 .btn-custom {
|
||||
font-family: 'Santa Catarina', Arial, sans-serif;
|
||||
background-color: #382F1E;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
margin-top: 20px;
|
||||
}
|
||||
@media (max-width: 576px) {
|
||||
.page5 h1 {
|
||||
font-size: 48px;
|
||||
}
|
||||
}
|
||||
@media (min-width: 576px) {
|
||||
.page5 h1 {
|
||||
font-size: 10em;
|
||||
}
|
||||
}
|
||||
|
||||
.LK .row.justify-content-center {
|
||||
height: 100vh;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.LK .form-label {
|
||||
font-size: 24px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.LK .form-control {
|
||||
font-size: 20px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.LK .btn-custom {
|
||||
font-family: 'Santa Catarina', Arial, sans-serif;
|
||||
background-color: #382F1E;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.LK .btn-edit {
|
||||
font-family: 'Santa Catarina', Arial, sans-serif;
|
||||
background-color: #3E5B7C;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
margin-top: 20px;
|
||||
}
|
||||
@media (max-width: 576px) {
|
||||
.LK h1 {
|
||||
font-size: 48px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media (min-width: 576px) {
|
||||
.LK h1 {
|
||||
font-size: 10em;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.regadmin .row.justify-content-center {
|
||||
height: 100vh;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.regadmin .form-label {
|
||||
font-size: 24px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.regadmin .form-control {
|
||||
font-size: 20px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.regadmin .btn-custom {
|
||||
font-family: 'Santa Catarina', Arial, sans-serif;
|
||||
background-color: #382F1E;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
@media (max-width: 576px) {
|
||||
.regadmin h1 {
|
||||
font-size: 48px;
|
||||
}
|
||||
}
|
||||
@media (min-width: 576px) {
|
||||
.regadmin h1 {
|
||||
font-size: 10em;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.regadmin2 .row.justify-content-center {
|
||||
height: 100vh;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.regadmin2 .form-label {
|
||||
font-size: 24px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.regadmin2 .form-control {
|
||||
font-size: 20px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.regadmin2 .btn-custom {
|
||||
font-family: 'Santa Catarina', Arial, sans-serif;
|
||||
background-color: #382F1E;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
@media (max-width: 576px) {
|
||||
.regadmin2 h1.text-center {
|
||||
font-size: 48px;
|
||||
}
|
||||
}
|
||||
@media (min-width: 576px) {
|
||||
.regadmin2 h1.text-center {
|
||||
font-size: 10em;
|
||||
}
|
||||
}
|
||||
|
||||
.registration .row.justify-content-center {
|
||||
height: 100vh;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.registration .form-label {
|
||||
font-size: 24px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.registration .form-control {
|
||||
font-size: 20px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.registration .btn-custom {
|
||||
font-family: 'Santa Catarina', Arial, sans-serif;
|
||||
background-color: #382F1E;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
@media (max-width: 576px) {
|
||||
.registration h1.text-center {
|
||||
font-size: 48px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media (min-width: 576px) {
|
||||
.registration h1.text-center {
|
||||
font-size: 10em;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.otherpage .row.justify-content-center {
|
||||
height: 100vh;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.otherpage .form-label {
|
||||
font-size: 24px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.otherpage .form-control {
|
||||
font-size: 20px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.otherpage .btn-custom {
|
||||
font-family: 'Santa Catarina', Arial, sans-serif;
|
||||
background-color: #382F1E;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.otherpage .btn-edit {
|
||||
font-family: 'Santa Catarina', Arial, sans-serif;
|
||||
background-color: #3E5B7C;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
margin-top: 20px;
|
||||
}
|
||||
@media (max-width: 576px) {
|
||||
.otherpage h1 {
|
||||
font-size: 48px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 576px) {
|
||||
.otherpage h1 {
|
||||
font-size: 10em;
|
||||
}
|
||||
}
|
68
3 proba/data.json
Normal file
90
3 proba/db-1701962695374.json
Normal file
BIN
3 proba/dist/assets/3j-2565bbd7.png
vendored
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
3 proba/dist/assets/4j-333e118f.png
vendored
Normal file
After Width: | Height: | Size: 87 KiB |
BIN
3 proba/dist/assets/fa-brands-400-003f1154.ttf
vendored
Normal file
BIN
3 proba/dist/assets/fa-brands-400-faae6fc0.woff2
vendored
Normal file
BIN
3 proba/dist/assets/fa-regular-400-7d81a1a7.ttf
vendored
Normal file
BIN
3 proba/dist/assets/fa-regular-400-9169d8be.woff2
vendored
Normal file
BIN
3 proba/dist/assets/fa-solid-900-886c8611.woff2
vendored
Normal file
BIN
3 proba/dist/assets/fa-solid-900-cea79b34.ttf
vendored
Normal file
BIN
3 proba/dist/assets/fa-v4compatibility-335fd7d9.woff2
vendored
Normal file
BIN
3 proba/dist/assets/fa-v4compatibility-455e8e72.ttf
vendored
Normal file
BIN
3 proba/dist/assets/gl-51d74063.PNG
vendored
Normal file
After Width: | Height: | Size: 840 KiB |
BIN
3 proba/dist/assets/kafka-27996d7c.jpg
vendored
Normal file
After Width: | Height: | Size: 130 KiB |
BIN
3 proba/dist/assets/leot-9d1bdf96.jpg
vendored
Normal file
After Width: | Height: | Size: 265 KiB |
1
3 proba/dist/assets/main-bdf679db.js.map
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"main-bdf679db.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
1
3 proba/dist/assets/page2-bdf679db.js.map
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"page2-bdf679db.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
1
3 proba/dist/assets/page3-bdf679db.js.map
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"page3-bdf679db.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
6
3 proba/dist/assets/page4-6eebaf84.js
vendored
Normal file
1
3 proba/dist/assets/page4-6eebaf84.js.map
vendored
Normal file
BIN
3 proba/dist/assets/pandp-234f6c85.jpg
vendored
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
3 proba/dist/assets/stranger-6b72d0d2.jpg
vendored
Normal file
After Width: | Height: | Size: 113 KiB |
9
3 proba/dist/assets/style-9f101eee.css
vendored
Normal file
1
3 proba/dist/assets/style-d523d2ea.js.map
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"style-d523d2ea.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
59
3 proba/dist/index.html
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Elitist</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<script src="./node_modules/bootstrap/dist/js/bootstrap.min.js" type="text/javascript"></script>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/assets/style-9f101eee.css">
|
||||
</head>
|
||||
<body class="index">
|
||||
<header>
|
||||
<nav class="navbar navbar-expand-md navbar-dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="./index.html">
|
||||
<i class="fa-solid fa-microchip"></i>
|
||||
Elitist
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
|
||||
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="navbar-collapse collapse justify-content-end" id="navbarNav">
|
||||
<div class="navbar-nav">
|
||||
<a class="nav-link active" href="./index.html">Главная страница</a>
|
||||
<a class="nav-link" href="./page2.html">Жанры</a>
|
||||
<a class="nav-link" href="./page3.html">Бестселлеры</a>
|
||||
<a class="nav-link" href="./AboutUs.html">О нас</a>
|
||||
<a class="nav-link" href="./page5.html">Войти</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<article class="container-fluid mt-4">
|
||||
<div class="row justify-content-center align-items-center">
|
||||
<div class="col-md-6">
|
||||
<img src="/assets/gl-51d74063.PNG" alt="" class="img-fluid" style="max-width: 600px; max-height: 625px;">
|
||||
</div>
|
||||
<div class="col-md-6 text-center">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-12">
|
||||
<h1>Elitist</h1>
|
||||
<h2>Моя родина там, где моя библиотека</h2>
|
||||
<h3>Эразм Роттердамский</h3>
|
||||
<a href="./regadmin.html" class="btn btn-primary btn-custom">Администратору</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
<footer class="footer mt-auto d-flex flex-shrink-0 justify-content-center align-items-center fixed-bottom">
|
||||
Жирнова Алена ПИбд-21
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
69
3 proba/dist/page2.html
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Elitist</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<script src="./node_modules/bootstrap/dist/js/bootstrap.min.js" type="text/javascript"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/assets/style-9f101eee.css">
|
||||
</head>
|
||||
<body class="page2">
|
||||
<header>
|
||||
<nav class="navbar navbar-expand-md navbar-dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="./index.html">
|
||||
<i class="fa-solid fa-microchip"></i>
|
||||
Elitist
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
|
||||
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="navbar-collapse collapse justify-content-end" id="navbarNav">
|
||||
<div class="navbar-nav">
|
||||
<a class="nav-link active" href="./index.html">Главная страница</a>
|
||||
<a class="nav-link" href="./page2.html">Жанры</a>
|
||||
<a class="nav-link" href="./page3.html">Бестселлеры</a>
|
||||
<a class="nav-link" href="./AboutUs.html">О нас</a>
|
||||
<a class="nav-link" href="./page5.html">Войти</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
<article class="container-fluid py-5" style="padding-left: 0;">
|
||||
<div class="row justify-content-center align-items-center">
|
||||
<div class="col-md-6 text-center">
|
||||
<h2 style="margin-top: 20px;">ЖАНРЫ</h2>
|
||||
<ul style="list-style-type: none; padding: 0;">
|
||||
<li><a href="./magicheskiy-realizm.html"><h1 style="margin-top: 20px;">I Магический реализм</h1></a></li>
|
||||
<li><a href="./filosofskaya-proza.html"><h1 style="margin-top: 20px;">II Философская проза</h1></a></li>
|
||||
<li><a href="./metafizicheskaya-poeziya.html"><h1 style="margin-top: 20px;">III Метафизическая поэзия</h1></a></li>
|
||||
<li><a href="./psihologicheskiy-roman.html"><h1 style="margin-top: 20px;">IV Психологический роман</h1></a></li>
|
||||
<li><a href="./filosofskiy-roman.html"><h1 style="margin-top: 20px;">V Философский роман</h1></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-6 text-center">
|
||||
<ul style="list-style-type: none; padding: 0;">
|
||||
<li><a href="./epicheskaya-poesy.html"><h1 style="margin-top: 20px;">VI Эпическая поэзия</h1></a></li>
|
||||
<li><a href="./socz-real.html"><h1 style="margin-top: 20px;">VII Социальный реализм</h1></a></li>
|
||||
<li><a href="./fant-roman.html"><h1 style="margin-top: 20px;">VIII Фантастический роман</h1></a></li>
|
||||
<li><a href="./avt-dram.html"><h1 style="margin-top: 20px;">IX Авторская драматургия</h1></a></li>
|
||||
<li><a href="./Eksp-proza.html"><h1 style="margin-top: 20px;">X Авторская драматургия</h1></a></li>
|
||||
</ul>
|
||||
<img src="/assets/3j-2565bbd7.png" alt="3j" class="img-fluid" style="width: 150px;">
|
||||
<img src="/assets/4j-333e118f.png" alt="4j" class="img-fluid" style="width: 150px;">
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
<footer class="footer mt-auto d-flex flex-shrink-0 justify-content-center align-items-center fixed-bottom">
|
||||
Жирнова Алена ПИбд-21
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
</html>
|
63
3 proba/dist/page3.html
vendored
Normal file
@ -0,0 +1,63 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Elitist</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<script src="./node_modules/bootstrap/dist/js/bootstrap.min.js" type="text/javascript"></script>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/assets/style-9f101eee.css">
|
||||
</head>
|
||||
<body class="page3">
|
||||
<header>
|
||||
<nav class="navbar navbar-expand-md navbar-dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="./index.html">
|
||||
<i class="fa-solid fa-microchip"></i>
|
||||
Elitist
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
|
||||
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="navbar-collapse collapse justify-content-end" id="navbarNav">
|
||||
<div class="navbar-nav">
|
||||
<a class="nav-link active" href="./index.html">Главная страница</a>
|
||||
<a class="nav-link" href="./page2.html">Жанры</a>
|
||||
<a class="nav-link" href="./page3.html">Бестселлеры</a>
|
||||
<a class="nav-link" href="./AboutUs.html">О нас</a>
|
||||
<a class="nav-link" href="./page5.html">Войти</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
<article class="container py-5">
|
||||
<h2 class="col-md-3 mb-4 text-center mx-auto">Бестселлеры</h2>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-3 mb-4 text-center">
|
||||
<img src="/assets/kafka-27996d7c.jpg" alt="" class="img-fluid" style="max-width: 260px; max-height: 372px;">
|
||||
<h3 class="h7 mt-3">Ф.Кафка “Превращение”</h3>
|
||||
</div>
|
||||
<div class="col-md-3 mb-4 text-center">
|
||||
<img src="/assets/pandp-234f6c85.jpg" alt="" class="img-fluid" style="max-width: 260px; max-height: 372px;">
|
||||
<h3 class="h7 mt-3">Д.Остен “Гордость и предубеждение”</h3>
|
||||
</div>
|
||||
<div class="col-md-3 mb-4 text-center">
|
||||
<img src="/assets/leot-9d1bdf96.jpg" alt="" class="img-fluid" style="max-width: 260px; max-height: 372px;">
|
||||
<h3 class="h7 mt-3">Л.Толстой “Смерть Ивана Ильича”</h3>
|
||||
</div>
|
||||
<div class="col-md-3 mb-4 text-center">
|
||||
<img src="/assets/stranger-6b72d0d2.jpg" alt="" class="img-fluid" style="max-width: 260px; max-height: 372px;">
|
||||
<h3 class="h7 mt-3">А.Камю “Посторонний”</h3>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
<footer class="footer mt-auto d-flex flex-shrink-0 justify-content-center align-items-center fixed-bottom">
|
||||
Жирнова Алена ПИбд-21
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
185
3 proba/dist/page4.html
vendored
Normal file
@ -0,0 +1,185 @@
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Elitist</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<script src="./node_modules/bootstrap/dist/js/bootstrap.min.js" type="text/javascript"></script>
|
||||
|
||||
|
||||
|
||||
<script type="module" crossorigin src="/assets/page4-6eebaf84.js"></script>
|
||||
<link rel="stylesheet" href="/assets/style-9f101eee.css">
|
||||
</head>
|
||||
|
||||
<body class="page4x">
|
||||
<header>
|
||||
<nav class="navbar navbar-expand-md navbar-dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="./index.html">
|
||||
<i class="fa-solid fa-microchip"></i>
|
||||
Elitist
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
|
||||
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="navbar-collapse collapse justify-content-end" id="navbarNav">
|
||||
<div class="navbar-nav">
|
||||
<a class="nav-link active" href="./index.html">Главная страница</a>
|
||||
<a class="nav-link" href="./page2.html">Жанры</a>
|
||||
<a class="nav-link" href="./page3.html">Бестселлеры</a>
|
||||
<a class="nav-link" href="./AboutUs.html">О нас</a>
|
||||
<a class="nav-link" href="./page5.html">Войти</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</main>
|
||||
<footer class="footer mt-auto d-flex flex-shrink-0 justify-content-center align-items-center fixed-bottom">
|
||||
Жирнова Алена ПИбд-21
|
||||
</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 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 for="author" class="form-label">Автор</label>
|
||||
<select
|
||||
id="author"
|
||||
class="form-select"
|
||||
name="selected"
|
||||
required
|
||||
></select>
|
||||
</div>
|
||||
<div class="mb-2">
|
||||
<label for="name" class="form-label">Название</label>
|
||||
<input
|
||||
id="name"
|
||||
name="name"
|
||||
class="form-control"
|
||||
type="text"
|
||||
maxlength="100"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<div class="mb-2">
|
||||
<label for="desc" class="form-label">Описание</label>
|
||||
<input
|
||||
id="desc"
|
||||
name="desc"
|
||||
class="form-control"
|
||||
type="text"
|
||||
maxlength="100"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<div class="mb-2">
|
||||
<label for="count" class="form-label">Количество книг</label>
|
||||
<input
|
||||
id="count"
|
||||
name="count"
|
||||
class="form-control"
|
||||
type="number"
|
||||
value="0"
|
||||
min="1"
|
||||
step="1"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<div class="mb-2">
|
||||
<label for="date" class="form-label">Дата</label>
|
||||
<input
|
||||
id="date"
|
||||
name="date"
|
||||
class="form-control"
|
||||
type="date"
|
||||
value="2022-01-01"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<div class="mb-2">
|
||||
<label for="image" class="form-label">Изображение</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>
|
||||
|
||||
</body>
|
||||
</html>
|
BIN
3 proba/images/1.png
Normal file
After Width: | Height: | Size: 559 KiB |
BIN
3 proba/images/3j.png
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
3 proba/images/4j.png
Normal file
After Width: | Height: | Size: 87 KiB |
BIN
3 proba/images/gl.PNG
Normal file
After Width: | Height: | Size: 840 KiB |
BIN
3 proba/images/kafka.jpg
Normal file
After Width: | Height: | Size: 130 KiB |
BIN
3 proba/images/leot.jpg
Normal file
After Width: | Height: | Size: 265 KiB |
BIN
3 proba/images/pandp.jpg
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
3 proba/images/stranger.jpg
Normal file
After Width: | Height: | Size: 113 KiB |
58
3 proba/index.html
Normal file
@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Elitist</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<script src="./node_modules/bootstrap/dist/js/bootstrap.min.js" type="text/javascript"></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="index">
|
||||
<header>
|
||||
<nav class="navbar navbar-expand-md navbar-dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="./index.html">
|
||||
<i class="fa-solid fa-microchip"></i>
|
||||
Elitist
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
|
||||
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="navbar-collapse collapse justify-content-end" id="navbarNav">
|
||||
<div class="navbar-nav">
|
||||
<a class="nav-link active" href="./index.html">Главная страница</a>
|
||||
<a class="nav-link" href="./page2.html">Жанры</a>
|
||||
<a class="nav-link" href="./page3.html">Бестселлеры</a>
|
||||
<a class="nav-link" href="./page4.html">Админ</a>
|
||||
<a class="nav-link" href="./page5.html">Войти</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<article class="container-fluid mt-4">
|
||||
<div class="row justify-content-center align-items-center">
|
||||
<div class="col-md-6">
|
||||
<img src="images/gl.PNG" alt="" class="img-fluid" style="max-width: 600px; max-height: 625px;">
|
||||
</div>
|
||||
<div class="col-md-6 text-center">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-12">
|
||||
<h1>Elitist</h1>
|
||||
<h2>Моя родина там, где моя библиотека</h2>
|
||||
<h3>Эразм Роттердамский</h3>
|
||||
<a href="./regadmin.html" class="btn btn-primary btn-custom">Администратору</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
<footer class="footer mt-auto d-flex flex-shrink-0 justify-content-center align-items-center fixed-bottom">
|
||||
Жирнова Алена ПИбд-21
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
67
3 proba/js/lines-modal.js
Normal file
@ -0,0 +1,67 @@
|
||||
/* eslint-disable linebreak-style */
|
||||
// Модуль для работы с модальным окном
|
||||
// eslint-disable-next-line linebreak-style
|
||||
|
||||
// импорт компонента Modal из bootstrap
|
||||
import { Modal } from "bootstrap";
|
||||
import { cntrls, imagePlaceholder } from "./lines-ui";
|
||||
|
||||
// поиск модального окна на странице
|
||||
const modal = document.getElementById("items-update");
|
||||
// если он найден, то создается экземпляр компонента Modal
|
||||
// для программного управления модальным окном
|
||||
const myModal = modal ? new Modal(modal, {}) : null;
|
||||
|
||||
// поиск тега с заголовком модального кона для его смены
|
||||
const modalTitle = document.getElementById("items-update-title");
|
||||
|
||||
// обнуление значений модального окна, т. к.
|
||||
// используется одно окно для всех операций
|
||||
function resetValues() {
|
||||
cntrls.lineId.value = "";
|
||||
cntrls.nameBook.value = "";
|
||||
cntrls.authorsType.value = "";
|
||||
cntrls.genresType.value = "";
|
||||
cntrls.year.value = "";
|
||||
cntrls.description.value = "";
|
||||
cntrls.count.value = "";
|
||||
cntrls.image.value = "";
|
||||
cntrls.imagePreview.src = imagePlaceholder;
|
||||
}
|
||||
|
||||
// функция для показа модального окна
|
||||
// перед показом происходит заполнение формы для редактирования
|
||||
// если объект item не пуст
|
||||
export function showUpdateModal(item) {
|
||||
modalTitle.innerHTML = item === null ? "Добавить" : "Изменить";
|
||||
console.info(item);
|
||||
|
||||
if (item) {
|
||||
cntrls.lineId.value = item.id;
|
||||
cntrls.nameBook.value = item.nameBook;
|
||||
cntrls.authorsType.value = item.authorsId;
|
||||
cntrls.genresType.value = item.genresId;
|
||||
cntrls.year.value = item.year;
|
||||
cntrls.description.value = item.description;
|
||||
cntrls.count.value = item.count;
|
||||
// заполнение превью
|
||||
// Если пользователь выбрал изображение, то оно загружается
|
||||
// в тэг image с id image - preview
|
||||
// иначе устанавливается заглушка, адрес которой указан в imagePlaceholder
|
||||
cntrls.imagePreview.src = item.image ? item.image : imagePlaceholder;
|
||||
} else {
|
||||
resetValues();
|
||||
}
|
||||
|
||||
myModal.show();
|
||||
}
|
||||
|
||||
// функция для скрытия модального окна
|
||||
export function hideUpdateModal() {
|
||||
resetValues();
|
||||
|
||||
// удаление класса was-validated для скрытия результатов валидации
|
||||
cntrls.form.classList.remove("was-validated");
|
||||
|
||||
myModal.hide();
|
||||
}
|
120
3 proba/js/lines-rest-api.js
Normal file
@ -0,0 +1,120 @@
|
||||
/* eslint-disable linebreak-style */
|
||||
// eslint-disable-next-line linebreak-style
|
||||
// eslint-disable-next-line linebreak-style
|
||||
// eslint-disable-next-line linebreak-style
|
||||
/* eslint-disable eol-last */
|
||||
/* eslint-disable linebreak-style */
|
||||
/* eslint-disable max-len */
|
||||
/* eslint-disable linebreak-style */
|
||||
/* eslint-disable comma-dangle */
|
||||
/* eslint-disable linebreak-style */
|
||||
// модуль для работы с REST API сервера
|
||||
|
||||
// адрес сервера
|
||||
const serverUrl = "http://localhost:8081";
|
||||
|
||||
// функция возвращает объект нужной структуры для отправки на сервер
|
||||
function createLineObject(_name, _authorsType, _genresType, _year, _description, _count, _image) {
|
||||
return {
|
||||
nameBook: _name,
|
||||
authorsId: _authorsType,
|
||||
genresId: _genresType,
|
||||
year: _year,
|
||||
description: _description,
|
||||
count: _count,
|
||||
image: _image
|
||||
};
|
||||
}
|
||||
|
||||
/// обращение к серверу для получения всех типов товара (get)
|
||||
export async function getAllAuthorTypes() {
|
||||
const response = await fetch(`${serverUrl}/authors`);
|
||||
if (!response.ok) {
|
||||
throw response.statusText;
|
||||
}
|
||||
return response.json();
|
||||
}
|
||||
export async function getAllGengeTypes() {
|
||||
const response = await fetch(`${serverUrl}/genres`);
|
||||
if (!response.ok) {
|
||||
throw response.statusText;
|
||||
}
|
||||
return response.json();
|
||||
}
|
||||
|
||||
// обращение к серверу для получения всех записей (get)
|
||||
export async function getAllLines() {
|
||||
const response = await fetch(`${serverUrl}/lines?_expand=authors&_expand=genres`);
|
||||
if (!response.ok) {
|
||||
throw response.statusText;
|
||||
}
|
||||
return response.json();
|
||||
}
|
||||
|
||||
// обращение к серверу для получения записи по первичному ключу (id) (get)
|
||||
// id передается в качестве части пути URL get-запроса
|
||||
export async function getLine(id) {
|
||||
const response = await fetch(`${serverUrl}/lines/${id}?_expand=genres&_expand=authors`);
|
||||
if (!response.ok) {
|
||||
throw response.statusText;
|
||||
}
|
||||
return response.json();
|
||||
}
|
||||
|
||||
// обращение к серверу для создания записи (post)
|
||||
// объект отправляется в теле запроса (body)
|
||||
export async function createLine(_name, _authorsType, _genresType, _year, _description, _count, _image) {
|
||||
const itemObject = createLineObject(_name, _authorsType, _genresType, _year, _description, _count, _image);
|
||||
|
||||
const options = {
|
||||
method: "POST",
|
||||
body: JSON.stringify(itemObject),
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
};
|
||||
|
||||
const response = await fetch(`${serverUrl}/lines`, options);
|
||||
if (!response.ok) {
|
||||
throw response.statusText;
|
||||
}
|
||||
return response.json();
|
||||
}
|
||||
|
||||
// обращение к серверу для обновления записи по id (put)
|
||||
// объект отправляется в теле запроса (body)
|
||||
// id передается в качестве части пути URL get-запроса
|
||||
export async function updateLine(id, _name, _authorsType, _genresType, _year, _description, _count, _image) {
|
||||
const itemObject = createLineObject(_name, _authorsType, _genresType, _year, _description, _count, _image);
|
||||
|
||||
const options = {
|
||||
method: "PUT",
|
||||
body: JSON.stringify(itemObject),
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
};
|
||||
|
||||
const response = await fetch(`${serverUrl}/lines/${id}`, options);
|
||||
if (!response.ok) {
|
||||
throw response.statusText;
|
||||
}
|
||||
return response.json();
|
||||
}
|
||||
|
||||
// обращение к серверу для удаления записи по id (delete)
|
||||
// id передается в качестве части пути URL get-запроса
|
||||
export async function deleteLine(id) {
|
||||
const options = {
|
||||
method: "DELETE",
|
||||
};
|
||||
|
||||
const response = await fetch(`${serverUrl}/lines/${id}`, options);
|
||||
if (!response.ok) {
|
||||
throw response.statusText;
|
||||
}
|
||||
await response.json();
|
||||
location.reload();
|
||||
}
|
159
3 proba/js/lines-ui.js
Normal file
@ -0,0 +1,159 @@
|
||||
/* eslint-disable linebreak-style */
|
||||
/* eslint-disable no-unused-vars */
|
||||
/* eslint-disable linebreak-style */
|
||||
/* eslint-disable eol-last */
|
||||
/* eslint-disable linebreak-style */
|
||||
// модуль для работы с элементами управления
|
||||
|
||||
// объект для удобного получения элементов
|
||||
// при обращении к атрибуту объекта вызывается
|
||||
// нужная функция для поиска элемента
|
||||
export const cntrls = {
|
||||
container: document.getElementById("my-id-for-text"),
|
||||
button: document.getElementById("items-add"),
|
||||
table: document.querySelector("#items-table tbody"),
|
||||
form: document.getElementById("items-form"),
|
||||
lineId: document.getElementById("items-line-id"),
|
||||
genresType: document.getElementById("genre"),
|
||||
nameBook: document.getElementById("nameBook"),
|
||||
authorsType: document.getElementById("author"),
|
||||
year: document.getElementById("yearPicker"),
|
||||
description: document.getElementById("description"),
|
||||
count: document.getElementById("count"),
|
||||
image: document.getElementById("image"),
|
||||
imagePreview: document.getElementById("image-preview"),
|
||||
};
|
||||
|
||||
// Дефолтное превью
|
||||
export const imagePlaceholder = "https://via.placeholder.com/200";
|
||||
|
||||
// функция создает тег option для select
|
||||
// <option value="" selected>name</option>
|
||||
export function createGenresOption(name, value = "", isSelected = false) {
|
||||
const option = document.createElement("option");
|
||||
option.value = value || "";
|
||||
option.selected = isSelected;
|
||||
option.text = name;
|
||||
return option;
|
||||
}
|
||||
|
||||
export function createAuthorsOption(name, value = "", isSelected = false) {
|
||||
const option = document.createElement("option");
|
||||
option.value = value || "";
|
||||
option.selected = isSelected;
|
||||
option.text = name;
|
||||
return option;
|
||||
}
|
||||
|
||||
// функция создает ссылку (a) для таблицы
|
||||
// содержимое тега a заполняется необходимой иконкой (icon)
|
||||
// при нажатии вызывается callback
|
||||
// ссылка "оборачивается" тегом td
|
||||
// <td><a href="#" onclick="callback()"><i class="fa-solid icon"></i></a></td>
|
||||
function createTableAnchor(icon, callback) {
|
||||
const i = document.createElement("i");
|
||||
i.classList.add("fa-solid", icon);
|
||||
|
||||
const a = document.createElement("a");
|
||||
a.href = "#";
|
||||
a.appendChild(i);
|
||||
a.onclick = (event) => {
|
||||
// чтобы в URL не добавлялась решетка
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
callback();
|
||||
};
|
||||
|
||||
const td = document.createElement("td");
|
||||
td.appendChild(a);
|
||||
return td;
|
||||
}
|
||||
|
||||
// функция создает колонку таблицы с текстом value
|
||||
// <td>value</td>
|
||||
function createTableColumn(value) {
|
||||
const td = document.createElement("td");
|
||||
td.textContent = value;
|
||||
return td;
|
||||
}
|
||||
|
||||
// функция создает строку таблицы
|
||||
// <tr>
|
||||
// <th scope="row">index + 1</th>
|
||||
// <td>item.items.name</td>
|
||||
// <td>parseFloat(item.price).toFixed(2))</td>
|
||||
// <td>item.count</td>
|
||||
// <td>parseFloat(item.sum).toFixed(2))</td>
|
||||
// <td><a href="#" onclick="editCallback()"><i class="fa-solid fa-pencil"></i></a></td>
|
||||
// <td><a href="#" onclick="editPageCallback()"><i class="fa-solid fa-pen-to-square"></i></a></td>
|
||||
// <td><a href="#" onclick="deleteCallback()"><i class="fa-solid fa-trash"></i></a></td>
|
||||
// </tr>
|
||||
export function createTableRow(item, index, editCallback, deleteCallback) {
|
||||
const rowNumber = document.createElement("th");
|
||||
rowNumber.scope = "row";
|
||||
rowNumber.textContent = index + 1;
|
||||
|
||||
const row = document.createElement("tr");
|
||||
row.id = `line-${item.id}`;
|
||||
|
||||
row.appendChild(rowNumber);
|
||||
row.appendChild(createTableColumn(item.nameBook));
|
||||
row.appendChild(createTableColumn(item.authors.name));
|
||||
row.appendChild(createTableColumn(item.genres.name));
|
||||
row.appendChild(createTableColumn(item.year));
|
||||
row.appendChild(createTableColumn(item.description));
|
||||
row.appendChild(createTableColumn(item.count));
|
||||
|
||||
// редактировать в модальном окне
|
||||
row.appendChild(createTableAnchor("fa-pencil", editCallback));
|
||||
// удаление
|
||||
row.appendChild(createTableAnchor("fa-trash", deleteCallback));
|
||||
return row;
|
||||
}
|
||||
|
||||
export function createTableRowOnIndex(item, index, editCallback, editPageCallback, deleteCallback) {
|
||||
console.log(item);
|
||||
|
||||
const bookCard = createBookCard(item);
|
||||
return bookCard;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-multiple-empty-lines
|
||||
|
||||
function createBookCard(item) {
|
||||
const card = document.createElement("div");
|
||||
card.classList.add("book");
|
||||
|
||||
const image = document.createElement("img");
|
||||
image.src = item.image ? item.image : imagePlaceholder;
|
||||
image.alt = "Обложка книги";
|
||||
|
||||
const title = document.createElement("h3");
|
||||
title.textContent = `${item.nameBook}, ${item.authors.name}`;
|
||||
|
||||
const detailsButton = document.createElement("a");
|
||||
detailsButton.href = "#link";
|
||||
detailsButton.classList.add("btn", "btn-custom");
|
||||
detailsButton.role = "button";
|
||||
detailsButton.textContent = "Подробнее";
|
||||
|
||||
const favoriteButton = document.createElement("a");
|
||||
favoriteButton.href = "#link";
|
||||
favoriteButton.classList.add("btn", "btn-custom");
|
||||
favoriteButton.role = "button";
|
||||
favoriteButton.textContent = "В избранное";
|
||||
|
||||
card.appendChild(image);
|
||||
card.appendChild(title);
|
||||
card.appendChild(detailsButton);
|
||||
card.appendChild(favoriteButton);
|
||||
|
||||
const div = document.createElement("div");
|
||||
div.classList.add("col-12");
|
||||
div.classList.add("col-md-6");
|
||||
div.classList.add("col-lg-4");
|
||||
div.classList.add("col-xl-3");
|
||||
div.appendChild(card);
|
||||
|
||||
return div;
|
||||
}
|
450
3 proba/js/lines.js
Normal file
@ -0,0 +1,450 @@
|
||||
/* eslint-disable linebreak-style */
|
||||
// eslint-disable-next-line linebreak-style
|
||||
/* eslint-disable spaced-comment */
|
||||
/* eslint-disable linebreak-style */
|
||||
/* eslint-disable comma-dangle */
|
||||
/* eslint-disable linebreak-style */
|
||||
/* eslint-disable no-trailing-spaces */
|
||||
/* eslint-disable linebreak-style */
|
||||
// модуль с логикой
|
||||
|
||||
import {
|
||||
hideUpdateModal,
|
||||
showUpdateModal
|
||||
} from "./lines-modal";
|
||||
import {
|
||||
createLine,
|
||||
deleteLine,
|
||||
getAllGengeTypes,
|
||||
getAllAuthorTypes,
|
||||
getAllLines,
|
||||
getLine,
|
||||
updateLine,
|
||||
} from "./lines-rest-api";
|
||||
import {
|
||||
cntrls,
|
||||
createTableRow,
|
||||
imagePlaceholder,
|
||||
createGenresOption,
|
||||
createAuthorsOption,
|
||||
createTableRowOnIndex
|
||||
} from "./lines-ui";
|
||||
|
||||
async function drawGenreSelect() {
|
||||
// вызов метода REST API для получения списка типов товаров
|
||||
const data = await getAllGengeTypes();
|
||||
const data2 = await getAllAuthorTypes();
|
||||
// очистка содержимого select
|
||||
// удаляется все, что находится между тегами <select></select>
|
||||
// но не атрибуты
|
||||
cntrls.genresType.innerHTML = "";
|
||||
cntrls.authorsType.innerHTML = "";
|
||||
// пустое значение
|
||||
cntrls.genresType.appendChild(createGenresOption("Выберите значение", "", true));
|
||||
cntrls.authorsType.appendChild(createGenresOption("Выберите значение", "", true));
|
||||
// цикл по результату ответа от сервера
|
||||
// используется лямбда-выражение
|
||||
// (item) => {} аналогично function(item) {}
|
||||
data.forEach((genre) => {
|
||||
cntrls.genresType.appendChild(createGenresOption(genre.name, genre.id));
|
||||
});
|
||||
data2.forEach((author) => {
|
||||
cntrls.authorsType.appendChild(createAuthorsOption(author.name, author.id));
|
||||
});
|
||||
}
|
||||
|
||||
async function drawLinesTable() {
|
||||
console.info("Try to load data");
|
||||
if (!cntrls.table) {
|
||||
return;
|
||||
}
|
||||
// вызов метода REST API для получения всех записей
|
||||
const data = await getAllLines();
|
||||
// очистка содержимого table
|
||||
// удаляется все, что находится между тегами <table></table>
|
||||
// но не атрибуты
|
||||
cntrls.table.innerHTML = "";
|
||||
// цикл по результату ответа от сервера
|
||||
// используется лямбда-выражение
|
||||
// (item, index) => {} аналогично function(item, index) {}
|
||||
data.forEach((item, index) => {
|
||||
cntrls.table.appendChild(
|
||||
createTableRow(
|
||||
item,
|
||||
index,
|
||||
// функции передаются в качестве параметра
|
||||
// это очень удобно, так как аргументы функций доступны только
|
||||
// в данном месте кода и не передаются в сервисные модули
|
||||
() => showUpdateModal(item),
|
||||
() => removeLine(item.id),
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
async function drawLinesTableOnIndex() {
|
||||
console.info("Try to load data On Index");
|
||||
if (!cntrls.container) {
|
||||
return;
|
||||
}
|
||||
// вызов метода REST API для получения всех записей
|
||||
const data = await getAllLines();
|
||||
// очистка содержимого table
|
||||
// удаляется все, что находится между тегами <table></table>
|
||||
// но не атрибуты
|
||||
cntrls.container.innerHTML = "";
|
||||
// цикл по результату ответа от сервера
|
||||
// используется лямбда-выражение
|
||||
// (item, index) => {} аналогично function(item, index) {}
|
||||
data.forEach((item, index) => {
|
||||
cntrls.container.appendChild(
|
||||
createTableRowOnIndex(
|
||||
item,
|
||||
index,
|
||||
// функции передаются в качестве параметра
|
||||
// это очень удобно, так как аргументы функций доступны только
|
||||
// в данном месте кода и не передаются в сервисные модули
|
||||
() => showUpdateModal(item),
|
||||
() => location.assign(`page3.html?id=${item.id}`),
|
||||
() => removeLine(item.id),
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
async function addLine(nameBook, authorsType, genresType, year, description, count, image) {
|
||||
console.info("Try to add item");
|
||||
// вызов метода REST API для добавления записи
|
||||
const data = await createLine(nameBook, authorsType, genresType, year, description, count, image);
|
||||
console.info("Added");
|
||||
console.info(data);
|
||||
// загрузка и заполнение table
|
||||
drawLinesTable();
|
||||
}
|
||||
|
||||
async function editLine(id, nameBook, authorsType, genresType, year, description, count, image) {
|
||||
console.info("Try to update item");
|
||||
console.log(id, nameBook, authorsType, genresType, description, count, image);
|
||||
// вызов метода REST API для обновления записи
|
||||
// eslint-disable-next-line max-len
|
||||
const data = await updateLine(id, nameBook, authorsType, genresType, year, description, count, image);
|
||||
console.info("Updated");
|
||||
console.info(data);
|
||||
// загрузка и заполнение table
|
||||
drawLinesTable();
|
||||
}
|
||||
|
||||
async function removeLine(id) {
|
||||
if (!confirm("Вы точно хотите удалить этот товар?")) {
|
||||
console.info("Canceled");
|
||||
return;
|
||||
}
|
||||
console.info("Try to remove item");
|
||||
// вызов метода REST API для удаления записи
|
||||
const data = await deleteLine(id);
|
||||
console.info(data);
|
||||
// загрузка и заполнение table
|
||||
drawLinesTable();
|
||||
}
|
||||
|
||||
// функция для получения содержимого файла в виде base64 строки
|
||||
// https://ru.wikipedia.org/wiki/Base64
|
||||
async function readFile(file) {
|
||||
const reader = new FileReader();
|
||||
|
||||
// создание Promise-объекта для использования функции
|
||||
// с помощью await (асинхронно) без коллбэков (callback)
|
||||
// https://learn.javascript.ru/promise
|
||||
return new Promise((resolve, reject) => {
|
||||
// 2. "Возвращаем" содержимое когда файл прочитан
|
||||
// через вызов resolve
|
||||
// Если не использовать Promise, то всю работу по взаимодействию
|
||||
// с REST API пришлось бы делать в обработчике (callback) функции
|
||||
// onloadend
|
||||
reader.onloadend = () => {
|
||||
const fileContent = reader.result;
|
||||
// Здесь могла бы быть работа с REST API
|
||||
// Чтение заканчивает выполняться здесь
|
||||
resolve(fileContent);
|
||||
};
|
||||
// 3. Возвращаем ошибку
|
||||
reader.onerror = () => {
|
||||
// Или здесь в случае ошибки
|
||||
reject(new Error("oops, something went wrong with the file reader."));
|
||||
};
|
||||
// Шаг 1. Сначала читаем файл
|
||||
// Чтение начинает выполняться здесь
|
||||
reader.readAsDataURL(file);
|
||||
});
|
||||
}
|
||||
|
||||
// функция для обновления блока с превью выбранного изображения
|
||||
async function updateImagePreview() {
|
||||
// получение выбранного файла
|
||||
// возможен выбор нескольких файлов, поэтому необходимо получить только первый
|
||||
const file = cntrls.image.files[0];
|
||||
// чтение содержимого файла в виде base64 строки
|
||||
const fileContent = await readFile(file);
|
||||
console.info("base64 ", fileContent);
|
||||
// обновление атрибута src для тега img с id image-preview
|
||||
cntrls.imagePreview.src = fileContent;
|
||||
}
|
||||
|
||||
// Функция для обработки создания и редактирования элементов таблицы через модальное окно
|
||||
// Если хотите делать через страницу, то удалите эту функцию
|
||||
export function linesForm() {
|
||||
console.info("linesForm");
|
||||
|
||||
// загрузка и заполнение select со списком товаров
|
||||
drawGenreSelect();
|
||||
//drawAuthorSelect();
|
||||
// загрузка и заполнение table
|
||||
drawLinesTable();
|
||||
|
||||
// Вызов функции обновления превью изображения при возникновении
|
||||
// события oncahnge в тэге input с id image
|
||||
cntrls.image.addEventListener("change", () => updateImagePreview());
|
||||
|
||||
// обработчик события нажатия на кнопку для показа модального окна
|
||||
cntrls.button.addEventListener("click", () => showUpdateModal(null));
|
||||
|
||||
// обработчик события отправки формы
|
||||
// возникает при нажатии на кнопку (button) с типом submit
|
||||
// кнопка должна находится внутри тега form
|
||||
cntrls.form.addEventListener("submit", async (event) => {
|
||||
console.info("Form onSubmit");
|
||||
// отключение стандартного поведения формы при отправке
|
||||
// при отправке страница обновляется и JS перестает работать
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
// если форма не прошла валидацию, то ничего делать не нужно
|
||||
if (!cntrls.form.checkValidity()) {
|
||||
return;
|
||||
}
|
||||
|
||||
let imageBase64 = "";
|
||||
// Получение выбранного пользователем изображения в виде base64 строки
|
||||
// Если пользователь ничего не выбрал, то не нужно сохранять в БД
|
||||
// дефолтное изображение
|
||||
if (cntrls.imagePreview.src !== imagePlaceholder) {
|
||||
// Загрузка содержимого атрибута src тэга img с id image-preview
|
||||
// Здесь выполняется HTTP запрос с типом GET
|
||||
const result = await fetch(cntrls.imagePreview.src);
|
||||
// Получение из HTTP-ответа бинарного содержимого
|
||||
const blob = await result.blob();
|
||||
// Получение base64 строки для файла
|
||||
// Здесь выполняется Promise из функции readFile
|
||||
// Promise позволяет писать линейный код для работы с асинхронными методами
|
||||
// без использования обработчиков (callback) с помощью await
|
||||
imageBase64 = await readFile(blob);
|
||||
}
|
||||
|
||||
// получение id строки для редактирования
|
||||
// это значение содержится в скрытом input
|
||||
const currentId = cntrls.lineId.value;
|
||||
// если значение id не задано,
|
||||
// то необходимо выполнить добавление записи
|
||||
// иначе обновление записи
|
||||
if (!currentId) {
|
||||
await addLine(
|
||||
cntrls.nameBook.value,
|
||||
cntrls.authorsType.value,
|
||||
cntrls.genresType.value,
|
||||
cntrls.year.value,
|
||||
cntrls.description.value,
|
||||
cntrls.count.value,
|
||||
imageBase64,
|
||||
);
|
||||
} else {
|
||||
await editLine(
|
||||
currentId,
|
||||
cntrls.nameBook.value,
|
||||
cntrls.authorsType.value,
|
||||
cntrls.genresType.value,
|
||||
cntrls.year.value,
|
||||
cntrls.description.value,
|
||||
cntrls.count.value,
|
||||
imageBase64,
|
||||
);
|
||||
}
|
||||
|
||||
// после выполнения добавления/обновления модальное окно скрывается
|
||||
hideUpdateModal();
|
||||
});
|
||||
}
|
||||
|
||||
export async function linesFormOnIndex() {
|
||||
console.info("linesFormOnIndex");
|
||||
|
||||
// await drawGenreSelect();
|
||||
await drawLinesTableOnIndex();
|
||||
|
||||
// обработчик события отправки формы
|
||||
// возникает при нажатии на кнопку (button) с типом submit
|
||||
// кнопка должна находится внутри тега form
|
||||
cntrls.form.addEventListener("submit", async (event) => {
|
||||
console.info("Form onSubmit");
|
||||
// отключение стандартного поведения формы при отправке
|
||||
// при отправке страница обновляется и JS перестает работать
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
// если форма не прошла валидацию, то ничего делать не нужно
|
||||
if (!cntrls.form.checkValidity()) {
|
||||
return;
|
||||
}
|
||||
|
||||
let imageBase64 = "";
|
||||
// Получение выбранного пользователем изображения в виде base64 строки
|
||||
// Если пользователь ничего не выбрал, то не нужно сохранять в БД
|
||||
// дефолтное изображение
|
||||
if (cntrls.imagePreview.src !== imagePlaceholder) {
|
||||
// Загрузка содержимого атрибута src тэга img с id image-preview
|
||||
// Здесь выполняется HTTP запрос с типом GET
|
||||
const result = await fetch(cntrls.imagePreview.src);
|
||||
// Получение из HTTP-ответа бинарного содержимого
|
||||
const blob = await result.blob();
|
||||
// Получение base64 строки для файла
|
||||
// Здесь выполняется Promise из функции readFile
|
||||
// Promise позволяет писать линейный код для работы с асинхронными методами
|
||||
// без использования обработчиков (callback) с помощью await
|
||||
imageBase64 = await readFile(blob);
|
||||
}
|
||||
|
||||
// получение id строки для редактирования
|
||||
// это значение содержится в скрытом input
|
||||
const currentId = cntrls.lineId.value;
|
||||
// если значение id не задано,
|
||||
// то необходимо выполнить добавление записи
|
||||
// иначе обновление записи
|
||||
if (!currentId) {
|
||||
await addLine(
|
||||
cntrls.nameBook.value,
|
||||
cntrls.authorsType.value,
|
||||
cntrls.genresType.value,
|
||||
cntrls.year.value,
|
||||
cntrls.description.value,
|
||||
cntrls.count.value,
|
||||
imageBase64,
|
||||
);
|
||||
} else {
|
||||
await editLine(
|
||||
currentId,
|
||||
cntrls.nameBook.value,
|
||||
cntrls.authorsType.value,
|
||||
cntrls.genresType.value,
|
||||
cntrls.year.value,
|
||||
cntrls.description.value,
|
||||
cntrls.count.value,
|
||||
imageBase64,
|
||||
);
|
||||
}
|
||||
|
||||
// после выполнения добавления/обновления модальное окно скрывается
|
||||
hideUpdateModal();
|
||||
});
|
||||
}
|
||||
// Функция для обработки создания и редактирования элементов таблицы через страницу page-admin.html
|
||||
// Если хотите делать через модальное окно, то удалите эту функцию
|
||||
export async function linesPageForm() {
|
||||
console.info("linesPageForm");
|
||||
|
||||
// загрузка и заполнение select со списком товаров
|
||||
// drawGenreSelect();
|
||||
|
||||
// func1 = (id) => {} аналогично function func1(id) {}
|
||||
const goBack = () => location.assign("/Catalog.html");
|
||||
|
||||
// Вызов функции обновления превью изображения при возникновении
|
||||
// события onchange в тэге input с id image
|
||||
cntrls.image.addEventListener("change", () => updateImagePreview());
|
||||
|
||||
// получение параметров GET-запроса из URL
|
||||
// параметры перечислены после символа ? (?id=1&color=black&...)
|
||||
const urlParams = new URLSearchParams(location.search);
|
||||
|
||||
// получение значения конкретного параметра (id)
|
||||
// указан только при редактировании
|
||||
const currentId = urlParams.get("id");
|
||||
// если id задан
|
||||
if (currentId) {
|
||||
try {
|
||||
// вызов метода REST API для получения записи по первичному ключу(id)
|
||||
const line = await getLine(currentId);
|
||||
// заполнение формы для редактирования
|
||||
cntrls.nameBook.value = line.nameBook;
|
||||
cntrls.authorsType.value = line.authorsType;
|
||||
cntrls.genresType.value = line.genresType;
|
||||
cntrls.year.value = line.year;
|
||||
cntrls.description.value = line.description;
|
||||
cntrls.count.value = line.count;
|
||||
// заполнение превью
|
||||
// Если пользователь выбрал изображение, то оно загружается
|
||||
// в тэг image с id image - preview
|
||||
// иначе устанавливается заглушка, адрес которой указан в imagePlaceholder
|
||||
cntrls.imagePreview.src = line.image ? line.image : imagePlaceholder;
|
||||
} catch {
|
||||
// в случае ошибки происходит возврат к index
|
||||
goBack();
|
||||
}
|
||||
}
|
||||
|
||||
// обработчик события отправки формы
|
||||
// возникает при нажатии на кнопку (button) с типом submit
|
||||
// кнопка должна находится внутри тега form
|
||||
cntrls.form.addEventListener("submit", async (event) => {
|
||||
console.info("Form onSubmit");
|
||||
// отключение стандартного поведения формы при отправке
|
||||
// при отправке страница обновляется и JS перестает работать
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
// если форма не прошла валидацию, то ничего делать не нужно
|
||||
if (!cntrls.form.checkValidity()) {
|
||||
return;
|
||||
}
|
||||
|
||||
let imageBase64 = "";
|
||||
// Получение выбранного пользователем изображения в виде base64 строки
|
||||
// Если пользователь ничего не выбрал, то не нужно сохранять в БД
|
||||
// дефолтное изображение
|
||||
if (cntrls.imagePreview.src !== imagePlaceholder) {
|
||||
// Загрузка содержимого атрибута src тэга img с id image-preview
|
||||
// Здесь выполняется HTTP запрос с типом GET
|
||||
const result = await fetch(cntrls.imagePreview.src);
|
||||
// Получение из HTTP-ответа бинарного содержимого
|
||||
const blob = await result.blob();
|
||||
// Получение base64 строки для файла
|
||||
// Здесь выполняется Promise из функции readFile
|
||||
// Promise позволяет писать линейный код для работы с асинхронными методами
|
||||
// без использования обработчиков (callback) с помощью await
|
||||
imageBase64 = await readFile(blob);
|
||||
}
|
||||
|
||||
// если значение параметра запроса не задано,
|
||||
// то необходимо выполнить добавление записи
|
||||
// иначе обновление записи
|
||||
if (!currentId) {
|
||||
await addLine(
|
||||
cntrls.nameBook.value,
|
||||
cntrls.authorsType.value,
|
||||
cntrls.genresType.value,
|
||||
cntrls.year.value,
|
||||
cntrls.description.value,
|
||||
cntrls.count.value,
|
||||
imageBase64,
|
||||
);
|
||||
} else {
|
||||
await editLine(
|
||||
currentId,
|
||||
cntrls.nameBook.value,
|
||||
cntrls.authorsType.value,
|
||||
cntrls.genresType.value,
|
||||
cntrls.year.value,
|
||||
cntrls.description.value,
|
||||
cntrls.count.value,
|
||||
imageBase64,
|
||||
);
|
||||
}
|
||||
// возврат к странице index
|
||||
goBack();
|
||||
});
|
||||
}
|
26
3 proba/js/validation.js
Normal file
@ -0,0 +1,26 @@
|
||||
/* eslint-disable linebreak-style */
|
||||
// модуль используется для валидации форма на странице
|
||||
|
||||
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;
|
14
3 proba/jsconfig.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Node",
|
||||
"target": "ES2020",
|
||||
"jsx": "preserve",
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"**/node_modules/*"
|
||||
]
|
||||
}
|
12
3 proba/node_modules/.bin/acorn
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../acorn/bin/acorn" "$@"
|
||||
else
|
||||
exec node "$basedir/../acorn/bin/acorn" "$@"
|
||||
fi
|
17
3 proba/node_modules/.bin/acorn.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\acorn\bin\acorn" %*
|
28
3 proba/node_modules/.bin/acorn.ps1
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../acorn/bin/acorn" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../acorn/bin/acorn" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
12
3 proba/node_modules/.bin/esbuild
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../esbuild/bin/esbuild" "$@"
|
||||
else
|
||||
exec node "$basedir/../esbuild/bin/esbuild" "$@"
|
||||
fi
|
17
3 proba/node_modules/.bin/esbuild.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\esbuild\bin\esbuild" %*
|
28
3 proba/node_modules/.bin/esbuild.ps1
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../esbuild/bin/esbuild" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../esbuild/bin/esbuild" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../esbuild/bin/esbuild" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../esbuild/bin/esbuild" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
12
3 proba/node_modules/.bin/eslint
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../eslint/bin/eslint.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../eslint/bin/eslint.js" "$@"
|
||||
fi
|
17
3 proba/node_modules/.bin/eslint.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\eslint\bin\eslint.js" %*
|
28
3 proba/node_modules/.bin/eslint.ps1
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../eslint/bin/eslint.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../eslint/bin/eslint.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../eslint/bin/eslint.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../eslint/bin/eslint.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
12
3 proba/node_modules/.bin/he
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../he/bin/he" "$@"
|
||||
else
|
||||
exec node "$basedir/../he/bin/he" "$@"
|
||||
fi
|
17
3 proba/node_modules/.bin/he.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\he\bin\he" %*
|
28
3 proba/node_modules/.bin/he.ps1
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../he/bin/he" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../he/bin/he" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../he/bin/he" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../he/bin/he" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
12
3 proba/node_modules/.bin/http-server
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../http-server/bin/http-server" "$@"
|
||||
else
|
||||
exec node "$basedir/../http-server/bin/http-server" "$@"
|
||||
fi
|
17
3 proba/node_modules/.bin/http-server.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\http-server\bin\http-server" %*
|
28
3 proba/node_modules/.bin/http-server.ps1
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../http-server/bin/http-server" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../http-server/bin/http-server" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../http-server/bin/http-server" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../http-server/bin/http-server" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
12
3 proba/node_modules/.bin/js-yaml
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../js-yaml/bin/js-yaml.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../js-yaml/bin/js-yaml.js" "$@"
|
||||
fi
|
17
3 proba/node_modules/.bin/js-yaml.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\js-yaml\bin\js-yaml.js" %*
|
28
3 proba/node_modules/.bin/js-yaml.ps1
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
12
3 proba/node_modules/.bin/json-server
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../json-server/lib/cli/bin.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../json-server/lib/cli/bin.js" "$@"
|
||||
fi
|
17
3 proba/node_modules/.bin/json-server.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\json-server\lib\cli\bin.js" %*
|
28
3 proba/node_modules/.bin/json-server.ps1
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../json-server/lib/cli/bin.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../json-server/lib/cli/bin.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../json-server/lib/cli/bin.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../json-server/lib/cli/bin.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
12
3 proba/node_modules/.bin/json5
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../json5/lib/cli.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../json5/lib/cli.js" "$@"
|
||||
fi
|
17
3 proba/node_modules/.bin/json5.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\json5\lib\cli.js" %*
|
28
3 proba/node_modules/.bin/json5.ps1
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../json5/lib/cli.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../json5/lib/cli.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../json5/lib/cli.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../json5/lib/cli.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
12
3 proba/node_modules/.bin/mime
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../mime/cli.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../mime/cli.js" "$@"
|
||||
fi
|
17
3 proba/node_modules/.bin/mime.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mime\cli.js" %*
|
28
3 proba/node_modules/.bin/mime.ps1
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../mime/cli.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../mime/cli.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../mime/cli.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../mime/cli.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
12
3 proba/node_modules/.bin/mkdirp
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../mkdirp/bin/cmd.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../mkdirp/bin/cmd.js" "$@"
|
||||
fi
|
17
3 proba/node_modules/.bin/mkdirp.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mkdirp\bin\cmd.js" %*
|
28
3 proba/node_modules/.bin/mkdirp.ps1
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
12
3 proba/node_modules/.bin/nanoid
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../nanoid/bin/nanoid.cjs" "$@"
|
||||
else
|
||||
exec node "$basedir/../nanoid/bin/nanoid.cjs" "$@"
|
||||
fi
|
17
3 proba/node_modules/.bin/nanoid.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\nanoid\bin\nanoid.cjs" %*
|
28
3 proba/node_modules/.bin/nanoid.ps1
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
12
3 proba/node_modules/.bin/npm-run-all
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../npm-run-all/bin/npm-run-all/index.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../npm-run-all/bin/npm-run-all/index.js" "$@"
|
||||
fi
|
17
3 proba/node_modules/.bin/npm-run-all.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\npm-run-all\bin\npm-run-all\index.js" %*
|
28
3 proba/node_modules/.bin/npm-run-all.ps1
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../npm-run-all/bin/npm-run-all/index.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../npm-run-all/bin/npm-run-all/index.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../npm-run-all/bin/npm-run-all/index.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../npm-run-all/bin/npm-run-all/index.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
12
3 proba/node_modules/.bin/opener
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../opener/bin/opener-bin.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../opener/bin/opener-bin.js" "$@"
|
||||
fi
|
17
3 proba/node_modules/.bin/opener.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\opener\bin\opener-bin.js" %*
|
28
3 proba/node_modules/.bin/opener.ps1
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../opener/bin/opener-bin.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../opener/bin/opener-bin.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../opener/bin/opener-bin.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../opener/bin/opener-bin.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
12
3 proba/node_modules/.bin/pidtree
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../pidtree/bin/pidtree.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../pidtree/bin/pidtree.js" "$@"
|
||||
fi
|
17
3 proba/node_modules/.bin/pidtree.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\pidtree\bin\pidtree.js" %*
|
28
3 proba/node_modules/.bin/pidtree.ps1
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../pidtree/bin/pidtree.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../pidtree/bin/pidtree.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../pidtree/bin/pidtree.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../pidtree/bin/pidtree.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
12
3 proba/node_modules/.bin/resolve
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../resolve/bin/resolve" "$@"
|
||||
else
|
||||
exec node "$basedir/../resolve/bin/resolve" "$@"
|
||||
fi
|
17
3 proba/node_modules/.bin/resolve.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\resolve\bin\resolve" %*
|
28
3 proba/node_modules/.bin/resolve.ps1
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../resolve/bin/resolve" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../resolve/bin/resolve" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../resolve/bin/resolve" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../resolve/bin/resolve" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
12
3 proba/node_modules/.bin/rimraf
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../rimraf/bin.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../rimraf/bin.js" "$@"
|
||||
fi
|
17
3 proba/node_modules/.bin/rimraf.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\rimraf\bin.js" %*
|
28
3 proba/node_modules/.bin/rimraf.ps1
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../rimraf/bin.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../rimraf/bin.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../rimraf/bin.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../rimraf/bin.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
12
3 proba/node_modules/.bin/rollup
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../rollup/dist/bin/rollup" "$@"
|
||||
else
|
||||
exec node "$basedir/../rollup/dist/bin/rollup" "$@"
|
||||
fi
|
17
3 proba/node_modules/.bin/rollup.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\rollup\dist\bin\rollup" %*
|
28
3 proba/node_modules/.bin/rollup.ps1
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../rollup/dist/bin/rollup" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../rollup/dist/bin/rollup" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../rollup/dist/bin/rollup" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../rollup/dist/bin/rollup" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
12
3 proba/node_modules/.bin/run-p
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../npm-run-all/bin/run-p/index.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../npm-run-all/bin/run-p/index.js" "$@"
|
||||
fi
|
17
3 proba/node_modules/.bin/run-p.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\npm-run-all\bin\run-p\index.js" %*
|
28
3 proba/node_modules/.bin/run-p.ps1
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../npm-run-all/bin/run-p/index.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../npm-run-all/bin/run-p/index.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../npm-run-all/bin/run-p/index.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../npm-run-all/bin/run-p/index.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|