|
| 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 | + <link |
| 7 | + href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap" |
| 8 | + rel="stylesheet" |
| 9 | + /> |
| 10 | + |
| 11 | + <title>Carousel Component</title> |
| 12 | + |
| 13 | + <style> |
| 14 | + /* |
| 15 | + SPACING SYSTEM (px) |
| 16 | + 2 / 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 80 / 96 / 128 |
| 17 | +
|
| 18 | + FONT SIZE SYSTEM (px) |
| 19 | + 10 / 12 / 14 / 16 / 18 / 20 / 24 / 30 / 36 / 44 / 52 / 62 / 74 / 86 / 98 |
| 20 | + */ |
| 21 | + |
| 22 | + /* |
| 23 | + MAIN-COLOR: #087f5b |
| 24 | + GREY-COLOR: #343a40 |
| 25 | + */ |
| 26 | + |
| 27 | + * { |
| 28 | + margin: 0; |
| 29 | + padding: 0; |
| 30 | + box-sizing: border-box; |
| 31 | + } |
| 32 | + |
| 33 | + /* ------------------------ */ |
| 34 | + /* GENERAL STYLES */ |
| 35 | + /* ------------------------ */ |
| 36 | + body { |
| 37 | + font-family: "Inter", sans-serif; |
| 38 | + color: #343a40; |
| 39 | + line-height: 1; |
| 40 | + } |
| 41 | + |
| 42 | + .carousel { |
| 43 | + width: 800px; |
| 44 | + margin: 100px auto; |
| 45 | + background-color: #087f5b; |
| 46 | + /* padding: 32px; |
| 47 | + padding-left: 86px; |
| 48 | + padding-right: 48px; */ |
| 49 | + padding: 32px 48px 32px 86px; |
| 50 | + border-radius: 8px; |
| 51 | + |
| 52 | + display: flex; |
| 53 | + align-items: center; |
| 54 | + gap: 86px; |
| 55 | + position: relative; |
| 56 | + } |
| 57 | + |
| 58 | + img { |
| 59 | + height: 200px; |
| 60 | + border-radius: 8px; |
| 61 | + transform: scale(1.5); |
| 62 | + box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25); |
| 63 | + } |
| 64 | + |
| 65 | + .testimonial-text { |
| 66 | + font-size: 18px; |
| 67 | + font-weight: 500; |
| 68 | + line-height: 1.5; |
| 69 | + margin-bottom: 32px; |
| 70 | + color: #e6fcf5; |
| 71 | + } |
| 72 | + |
| 73 | + .testimonial-author { |
| 74 | + font-size: 14px; |
| 75 | + margin-bottom: 4px; |
| 76 | + color: #c3fae8; |
| 77 | + } |
| 78 | + |
| 79 | + .testimonial-job { |
| 80 | + font-size: 12px; |
| 81 | + color: #c3fae8; |
| 82 | + } |
| 83 | + |
| 84 | + /* CONTROLS */ |
| 85 | + .btn { |
| 86 | + background-color: #fff; |
| 87 | + border: none; |
| 88 | + height: 40px; |
| 89 | + width: 40px; |
| 90 | + position: absolute; |
| 91 | + box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2); |
| 92 | + cursor: pointer; |
| 93 | + |
| 94 | + border-radius: 50%; |
| 95 | + display: flex; |
| 96 | + align-items: center; |
| 97 | + justify-content: center; |
| 98 | + } |
| 99 | + |
| 100 | + .btn--left { |
| 101 | + left: 0; |
| 102 | + top: 50%; |
| 103 | + transform: translate(-50%, -50%); |
| 104 | + } |
| 105 | + |
| 106 | + .btn--right { |
| 107 | + right: 0; |
| 108 | + top: 50%; |
| 109 | + transform: translate(50%, -50%); |
| 110 | + } |
| 111 | + |
| 112 | + .btn-icon { |
| 113 | + height: 24px; |
| 114 | + width: 24px; |
| 115 | + stroke: #087f5b; |
| 116 | + } |
| 117 | + |
| 118 | + .dots { |
| 119 | + position: absolute; |
| 120 | + left: 50%; |
| 121 | + bottom: 0; |
| 122 | + transform: translate(-50%, 32px); |
| 123 | + |
| 124 | + display: flex; |
| 125 | + gap: 12px; |
| 126 | + } |
| 127 | + |
| 128 | + .dot { |
| 129 | + height: 12px; |
| 130 | + width: 12px; |
| 131 | + background-color: #fff; |
| 132 | + border: 2px solid #087f5b; |
| 133 | + border-radius: 50%; |
| 134 | + cursor: pointer; |
| 135 | + } |
| 136 | + |
| 137 | + .dot--fill { |
| 138 | + background-color: #087f5b; |
| 139 | + } |
| 140 | + |
| 141 | + /* Start at Building a Table Component - Part 1 */ |
| 142 | + </style> |
| 143 | + </head> |
| 144 | + <body> |
| 145 | + <div class="carousel"> |
| 146 | + <img src="maria.jpg" alt="A woman with glasses: Maria" /> |
| 147 | + <blockquote class="testimonial"> |
| 148 | + <p class="testimonial-text"> |
| 149 | + "Lorem, ipsum dolor sit amet consectetur adipisicing elit. Ad, culpa |
| 150 | + quo! At neque, incidunt ut placeat, maxime sunt minima earum |
| 151 | + doloremque autem." |
| 152 | + </p> |
| 153 | + <p class="testimonial-author">Maria de Almeida</p> |
| 154 | + <p class="testimonial-job">Senior Product Manager at EDP Comercial</p> |
| 155 | + </blockquote> |
| 156 | + |
| 157 | + <button class="btn btn--left"> |
| 158 | + <svg |
| 159 | + xmlns="http://www.w3.org/2000/svg" |
| 160 | + fill="none" |
| 161 | + viewBox="0 0 24 24" |
| 162 | + stroke-width="1.5" |
| 163 | + stroke="currentColor" |
| 164 | + class="btn-icon" |
| 165 | + > |
| 166 | + <path |
| 167 | + stroke-linecap="round" |
| 168 | + stroke-linejoin="round" |
| 169 | + d="M15.75 19.5 8.25 12l7.5-7.5" |
| 170 | + /> |
| 171 | + </svg> |
| 172 | + </button> |
| 173 | + |
| 174 | + <button class="btn btn--right"> |
| 175 | + <svg |
| 176 | + xmlns="http://www.w3.org/2000/svg" |
| 177 | + fill="none" |
| 178 | + viewBox="0 0 24 24" |
| 179 | + stroke-width="1.5" |
| 180 | + stroke="currentColor" |
| 181 | + class="btn-icon" |
| 182 | + > |
| 183 | + <path |
| 184 | + stroke-linecap="round" |
| 185 | + stroke-linejoin="round" |
| 186 | + d="m8.25 4.5 7.5 7.5-7.5 7.5" |
| 187 | + /> |
| 188 | + </svg> |
| 189 | + </button> |
| 190 | + |
| 191 | + <div class="dots"> |
| 192 | + <button class="dot dot--fill"> </button> |
| 193 | + <button class="dot"> </button> |
| 194 | + <button class="dot"> </button> |
| 195 | + <button class="dot"> </button> |
| 196 | + </div> |
| 197 | + </div> |
| 198 | + </body> |
| 199 | +</html> |
0 commit comments