| 1 | <!DOCTYPE html>
|
|---|
| 2 | <html lang="mk">
|
|---|
| 3 |
|
|---|
| 4 | <head>
|
|---|
| 5 | <meta charset="UTF-8">
|
|---|
| 6 | <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|---|
| 7 |
|
|---|
| 8 | <title>{{ kniga[1] }} | BiblioPremium</title>
|
|---|
| 9 |
|
|---|
| 10 | <link rel="stylesheet"
|
|---|
| 11 | href="{{ url_for('static', filename='style.css') }}">
|
|---|
| 12 | </head>
|
|---|
| 13 |
|
|---|
| 14 | <body>
|
|---|
| 15 |
|
|---|
| 16 | <header class="navbar">
|
|---|
| 17 |
|
|---|
| 18 | <div class="logo">
|
|---|
| 19 | <img src="{{ url_for('static', filename='images/logo.png') }}"
|
|---|
| 20 | alt="BiblioPremium">
|
|---|
| 21 | </div>
|
|---|
| 22 |
|
|---|
| 23 | <nav>
|
|---|
| 24 |
|
|---|
| 25 | <a href="{{ url_for('home') }}">
|
|---|
| 26 | Почетна
|
|---|
| 27 | </a>
|
|---|
| 28 |
|
|---|
| 29 | <a href="{{ url_for('home') }}#books">
|
|---|
| 30 | Книги
|
|---|
| 31 | </a>
|
|---|
| 32 |
|
|---|
| 33 | <a href="{{ url_for('recommendations') }}">
|
|---|
| 34 | Препораки
|
|---|
| 35 | </a>
|
|---|
| 36 |
|
|---|
| 37 | {% if session.get('korisnik_id') %}
|
|---|
| 38 |
|
|---|
| 39 | <a href="{{ url_for('favorites') }}">
|
|---|
| 40 | Омилени
|
|---|
| 41 | </a>
|
|---|
| 42 |
|
|---|
| 43 | <a href="{{ url_for('orders') }}">
|
|---|
| 44 | Мои нарачки
|
|---|
| 45 | </a>
|
|---|
| 46 |
|
|---|
| 47 | <a href="{{ url_for('preferences') }}">
|
|---|
| 48 | Мои преференции
|
|---|
| 49 | </a>
|
|---|
| 50 |
|
|---|
| 51 | {% endif %}
|
|---|
| 52 |
|
|---|
| 53 | </nav>
|
|---|
| 54 |
|
|---|
| 55 |
|
|---|
| 56 | <div class="nav-buttons">
|
|---|
| 57 |
|
|---|
| 58 | {% if session.get('korisnik_id') %}
|
|---|
| 59 |
|
|---|
| 60 | <span class="logged-user">
|
|---|
| 61 | 👤 {{ session.get('ime') }}
|
|---|
| 62 | </span>
|
|---|
| 63 |
|
|---|
| 64 | <a href="{{ url_for('logout') }}"
|
|---|
| 65 | class="login-btn">
|
|---|
| 66 | Одјави се
|
|---|
| 67 | </a>
|
|---|
| 68 |
|
|---|
| 69 | {% else %}
|
|---|
| 70 |
|
|---|
| 71 | <a href="{{ url_for('login') }}"
|
|---|
| 72 | class="login-btn">
|
|---|
| 73 | Најава
|
|---|
| 74 | </a>
|
|---|
| 75 |
|
|---|
| 76 | <a href="{{ url_for('register') }}"
|
|---|
| 77 | class="register-btn">
|
|---|
| 78 | Регистрација
|
|---|
| 79 | </a>
|
|---|
| 80 |
|
|---|
| 81 | {% endif %}
|
|---|
| 82 |
|
|---|
| 83 | </div>
|
|---|
| 84 |
|
|---|
| 85 | </header>
|
|---|
| 86 |
|
|---|
| 87 |
|
|---|
| 88 | <section class="book-details">
|
|---|
| 89 |
|
|---|
| 90 | <!-- КОРИЦА -->
|
|---|
| 91 |
|
|---|
| 92 | <div class="details-cover">
|
|---|
| 93 |
|
|---|
| 94 | {% if kniga[1] == 'Atomic Habits' %}
|
|---|
| 95 |
|
|---|
| 96 | <img src="{{ url_for('static', filename='images/Atomic Habits.png') }}"
|
|---|
| 97 | alt="Atomic Habits">
|
|---|
| 98 |
|
|---|
| 99 | {% elif kniga[1] == 'The Alchemist' %}
|
|---|
| 100 |
|
|---|
| 101 | <img src="{{ url_for('static', filename='images/The Alchemist.png') }}"
|
|---|
| 102 | alt="The Alchemist">
|
|---|
| 103 |
|
|---|
| 104 | {% elif kniga[1] == 'Ikigai' %}
|
|---|
| 105 |
|
|---|
| 106 | <img src="{{ url_for('static', filename='images/Ikigai.png') }}"
|
|---|
| 107 | alt="Ikigai">
|
|---|
| 108 |
|
|---|
| 109 | {% elif kniga[1] == 'Deep Work' %}
|
|---|
| 110 |
|
|---|
| 111 | <img src="{{ url_for('static', filename='images/Deep Work.png') }}"
|
|---|
| 112 | alt="Deep Work">
|
|---|
| 113 |
|
|---|
| 114 | {% elif kniga[1] == 'The Power of Now' %}
|
|---|
| 115 |
|
|---|
| 116 | <img src="{{ url_for('static', filename='images/The Power of Now.png') }}"
|
|---|
| 117 | alt="The Power of Now">
|
|---|
| 118 |
|
|---|
| 119 | {% elif kniga[1] == 'Mindset' %}
|
|---|
| 120 |
|
|---|
| 121 | <img src="{{ url_for('static', filename='images/Mindset.png') }}"
|
|---|
| 122 | alt="Mindset">
|
|---|
| 123 |
|
|---|
| 124 | {% elif kniga[1] == 'The Little Prince' %}
|
|---|
| 125 |
|
|---|
| 126 | <img src="{{ url_for('static', filename='images/The Little Prince.png') }}"
|
|---|
| 127 | alt="The Little Prince">
|
|---|
| 128 |
|
|---|
| 129 | {% elif kniga[1] == 'Think and Grow Rich' %}
|
|---|
| 130 |
|
|---|
| 131 | <img src="{{ url_for('static', filename='images/Think and Grow Rich.png') }}"
|
|---|
| 132 | alt="Think and Grow Rich">
|
|---|
| 133 |
|
|---|
| 134 | {% else %}
|
|---|
| 135 |
|
|---|
| 136 | <span class="book-placeholder">📖</span>
|
|---|
| 137 |
|
|---|
| 138 | {% endif %}
|
|---|
| 139 |
|
|---|
| 140 | </div>
|
|---|
| 141 |
|
|---|
| 142 |
|
|---|
| 143 | <!-- ИНФОРМАЦИИ -->
|
|---|
| 144 |
|
|---|
| 145 | <div class="details-info">
|
|---|
| 146 |
|
|---|
| 147 | <span class="details-label">
|
|---|
| 148 | ДЕТАЛИ ЗА КНИГАТА
|
|---|
| 149 | </span>
|
|---|
| 150 |
|
|---|
| 151 | <h1>
|
|---|
| 152 | {{ kniga[1] }}
|
|---|
| 153 | </h1>
|
|---|
| 154 |
|
|---|
| 155 | <p class="details-year">
|
|---|
| 156 | Година на издавање: {{ kniga[4] }}
|
|---|
| 157 | </p>
|
|---|
| 158 |
|
|---|
| 159 | <p class="details-description">
|
|---|
| 160 | {{ kniga[3] }}
|
|---|
| 161 | </p>
|
|---|
| 162 |
|
|---|
| 163 | <p class="details-price">
|
|---|
| 164 | {{ kniga[2] }} ден.
|
|---|
| 165 | </p>
|
|---|
| 166 |
|
|---|
| 167 |
|
|---|
| 168 | <!-- КОЛИЧИНА И КОПЧИЊА -->
|
|---|
| 169 |
|
|---|
| 170 | <div class="book-purchase-area">
|
|---|
| 171 |
|
|---|
| 172 | <form
|
|---|
| 173 | method="POST"
|
|---|
| 174 | action="{{ url_for('buy_book', kniga_id=kniga[0]) }}"
|
|---|
| 175 | class="purchase-form"
|
|---|
| 176 | >
|
|---|
| 177 |
|
|---|
| 178 | <!-- МОДЕРЕН ИЗБОР НА КОЛИЧИНА -->
|
|---|
| 179 |
|
|---|
| 180 | <div class="quantity-box">
|
|---|
| 181 |
|
|---|
| 182 | <span class="quantity-label">
|
|---|
| 183 | Количина
|
|---|
| 184 | </span>
|
|---|
| 185 |
|
|---|
| 186 | <div class="quantity-control">
|
|---|
| 187 |
|
|---|
| 188 | <button
|
|---|
| 189 | type="button"
|
|---|
| 190 | class="quantity-btn"
|
|---|
| 191 | onclick="changeQuantity(-1)"
|
|---|
| 192 | >
|
|---|
| 193 | −
|
|---|
| 194 | </button>
|
|---|
| 195 |
|
|---|
| 196 | <input
|
|---|
| 197 | type="number"
|
|---|
| 198 | id="kolicina"
|
|---|
| 199 | name="kolicina"
|
|---|
| 200 | value="1"
|
|---|
| 201 | min="1"
|
|---|
| 202 | max="5"
|
|---|
| 203 | readonly
|
|---|
| 204 | >
|
|---|
| 205 |
|
|---|
| 206 | <button
|
|---|
| 207 | type="button"
|
|---|
| 208 | class="quantity-btn"
|
|---|
| 209 | onclick="changeQuantity(1)"
|
|---|
| 210 | >
|
|---|
| 211 | +
|
|---|
| 212 | </button>
|
|---|
| 213 |
|
|---|
| 214 | </div>
|
|---|
| 215 |
|
|---|
| 216 | </div>
|
|---|
| 217 |
|
|---|
| 218 |
|
|---|
| 219 | <!-- КОПЧИЊА -->
|
|---|
| 220 |
|
|---|
| 221 | <div class="action-buttons">
|
|---|
| 222 |
|
|---|
| 223 | <button type="submit" class="buy-btn">
|
|---|
| 224 | Купи ја книгата
|
|---|
| 225 | </button>
|
|---|
| 226 |
|
|---|
| 227 |
|
|---|
| 228 | {% if is_favorite %}
|
|---|
| 229 |
|
|---|
| 230 | <button
|
|---|
| 231 | type="button"
|
|---|
| 232 | class="favorite-btn"
|
|---|
| 233 | disabled
|
|---|
| 234 | >
|
|---|
| 235 | ♥ Во омилени
|
|---|
| 236 | </button>
|
|---|
| 237 |
|
|---|
| 238 | {% else %}
|
|---|
| 239 |
|
|---|
| 240 | <button
|
|---|
| 241 | type="submit"
|
|---|
| 242 | class="favorite-btn"
|
|---|
| 243 | formaction="{{ url_for('add_favorite', kniga_id=kniga[0]) }}"
|
|---|
| 244 | formnovalidate
|
|---|
| 245 | >
|
|---|
| 246 | ♡ Додај во омилени
|
|---|
| 247 | </button>
|
|---|
| 248 |
|
|---|
| 249 | {% endif %}
|
|---|
| 250 |
|
|---|
| 251 | </div>
|
|---|
| 252 |
|
|---|
| 253 | </form>
|
|---|
| 254 |
|
|---|
| 255 | </div>
|
|---|
| 256 |
|
|---|
| 257 | </div>
|
|---|
| 258 |
|
|---|
| 259 | </section>
|
|---|
| 260 |
|
|---|
| 261 |
|
|---|
| 262 | <!-- JAVASCRIPT ЗА КОЛИЧИНАТА -->
|
|---|
| 263 |
|
|---|
| 264 | <script>
|
|---|
| 265 |
|
|---|
| 266 | function changeQuantity(change) {
|
|---|
| 267 |
|
|---|
| 268 | const input = document.getElementById("kolicina");
|
|---|
| 269 |
|
|---|
| 270 | let quantity = parseInt(input.value);
|
|---|
| 271 |
|
|---|
| 272 | let newQuantity = quantity + change;
|
|---|
| 273 |
|
|---|
| 274 | if (newQuantity >= 1 && newQuantity <= 5) {
|
|---|
| 275 | input.value = newQuantity;
|
|---|
| 276 | }
|
|---|
| 277 |
|
|---|
| 278 | }
|
|---|
| 279 |
|
|---|
| 280 | </script>
|
|---|
| 281 |
|
|---|
| 282 |
|
|---|
| 283 | </body>
|
|---|
| 284 |
|
|---|
| 285 | </html> |
|---|