aboutsummaryrefslogtreecommitdiff
path: root/templates/base.html
blob: 9d49fb5f07ac3d9233ab173f456a4b3cb0423b34 (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
<!DOCTYPE html>
<html lang="en">
<head>
    {% block head %}
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
    <link rel="stylesheet" href="{{ url_for('static', filename='ihatecss.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='auto-complete.css') }}">
    <link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico')}}" type="image/x-icon">
    <link rel="icon" href="{{ url_for('static', filename='favicon.ico')}}" type="image/x-icon">
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-144659956-1"></script>
    <script src="{{ url_for('static', filename='auto-complete.min.js') }}"></script>
    <script>
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());
        gtag('config', 'UA-144659956-1');
    </script>

    <title>{% block title %}{% endblock %} Similar Beers</title>
    {% endblock %}
</head>
<body>
  <nav class="navbar navbar-dark bg-info mb-3">
    <div class="container">
      <a class="navbar-brand" href="/">similar.beer</a>
      <form class="form-inline" action="/search" method="post" autocomplete="off">
        <input class="form-control mr-sm-2" type="search" name="q" placeholder="Search Beers" aria-label="Search">
        <button class="btn btn-secondary my-2 my-sm-0" type="submit">Go</button>
      </form>
      <a href="/random" class="btn btn-secondary my-2 my-sm-0">Random Beer!</a>
    </div>
  </nav>

  <div class="container">
    {% block content %}{% endblock %}
  </div>
    <div id="footer">
        {% block footer %}
            <div class="row">
            <div class="col"><p >
            Please Drink responsibly... or don't - I'm a website, not a cop.
            </p></div>
            <div class="col text-right"><a href="mailto:bn.chn2@gmail.com">Feedback / Contact Us</a></div>
            </div>
        {% endblock %}
    </div>
  <script>
    (function() {
      new autoComplete({
          selector: 'input[name="q"]',
          source: function(q, response) {
            fetch(`/all_beers.json?q=${encodeURIComponent(q)}`)
              .then(res => res.json())
              .then(response);
          }
      });
    })()
  </script>
</body>
</html>