Инициализация
This commit is contained in:
38
mirzaev/surikovlib/system/views/auth.html
Normal file
38
mirzaev/surikovlib/system/views/auth.html
Normal file
@@ -0,0 +1,38 @@
|
||||
<section id="authentication">
|
||||
<link href="/css/auth.css" rel="stylesheet">
|
||||
|
||||
{% if account is not empty %}
|
||||
<h3>Аккаунт</h3>
|
||||
<div>
|
||||
<p><b>Почта:</b> <span>{{ account.email }}</span></p>
|
||||
<a class="exit" type="button" href='/account/deauthentication'>Выход</a>
|
||||
</div>
|
||||
{% else %}
|
||||
<h3>Аутентификация</h3>
|
||||
<form method="POST" accept-charset="UTF-8">
|
||||
<input type="text" name="email" placeholder="Почта">
|
||||
<input type="password" name="password" placeholder="Пароль">
|
||||
|
||||
<div class="submit">
|
||||
<label class="button unselectable fas fa-unlock" for="remember"
|
||||
onclick="return remember_switch(this);"></label>
|
||||
<input type="checkbox" name="remember" value="1">
|
||||
<input type="submit" value="Войти" onclick="return authentication(this.parentElement.parentElement);">
|
||||
</div>
|
||||
<input type="submit" class="registration" value="Зарегистрироваться"
|
||||
onclick="return registration(this.parentElement);">
|
||||
|
||||
{% if errors is not empty %}
|
||||
{% if errors.account is not empty %}
|
||||
<ul class="errors">
|
||||
{% for error in errors.account %}
|
||||
<li>{{ error }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
<script type="text/javascript" src="/js/auth.js" defer></script>
|
||||
</section>
|
11
mirzaev/surikovlib/system/views/books/book.html
Normal file
11
mirzaev/surikovlib/system/views/books/book.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{% extends "core.html" %}
|
||||
|
||||
{% block main %}
|
||||
<link href="/css/books.css" rel="stylesheet">
|
||||
|
||||
<article class="book">
|
||||
<img src="/books/{{ book.id|e }}/cover" alt='Обложка книги "{{ book.title|e }}"'>
|
||||
<h3><a href="/books/{{ book.id|e }}">{{ book.title|e }}</a></h3>
|
||||
<p>{{ book.description|e|length|trim(' ') > 80 ? book.description|e|slice(0, 80)|trim(' ') ~ '...' : book.description|e}}</p>
|
||||
</article>
|
||||
{% endblock %}
|
19
mirzaev/surikovlib/system/views/books/index.html
Normal file
19
mirzaev/surikovlib/system/views/books/index.html
Normal file
@@ -0,0 +1,19 @@
|
||||
{% extends "core.html" %}
|
||||
|
||||
{% block main %}
|
||||
<link href="/css/books.css" rel="stylesheet">
|
||||
<link href="/css/upload.css" rel="stylesheet">
|
||||
|
||||
<section id="books">
|
||||
<form class="upload" action="/books/write" enctype="multipart/form-data" method="POST">
|
||||
<input type="file" name="books[]" accept=".pdf" oninput="this.parentElement.submit();" multiple="true">
|
||||
<p>+</p>
|
||||
</form>
|
||||
{% for book in books %}
|
||||
<article class="book">
|
||||
<img src="/books/{{ book.id|e }}/cover" alt='Обложка книги "{{ book.title|e }}"'>
|
||||
<h4><a href="/books/{{ book.id|e }}">{{ book.title|e }}</a></h3>
|
||||
</article>
|
||||
{% endfor %}
|
||||
</section>
|
||||
{% endblock %}
|
34
mirzaev/surikovlib/system/views/core.html
Normal file
34
mirzaev/surikovlib/system/views/core.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<!doctype html>
|
||||
|
||||
<html lang="ru">
|
||||
|
||||
<head>
|
||||
{% include 'head.html' %}
|
||||
|
||||
<link href="/css/main.css" rel="stylesheet">
|
||||
|
||||
<title>
|
||||
{% block title %}
|
||||
Библеотека Сурикова
|
||||
{% endblock %}
|
||||
</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{% include 'header.html' %}
|
||||
|
||||
<aside>
|
||||
{% include 'sidebar.html' %}
|
||||
</aside><!----><main>
|
||||
{% block main %}
|
||||
{% include 'calculators/index.html' %}
|
||||
{% endblock %}
|
||||
</main>
|
||||
|
||||
{% include 'footer.html' %}
|
||||
</body>
|
||||
|
||||
{% include 'js.html' %}
|
||||
</body>
|
||||
|
||||
</html>
|
3
mirzaev/surikovlib/system/views/footer.html
Normal file
3
mirzaev/surikovlib/system/views/footer.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<footer>
|
||||
|
||||
</footer>
|
2
mirzaev/surikovlib/system/views/head.html
Normal file
2
mirzaev/surikovlib/system/views/head.html
Normal file
@@ -0,0 +1,2 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
18
mirzaev/surikovlib/system/views/header.html
Normal file
18
mirzaev/surikovlib/system/views/header.html
Normal file
@@ -0,0 +1,18 @@
|
||||
<header>
|
||||
<section class="menu">
|
||||
<nav>
|
||||
<a class="link" href="/surikov" title="Архивный фонд">Кеменев</a>
|
||||
<a class="link" href="/kemenev" title="Список книг">Суриков</a>
|
||||
<a id="logo" href="/" title="Главная страница">
|
||||
<img src="/img/surikovlib_logo_1_white.svg">
|
||||
</a>
|
||||
<a class="link" href="/books" title="Читать книги">Библиотека</a>
|
||||
<a class="link" href="/contacts" title="Контакты администрации">Контакты</a>
|
||||
</nav>
|
||||
</section>
|
||||
|
||||
<section class="window">
|
||||
<img class="img_1" src="/img/ФЖ-28.png" alt="">
|
||||
<img class="background" src="/img/background_1.png" alt="">
|
||||
</section>
|
||||
</header>
|
9
mirzaev/surikovlib/system/views/js.html
Normal file
9
mirzaev/surikovlib/system/views/js.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<script type="text/javascript" src="/js/auth.js"></script>
|
||||
<script type="text/javascript" src="/js/tasks.js"></script>
|
||||
<script src="https://kit.fontawesome.com/d7e922c226.js" crossorigin="anonymous"></script>
|
||||
<script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="/js/bootstrap/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="/js/bootstrap/forms_validator.js"></script>
|
||||
|
||||
{% block js %}
|
||||
{% endblock %}
|
5
mirzaev/surikovlib/system/views/main/index.html
Normal file
5
mirzaev/surikovlib/system/views/main/index.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{% extends "core.html" %}
|
||||
|
||||
{% block main %}
|
||||
<img class="banner unselectable" src="/img/школьникам.png" alt="Предложение для школьников">
|
||||
{% endblock %}
|
25
mirzaev/surikovlib/system/views/manager.php
Normal file
25
mirzaev/surikovlib/system/views/manager.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace mirzaev\surikovlib\views;
|
||||
|
||||
use mirzaev\minimal\controller;
|
||||
|
||||
use Twig\Loader\FilesystemLoader;
|
||||
use Twig\Environment as view;
|
||||
|
||||
/**
|
||||
* Менеджер представлений
|
||||
*
|
||||
* @package mirzaev\surikovlib\controllers
|
||||
* @author Arsen Mirzaev Tatyano-Muradovich <arsen@mirzaev.sexy>
|
||||
*/
|
||||
final class manager extends controller
|
||||
{
|
||||
public function render(string $file, array $vars = []): ?string
|
||||
{
|
||||
// Генерация представления
|
||||
return (new view(new FilesystemLoader(VIEWS)))->render($file, $vars);
|
||||
}
|
||||
}
|
6
mirzaev/surikovlib/system/views/sidebar.html
Normal file
6
mirzaev/surikovlib/system/views/sidebar.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<link href="/css/banners.css" rel="stylesheet">
|
||||
|
||||
{% include 'auth.html' %}
|
||||
{% include 'vk.html' %}
|
||||
<!-- <section class="banners">
|
||||
</section> -->
|
8
mirzaev/surikovlib/system/views/vk.1.html
Normal file
8
mirzaev/surikovlib/system/views/vk.1.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<script src="https://vk.com/js/api/openapi.js?169" type="text/javascript"></script>
|
||||
<script type="text/javascript" src="https://vk.com/js/api/openapi.js?169"></script>
|
||||
|
||||
<div id="group"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
VK.Widgets.Group("group", { mode: 4, wide: 0, width: parseInt(getComputedStyle(document.getElementsByTagName('aside')[0]).getPropertyValue('width')), height: "600", color1: 'd9b5b5', color2: '000', color3: '86781C' }, 29605269);
|
||||
</script>
|
10
mirzaev/surikovlib/system/views/vk.html
Normal file
10
mirzaev/surikovlib/system/views/vk.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<section id="vk">
|
||||
<script src="https://vk.com/js/api/openapi.js?169" type="text/javascript"></script>
|
||||
<script type="text/javascript" src="https://vk.com/js/api/openapi.js?169"></script>
|
||||
|
||||
<div id="group"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
VK.Widgets.Group("group", { mode: 4, wide: 0, width: parseInt(getComputedStyle(document.getElementById('vk')).getPropertyValue('width')), height: "600", color1: 'E5DDD1', color3: '86781C' }, 29605269);
|
||||
</script>
|
||||
</section>
|
Reference in New Issue
Block a user