Отчёты 3-4 лабы

This commit is contained in:
DyCTaTOR 2023-12-08 14:53:58 +04:00
parent a4ff178c5e
commit 2f62623c2e
11 changed files with 7 additions and 99 deletions

View File

@ -13,7 +13,7 @@
<nav class = "headStyleNavBar navbar-text navbar-dark w-100"> <nav class = "headStyleNavBar navbar-text navbar-dark w-100">
<div class = "text-center"> <div class = "text-center">
<img src = "./images/logo2.png" alt = "logo2"> <img src = "./images/logo2.png" alt = "logo2" width="70">
<span class = "headStyle"> <span class = "headStyle">
<b>Ульяновский Государственный Политехнический Университет</b> <b>Ульяновский Государственный Политехнический Университет</b>
</span> </span>

Binary file not shown.

View File

@ -74,10 +74,6 @@
alt="placeholder"> alt="placeholder">
</div> </div>
<input id="items-line-id" type="number" hidden> <input id="items-line-id" type="number" hidden>
<div class="mb-2">
<label for="date" class="form-label">Дата</label>
<input id="date" class="form-control" name="date" type = "date" required>
</div>
<div class="mb-2"> <div class="mb-2">
<label class="form-label" for="name">Название</label> <label class="form-label" for="name">Название</label>
<input id="name" name="name" class="form-control" type = "text" <input id="name" name="name" class="form-control" type = "text"

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,3 @@
// модуль с логикой
import { hideUpdateModal, showUpdateModal } from "./lines-modal"; import { hideUpdateModal, showUpdateModal } from "./lines-modal";
import { import {
// getAllItemTypes, // getAllItemTypes,
@ -10,23 +8,6 @@ import {
cntrls, createTableRow, createAnchor, imagePlaceholder, cntrls, createTableRow, createAnchor, imagePlaceholder,
} from "./lines-ui"; } from "./lines-ui";
// async function drawItemsSelect() {
// // вызов метода REST API для получения списка типов товаров
// const data = await getAllItemTypes();
// // очистка содержимого select
// // удаляется все, что находится между тегами <select></select>
// // но не атрибуты
// cntrls.itemDate.innerHTML = "";
// // пустое значение
// cntrls.itemDate.appendChild(createItemsOption("Выберите значение", "", true));
// // цикл по результату ответа от сервера
// // используется лямбда-выражение
// // (item) => {} аналогично function(item) {}
// data.forEach((item) => {
// cntrls.itemDate.appendChild(createItemsOption(item.name, item.id));
// });
// }
async function drawLinesTable() { async function drawLinesTable() {
console.info("Try to load data"); console.info("Try to load data");
if (!cntrls.table) { if (!cntrls.table) {
@ -302,7 +283,6 @@ export async function UpdateNews() {
data.forEach((item) => { data.forEach((item) => {
cntrls.form.addEventListener("submit", async (event) => { cntrls.form.addEventListener("submit", async (event) => {
// console.info("Form on Submit231");
event.preventDefault(); event.preventDefault();
event.stopPropagation(); event.stopPropagation();
}); });

Binary file not shown.

View File

@ -1,11 +1,11 @@
{ {
"name": "lec4", "name": "ulstu",
"version": "0.0.0", "version": "0.0.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "lec4", "name": "ulstu",
"version": "0.0.0", "version": "0.0.0",
"dependencies": { "dependencies": {
"bootstrap": "^5.3.2", "bootstrap": "^5.3.2",

View File

@ -1,5 +1,5 @@
{ {
"name": "lec4", "name": "ulstu",
"private": true, "private": true,
"version": "0.0.0", "version": "0.0.0",
"type": "module", "type": "module",

View File

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-cart2" viewBox="0 0 16 16">
<path d="M0 2.5A.5.5 0 0 1 .5 2H2a.5.5 0 0 1 .485.379L2.89 4H14.5a.5.5 0 0 1 .485.621l-1.5 6A.5.5 0 0 1 13 11H4a.5.5 0 0 1-.485-.379L1.61 3H.5a.5.5 0 0 1-.5-.5zM3.14 5l1.25 5h8.22l1.25-5H3.14zM5 13a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm-2 1a2 2 0 1 1 4 0 2 2 0 0 1-4 0zm9-1a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm-2 1a2 2 0 1 1 4 0 2 2 0 0 1-4 0z"/>
</svg>

Before

Width:  |  Height:  |  Size: 463 B

View File

@ -1,25 +0,0 @@
#banner {
margin: 2px;
display: flex;
align-items: center;
flex-direction: column;
}
#banner img {
border: 1px solid #3c3c3f;
border-radius: 5px;
}
#banner img.banner-show {
width: 100%;
opacity: 1;
transition: opacity 1s, visibility 0s;
}
#banner img.banner-hide {
height: 0;
width: 0;
opacity: 0;
visibility: hidden;
transition: opacity 1s, visibility 0s 1s;
}

View File

@ -1,40 +0,0 @@
import { useEffect, useState } from 'react';
import banner1 from '../../assets/banner1.png';
import banner2 from '../../assets/banner2.png';
import banner3 from '../../assets/banner3.png';
import './Banner.css';
const Banner = () => {
const [currentBanner, setCurrentBanner] = useState(0);
const banners = [banner1, banner2, banner3];
const getBannerClass = (index) => {
return currentBanner === index ? 'banner-show' : 'banner-hide';
};
useEffect(() => {
const bannerInterval = setInterval(
() => {
console.info('Banner changed');
let current = currentBanner + 1;
if (current === banners.length) {
current = 0;
}
setCurrentBanner(current);
},
5000,
);
return () => clearInterval(bannerInterval);
});
return (
<div id="banner" >
{
banners.map((banner, index) =>
<img key={index} className={getBannerClass(index)} src={banner} alt={`banner${index}`} />)
}
</div >
);
};
export default Banner;