This repository has been archived by the owner on Mar 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
/
Example.stencil
126 lines (112 loc) · 3.42 KB
/
Example.stencil
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<!DOCTYPE html>
<html>
<title>Food Tracker Frontend</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Karma">
<style>
body,h1,h2,h3,h4,h5,h6 {font-family: "Karma", sans-serif}
.w3-bar-block .w3-bar-item {padding:20px}
.wrapper {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-gap: 10px;
}
.navbar {
overflow: hidden;
background-color: #333;
position: fixed;
top: 0;
width: 100%;
}
.navbar a {
float: left;
display: block;
color: #f2f2f2;
text-align: center;
padding: 15px 15px;
text-decoration: none;
font-size: 19px;
}
.navbar a:hover {
background: #ddd;
color: black;
}
</style>
<body>
<!-- Top menu -->
<div class="navbar">
<a href="#welcome">Welcome</a>
<a href="#food">Meals</a>
<a href="#submitmeal">Submit Meal</a>
<a href="#links">Links</a>
</div>
<hr id="Welcome">
<!-- About Section -->
<div class="w3-container w3-padding-32 w3-center">
<h1>Food Tracker Webpage</h1><br>
<div class="w3-padding-10">
<h4><b>Congratulations on creating a Kitura Server Frontend!</b></h4>
<p>This page is being generated using Stencil template engine. It is connected to a Kitura server, which is connected to an iOS app. All written entirely is Swift!</p>
</div>
</div>
<hr>
<!-- !PAGE CONTENT! -->
<hr id="food">
<div class="w3-container w3-padding-32 w3-center" style="max-width:1200px">
<h1>Meals</h1><br>
<!-- First Photo Grid-->
<div class="wrapper">
{% for meal in meals %}
<div class="w3-center">
<img src="images/{{ meal.name }}.jpg" alt="{{ meal.name }}" height="200">
<h4> {{ meal.name }}. <br> Rating {{ meal.rating }}/5</h4>
</div>
{% endfor %}
</div>
<hr>
<hr id="submitmeal">
<div class="w3-container w3-padding-32 w3-center">
<h1>Add your own meal</h1><br>
<form action="foodtracker" method="post" enctype="multipart/form-data">
Name: <input type="text" name="name"><br> <br>
Rating: <input type="range" name="rating" min="0" max="5"><br> <br>
File: <input type="file" name="photo"><br> <br>
<input type="submit" value="Submit">
</form>
</div>
<hr>
<hr id="links">
<!-- Footer -->
<footer class="w3-row-padding w3-padding-32">
<div class="w3-third">
<h3>SLACK</h3>
<p>Any questions or comments? Please join the vibrant Kitura community on Slack! </p>
<p> <a href="http://swift-at-ibm-slack.mybluemix.net/" target="_blank">Kitura Slack</a></p>
</div>
<div class="w3-third">
<h3>BLOG</h3>
<p>Interested in finding out more about Kitura? Visit the Kitura blog to find out about all the latest features.</p>
<ul class="w3-ul w3-hoverable">
<li class="w3-padding-16">
<span><a href="https://developer.ibm.com/swift/blogs/" target="_blank">Blog Link</a></span>
</li>
</ul>
</div>
<div class="w3-third">
<h3>GITHUB</h3>
<p>Kitura is a free and open-source web framework written in Swift.
To view the code or get involved please visit our github.</p>
<ul class="w3-ul w3-hoverable">
<li class="w3-padding-16">
<span><a href="https://github.com/IBM-Swift/Kitura" target="_blank">Github Link</a></span>
</li>
</ul>
</div>
</footer>
<hr>
<!-- End page content -->
</div>
</body>
</html>