├── README.md ├── LICENSE ├── style.css └── index.html /README.md: -------------------------------------------------------------------------------- 1 | ## Envato Tuts+ Course: Figma to HTML: Code up a Single Page Design 2 | ### Instructor: [Kezz Bracey](https://tutsplus.com/authors/kezz-bracey) 3 | 4 | In this course we’ll take a one page design for a travel website in Figma and go through the process of converting it into HTML. 5 | 6 | In the process we’ll learn some tricks about working with Figma, and using CSS Grid and Flexbox to make layout control a breeze. 7 | 8 | This course is perfect for anyone who’s found a landing page design on Envato Elements and wants to code it up themselves. 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 2-Clause License 2 | 3 | Copyright (c) 2019, Tuts+ 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --background_color_one: #fff; 3 | --background_color_two: #F2F4F6; 4 | 5 | --border_color: #D6E3F0; 6 | 7 | --highlight_color: #38A4DC; 8 | 9 | --text_color_one: #5C6163; 10 | --text_color_two: #24282A; 11 | --text_color_three: #939FA4; 12 | --text_color_four: #A7B0B4; 13 | --text_color_five: #F799A6; 14 | } 15 | 16 | html, body { 17 | height: 100%; 18 | } 19 | 20 | body { 21 | margin: 0; 22 | background-color: var(--background_color_two); 23 | font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 24 | } 25 | 26 | a { 27 | text-decoration: none; 28 | color: var(--highlight_color); 29 | } 30 | 31 | .wrapper { 32 | width: 100%; 33 | max-width: 90rem; 34 | margin: 0 auto; 35 | background-color: var(--background_color_one); 36 | min-height: 10rem; 37 | border-left: 1px solid var(--border_color); 38 | border-right: 1px solid var(--border_color); 39 | box-sizing: border-box; 40 | } 41 | 42 | .inner { 43 | width: 100%; 44 | max-width: 73.125rem; 45 | margin: 0 auto; 46 | height: inherit; 47 | } 48 | 49 | .inner_padding { 50 | padding: 6.875rem 0; 51 | } 52 | 53 | .inner h1 { 54 | font-size: 3rem; 55 | text-align: center; 56 | margin: 0 0 5.625rem 0; 57 | font-weight: 300; 58 | color: var(--text_color_three); 59 | } 60 | 61 | .best_offers .inner h1 { 62 | text-align: left; 63 | margin: 0 0 5rem 0; 64 | } 65 | 66 | .inner h1 strong { 67 | color: var(--text_color_two); 68 | font-weight: 700; 69 | } 70 | 71 | .top_header { 72 | background-color: var(--background_color_two); 73 | min-height: 3.125rem; 74 | } 75 | 76 | .popular_destinations { 77 | display: flex; 78 | justify-content: flex-end; 79 | font-size: 0.75rem; 80 | line-height: 3.125rem; 81 | } 82 | 83 | .popular_destinations a { 84 | font-weight: 500; 85 | margin-left: 1.875rem; 86 | } 87 | 88 | .popular_destinations div { 89 | color: var(--text_color_one); 90 | } 91 | 92 | .header { 93 | height: 6.25rem; 94 | } 95 | 96 | .header_inner { 97 | display: flex; 98 | justify-content: space-between; 99 | align-items: center; 100 | } 101 | 102 | .logo { 103 | font-size: 1.5rem; 104 | font-weight: 300; 105 | color: var(--text_color_three); 106 | } 107 | 108 | .logo span { 109 | font-weight: 700; 110 | color: var(--text_color_two); 111 | } 112 | 113 | .page_menu a { 114 | color: var(--text_color_one); 115 | font-weight: 500; 116 | font-size: 0.875rem; 117 | padding: 0.625rem; 118 | margin: 0.9375rem; 119 | } 120 | 121 | .page_menu a.active, .page_menu a:hover { 122 | background: var(--highlight_color); 123 | color: var(--background_color_one); 124 | box-shadow: 0px 15px 40px rgba(0, 0, 0, 0.2); 125 | border-radius: 5px; 126 | } 127 | 128 | .phone_number { 129 | font-size: 0.875rem; 130 | font-weight: 500; 131 | color: var(--highlight_color); 132 | line-height: 1.5rem; 133 | display: flex; 134 | align-content: center; 135 | } 136 | 137 | .phone_number span { 138 | margin-left: 0.5rem; 139 | } 140 | 141 | .hero_header { 142 | height: 43.75rem; 143 | background-image: url("images/heroimage.jpg"); 144 | background-size: cover; 145 | text-align: center; 146 | } 147 | 148 | .hero_header_inner { 149 | display: flex; 150 | align-items: center; 151 | justify-content: center; 152 | } 153 | 154 | .subheadline { 155 | color: var(--background_color_one); 156 | font-size: 1.25rem; 157 | margin-bottom: 3.75rem; 158 | } 159 | 160 | a.button { 161 | background: linear-gradient(199.55deg, #FDD6BD 0%, #F794A4 100%); 162 | box-shadow: 0px 20px 40px rgba(0, 0, 0, 0.5); 163 | border-radius: 30px; 164 | color: var(--background_color_one); 165 | font-weight: 500; 166 | padding: 0 2.5rem; 167 | line-height: 3.75rem; 168 | display: inline-block; 169 | } 170 | 171 | .tour_categories { 172 | display: grid; 173 | grid-template-columns: 1fr 1fr 1fr; 174 | grid-gap: 1.875rem 1.875rem; 175 | } 176 | 177 | .tour_categories > div { 178 | position: relative; 179 | } 180 | 181 | .rome { 182 | grid-column: 1 / span 2; 183 | } 184 | 185 | .tour_overlay { 186 | position: absolute; 187 | top: 0; 188 | right: 0; 189 | bottom: 0; 190 | left: 0; 191 | display: flex; 192 | flex-direction: column; 193 | justify-content: flex-end; 194 | align-items: flex-start; 195 | padding: 1.875rem; 196 | } 197 | 198 | a.button_two { 199 | box-shadow: 0px 15px 30px rgba(0, 0, 0, 0.3); 200 | border-radius: 5px; 201 | background: var(--highlight_color); 202 | color: var(--background_color_one); 203 | font-weight: 500; 204 | font-size: 0.875rem; 205 | padding: 0.625rem; 206 | margin-bottom: 1rem; 207 | display: inline-block; 208 | } 209 | 210 | .tour_text { 211 | font-size: 1.25rem; 212 | font-weight: 700; 213 | color: var(--background_color_one); 214 | } 215 | 216 | .best_offers { 217 | min-height: 20rem; 218 | background-color: var(--background_color_two); 219 | } 220 | 221 | .best_offers_title { 222 | display: flex; 223 | justify-content: space-between; 224 | align-items: flex-start; 225 | } 226 | 227 | .best_offer_row { 228 | display: grid; 229 | grid-template-columns: repeat(6, 1fr); 230 | padding: 1.25rem; 231 | margin-left: 1.25rem; 232 | margin-right: 1.25rem; 233 | align-items: center; 234 | font-size: 0.875rem; 235 | color: var(--text_color_four); 236 | } 237 | 238 | .best_offer_row strong { 239 | color: var(--text_color_two); 240 | font-size: 1rem; 241 | } 242 | 243 | .best_offer_row img { 244 | margin-left: -2.5rem; 245 | } 246 | 247 | .best_offer_row:nth-child(even){ 248 | box-shadow: 0px 20px 40px rgba(0, 0, 0, 0.1); 249 | border-radius: 5px; 250 | background-color: var(--background_color_one); 251 | } 252 | 253 | .best_offer_row:nth-child(even) img { 254 | box-shadow: 0px 20px 40px rgba(0, 0, 0, 0.3); 255 | } 256 | 257 | .blog { 258 | text-align: center; 259 | } 260 | 261 | .blog_posts { 262 | display: grid; 263 | grid-template-columns: repeat(3, 1fr); 264 | grid-column-gap: 0.625rem; 265 | } 266 | 267 | .blog_posts > div { 268 | margin-top: 1.25rem; 269 | } 270 | 271 | .blog_posts img { 272 | display: block; 273 | margin: -1.25rem auto 0 auto; 274 | } 275 | 276 | .blog_posts > div:nth-child(even) { 277 | box-shadow: 0px 20px 40px rgba(0, 0, 0, 0.1); 278 | border-radius: 5px; 279 | } 280 | 281 | .blog_posts > div:nth-child(even) img { 282 | box-shadow: 0px 30px 60px rgba(0, 0, 0, 0.3); 283 | } 284 | 285 | .blog_post_teaser { 286 | margin: 2.5rem; 287 | text-align: left; 288 | } 289 | 290 | .blog_posts h1 { 291 | font-size: 1.25rem; 292 | font-weight: 700; 293 | margin-top: 1.875rem; 294 | margin-bottom: 0.625rem; 295 | color: var(--text_color_two); 296 | text-align: left; 297 | } 298 | 299 | .blog_posts p { 300 | color: var(--text_color_four); 301 | } 302 | 303 | .blog_posts a { 304 | color: var(--text_color_five); 305 | font-weight: 500; 306 | } 307 | 308 | .blog .button { 309 | margin-top: 5.625rem; 310 | margin-bottom: 1.875rem; 311 | } 312 | 313 | .footer { 314 | background-color: var(--background_color_two); 315 | } 316 | 317 | .footer_inner { 318 | display: flex; 319 | justify-content: space-between; 320 | align-items: center; 321 | padding: 4.375rem 0; 322 | } -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Travel Site 10 | 11 | 12 | 13 |
14 |
15 | 16 |
17 |
18 | 26 |
27 |
28 | 29 |
30 |
31 | 32 | 35 | 36 | 39 | 40 |
41 | phone icon 42 | 011 234 567 999 43 |
44 | 45 |
46 |
47 | 48 |
49 |
50 |
51 | #summer 52 |
Curated list of summer trips to Sea Side, Islands & Oceans
53 | Explore Now 54 |
55 |
56 |
57 | 58 |
59 | 60 |
61 | 62 |
63 |
64 |

