aboutsummaryrefslogtreecommitdiff
path: root/interface/views/index.ejs
blob: ffd77e688f6c82f55c105cd634e90f5f837c5988 (plain)
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
<!DOCTYPE html>
<html lang="en">
  <head>
    <%- include('partials/head') %>
  </head>

  <body>
    <div class="ui modal login">
      <i class="close icon"></i>
      <div class="header">Log in to continue</div>
      <div
        class="ui padded container segment"
        style="border: none; box-shadow: none"
      >
        <form class="ui form" method="post" onsubmit="login(event)">
          <div class="field">
            <label>Username</label>
            <input
              placeholder="Username"
              name="username"
              type="text"
              autocomplete="off"
              id="username"
            />
          </div>
          <div class="field">
            <label>Password</label>
            <input
              type="password"
              name="password"
              placeholder="password"
              id="password"
            />
          </div>
          <div class="ui primary submit button" id="submit">Submit</div>
          <div class="ui error message"></div>
        </form>
      </div>
    </div>
    <%- include('partials/navbar') %>
    <div class="ui main container segment">
      <div class="ui cards">
        <div class="card">
          <div class="content">
            <div class="header">Citizens</div>
            <div class="description">
              <pre>
                Gender Statistics:<br>
                =====================<br>
                Male: <%= genderDistribution[0].genderCount %><br>
                Female: <%= genderDistribution[1].genderCount %><br>
                ---------------------<br>
                Total: <%= genderDistribution[0].genderCount + genderDistribution[1].genderCount %>
              </pre>
              Provides the details of all the citizens in the database
            </div>
          </div>
          <div class="extra content">
            <div class="ui basic green button" onclick="route('citizens')">
              View Data
            </div>
          </div>
        </div>
      </div>
    </div>
  </body>
  <%- include('partials/scripts') %>
  <script>
    $(".login.modal").modal("attach events", ".loginButton", "show");
  </script>
  <script src="/login.js"></script>
</html>