Spaces:
No application file
No application file
Commit
·
251819c
1
Parent(s):
eaa2687
Interface gráfica do Usuário em HTML
Browse files
1_Building_a_Python_Weather_App_using_Docker_and_Cloud_Run/templates/index.html
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>🤗 Weather App</title>
|
7 |
+
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">
|
8 |
+
<style>
|
9 |
+
body {
|
10 |
+
background-color: rgb(4, 45, 99); /* Light gray background color */
|
11 |
+
}
|
12 |
+
|
13 |
+
.container {
|
14 |
+
background-color: #ffffff; /* White container background color */
|
15 |
+
border-radius: 10px;
|
16 |
+
padding: 20px;
|
17 |
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
18 |
+
margin-top: 60px; /* Adjusted to make space for the fixed Navbar */
|
19 |
+
}
|
20 |
+
|
21 |
+
.navbar {
|
22 |
+
background-color: #007bff; /* Blue Navbar color */
|
23 |
+
}
|
24 |
+
|
25 |
+
.navbar-brand {
|
26 |
+
color: #ffffff; /* White text color for Navbar brand */
|
27 |
+
}
|
28 |
+
</style>
|
29 |
+
</head>
|
30 |
+
<body>
|
31 |
+
<nav class="navbar navbar-fixed-top navbar-expand-lg navbar-dark bg-primary d-flex justify-content-center align-items-center">
|
32 |
+
<a class="navbar-brand" href="#">
|
33 |
+
<img src="https://integradanews.com.br/wp-content/uploads/2023/03/Post_Previsao_Tempo_Somar_Integrada.png" width="40" height="40" class="d-inline-block align-top" alt="">
|
34 |
+
🌥️ Aplicativo de Previsão do Tempo 🌥️
|
35 |
+
</a>
|
36 |
+
</nav>
|
37 |
+
|
38 |
+
<div id="autor-info">
|
39 |
+
<p><pfont style="color: rgb(222, 38, 21);">Data Scientist:</pfont> Dr. Eddy Giusepe Chirinos Isidro</p>
|
40 |
+
<p><pfont style="color: rgb(222, 38, 14);">Email:</pfont> [email protected]</p>
|
41 |
+
<p><pfont style="color: rgb(222, 38, 14);">GitHub:</pfont> <a href="https://github.com/EddyGiusepe" target="_blank">https://github.com/EddyGiusepe</a></p>
|
42 |
+
<p><pfont style="color: rgb(222, 38, 14);">LinkedIn:</pfont> <a href="https://www.linkedin.com/in/eddy-giusepe-chirinos-isidro-85a43a42/" target="_blank">https://www.linkedin.com/in/eddy-giusepe-chirinos-isidro-85a43a42/</a></p>
|
43 |
+
</div>
|
44 |
+
|
45 |
+
<div class="container mt-5">
|
46 |
+
<h1 class="mb-4 text-primary">Aplicativo de previsão do tempo</h1>
|
47 |
+
<form method="post">
|
48 |
+
<div class="form-group">
|
49 |
+
<label for="city">Digite o nome da cidade:</label>
|
50 |
+
<input type="text" class="form-control" id="city" name="city" required>
|
51 |
+
</div>
|
52 |
+
<button type="submit" class="btn btn-primary">Obter previsão do tempo</button>
|
53 |
+
</form>
|
54 |
+
|
55 |
+
{% if weather_data %}
|
56 |
+
<div class="mt-4">
|
57 |
+
<h2>Weather in {{ weather_data['name'] }}, {{ weather_data['sys']['country'] }}:</h2>
|
58 |
+
<p>Description: {{ weather_data['weather'][0]['description'] }}</p>
|
59 |
+
<p>Temperature: {{ weather_data['main']['temp'] }}°C</p>
|
60 |
+
<p>Humidity: {{ weather_data['main']['humidity'] }}%</p>
|
61 |
+
<p>Wind Speed: {{ weather_data['wind']['speed'] }} m/s</p>
|
62 |
+
</div>
|
63 |
+
{% else %}
|
64 |
+
<p class="mt-4">Dados meteorológicos indisponíveis.</p>
|
65 |
+
{% endif %}
|
66 |
+
</div>
|
67 |
+
|
68 |
+
<!-- Bootstrap JS and Popper.js -->
|
69 |
+
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
|
70 |
+
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"></script>
|
71 |
+
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script>
|
72 |
+
</body>
|
73 |
+
</html>
|