forked from toulouse-weather/toulouse-weather.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
99 lines (89 loc) · 5.1 KB
/
index.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
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
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="manifest" href="/manifest.json">
<link rel="icon" href="./icon/152.png" type="image/x-icon" />
<link rel="apple-touch-icon" href="./icon/152.png">
<meta name="theme-color" content="white"/>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="Toulouse Weather">
<meta name="msapplication-TileImage" content="./icon/144.png">
<meta name="msapplication-TileColor" content="#FFFFFF">
<link rel="stylesheet" href="style.css">
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<title>WTWL?</title>
</head>
<body>
<div id="app">
<div v-show="isMobile" id="mobile">
<svg aria-hidden="true" width="25px" height="25px" focusable="false" data-prefix="fas" data-icon="sync-alt" class="svg-inline--fa fa-sync-alt fa-w-16 refresh" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M370.72 133.28C339.458 104.008 298.888 87.962 255.848 88c-77.458.068-144.328 53.178-162.791 126.85-1.344 5.363-6.122 9.15-11.651 9.15H24.103c-7.498 0-13.194-6.807-11.807-14.176C33.933 94.924 134.813 8 256 8c66.448 0 126.791 26.136 171.315 68.685L463.03 40.97C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.749zM32 296h134.059c21.382 0 32.09 25.851 16.971 40.971l-41.75 41.75c31.262 29.273 71.835 45.319 114.876 45.28 77.418-.07 144.315-53.144 162.787-126.849 1.344-5.363 6.122-9.15 11.651-9.15h57.304c7.498 0 13.194 6.807 11.807 14.176C478.067 417.076 377.187 504 256 504c-66.448 0-126.791-26.136-171.315-68.685L48.97 471.03C33.851 486.149 8 475.441 8 454.059V320c0-13.255 10.745-24 24-24z"></path></svg>
<header>
<h1 class="time">{{time}}</h1>
<p class="city">{{city}}</p>
</header>
<div class="current-weather">
<div class="icon"><img src="" alt="" class="current-icon"></div>
<h1 class="current-temp">{{currentTemp}}</h1>
</div>
<div class="forecast-weather">
<div v-for="day in forecast.slice(1, 5)" :key="day.date">
<div class="mini day">
<p>{{day.weekday}}</p>
</div>
<div class="mini mini-img"><img :src="'./weather-vector-icons/'+day.icon+'.svg'" alt=""></div>
<div class="forecast">
<p>{{day.temp}}°</p>
</div>
</div>
</div>
</div>
<div id="desktop" v-show="isDesktop">
<div class="desktop-content">
<div class="desktop-header">
<p class="desktop-city">{{city}}</p>
<div class="desktop-current-weather">
<img src="" alt="" class="desktop-icon">
<h1 class="desktop-current-temp ">{{currentTemp}}</h1>
</div>
<h2 class="desktop-description">{{description}}</h2>
<div class="secondary-stat">
<p>Humidité:   {{humidity}} %</p>
<p>Vent:   {{wind}} km/h</p>
</div>
<div class="temp-stat">
<p>Min:   {{minTemp}}°</p>
<p>Ressenti:   {{feelsTemp}}°</p>
<p>Max:   {{maxTemp}}°</p>
</div>
</div>
<div>
<div class="canvas-size">
<canvas id="myChart" width="400" height="400"></canvas>
</div>
</div>
<div class="desktop-forecast-weather">
<h3>Cette Semaine:</h3>
<div class="desktop-forecast-grid">
<div v-for="day in forecast" :key="day.date" class="desktop-forecast desktop-forecast-grid-content">
<h4>{{day.date}}</h4>
<div class="desktop-img-frame">
<img :src="'./weather-vector-icons/'+day.icon+'.svg'" alt="" class="desktop-forecast-img">
</div>
<div class="all-range-temp desktop-forecast0-temp">
<h4 class="approximate-temp0">{{day.temp}}°</h4>
<p class="range-temp0">{{day.minTemp}}° / {{day.maxTemp}}°</p>
</div>
<p class="desktop-description-forecast0">{{day.description}}</p>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="vue.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.min.js"></script>
</body>
</html>