File: index.html

package info (click to toggle)
python-azure 20250603%2Bgit-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 851,724 kB
  • sloc: python: 7,362,925; ansic: 804; javascript: 287; makefile: 195; sh: 145; xml: 109
file content (72 lines) | stat: -rw-r--r-- 1,975 bytes parent folder | download
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
{% extends "base.html" %}
{% block title %}Restaurant List{% endblock %}
{% block head %}
    {{ super() }}
    <style>
      body {
          min-height: 75rem;
          padding-top: 4.5rem;
      }

      .score {
        display: block;
        font-size: 16px;
        position: relative;
        overflow: hidden;
      }
      
      .score-wrap {
        display: inline-block;
        position: relative;
        height: 19px;
      }
      
      .score .stars-active {
        color: #EEBD01;
        position: relative;
        z-index: 10;
        display: inline-block;
        overflow: hidden;
        white-space: nowrap;
      }
      
      .score .stars-inactive {
        color: grey;
        position: absolute;
        top: 0;
        left: 0;
        -webkit-text-stroke: initial;
        /* overflow: hidden; */
      }
  </style>
{% endblock %}
{% block content %}
      <h1>Restaurants</h1>

      {% if True %}
          <table class="table">
              <thead>
                  <tr>
                      <th>Name</th>
                      <th>Rating</th>
                      <th class="text-end">Details</th>
                  </tr>
              </thead>
              <tbody>
                  {% for restaurant in restaurants %}
                      <tr>
                          <td>{{ restaurant.name }}</td>
                          <td>{% include "star_rating.html" %}</td>
                          <td class="text-end"><a href="{{ url_for('details', id=restaurant.id) }}" class="btn btn-sm btn-primary">Details</a></td>
                      </tr>
                  {% endfor %}
              </tbody>
          </table>
      {% else %}
          <p>No restaurants exist.  Select Add new restaurant to add one.</p>
      {% endif %}

      <div class="d-flex justify-content-end">
              <a href="{{ url_for('create_restaurant') }}" class="btn btn-success px-4 gap-3">Add new restaurant</a>
      </div>
{% endblock %}