-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
228 lines (215 loc) · 8.11 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" media="(max-width: 480px)" href="css/mobile.css" />
<link href="https://fonts.googleapis.com/css2?family=Oswald&display=swap" rel="stylesheet">
<script src="https://kit.fontawesome.com/1bcdd38cc2.js" crossorigin="anonymous"></script>
<title>Food Collective</title>
</head>
<body>
<div id="footer">
<a href="#"><div></div></a>
</div>
<div id="socials">
<div class="socialcontainer">
<div class="social">
<a href="" target=""><i class="fa fa-envelope" aria-hidden="true"></i></a>
</div>
</div>
<div class="socialcontainer">
<div class="social">
<a href="https://www.instagram.com/clemsonfood/" target="_blank"><i class="fa fa-instagram" aria-hidden="true"></i></a>
</div>
</div>
<div class="socialcontainer">
<div class="social">
<a href="https://www.facebook.com/ClemsonFood/" target="_blank"><i class="fa fa-facebook" aria-hidden="true"></i></a>
</div>
</div>
</div>
<div id="header">
<div id="logo">
<a href="index.html">
<img src="static/logo.png" alt="Food Collective Logo" />
</a>
</div>
</div>
<div id="nav">
<div id="hamburger">
<div></div>
<div></div>
<div></div>
</div>
<ul id="webnav">
<li>
<div><a href="">About</a></div>
<div>
<ul>
<a href="#historycontainer"><li>History</li></a>
<a href="#join"><li>Contact</li></a>
</ul>
</div>
</li>
<li>
<div><a href="engage.html">Engage</a></div>
<div>
<ul>
<li>Past Events</li>
<a href="engage/calendar.html"><li>Calendar</li></a>
</ul>
</div>
</li>
<li>
<div><a href="resources.html">Resources</a></div>
<div>
<ul>
<a href="resources/clemson.html"><li>University</li></a>
<a href="resources/local.html"><li>Local</li></a>
</ul>
</div>
</li>
<li>
<div><a href="contact.html">Contact</a></div>
<div>
<ul>
<a href="contact.html#partner"><li>Partner</li></a>
<a href="contact.html#teamcontainer"><li>Our team</li></a>
<a href="contact.html#join"><li>Join us!</li></a>
</ul>
</div>
</li>
</ul>
<div id="summitbutton">
<a href="summit.html">Food Summit 2021</a>
</div>
</div>
<div id="navoverlay"></div>
<script>
const mq = window.matchMedia( "(max-width: 480px)" );
if (mq.matches) {
const hamburg = document.getElementById('hamburger');
const nav = document.getElementById('webnav');
const summitbutton = document.getElementById('summitbutton');
const overlay = document.getElementById('navoverlay');
nav.style.opacity = '0';
nav.style.pointerEvents = 'none';
summitbutton.style.opacity = '0';
summitbutton.style.pointerEvents = 'none';
overlay.style.opacity = '0';
overlay.style.pointerEvents = 'none';
hamburg.addEventListener('click', () => {
if (nav.style.opacity === '0' && overlay.style.opacity === '0') {
nav.style.opacity = '1';
nav.style.pointerEvents = 'auto';
summitbutton.style.opacity = '1';
summitbutton.style.pointerEvents = 'auto';
overlay.style.opacity = '.5';
overlay.style.pointerEvents = 'auto';
} else {
nav.style.opacity = '0';
nav.style.pointerEvents = 'none';
summitbutton.style.opacity = '0';
summitbutton.style.pointerEvents = 'none';
overlay.style.opacity = '0';
overlay.style.pointerEvents = 'none';
}
});
overlay.addEventListener('click', () => {
nav.style.opacity = '0';
nav.style.pointerEvents = 'none';
summitbutton.style.opacity = '0';
summitbutton.style.pointerEvents = 'none';
overlay.style.opacity = '0';
overlay.style.pointerEvents = 'none';
});
} else {
}
</script>
<div id="rest">
<div class="sectioncontainer">
<div class="section" id="home">
<div class="text">
<h3>Welcome!</h3>
<p>We are a student-run organization at Clemson University dedicated to influencing positive change within our food system. We promote food justice, equity, and sustainability through interdisciplinary events to educate and inspire Clemson students, faculty, and community members <b>to use the power of food as a force for good</b>.</p>
</div>
<div class="image">
<img src="static/brusselsprouts2.png" alt="brussel sprouts">
</div>
</div>
</div>
<div class="sectioncontainer" id="historycontainer">
<div class="section" id="history">
<div class="image">
<img src="static/radishes.png" />
</div>
<div class="text">
<h3>A Little History</h3>
<p>Four years ago, Michael Summers started the Clemson Food Summit with the idea that bringing good people together over good food would be a recipe for success in generating conversations and solutions for issues across the food continuum.</p>
<p>Since then, we’ve grown a lot, and have expanded to more than just a one-day event each year. Join us at a pop-up event to learn about a local producer and sample their goods, come to an immersion dinner to gain a more in-depth look at larger issues related to food justice and food equity, and don’t miss our main event each spring- the Food Summit, which brings speakers from across the region, interactive exhibits, and of course, incredible food together to provide a platform for food-based solutions.</p>
</div>
</div>
</div>
</div>
<div class="sectioncontainer">
<div class="section" id="involve">
<div class="text">
<h3>Get in touch!</h3>
<p>Questions, suggestions, or comments?</p>
<p>Find us on social media, or get in touch with someone</p>
<p><a href="contact.html#team">on the team!</a></p>
<div class="socialblock">
<div class="socialcontainer">
<div class="social">
<a href="" target=""><i class="fa fa-envelope" aria-hidden="true"></i></a>
</div>
</div>
<div class="socialcontainer">
<div class="social">
<a href="https://www.instagram.com/clemsonfood/" target="_blank"><i class="fa fa-instagram" aria-hidden="true"></i></a>
</div>
</div>
<div class="socialcontainer">
<div class="social">
<a href="https://www.facebook.com/ClemsonFood/" target="_blank"><i class="fa fa-facebook" aria-hidden="true"></i></a>
</div>
</div>
</div>
</div>
<div class="image">
<img src="static/artichoke.png" alt="cauliflower" style="transform:rotate(90deg)" />
</div>
</div>
</div>
<script>
const webnav = document.getElementById("webnav");
const buttons = webnav.children;
for (i=0; i < buttons.length; i++) {
const button = buttons[i];
const dropdown = button.querySelector("div:nth-child(2)");
dropdown.style.height = '0';
dropdown.style.opacity = '0';
button.addEventListener("mouseover", () => {
dropdown.style.height = 'auto';
dropdown.style.opacity = '1';
});
button.addEventListener("mouseout", () => {
dropdown.style.height = '0';
dropdown.style.opacity = '0';
})
}
const nav = document.getElementById("nav");
const headerheight = document.getElementById('header').offsetHeight;
window.addEventListener("scroll", () => {
if (window.pageYOffset > headerheight) {
console.log('PLEASE');
nav.classList.add('sticky');
} else {
nav.classList.remove('sticky');
}
});
</script>
<script src="app.js"></script>
</body>
</html>