Skip to content

Commit 1a1eee6

Browse files
authored
Merge pull request CodeYourFuture#11 from NateWr/combined_skills
Add a combined skills exercise in week 3
2 parents c5e09fd + 0e46e3a commit 1a1eee6

27 files changed

+660
-8
lines changed

css/combined-skills.css

+239
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,239 @@
1+
html,
2+
body {
3+
font-size: 16px;
4+
background: #fff;
5+
}
6+
7+
* {
8+
box-sizing: border-box;
9+
}
10+
11+
a {
12+
color: #0870c8;
13+
font-weight: 700;
14+
}
15+
16+
a:hover,
17+
a:focus {
18+
color: #3497ec;
19+
}
20+
21+
.site-wrapper {
22+
max-width: 80rem;
23+
margin: 0 auto;
24+
background: #fff;
25+
box-shadow: none;
26+
}
27+
28+
.site-header {
29+
padding-top: 0.5rem;
30+
padding-bottom: 0.5rem;
31+
}
32+
33+
.site-header__title,
34+
.main-nav {
35+
padding: 0.5rem;
36+
}
37+
38+
.site-header__title {
39+
margin: 0 0.5rem;
40+
background: #0870c8;
41+
color: #fff;
42+
text-align: center;
43+
font-size: 2rem;
44+
font-weight: 300;
45+
letter-spacing: 5px;
46+
}
47+
48+
.main-nav__list {
49+
margin: 0;
50+
padding: 0;
51+
list-style: none;
52+
min-width: 240px;
53+
}
54+
55+
.main-nav__list-item a {
56+
display: inline-block;
57+
padding: 0.25rem 0;
58+
text-transform: uppercase;
59+
text-decoration: none;
60+
}
61+
62+
.site-search {
63+
position: relative;
64+
margin: 0.5rem;
65+
}
66+
67+
.site-search label,
68+
.site-search button {
69+
position: absolute;
70+
left: -9999px;
71+
}
72+
73+
.site-search svg {
74+
position: absolute;
75+
top: 50%;
76+
left: 0.75rem;
77+
transform: translateY(-50%);
78+
color: #0870c8;
79+
width: 16px;
80+
height: 16px;
81+
}
82+
83+
.site-search .site-search__input {
84+
display: block;
85+
padding: 0.5em 1em 0.5em 2rem;
86+
border: 4px solid #0870c8;
87+
width: auto;
88+
max-width: none;
89+
}
90+
91+
main {
92+
padding: 0.5rem;
93+
}
94+
95+
.hero__image,
96+
.item__image {
97+
display: block;
98+
max-width: 100%;
99+
height: auto;
100+
}
101+
102+
.hero__title,
103+
.item__title {
104+
font-weight: 600;
105+
}
106+
107+
.hero__author,
108+
.item__author {
109+
font-style: italic;
110+
}
111+
112+
.hero__author span,
113+
.item__author span {
114+
font-style: normal;
115+
font-weight: 600;
116+
}
117+
118+
.items,
119+
.item + .item {
120+
margin-top: 3rem;
121+
}
122+
123+
.views {
124+
margin-top: 3rem;
125+
padding: 0.5rem 0;
126+
}
127+
128+
.views__title {
129+
margin: 0;
130+
font-weight: 400;
131+
font-size: 1rem;
132+
font-style: italic;
133+
}
134+
135+
.view-list {
136+
margin: 0;
137+
padding: 0;
138+
list-style: none;
139+
}
140+
141+
.view-list__item,
142+
.views__all {
143+
display: block;
144+
padding: 0.25rem 0;
145+
text-transform: uppercase;
146+
text-decoration: none;
147+
}
148+
149+
.contact-form {
150+
max-width: 30em;
151+
}
152+
153+
.contact-form__field + .contact-form__field {
154+
margin-top: 1rem;
155+
}
156+
157+
footer {
158+
margin-top: 2rem;
159+
padding-top: 2rem;
160+
padding-bottom: 2rem;
161+
text-align: center;
162+
}
163+
164+
footer svg {
165+
width: 12px;
166+
height: 12px;
167+
}
168+
169+
footer p:last-child {
170+
margin-top: 2rem;
171+
font-size: 0.9rem;
172+
color: rgba(0,0,0,0.64);
173+
}
174+
175+
footer p:last-child a {
176+
color: rgba(0,0,0,0.64);
177+
font-weight: 400;
178+
}
179+
180+
@media (min-width: 768px) {
181+
182+
.site-header__title {
183+
font-size: 3rem;
184+
}
185+
186+
.hero {
187+
position: relative;
188+
overflow: hidden;
189+
padding: 10vw;
190+
background: #000;
191+
color: rgba(255,255,255,0.9);
192+
}
193+
194+
.hero__image {
195+
position: absolute;
196+
top: 0;
197+
left: 0;
198+
opacity: 0.7;
199+
}
200+
201+
.hero__title,
202+
.hero__author,
203+
.hero__time {
204+
position: relative;
205+
}
206+
207+
.hero__title {
208+
max-width: 15em;
209+
font-size: 2rem;
210+
font-weight: 300;
211+
text-shadow: 0 2px 0 rgba(0,0,0,0.5);
212+
}
213+
214+
.items {
215+
margin-top: 1rem;
216+
display: flex;
217+
justify-content: space-around;
218+
}
219+
220+
.item {
221+
width: 100%;
222+
}
223+
224+
.item + .item {
225+
margin-top: 0;
226+
margin-left: 1.5rem;
227+
}
228+
229+
.views {
230+
border-bottom: 1px solid rgba(0,0,0,0.2);
231+
}
232+
}
233+
234+
@media (min-width: 80rem) {
235+
236+
.hero {
237+
padding: 130px;
238+
}
239+
}

