Skip to content

Commit f721f1a

Browse files
committed
13 - lorem ipsum product complete
1 parent bd7802a commit f721f1a

8 files changed

Lines changed: 563 additions & 0 deletions

File tree

‎13-hipster-ipsum/final/app.js‎

Lines changed: 35 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎13-hipster-ipsum/final/index.html‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Lorem Ipsum</title>
7+
8+
<!-- styles -->
9+
<link rel="stylesheet" href="styles.css" />
10+
</head>
11+
<body>
12+
<section class="section-center">
13+
<h3>tired of boring lorem ipsum?</h3>
14+
<form class="lorem-form">
15+
<label for="amount">paragraphs:</label>
16+
<input
17+
type="number"
18+
name="amount"
19+
id="amount"
20+
maxlength="1"
21+
placeholder="5"
22+
/>
23+
<button type="submit" class="btn">generate</button>
24+
</form>
25+
<article class="lorem-text"></article>
26+
</section>
27+
28+
<!-- javascript -->
29+
<script src="app.js"></script>
30+
</body>
31+
</html>

‎13-hipster-ipsum/final/logo.svg‎

Lines changed: 17 additions & 0 deletions
Loading

‎13-hipster-ipsum/final/styles.css‎

Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
/*
2+
===============
3+
Fonts
4+
===============
5+
*/
6+
@import url("https://fonts.googleapis.com/css?family=Open+Sans|Roboto:400,700&display=swap");
7+
8+
/*
9+
===============
10+
Variables
11+
===============
12+
*/
13+
14+
:root {
15+
/* dark shades of primary color*/
16+
--clr-primary-1: hsl(205, 86%, 17%);
17+
--clr-primary-2: hsl(205, 77%, 27%);
18+
--clr-primary-3: hsl(205, 72%, 37%);
19+
--clr-primary-4: hsl(205, 63%, 48%);
20+
/* primary/main color */
21+
--clr-primary-5: #49a6e9;
22+
/* lighter shades of primary color */
23+
--clr-primary-6: hsl(205, 89%, 70%);
24+
--clr-primary-7: hsl(205, 90%, 76%);
25+
--clr-primary-8: hsl(205, 86%, 81%);
26+
--clr-primary-9: hsl(205, 90%, 88%);
27+
--clr-primary-10: hsl(205, 100%, 96%);
28+
/* darkest grey - used for headings */
29+
--clr-grey-1: hsl(209, 61%, 16%);
30+
--clr-grey-2: hsl(211, 39%, 23%);
31+
--clr-grey-3: hsl(209, 34%, 30%);
32+
--clr-grey-4: hsl(209, 28%, 39%);
33+
/* grey used for paragraphs */
34+
--clr-grey-5: hsl(210, 22%, 49%);
35+
--clr-grey-6: hsl(209, 23%, 60%);
36+
--clr-grey-7: hsl(211, 27%, 70%);
37+
--clr-grey-8: hsl(210, 31%, 80%);
38+
--clr-grey-9: hsl(212, 33%, 89%);
39+
--clr-grey-10: hsl(210, 36%, 96%);
40+
--clr-white: #fff;
41+
--clr-red-dark: hsl(360, 67%, 44%);
42+
--clr-red-light: hsl(360, 71%, 66%);
43+
--clr-green-dark: hsl(125, 67%, 44%);
44+
--clr-green-light: hsl(125, 71%, 66%);
45+
--clr-black: #222;
46+
--ff-primary: "Roboto", sans-serif;
47+
--ff-secondary: "Open Sans", sans-serif;
48+
--transition: all 0.3s linear;
49+
--spacing: 0.25rem;
50+
--radius: 0.5rem;
51+
--light-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
52+
--dark-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
53+
--max-width: 1170px;
54+
--fixed-width: 620px;
55+
}
56+
/*
57+
===============
58+
Global Styles
59+
===============
60+
*/
61+
62+
*,
63+
::after,
64+
::before {
65+
margin: 0;
66+
padding: 0;
67+
box-sizing: border-box;
68+
}
69+
body {
70+
font-family: var(--ff-secondary);
71+
background: var(--clr-grey-10);
72+
color: var(--clr-grey-1);
73+
line-height: 1.5;
74+
font-size: 0.875rem;
75+
}
76+
ul {
77+
list-style-type: none;
78+
}
79+
a {
80+
text-decoration: none;
81+
}
82+
img:not(.logo) {
83+
width: 100%;
84+
}
85+
img {
86+
display: block;
87+
}
88+
89+
h1,
90+
h2,
91+
h3,
92+
h4 {
93+
letter-spacing: var(--spacing);
94+
text-transform: capitalize;
95+
line-height: 1.25;
96+
margin-bottom: 0.75rem;
97+
font-family: var(--ff-primary);
98+
}
99+
h1 {
100+
font-size: 3rem;
101+
}
102+
h2 {
103+
font-size: 2rem;
104+
}
105+
h3 {
106+
font-size: 1.25rem;
107+
}
108+
h4 {
109+
font-size: 0.875rem;
110+
}
111+
p {
112+
margin-bottom: 1.25rem;
113+
color: var(--clr-grey-5);
114+
}
115+
@media screen and (min-width: 800px) {
116+
h1 {
117+
font-size: 4rem;
118+
}
119+
h2 {
120+
font-size: 2.5rem;
121+
}
122+
h3 {
123+
font-size: 1.75rem;
124+
}
125+
h4 {
126+
font-size: 1rem;
127+
}
128+
body {
129+
font-size: 1rem;
130+
}
131+
h1,
132+
h2,
133+
h3,
134+
h4 {
135+
line-height: 1;
136+
}
137+
}
138+
/* global classes */
139+
140+
.btn {
141+
text-transform: uppercase;
142+
background: var(--clr-primary-5);
143+
color: var(--clr-primary-1);
144+
padding: 0.375rem 0.75rem;
145+
letter-spacing: 1px;
146+
display: inline-block;
147+
transition: var(--transition);
148+
font-size: 0.875rem;
149+
border: 2px solid var(--clr-primary-5);
150+
cursor: pointer;
151+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
152+
border-radius: var(--radius);
153+
}
154+
.btn:hover {
155+
color: var(--clr-primary-5);
156+
background: var(--clr-primary-8);
157+
border-color: var(--clr-primary-8);
158+
}
159+
/* section */
160+
.section {
161+
padding: 5rem 0;
162+
}
163+
164+
.section-center {
165+
width: 90vw;
166+
margin: 0 auto;
167+
max-width: 40rem;
168+
margin-top: 5rem;
169+
text-align: center;
170+
}
171+
@media screen and (min-width: 992px) {
172+
.section-center {
173+
width: 95vw;
174+
}
175+
}
176+
main {
177+
min-height: 100vh;
178+
display: grid;
179+
place-items: center;
180+
}
181+
/*
182+
===============
183+
Lorem Ipsum
184+
===============
185+
*/
186+
h3 {
187+
text-transform: uppercase;
188+
color: var(--clr-primary-1);
189+
}
190+
.lorem-form {
191+
text-transform: capitalize;
192+
letter-spacing: var(--spacing);
193+
margin-top: 2rem;
194+
margin-bottom: 4rem;
195+
display: flex;
196+
justify-content: center;
197+
align-items: center;
198+
}
199+
label {
200+
font-size: 1.25rem;
201+
color: var(--clr-primary-1);
202+
}
203+
input {
204+
padding: 0.25rem 0.5rem;
205+
206+
width: 4rem;
207+
border-radius: var(--radius);
208+
border: none;
209+
margin: 0 0.5rem;
210+
font-size: 1.25rem;
211+
}
212+
button {
213+
background: var(--clr-primary-10);
214+
}
215+
.result {
216+
margin-bottom: 2rem;
217+
}

0 commit comments

Comments
 (0)