feat: add templates for navbar and footer

This commit is contained in:
Julian Lobbes 2023-07-21 15:58:12 +02:00
parent 9dc5ca66ed
commit e5c89a266e
5 changed files with 93 additions and 20 deletions

View File

@ -1,19 +1,27 @@
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}Medwings{% endblock title %}</title>
<meta name="description" content="{% block description %}An early warning system for medical deterioration.{% endblock description %}">
<meta name="author" content="{% block author %}Julian Lobbes{% endblock author %}">
<title>{% block title %}Medwings{% endblock title %}</title>
<meta name="description" content="{% block description %}An early warning system for medical deterioration.{% endblock description %}">
<meta name="author" content="{% block author %}Julian Lobbes{% endblock author %}">
<link rel="stylesheet" href="{% static 'dist/main.css' %}">
</head>
<body>
{% block content %}
{% endblock content %}
<script src="{% static 'dist/main.js' %}"></script>
</body>
<link rel="stylesheet" href="{% static 'dist/main.css' %}">
</head>
<body class="global">
<header class="global">
{% include 'medwings/navbar.html' %}
</header>
<main class="global">
{% block content %}
{% endblock content %}
</main>
<footer class="global">
{% include 'medwings/footer.html' %}
</footer>
<script src="{% static 'dist/main.js' %}"></script>
</body>
</html>

View File

@ -0,0 +1,3 @@
<div>
<p>Footer stuff.</p>
</div>

View File

@ -7,5 +7,5 @@
{% block content %}
<h1>Welcome to Medwings</h1>
<p1>There ain't much 'ere yet...</p1>
<img src="{% static 'medwings/images/devices/withings-thermo.webp' %}" alt="A withings thermometer.">
{% comment %}<img src="{% static 'medwings/images/devices/withings-thermo.webp' %}" alt="A withings thermometer.">{% endcomment %}
{% endblock content %}

View File

@ -0,0 +1,47 @@
<nav class="flex gap-2 p-2 bg-background-800">
<a href="/">
<div class="bg-background-400 p-2 rounded rounded-xl">
<svg class="h-8 w-auto" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 512.001 512.001" xml:space="preserve">
<g>
<path style="fill:#FAEDD6;" d="M398.266,86.092c-25.518,0-46.104,19.473-46.104,44.992v41.853l39.925,33.359h16.01
c13.263,0,23.503-12.09,23.503-25.355v-14.365h8.517c13.263,0,23.886-12.398,23.886-25.661v-16.01
c21.95,0,40.155-14.773,40.155-38.813L398.266,86.092L398.266,86.092z"/>
<path style="fill:#FAEDD6;" d="M113.734,86.092c25.518,0,46.104,19.473,46.104,44.992v41.853l-39.925,33.359h-16.01
c-13.263,0-23.503-12.09-23.503-25.355v-14.365h-8.517c-13.263,0-23.886-12.398-23.886-25.661v-16.01
c-24.041,0-40.155-14.773-40.155-38.813L113.734,86.092L113.734,86.092z"/>
</g>
<path style="fill:#FA004B;" d="M376.286,188.964c-31.262-31.262-81.949-31.262-113.21,0c-0.296,0.296-3.427,3.427-8.491,8.491
c-3.383-3.383-5.422-5.422-5.66-5.66c-31.262-31.262-81.948-31.262-113.21,0s-31.262,81.949,0,113.21
c0.239,0.239,118.871,118.871,118.871,118.871S375.992,302.47,376.288,302.174C407.548,270.912,407.548,220.226,376.286,188.964z"/>
<g>
<path style="fill:#232323;" d="M398.266,77.04c-29.8,0-54.044,24.244-54.044,54.044V161.2c-29.785-8.61-63.26-1.209-86.691,22.221
l-2.948,2.948l-0.117-0.117c-23.43-23.43-56.904-30.83-86.69-22.221v-32.947c0-29.799-24.244-54.044-54.044-54.044H0v7.839
c0,26.393,21.472,47.865,47.865,47.865h40.026v-15.679H47.865c-15.045,0-27.712-10.375-31.221-24.347h97.089
c21.155,0,38.365,17.21,38.365,38.365v39.176c-7.901,4.06-15.317,9.381-21.928,15.991c-3.42,3.42-6.483,7.062-9.22,10.866h-17.049
c-8.919,0-16.176-7.256-16.176-16.176H72.046c0,17.565,14.29,31.855,31.855,31.855h8.084c-14.246,32.247-8.2,71.365,18.186,97.752
l124.414,124.414l5.543-5.543c4.958-4.958,121.411-121.411,121.702-121.702c25.617-25.617,32.077-63.24,19.396-94.921h6.875
c17.564,0,31.855-14.29,31.855-31.855h-15.679c0,8.92-7.256,16.176-16.176,16.176h-15.079c-3.202-4.843-6.93-9.437-11.19-13.697
c-6.61-6.61-14.026-11.932-21.928-15.991v-36.345c0-21.154,17.21-38.365,38.365-38.365h97.089
c-3.509,13.972-16.176,24.347-31.221,24.347H424.11v15.679h40.026c26.393,0,47.865-21.472,47.865-47.865V77.04L398.266,77.04
L398.266,77.04z M370.739,296.634c-0.422,0.423-92.402,92.403-116.153,116.154L141.257,299.462
c-28.156-28.156-28.156-73.968,0-102.124c14.077-14.077,32.57-21.117,51.061-21.117c18.493,0,36.984,7.039,51.063,21.117
l11.204,11.204l14.034-14.034c28.156-28.156,73.969-28.156,102.124,0S398.898,268.475,370.739,296.634z"/>
<path style="fill:#232323;" d="M440.119,157.091h-40.026v15.679h40.026c17.565,0,31.855-14.29,31.855-31.855h-15.679
C456.296,149.835,449.039,157.091,440.119,157.091z"/>
<path style="fill:#232323;" d="M111.907,157.091H71.881c-8.92,0-16.176-7.256-16.176-16.176H40.026
c0,17.564,14.29,31.855,31.855,31.855h40.026V157.091z"/>
</g>
<path style="fill:#FFFFFF;" d="M367.906,244.969h-15.679c0-17.769-14.698-32.174-32.468-32.174v-15.679
C346.936,197.117,367.906,218.838,367.906,244.969z"/>
<g>
<rect x="247.641" y="86.087" style="fill:#36C9A3;" width="15.679" height="48.081"/>
<rect x="284.178" y="111.923" transform="matrix(-0.7071 -0.7071 0.7071 -0.7071 407.3551 426.5414)" style="fill:#36C9A3;" width="15.679" height="33.963"/>
<rect x="202.999" y="121.072" transform="matrix(-0.7071 -0.7071 0.7071 -0.7071 284.3756 375.6156)" style="fill:#36C9A3;" width="33.963" height="15.679"/>
</g>
</svg>
</div>
</a>
</nav>

View File

@ -10,25 +10,40 @@ h1, h2, h3, h4, h5, h6 {
}
h1 {
font-size: 3rem;
font-size: 3rem;
}
h2 {
font-size: 2.6rem;
font-size: 2.6rem;
}
h3 {
font-size: 2.2rem;
font-size: 2.2rem;
}
h4 {
font-size: 1.8rem;
font-size: 1.8rem;
}
h5 {
font-size: 1.4rem;
font-size: 1.4rem;
}
h6 {
font-size: 1rem;
font-size: 1rem;
}
body.global {
min-height: 100vh;
width: 100%;
display: flex;
flex-direction: column;
}
header.global, main.global, footer.global {
width: 100%;
}
main.global {
flex-grow: 1;
}