parent
431f2503a8
commit
112daccec9
@ -0,0 +1,97 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\BukiVedi.Shared\BukiVedi.Shared.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Update="config.ini">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="web\assets\cover.jpg">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="web\assets\search.svg">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="web\css\buki-common.css">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="web\css\common.css">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="web\css\fonts\Roboto-300.ttf">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="web\css\fonts\Roboto-300.woff">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="web\css\fonts\Roboto-300.woff2">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="web\css\fonts\Roboto-400.ttf">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="web\css\fonts\Roboto-400.woff">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="web\css\fonts\Roboto-400.woff2">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="web\css\login.css">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="web\css\logo.css">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="web\css\main.css">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="web\css\normalize.css">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="web\images\favicon.ico">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="web\images\flower.jpeg">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="web\index.html">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="web\js\bukivedi-auth.js">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="web\js\bukivedi.js">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="web\js\common\jquery.js">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="web\js\constants\index.js">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="web\js\jquery.js">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="web\js\login\index.js">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="web\js\main\index.js">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="web\js\requests\index.js">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="web\login.html">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
@ -1 +1 @@
|
|||||||
9daab03e895a6f115233529b5b412c23d0bcacc1749fa577a062fe4da0d423fa
|
7f90fe300e225561cd7cc7726bf5d2f940d1cc60e07ec84b3e5f3a0ec108d1d7
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
|||||||
fdd5f880a586f54d63e65e077bb04d3db4265027ab5434a4a34588cbd432d5ad
|
731a41efb4470858e97b70db5c6c673a43866001a9d9b8ac769cdb5c62d8eec0
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 744 B |
After Width: | Height: | Size: 750 B |
@ -0,0 +1,40 @@
|
|||||||
|
.scroll-top {
|
||||||
|
position: fixed;
|
||||||
|
z-index: 3;
|
||||||
|
padding: 0;
|
||||||
|
right: 20px;
|
||||||
|
bottom: 20px;
|
||||||
|
opacity: 1;
|
||||||
|
visibility: hidden;
|
||||||
|
transform: translateY(0px);
|
||||||
|
height: 46px;
|
||||||
|
width: 46px;
|
||||||
|
cursor: pointer;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 50%;
|
||||||
|
transition: all 0.4s ease;
|
||||||
|
border: none;
|
||||||
|
box-shadow: inset 0 0 0 2px var(--accent-color);
|
||||||
|
color: var(--accent-color);
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll-top.is-active {
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll-top .icon-tabler-arrow-up {
|
||||||
|
position: absolute;
|
||||||
|
stroke-width: 2px;
|
||||||
|
stroke: var(--accent-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll-top:hover {
|
||||||
|
color: var(--accent-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll-top:hover .icon-tabler-arrow-up {
|
||||||
|
stroke: var(--accent-color);
|
||||||
|
}
|
@ -1,69 +1,41 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<title>Vedi</title>
|
<title>Vedi</title>
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<link rel="icon" type="image/x-icon" href="images/favicon.ico" />
|
<link rel="icon" type="image/x-icon" href="images/favicon.ico" />
|
||||||
<meta
|
<meta name="viewport"
|
||||||
name="viewport"
|
content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
|
||||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<link href="css/normalize.css" rel="stylesheet" />
|
<link href="css/normalize.css" rel="stylesheet" />
|
||||||
<link href="css/common.css" rel="stylesheet" />
|
<link href="css/common.css" rel="stylesheet" />
|
||||||
<link href="css/logo.css" rel="stylesheet" />
|
<link href="css/logo.css" rel="stylesheet" />
|
||||||
<link href="css/main.css" rel="stylesheet" />
|
<link href="css/main.css" rel="stylesheet" />
|
||||||
|
<link href="css/scroll.css" rel="stylesheet" />
|
||||||
|
|
||||||
<script src="js/common/jquery.js"></script>
|
<script src="js/common/jquery.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<main>
|
<header>
|
||||||
<h1 class="background-logo">Vedi</h1>
|
<h1 class="background-logo">Vedi</h1>
|
||||||
<div class="main-search-wrapper mt-l d-fl">
|
<div class="main-search-wrapper mt-l d-fl">
|
||||||
<div class="main-search-pic"></div>
|
<div class="main-search-pic"></div>
|
||||||
<input
|
<input id="search"
|
||||||
id="search"
|
|
||||||
class="main-search pl-l pr-s"
|
class="main-search pl-l pr-s"
|
||||||
placeholder="Выбери книгу, и я найду для тебя похожие"
|
placeholder="Выбери книгу, и я найду для тебя похожие"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
autofocus
|
autofocus />
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<button id="searchButton" class="main-search-btn mt-m">Найти</button>
|
<button id="searchButton" class="main-search-btn mt-m">Найти</button>
|
||||||
|
</header>
|
||||||
|
<main>
|
||||||
<div id="content" class="main-content mt-l">
|
<div id="content" class="main-content mt-l">
|
||||||
<div id="books"></div>
|
<div id="books"></div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module" src="script.js"></script>
|
||||||
import BookSection from "./js/main/index.js";
|
</body>
|
||||||
|
|
||||||
const input = document.getElementById("search");
|
|
||||||
const books = document.getElementById("books");
|
|
||||||
const booksSection = new BookSection({
|
|
||||||
url: "../api/books/search",
|
|
||||||
label: "books",
|
|
||||||
});
|
|
||||||
|
|
||||||
const click = () => {
|
|
||||||
const query = document.getElementById("search").value;
|
|
||||||
if (query) {
|
|
||||||
booksSection.update({ query });
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
searchButton.addEventListener("click", click);
|
|
||||||
|
|
||||||
input.addEventListener("keypress", function (event) {
|
|
||||||
if (event.key === "Enter") {
|
|
||||||
click();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
books.append(booksSection.element);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
|
@ -0,0 +1,80 @@
|
|||||||
|
export default class ButtonScroll {
|
||||||
|
element;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
this.render();
|
||||||
|
}
|
||||||
|
|
||||||
|
get template() {
|
||||||
|
return `
|
||||||
|
<button
|
||||||
|
class="btn-toggle-round scroll-top js-scroll-top"
|
||||||
|
type="button"
|
||||||
|
title="scroll_to_top"
|
||||||
|
data-scroll
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
class="icon icon-tabler icon-tabler-arrow-up"
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
stroke-width=""
|
||||||
|
stroke="cuurentColor"
|
||||||
|
fill="none"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
>
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||||
|
<line x1="12" y1="5" x2="12" y2="19" />
|
||||||
|
<line x1="18" y1="11" x2="12" y2="5" />
|
||||||
|
<line x1="6" y1="11" x2="12" y2="5" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
|
initialize() {
|
||||||
|
this.initEventListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
initEventListeners() {
|
||||||
|
const offset = 200;
|
||||||
|
|
||||||
|
window.addEventListener("scroll", () => {
|
||||||
|
const scrollPos =
|
||||||
|
window.scrollY ||
|
||||||
|
window.scrollTop ||
|
||||||
|
document.getElementsByTagName("html")[0].scrollTop;
|
||||||
|
scrollPos > offset
|
||||||
|
? this.element.classList.add("is-active")
|
||||||
|
: this.element.classList.remove("is-active");
|
||||||
|
});
|
||||||
|
|
||||||
|
this.element.addEventListener("click", (event) => {
|
||||||
|
const isScroll = event.target.closest("[data-scroll]");
|
||||||
|
if (isScroll) {
|
||||||
|
window.scrollTo({ top: 0, behavior: 'smooth' });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const divElement = document.createElement("div");
|
||||||
|
divElement.innerHTML = this.template;
|
||||||
|
this.element = divElement.firstElementChild;
|
||||||
|
this.initialize();
|
||||||
|
}
|
||||||
|
|
||||||
|
remove() {
|
||||||
|
if (this.element) {
|
||||||
|
this.element.remove();
|
||||||
|
destroyEventListeners();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
destroy() {
|
||||||
|
this.remove();
|
||||||
|
this.element = null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
|
||||||
|
import BookSection from "./js/main/index.js";
|
||||||
|
import ButtonScroll from './js/scroll/index.js';
|
||||||
|
|
||||||
|
const input = document.getElementById("search");
|
||||||
|
const books = document.getElementById("books");
|
||||||
|
const content = document.getElementById("content");
|
||||||
|
const booksSection = new BookSection({
|
||||||
|
url: "../api/books/search",
|
||||||
|
label: "books",
|
||||||
|
});
|
||||||
|
const click = () => {
|
||||||
|
const query = document.getElementById("search").value;
|
||||||
|
if (query) {
|
||||||
|
booksSection.update({ query });
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
searchButton.addEventListener("click", click);
|
||||||
|
|
||||||
|
input.addEventListener("keypress", function (event) {
|
||||||
|
if (event.key === "Enter") {
|
||||||
|
click();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
books.append(booksSection.element);
|
||||||
|
|
||||||
|
const scroll = new ButtonScroll()
|
||||||
|
content.append(scroll.element)
|
@ -0,0 +1,52 @@
|
|||||||
|
const path = require('path');
|
||||||
|
const { createProxyMiddleware } = require('http-proxy-middleware');
|
||||||
|
const cors = require('cors');
|
||||||
|
|
||||||
|
const express = require('express');
|
||||||
|
const app = express();
|
||||||
|
|
||||||
|
const server = require('http').Server(app);
|
||||||
|
const router = require('express').Router()
|
||||||
|
|
||||||
|
const options = {
|
||||||
|
target: 'https://book.ogoun.name/', // target host
|
||||||
|
changeOrigin: true, // needed for virtual hosted sites
|
||||||
|
ws: true, // proxy websockets
|
||||||
|
logLevel: 'debug',
|
||||||
|
secure: false,
|
||||||
|
cookieDomainRewrite: {
|
||||||
|
'*': 'localhost',
|
||||||
|
},
|
||||||
|
onProxyRes(proxyRes, req, _res) {
|
||||||
|
if (proxyRes.headers['set-cookie'] !== undefined) {
|
||||||
|
req.cookie = proxyRes.headers['set-cookie'];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onProxyReq(proxyReq, req, _res) {
|
||||||
|
if (req && req.cookie !== undefined) {
|
||||||
|
proxyReq.setHeader('Cookie', req.cookie[0]);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const myLogger = function (req, res, next) {
|
||||||
|
next()
|
||||||
|
}
|
||||||
|
|
||||||
|
app.use(myLogger)
|
||||||
|
|
||||||
|
app.use(express.static(__dirname));
|
||||||
|
app.use(express.static(__dirname + '/js'));
|
||||||
|
app.use(express.static(__dirname + '/css'));
|
||||||
|
app.use(express.static(__dirname + '/constants'));
|
||||||
|
|
||||||
|
// app.get('/login', function (req, res) {
|
||||||
|
// res.sendFile(path.join(__dirname, '/login.html'));
|
||||||
|
// });
|
||||||
|
|
||||||
|
app.use('/', cors({
|
||||||
|
credentials: true,
|
||||||
|
origin: 'http://localhost:3000',
|
||||||
|
}), createProxyMiddleware(options));
|
||||||
|
|
||||||
|
server.listen(3001);
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
|||||||
6662423c1e23f623328b320f21205ebeff7a4aebfe8c7b0b24e3f18247b7d14a
|
22258ed3f3bd48ae74b9c3607cf0cf82ec9b3322b631691b32743438f798c7cc
|
||||||
|
Binary file not shown.
@ -1 +1 @@
|
|||||||
2bddd0bc3dcd27073c70a4760f8dbf79dac12620146c67283751aa5c04e62c2b
|
8f1511391c660118f311ede1de029df8d3c4dca0dcff3c3fe53339a3d1836ea1
|
||||||
|
Binary file not shown.
@ -1 +1 @@
|
|||||||
28e06cd4b9a59e2ff22da92879fdac725f071bab5552441829896eec6bfa3411
|
06715856c937a6aa0ade3b1fa065928029591cc434dd76545f239523dd28567b
|
||||||
|
Binary file not shown.
@ -1 +1 @@
|
|||||||
79899f010b0c66fc84b9abdf331440593c067d267d0f470e1f4033e933b4c19e
|
946ae02ae1d24f78debab34bdbac2f87234e55c2d9142e2f73b46c18adb4ce88
|
||||||
|
Binary file not shown.
@ -0,0 +1,9 @@
|
|||||||
|
login=ogoun
|
||||||
|
password=A3n1g4e1l5#
|
||||||
|
libraryPath=I:\Library\Flibusta.Net
|
||||||
|
|
||||||
|
[MongoDB]
|
||||||
|
ConnectionString="mongodb://192.168.0.222:27017"
|
||||||
|
|
||||||
|
[Sleopok]
|
||||||
|
path=H:\TEST
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
|||||||
b6e867e96464d226d6f64f5bb8ff88fd91a7dc10b0cbc8df658695411d89c7c7
|
d7606117e667c055ed565f5f0d94c916cbdbb0bbb171442e9a9d4b51ab356451
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
|||||||
588b6177dc8dadc34104d72c7f17ba8cc3301324d19dcc1fef526a0a4fcaa5de
|
a7282ddb1bbc4aea6cf73d9f5cd24625e715891dd94841b8c41be90b8822b144
|
||||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue