Инициализация
This commit is contained in:
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 %}
|
Reference in New Issue
Block a user