Book unique homes and experiences all over the world.
48 |

Apartments in Barcelona, Spain
67 | Show all (328) 68 |






Apartments in Barcelona, Spain
161 | Show all (328) 162 |






├── .gitignore ├── css └── style.css ├── img ├── apartment.png ├── avatar.png ├── hamburger.png ├── logo.png ├── mobile-img.png ├── room.png ├── search-icon-white.png └── search-icon.png ├── index.html └── js └── script.js /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /css/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | padding: 0; 3 | margin: 0; 4 | } 5 | 6 | html { 7 | font-size: 16px; 8 | -webkit-font-smoothing: antialiased; 9 | } 10 | 11 | body { 12 | font-family: 'Roboto', sans-serif; 13 | } 14 | 15 | .container { 16 | max-width: 90%; 17 | margin: 0 auto; 18 | } 19 | 20 | nav { 21 | display: flex; 22 | align-items: center; 23 | justify-content: space-between; 24 | padding: 1rem 0; 25 | flex-wrap: wrap; 26 | } 27 | 28 | nav .logo-section { 29 | display: flex; 30 | align-items: center; 31 | } 32 | 33 | .search-block { 34 | border: 1px solid #D9DDE7; 35 | padding: 0.5rem 0.8rem; 36 | border-radius: 4px; 37 | display: flex; 38 | align-items: center; 39 | margin-left: 1.4rem; 40 | } 41 | 42 | nav input { 43 | border: none; 44 | min-width: 190px; 45 | } 46 | 47 | nav input:focus { 48 | outline: none; 49 | } 50 | 51 | nav ul { 52 | display: none; 53 | width: 100%; 54 | text-align: center; 55 | list-style-type: none; 56 | padding: 1rem; 57 | background: whitesmoke; 58 | margin-top: 1rem; 59 | } 60 | 61 | nav ul.show { 62 | display: block; 63 | } 64 | 65 | 66 | nav ul li { 67 | padding-bottom: 1rem; 68 | } 69 | 70 | nav ul li:last-child { 71 | padding-bottom: 0; 72 | } 73 | 74 | nav ul li a { 75 | color: #596172; 76 | text-decoration: none; 77 | } 78 | 79 | .hero { 80 | background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7)),url('../img/mobile-img.png'); 81 | min-height: calc(100vh - 65px); 82 | background-repeat: no-repeat; 83 | background-size: cover; 84 | background-position: bottom; 85 | display: flex; 86 | align-items: center; 87 | } 88 | 89 | .hero__text-block { 90 | width: 90%; 91 | margin: 0 auto; 92 | color: #fff; 93 | } 94 | 95 | .hero__text-block .house-emoji { 96 | font-size: 3rem; 97 | margin-bottom: 1rem; 98 | } 99 | 100 | .hero__text-block h1 { 101 | font-size: 2rem; 102 | line-height: 1.3; 103 | margin-bottom: 2rem; 104 | font-weight: 400; 105 | } 106 | 107 | .search-block.search-block--hero input { 108 | width: 100%; 109 | background: transparent; 110 | border: none; 111 | color: #fff; 112 | } 113 | 114 | .search-block.search-block--hero input:focus { 115 | outline: none; 116 | border: none; 117 | } 118 | 119 | .hero ::placeholder { 120 | color: #fff; 121 | } 122 | 123 | .search-block.search-block--hero { 124 | margin-left: 0; 125 | width: 70%; 126 | } 127 | 128 | .hero__btn-block { 129 | margin-top: 2rem; 130 | display: flex; 131 | flex-wrap: wrap; 132 | } 133 | 134 | .hero__btn-block .btn { 135 | color: #fff; 136 | border: none; 137 | padding: 0.7rem 1rem; 138 | border-radius: 4px; 139 | cursor: pointer; 140 | margin-right: 0.5rem; 141 | margin-bottom: 0.5rem; 142 | } 143 | 144 | .hero__btn-block .btn-success { 145 | background: #25DF8F; 146 | } 147 | 148 | .hero__btn-block .btn-secondary { 149 | background: #C1C8D7; 150 | } 151 | 152 | .apartments { 153 | background: #F6F6F7; 154 | } 155 | 156 | .apartments .section-heading { 157 | display: flex; 158 | align-items: center; 159 | justify-content: space-between; 160 | margin-bottom: 1rem; 161 | } 162 | 163 | .apartments .section-heading h2 { 164 | font-weight: 400; 165 | color: #2B313D; 166 | font-size: 1.2rem; 167 | } 168 | 169 | .apartments .section-heading h2 span { 170 | color: #949FB7; 171 | } 172 | 173 | .apartments .section-heading a { 174 | color: #596172; 175 | text-decoration: none; 176 | font-size: 1rem; 177 | } 178 | 179 | .apartments__list-wrapper { 180 | display: grid; 181 | grid-template-columns: 1fr 1fr; 182 | grid-gap: 2rem; 183 | } 184 | 185 | section { 186 | padding: 2rem 0; 187 | } 188 | 189 | .apartments__meta { 190 | display: flex; 191 | align-items: center; 192 | justify-content: space-between; 193 | } 194 | 195 | .apartments__meta span { 196 | color: #596172; 197 | font-size: 0.8rem; 198 | padding-top: 0.4rem; 199 | } 200 | 201 | .apartments__card img { 202 | width: 100%; 203 | } 204 | 205 | .apartments__title { 206 | margin-top: 1rem; 207 | } 208 | 209 | .apartments__title a { 210 | color: #2B313D; 211 | text-decoration: none; 212 | line-height: 1.6; 213 | } 214 | 215 | .hero__image-block { 216 | display: none; 217 | } 218 | 219 | /* Media queries */ 220 | @media(min-width: 800px) { 221 | nav .hamburger { 222 | display: none; 223 | } 224 | 225 | nav ul.nav-list { 226 | width: auto; 227 | display: flex; 228 | align-items: center; 229 | background: transparent; 230 | margin-top: 0; 231 | padding: 0; 232 | } 233 | 234 | nav ul.nav-list li { 235 | padding-bottom: 0; 236 | margin-left: 1.8rem; 237 | } 238 | 239 | nav { 240 | flex-wrap: nowrap; 241 | } 242 | 243 | .hero__text-block h1 { 244 | width: 60%; 245 | } 246 | 247 | } 248 | 249 | @media(min-width: 992px) { 250 | .hero { 251 | background: #fff; 252 | min-height: auto; 253 | } 254 | .hero__text-block { 255 | width: 45%; 256 | margin-left: 5%; 257 | } 258 | .hero__image-block { 259 | display: block; 260 | width: 55%; 261 | margin-left: 4rem; 262 | } 263 | .hero__image-block img { 264 | height: 100%; 265 | width: 100%; 266 | } 267 | .hero__text-block h1 { 268 | color: #2B313D; 269 | font-weight: 400; 270 | width: 100%; 271 | } 272 | .search-block.search-block--hero input { 273 | color: #949FB7; 274 | } 275 | 276 | .search-block.search-block--hero ::placeholder { 277 | color: #949FB7 278 | } 279 | 280 | .apartments__list-wrapper { 281 | grid-template-columns: repeat(3, 1fr); 282 | } 283 | } 284 | 285 | @media(min-width: 1192px) { 286 | html { 287 | font-size: 20px; 288 | } 289 | .apartments__list-wrapper { 290 | grid-template-columns: repeat(4, 1fr); 291 | } 292 | } 293 | 294 | -------------------------------------------------------------------------------- /img/apartment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codersgyan/mobile-first-web-design/e9da228952b7e6112fd91916d706460d22bd94c4/img/apartment.png -------------------------------------------------------------------------------- /img/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codersgyan/mobile-first-web-design/e9da228952b7e6112fd91916d706460d22bd94c4/img/avatar.png -------------------------------------------------------------------------------- /img/hamburger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codersgyan/mobile-first-web-design/e9da228952b7e6112fd91916d706460d22bd94c4/img/hamburger.png -------------------------------------------------------------------------------- /img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codersgyan/mobile-first-web-design/e9da228952b7e6112fd91916d706460d22bd94c4/img/logo.png -------------------------------------------------------------------------------- /img/mobile-img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codersgyan/mobile-first-web-design/e9da228952b7e6112fd91916d706460d22bd94c4/img/mobile-img.png -------------------------------------------------------------------------------- /img/room.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codersgyan/mobile-first-web-design/e9da228952b7e6112fd91916d706460d22bd94c4/img/room.png -------------------------------------------------------------------------------- /img/search-icon-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codersgyan/mobile-first-web-design/e9da228952b7e6112fd91916d706460d22bd94c4/img/search-icon-white.png -------------------------------------------------------------------------------- /img/search-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codersgyan/mobile-first-web-design/e9da228952b7e6112fd91916d706460d22bd94c4/img/search-icon.png -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 |