css/week3-forms.css

+21-5
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
body,
33
html {
44
background: #25262f;
5-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif;
65
font-size: 16px;
7-
line-height: 1.5em;
86
}
97

108
* {
@@ -39,14 +37,19 @@ input[type="color"],
3937
input[type="password"],
4038
input[type="number"],
4139
input[type="search"],
42-
select {
40+
select,
41+
textarea {
4342
display: block;
4443
width: 100%;
4544
padding: 0.75em;
4645
border: 1px solid rgba(0,0,0,0.5);
4746
border-radius: 3px;
4847
}
4948

49+
textarea {
50+
min-height: 10em;
51+
}
52+
5053
input[type="text"]:hover,
5154
input[type="email"]:hover,
5255
input[type="url"]:hover,
@@ -60,7 +63,8 @@ input[type="color"]:hover,
6063
input[type="password"]:hover,
6164
input[type="number"]:hover,
6265
input[type="search"]:hover,
63-
select:hover {
66+
select:hover,
67+
textarea:hover {
6468
border-color: #4491db;
6569
}
6670

@@ -77,11 +81,23 @@ input[type="color"]:focus,
7781
input[type="password"]:focus,
7882
input[type="number"]:focus,
7983
input[type="search"]:focus,
80-
select:focus {
84+
select:focus,
85+
textarea:focus {
8186
border-color: #4491db;
8287
box-shadow: inset 2px 0 0 #4491db;
8388
}
8489

90+
fieldset {
91+
margin-left: 0;
92+
margin-right: 0;
93+
border: 1px solid rgba(0,0,0,0.5);
94+
border-radius: 3px;
95+
}
96+
97+
legend {
98+
padding: 0 1em;
99+
}
100+
85101
button {
86102
margin-top: 0.75em;
87103
padding: 0.75em 1.5em;

images/29-hero.jpg

388 KB
Loading

images/29-initial-nav-menu.png

5.07 KB
Loading

images/29-item-1.jpg

11.2 KB
Loading

images/29-item-2.jpg

7.95 KB
Loading

images/29-item-3.jpg

13.1 KB
Loading

images/29-solution-email.png

7.08 KB
Loading

images/29-solution-header.png

4.93 KB
Loading

images/29-solution-heart.png

3.16 KB
Loading

images/29-solution-hero.png

778 KB
Loading

images/29-solution-label.gif

15.4 KB
Loading

images/29-solution-nav-menu.png

4.08 KB
Loading

images/29-solution-radio.png

7.49 KB
Loading

images/29-solution-required.gif

20.7 KB
Loading

images/29-solution-text.png

29.2 KB
Loading

images/29-solution-views.png

4.44 KB
Loading

images/search.svg

+1
Loading

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"24": "live-server --open=week-3/24-attributes",
3232
"27": "live-server --open=week-3/27-user-experience",
3333
"28": "live-server --open=week-3/28-git-conflict",
34+
"29": "live-server --open=week-3/29-combined-skills",
3435
"serve": "live-server"
3536
},
3637
"devDependencies": {

week-3/16-search/readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ Forms are used everywhere on the web. One of the simplest forms you will find is
44

55
1. Edit the `index.html` file. Find the line that says `<p>Delete this line and add your form.</p>`. Delete it.
66
2. Add a `<form>` to the same line where you deleted the text. The `<form>` should have two attributes: a `method` attribute that is `GET` and an `action` attribute that is `https://www.google.com/search`.
7-
3. Inside of the `<form>` create an `<input>` field. The `type` attribute should be `search` and the `name` attribute should be `q`.
7+
3. Inside of the `<form>` create an `<input>` field. The `type` attribute should be `text` and the `name` attribute should be `q`.
88

99
If you've done this correctly, you should be able to type into the field and hit `ENTER` and it will show you Google search results!

week-3/17-labels/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
<form method="GET" action="https://www.google.com/search">
1616
<!-- Add a label here -->
17-
<input type="search" name="q">
17+
<input type="text" name="q">
1818
</form>
1919

2020
</main>

week-3/18-buttons/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
<form method="GET" action="https://www.google.com/search">
1616
<label for="search-input">Search on Google</label>
17-
<input type="search" name="q" id="search-input">
17+
<input type="text" name="q" id="search-input">
1818
<!-- Add a submit button here -->
1919
</form>
2020

0 commit comments

Comments
 (0)