|
1 | 1 | <script>
|
2 |
| - import SvelteLogotype from './svelte-logotype.svg'; |
3 |
| -
|
4 |
| - // @ts-ignore |
| 2 | + // @ts-expect-error |
5 | 3 | import MachineDesktop from './svelte-machine-desktop.png?w=1200;2000;2800;4400&format=avif;webp;png;&as=picture';
|
6 |
| - // @ts-ignore |
| 4 | + // @ts-expect-error |
7 | 5 | import MachineMobile from './svelte-machine-mobile.png?w=960&format=avif;webp;png;&as=picture';
|
8 | 6 | </script>
|
9 | 7 |
|
10 | 8 | <div class="hero">
|
11 | 9 | <div class="hero-content">
|
12 |
| - <img alt="Svelte logotype" class="logotype" src={SvelteLogotype} width="300" height="56" /> |
13 |
| - <strong> |
14 |
| - <span style="white-space: nowrap">Web development</span> <br /> but fun |
15 |
| - </strong> |
16 |
| - <div class="buttons"> |
17 |
| - <a href="/tutorial" class="cta">tutorial</a> |
18 |
| - <a href="/docs" class="cta basic">read the docs</a> |
19 |
| - </div> |
| 10 | + <h1>web development for the rest of us</h1> |
| 11 | + <a href="/docs" class="cta basic">get started</a> |
20 | 12 | </div>
|
21 | 13 |
|
22 | 14 | <picture class="machine">
|
|
51 | 43 | <style>
|
52 | 44 | .hero {
|
53 | 45 | position: relative;
|
54 |
| - background: radial-gradient(circle at 40% 30%, rgb(235, 243, 249), rgb(214, 222, 228)); |
55 | 46 | padding: 6rem 0 34vw 0;
|
56 | 47 | margin-bottom: 3rem;
|
57 |
| - } |
58 | 48 |
|
59 |
| - .machine img { |
60 |
| - position: absolute; |
61 |
| - pointer-events: none; |
62 |
| - width: 100%; |
63 |
| - height: auto; |
| 49 | + &::before { |
| 50 | + content: ''; |
| 51 | + position: absolute; |
| 52 | + width: 100%; |
| 53 | + height: 200%; |
| 54 | + left: 0; |
| 55 | + top: 0; |
| 56 | + background: linear-gradient(to bottom, transparent, var(--sk-back-1)), |
| 57 | + radial-gradient(circle at 40% 30%, rgb(235, 243, 249), rgb(214, 222, 228)); |
| 58 | + } |
| 59 | +
|
| 60 | + :root.dark &::before { |
| 61 | + background: linear-gradient(to bottom, transparent, var(--sk-back-1)), |
| 62 | + radial-gradient( |
| 63 | + 64.14% 72.25% at 47.58% 31.75%, |
| 64 | + hsl(209deg 6% 47% / 52%) 0%, |
| 65 | + hsla(0, 0%, 100%, 0) 100% |
| 66 | + ), |
| 67 | + linear-gradient( |
| 68 | + 92.4deg, |
| 69 | + hsl(210, 7%, 16%) 14.67%, |
| 70 | + hsl(0deg 0% 0% / 48%) 54.37%, |
| 71 | + hsla(207, 22%, 13%, 0.62) 92.49% |
| 72 | + ), |
| 73 | + linear-gradient(0deg, hsl(204, 38%, 20%), hsl(204, 10%, 90%)); |
| 74 | + } |
64 | 75 | }
|
65 | 76 |
|
66 | 77 | .hero-content {
|
|
69 | 80 | align-items: center;
|
70 | 81 | gap: 1rem;
|
71 | 82 | margin-bottom: 4rem;
|
| 83 | + text-align: center; |
72 | 84 | }
|
73 | 85 |
|
74 |
| - strong { |
75 |
| - font-size: var(--sk-font-size-h2); |
76 |
| - text-align: center; |
77 |
| - font-family: var(--sk-font-heading); |
78 |
| - text-transform: lowercase; |
79 |
| - font-weight: 400; |
80 |
| - color: var(--sk-text-2); |
81 |
| - line-height: 1.2; |
| 86 | + h1 { |
| 87 | + max-width: 9em; |
82 | 88 | }
|
83 | 89 |
|
84 |
| - .buttons { |
85 |
| - display: flex; |
86 |
| - gap: 1rem; |
87 |
| - align-items: center; |
| 90 | + .machine img { |
| 91 | + position: absolute; |
| 92 | + pointer-events: none; |
| 93 | + width: 100%; |
| 94 | + height: auto; |
88 | 95 | }
|
89 | 96 |
|
90 | 97 | .cta {
|
91 |
| - display: flex; |
92 |
| - align-items: center; |
93 |
| - gap: 0.1rem; |
94 |
| - background: var(--sk-theme-1); |
95 |
| - padding: 0.35em 0.8em; |
96 | 98 | font-family: var(--sk-font-ui);
|
97 | 99 | font-size: var(--sk-font-size-ui-medium);
|
98 |
| - font-weight: 600; |
99 |
| - white-space: nowrap; |
100 |
| - border-radius: var(--sk-border-radius); |
101 |
| - box-shadow: 0px 6px 14px rgba(0, 0, 0, 0.08); |
102 |
| - color: #fff; |
103 |
| - transition: 0.5s var(--quint-out); |
104 |
| - transition-property: box-shadow, color; |
105 |
| - } |
106 |
| -
|
107 |
| - .cta:hover { |
108 |
| - text-decoration: none; |
109 |
| - box-shadow: |
110 |
| - 0px 0.8px 3.8px rgba(0, 0, 0, 0.115), |
111 |
| - 0px 6px 30px rgba(0, 0, 0, 0.23); |
112 |
| - } |
113 |
| -
|
114 |
| - .cta.basic { |
115 |
| - background-color: var(--sk-back-5); |
116 |
| - color: var(--sk-text-1); |
117 |
| - } |
118 |
| -
|
119 |
| - .logotype { |
120 |
| - width: min(45vw, 40em); |
121 |
| - height: auto; |
| 100 | + color: var(--sk-theme-1); |
| 101 | + text-transform: uppercase; |
122 | 102 | }
|
123 | 103 |
|
124 | 104 | @media (min-width: 800px) {
|
125 | 105 | .hero-content {
|
126 | 106 | --width: clamp(60rem, 50vw, 80rem);
|
| 107 | + align-items: start; |
127 | 108 | position: absolute;
|
128 |
| - display: grid; |
129 |
| - grid-template-columns: 1fr 1fr; |
130 |
| - grid-column-gap: 4rem; |
131 |
| - grid-row-gap: 2rem; |
132 | 109 | width: var(--width);
|
133 | 110 | left: calc(0.5 * (100% - min(100vw, 120rem)) + var(--sk-page-padding-side));
|
134 |
| - top: 6rem; |
135 |
| - font-size: 0.9em; |
136 |
| - } |
137 |
| -
|
138 |
| - .logotype { |
139 |
| - width: 100%; |
140 |
| - justify-self: end; |
141 |
| - } |
142 |
| -
|
143 |
| - strong { |
| 111 | + top: calc(8vw - 2rem); |
144 | 112 | text-align: left;
|
145 | 113 | }
|
146 | 114 |
|
|
151 | 119 | }
|
152 | 120 |
|
153 | 121 | @media (min-width: 1400px) {
|
154 |
| - .hero-content { |
155 |
| - grid-template-columns: 1fr; |
156 |
| - width: calc(0.5 * var(--width)); |
157 |
| - top: 6vw; |
158 |
| - } |
159 |
| -
|
160 | 122 | .hero {
|
161 | 123 | height: calc(10rem + 20vw);
|
162 | 124 | padding: 10rem 0 0 0;
|
163 | 125 | }
|
164 | 126 | }
|
165 |
| -
|
166 |
| - :global(html.dark) .hero { |
167 |
| - background: radial-gradient( |
168 |
| - 64.14% 72.25% at 47.58% 31.75%, |
169 |
| - hsl(209deg 6% 47% / 52%) 0%, |
170 |
| - hsla(0, 0%, 100%, 0) 100% |
171 |
| - ), |
172 |
| - linear-gradient( |
173 |
| - 92.4deg, |
174 |
| - hsl(210, 7%, 16%) 14.67%, |
175 |
| - hsl(0deg 0% 0% / 48%) 54.37%, |
176 |
| - hsla(207, 22%, 13%, 0.62) 92.49% |
177 |
| - ), |
178 |
| - linear-gradient(0deg, hsl(204, 38%, 20%), hsl(204, 10%, 90%)); |
179 |
| - } |
180 |
| -
|
181 |
| - :global(html.dark) .logotype { |
182 |
| - filter: invert(4) brightness(1.2); |
183 |
| - } |
184 | 127 | </style>
|
0 commit comments