-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.html
105 lines (104 loc) · 4.09 KB
/
template.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<!doctype html>
<html lang="ru">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="../static/bootstrap.min.css">
<title>E-book library</title>
<link rel="apple-touch-icon" sizes="180x180" href="../static/icons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="../static/icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="../static/icons/favicon-16x16.png">
<link rel="manifest" href="../static/icons/site.webmanifest">
<link rel="mask-icon" href="../static/icons/safari-pinned-tab.svg" color="#5bbad5">
<link rel="shortcut icon" href="../static/icons/favicon.ico">
<meta name="msapplication-TileColor" content="#2b5797">
<meta name="msapplication-config" content="../static/icons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
</head>
<body>
<div class="container my-3">
<nav aria-label="Page navigation">
<ul class="pagination justify-content-center">
{% if content.pages.current_page_number == 1 %}
<li class="page-item disabled">
<span class="page-link">Назад</span>
</li>
{% else %}
<li class="page-item">
<a class="page-link"
href="index{{ content.pages.current_page_number - 1 }}.html">
Назад
</a>
</li>
{% endif %}
{% for page in range(1, content.pages.number_of_pages + 1) %}
{% if page == content.pages.current_page_number %}
<li class="page-item active" aria-current="page">
<span class="page-link">
{{ page }}
<span class="sr-only">(current)</span>
</span>
</li>
{% else %}
<li class="page-item">
<a class="page-link" href="index{{ page }}.html">
{{ page }}
</a>
</li>
{% endif %}
{% endfor %}
{% if content.pages.current_page_number+1 > content.pages.number_of_pages %}
<li class="page-item disabled">
<span class="page-link">Вперед</span>
</li>
{% else %}
<li class="page-item">
<a class="page-link"
href="index{{ content.pages.current_page_number + 1 }}.html">
Вперед
</a>
</li>
{% endif %}
</ul>
</nav>
<div class="row">
{% for chunk in content.books %}
{% for book in chunk %}
<div class="col">
<div class="card mb-3" style="max-width: 540px;">
<div class="row no-gutters">
<div class="col-md-4">
<img src="../{{ book.image_url|urlencode }}" class="card-img"
alt="{{ book.title }}">
</div>
<div class="col-md-8">
<div class="card-body">
<h5 class="card-title">{{ book.title }}</h5>
<p class="card-text">{{ book.author }}</p>
{% for genre in book.genres %}
<span class="badge badge-pill badge-info">
{{ genre }}
</span>
{% endfor %}
<p class="card-text">
<br>
<a href="../{{ book.book_url|urlencode }}" target="_blank"
rel="noopener noreferrer">Читать</a>
</p>
</div>
</div>
</div>
</div>
</div>
{% endfor %}
<div class="w-100"></div>
{% endfor %}
</div>
</div>
<!-- Option 1: jQuery and Bootstrap Bundle (includes Popper) -->
<script src="../static/jquery-3.5.1.slim.min.js"</script>
<script src="../static/bootstrap.bundle.min.js"</script>
</body>
</html>