Discover Around
The World

65 |
66 |
67 | Rome Tours 68 |
69 | 15 Tours 70 |
Ancient Roman Road &
Aqueducts by bike
71 |
72 |
73 |
74 | Bar Crawl Tours 75 |
76 | 12 Tours 77 |
Whisky and beer at
the local barber
78 |
79 |
80 |
81 | Paris Tours 82 |
83 | 21 Tours 84 |
Paris photo walk
with Leo Iglesias
85 |
86 |
87 |
88 | Art Tours 89 |
90 | 16 Tours 91 |
Art Studio Spark
your creativity
92 |
93 |
94 |
95 | Iceland Tours 96 |
97 | 19 Tours 98 |
Essence of Iceland
own custom souvenir
99 |
100 |
101 |
102 |
103 |
104 | 105 |
106 |
107 |
108 |

Best Offers

109 | View All Offers 110 |
111 |
112 |
113 |
114 | Paris tour 115 |
116 |
117 |
Paris, France
118 |
Panorama City
119 |
120 |
121 |
7 Days
122 |
6 Nights
123 |
124 |
125 |
11 February
126 |
06:30 PM
127 |
128 |
129 |
$1889
130 |
It was $2449
131 |
132 |
133 |
$560
134 |
Save 20%
135 |
136 |
137 |
138 |
139 | Dublin tour 140 |
141 |
142 |
Dublin, Ireland
143 |
Car Roadtrip
144 |
145 |
146 |
4 Days
147 |
5 Nights
148 |
149 |
150 |
16 February
151 |
09:00 AM
152 |
153 |
154 |
$1400
155 |
It was $1900
156 |
157 |
158 |
$500
159 |
Save 25%
160 |
161 |
162 |
163 |
164 | Berlin tour 165 |
166 |
167 |
Berlin, Germany
168 |
Museums & City
169 |
170 |
171 |
9 Days
172 |
10 Nights
173 |
174 |
175 |
12 February
176 |
09:00 AM
177 |
178 |
179 |
$1450
180 |
It was $1950
181 |
182 |
183 |
$550
184 |
Save 25%
185 |
186 |
187 |
188 |
189 |
190 | 191 |
192 |
193 |

Explore the Travel
Through our Blog & Journal

194 |
195 |
196 | Greenland 197 | 202 |
203 |
204 | Indonesia 205 | 210 |
211 |
212 | Quotes 213 | 218 |
219 |
220 | 221 | Read our Blog 222 |
223 |
224 | 225 |
226 | 227 | 245 | 246 |
247 | 248 | 249 | --------------------------------------------------------------------------------