-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
106 lines (93 loc) · 4.59 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
100
101
102
103
104
105
106
<!-------------------------------------------------------------------------------->
<!-- © 2023 Sander Vonk | Requires permission for replication or commercial use -->
<!-------------------------------------------------------------------------------->
<!-------------------------------------------------------------------------------->
<!--------------- WEATHER APP WORKSHOP | MVHacks 2023 | 06/15/2023 --------------->
<!-------------------------------------------------------------------------------->
<!------------- This file will contain our DOM tree and file imports ------------->
<!-------------------------------------------------------------------------------->
<!--
Slides: https://mvhacks-slides.svonk.me
See /index.css for more info about selectors; For tags however, you should know
a few of the most common ones:
- <html> is the root element
- <body> is the container for the page
- <head> is the container for the page's metadata (scripts, links, meta tags)
- <div> is a generic container
- <span> is a generic inline container
- <p> is a container for paragraphs / text
- <a> (anchor) is a container for links, with a specific [href] attribute
- <header> is a container for the header of a page
- <main> is a container for the main content of a page
- <footer> is a container for the footer of a page
- <img> is a container for images, with a specific [src] attribute
All HTML elements, aside from a select few, are containers, and can contain other elements.
These use the syntax <tag>content</tag> to denote the start and end of an element.
Some elements are self-closing, and do not require a closing tag. These use the syntax <tag />.
An example of this is the <img /> tag, which is used to display images
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>My Weather App</title>
<!-- Requirements | JQUERY -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<!-- Requirements | CSS -->
<link rel="stylesheet" href="svonk-util/util.css" />
<link rel="stylesheet" href="svonk-util/theme.css" />
<link rel="stylesheet" href="css/index.css" />
<!-- Requirements | JS -->
<script type="module" src="js/index.js" type="text/javascript"></script>
</head>
<!------------------------------------------------------------------------------>
<!--------------------------- [ START CODE BELOW ] ----------------------------->
<!------------------------------------------------------------------------------>
<body>
<header class="flex-center">
<div class="header_text">My Cool Weather App</div>
<div class="header_search">
<input type="text" class="header_search_input" id="city_input" placeholder="San Francisco">
<button id="city_submit"></button>
</div>
</header>
<main>
<div id="forecast">
<div id="current_weather" class="flex-grow">
<img id="current_icon" src="" alt="Current Weather" >
<div id="current_text">
<div class="current_temp">
<span id="current_temp" class="temp_text">Current</span>
<span id="current_min_temp" class="temp_text">Min</span>
<span id="current_max_temp" class="temp_text">Max</span>
</div>
<br>
<div id="current_location"></div>
</div>
</div>
<!--
STEP 5:
----------------------------------------------------------------------
Let's create a row for the forecast cards to sit in. We'll use flexbox to
easily align the cards in a row.
Flexbox is a CSS layout system that allows us to easily align elements in a
row or column. It's very useful for creating responsive layouts.
@svonk/util.css comes with a few flexbox classes that we can use to make our
lives easier. We'll use the "flex-row" class to create a row for our cards.
Also give the container an id "forecast_card_row" to allow us to select it
later in our javascript! (STEP 6)
-->
<div id="[ CHANGE THIS IN STEP 5]" class="[ CHANGE THIS IN STEP 5 ]">
<!-- we'll add the cards dynamically through javascript -->
</div>
</div>
</main>
<footer>
<!-- footer contents -->
</footer>
</body>
</html>