-
Notifications
You must be signed in to change notification settings - Fork 0
/
recipe-card.html
52 lines (52 loc) · 2.16 KB
/
recipe-card.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Recipe Share - {{ recipe.Title }}</title>
<link rel="stylesheet" href="../static/style.css" />
<link rel="stylesheet" href="../static/recipe-card.css" />
<script src="../static/recipe-card.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js" integrity="sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
</head>
<body>
<main id="main">
<div id="card-title"><h1>{{ recipe.Title }}</h1></div>
<div id="description">
{% if recipe.imageData is defined and recipe.imageData != None %}
<img src="{{ recipe.imageData }}" alt="{{ recipe.Image_Name }}">
{% elif recipe.Image_Name is defined and recipe.Image_Name != None %}
<img src="./static/recipe-images/{{ recipe.Image_Name }}.jpg" alt="{{ recipe.Image_Name }}">
{% endif %}
{{ recipe.Description}}
</div>
<div id="columns">
<div class="column" id="left-column">
<h3>
Ingredients
</h3>
<ul>
{% for ingredient in recipe.Ingredients %}
<li>{{ ingredient }}</li>
{% endfor %}
</ul>
</div>
<div class="column" id="right-column">
<h3>
Instructions
</h3>
<ol>
{% for instruction in recipe.Instructions %}
<li>{{ instruction }}</li>
{% endfor %}
</ol>
</div>
</div>
</main>
<div class="no-print" id="buttons">
<button id="back-button" aria-label="back">Back</button>
<button id="print-button" aria-label="print">Print</button>
<button id="download-button" aria-label="download as PDF">Download as PDF</button>
</div>
</body>
</html>