Skip to content

Commit f1a9a14

Browse files
add project starter code
1 parent f5807b9 commit f1a9a14

19 files changed

+1404
-0
lines changed

CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @forbiddenvoid @hbkwong

README.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Mobile Web Specialist Certification Course
2+
---
3+
#### _Three Stage Course Material Project - Restaurant Reviews_
4+
5+
## Project Overview: Stage 1
6+
7+
For the **Restaurant Reviews** projects, you will incrementally convert a static webpage to a mobile-ready web application. In **Stage One**, you will take a static design that lacks accessibility and convert the design to be responsive on different sized displays and accessible for screen reader use. You will also add a service worker to begin the process of creating a seamless offline experience for your users.
8+
9+
### Specification
10+
11+
You have been provided the code for a restaurant reviews website. The code has a lot of issues. It’s barely usable on a desktop browser, much less a mobile device. It also doesn’t include any standard accessibility features, and it doesn’t work offline at all. Your job is to update the code to resolve these issues while still maintaining the included functionality.
12+
13+
### What do I do from here?
14+
15+
1. In this folder, start up a simple HTTP server to serve up the site files on your local computer. Python has some simple tools to do this, and you don't even need to know Python. For most people, it's already installed on your computer.
16+
17+
In a terminal, check the version of Python you have: `python -V`. If you have Python 2.x, spin up the server with `python -m SimpleHTTPServer 8000` (or some other port, if port 8000 is already in use.) For Python 3.x, you can use `python3 -m http.server 8000`. If you don't have Python installed, navigate to Python's [website](https://www.python.org/) to download and install the software.
18+
19+
2. With your server running, visit the site: `http://localhost:8000`, and look around for a bit to see what the current experience looks like.
20+
3. Explore the provided code, and start making a plan to implement the required features in three areas: responsive design, accessibility and offline use.
21+
4. Write code to implement the updates to get this site on its way to being a mobile-ready website.
22+
23+
## Leaflet.js and Mapbox:
24+
25+
This repository uses [leafletjs](https://leafletjs.com/) with [Mapbox](https://www.mapbox.com/). You need to replace `<your MAPBOX API KEY HERE>` with a token from [Mapbox](https://www.mapbox.com/). Mapbox is free to use, and does not require any payment information.
26+
27+
### Note about ES6
28+
29+
Most of the code in this project has been written to the ES6 JavaScript specification for compatibility with modern web browsers and future proofing JavaScript code. As much as possible, try to maintain use of ES6 in any additional JavaScript you write.
30+
31+
32+

css/styles.css

+275
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,275 @@
1+
@charset "utf-8";
2+
/* CSS Document */
3+
4+
body,td,th,p{
5+
font-family: Arial, Helvetica, sans-serif;
6+
font-size: 10pt;
7+
color: #333;
8+
line-height: 1.5;
9+
}
10+
body {
11+
background-color: #fdfdfd;
12+
margin: 0;
13+
position:relative;
14+
}
15+
ul, li {
16+
font-family: Arial, Helvetica, sans-serif;
17+
font-size: 10pt;
18+
color: #333;
19+
}
20+
a {
21+
color: orange;
22+
text-decoration: none;
23+
}
24+
a:hover, a:focus {
25+
color: #3397db;
26+
text-decoration: none;
27+
}
28+
a img{
29+
border: none 0px #fff;
30+
}
31+
h1, h2, h3, h4, h5, h6 {
32+
font-family: Arial, Helvetica, sans-serif;
33+
margin: 0 0 20px;
34+
}
35+
article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
36+
display: block;
37+
}
38+
#maincontent {
39+
background-color: #f3f3f3;
40+
min-height: 100%;
41+
}
42+
#footer {
43+
background-color: #444;
44+
color: #aaa;
45+
font-size: 8pt;
46+
letter-spacing: 1px;
47+
padding: 25px;
48+
text-align: center;
49+
text-transform: uppercase;
50+
}
51+
/* ====================== Navigation ====================== */
52+
nav {
53+
width: 100%;
54+
height: 80px;
55+
background-color: #252831;
56+
text-align:center;
57+
}
58+
nav h1 {
59+
margin: auto;
60+
}
61+
nav h1 a {
62+
color: #fff;
63+
font-size: 14pt;
64+
font-weight: 200;
65+
letter-spacing: 10px;
66+
text-transform: uppercase;
67+
}
68+
#breadcrumb {
69+
padding: 10px 40px 16px;
70+
list-style: none;
71+
background-color: #eee;
72+
font-size: 17px;
73+
margin: 0;
74+
width: calc(50% - 80px);
75+
}
76+
77+
/* Display list items side by side */
78+
#breadcrumb li {
79+
display: inline;
80+
}
81+
82+
/* Add a slash symbol (/) before/behind each list item */
83+
#breadcrumb li+li:before {
84+
padding: 8px;
85+
color: black;
86+
content: "/\00a0";
87+
}
88+
89+
/* Add a color to all links inside the list */
90+
#breadcrumb li a {
91+
color: #0275d8;
92+
text-decoration: none;
93+
}
94+
95+
/* Add a color on mouse-over */
96+
#breadcrumb li a:hover {
97+
color: #01447e;
98+
text-decoration: underline;
99+
}
100+
/* ====================== Map ====================== */
101+
#map {
102+
height: 400px;
103+
width: 100%;
104+
background-color: #ccc;
105+
}
106+
/* ====================== Restaurant Filtering ====================== */
107+
.filter-options {
108+
width: 100%;
109+
height: 50px;
110+
background-color: #3397DB;
111+
align-items: center;
112+
}
113+
.filter-options h2 {
114+
color: white;
115+
font-size: 1rem;
116+
font-weight: normal;
117+
line-height: 1;
118+
margin: 0 20px;
119+
}
120+
.filter-options select {
121+
background-color: white;
122+
border: 1px solid #fff;
123+
font-family: Arial,sans-serif;
124+
font-size: 11pt;
125+
height: 35px;
126+
letter-spacing: 0;
127+
margin: 10px;
128+
padding: 0 10px;
129+
width: 200px;
130+
}
131+
132+
/* ====================== Restaurant Listing ====================== */
133+
#restaurants-list {
134+
background-color: #f3f3f3;
135+
list-style: outside none none;
136+
margin: 0;
137+
padding: 30px 15px 60px;
138+
text-align: center;
139+
}
140+
#restaurants-list li {
141+
background-color: #fff;
142+
border: 2px solid #ccc;
143+
font-family: Arial,sans-serif;
144+
margin: 15px;
145+
min-height: 380px;
146+
padding: 0 30px 25px;
147+
text-align: left;
148+
width: 270px;
149+
}
150+
#restaurants-list .restaurant-img {
151+
background-color: #ccc;
152+
display: block;
153+
margin: 0;
154+
max-width: 100%;
155+
min-height: 248px;
156+
min-width: 100%;
157+
}
158+
#restaurants-list li h1 {
159+
color: #f18200;
160+
font-family: Arial,sans-serif;
161+
font-size: 14pt;
162+
font-weight: 200;
163+
letter-spacing: 0;
164+
line-height: 1.3;
165+
margin: 20px 0 10px;
166+
text-transform: uppercase;
167+
}
168+
#restaurants-list p {
169+
margin: 0;
170+
font-size: 11pt;
171+
}
172+
#restaurants-list li a {
173+
background-color: orange;
174+
border-bottom: 3px solid #eee;
175+
color: #fff;
176+
display: inline-block;
177+
font-size: 10pt;
178+
margin: 15px 0 0;
179+
padding: 8px 30px 10px;
180+
text-align: center;
181+
text-decoration: none;
182+
text-transform: uppercase;
183+
}
184+
185+
/* ====================== Restaurant Details ====================== */
186+
.inside header {
187+
position: fixed;
188+
top: 0;
189+
width: 100%;
190+
z-index: 1000;
191+
}
192+
.inside #map-container {
193+
background: blue none repeat scroll 0 0;
194+
height: 87%;
195+
position: fixed;
196+
right: 0;
197+
top: 80px;
198+
width: 50%;
199+
}
200+
.inside #map {
201+
background-color: #ccc;
202+
height: 100%;
203+
width: 100%;
204+
}
205+
.inside #footer {
206+
bottom: 0;
207+
position: absolute;
208+
width: 50%;
209+
}
210+
#restaurant-name {
211+
color: #f18200;
212+
font-family: Arial,sans-serif;
213+
font-size: 20pt;
214+
font-weight: 200;
215+
letter-spacing: 0;
216+
margin: 15px 0 30px;
217+
text-transform: uppercase;
218+
line-height: 1.1;
219+
}
220+
#restaurant-img {
221+
width: 90%;
222+
}
223+
#restaurant-address {
224+
font-size: 12pt;
225+
margin: 10px 0px;
226+
}
227+
#restaurant-cuisine {
228+
background-color: #333;
229+
color: #ddd;
230+
font-size: 12pt;
231+
font-weight: 300;
232+
letter-spacing: 10px;
233+
margin: 0 0 20px;
234+
padding: 2px 0;
235+
text-align: center;
236+
text-transform: uppercase;
237+
width: 90%;
238+
}
239+
#restaurant-container, #reviews-container {
240+
border-bottom: 1px solid #d9d9d9;
241+
border-top: 1px solid #fff;
242+
padding: 140px 40px 30px;
243+
width: 50%;
244+
}
245+
#reviews-container {
246+
padding: 30px 40px 80px;
247+
}
248+
#reviews-container h2 {
249+
color: #f58500;
250+
font-size: 24pt;
251+
font-weight: 300;
252+
letter-spacing: -1px;
253+
padding-bottom: 1pt;
254+
}
255+
#reviews-list {
256+
margin: 0;
257+
padding: 0;
258+
}
259+
#reviews-list li {
260+
background-color: #fff;
261+
border: 2px solid #f3f3f3;
262+
display: block;
263+
list-style-type: none;
264+
margin: 0 0 30px;
265+
overflow: hidden;
266+
padding: 0 20px 20px;
267+
position: relative;
268+
width: 85%;
269+
}
270+
#reviews-list li p {
271+
margin: 0 0 10px;
272+
}
273+
#restaurant-hours td {
274+
color: #666;
275+
}

0 commit comments

Comments
 (0)