Skip to content

Commit 5c4e68f

Browse files
committed
Update styles
1 parent d3faf9e commit 5c4e68f

File tree

2 files changed

+48
-26
lines changed

2 files changed

+48
-26
lines changed

src/App.svelte

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,43 @@
22
import AltText from './components/AltText.svelte'
33
</script>
44

5-
<section id="sponsor">
6-
<a class="sponsor-image" href="https://getautoseo.com/image-alt-text-generator" target="_blank">
7-
<img src="/sponsor.png" alt="AutoSEO Image Alt Text Generator">
8-
</a>
9-
</section>
10-
115
<main>
6+
<div class="sponsor align-main">
7+
<label class="sponsor-label" for="sponsor-link">
8+
Thank you to our sponsor!
9+
<a id="sponsor-link" class="sponsor-link" href="https://getautoseo.com/image-alt-text-generator" target="_blank">
10+
<img class="sponsor-image" src="/sponsor.png" alt="AutoSEO Alt Text Generator">
11+
</a>
12+
</label>
13+
</div>
14+
1215
<div class="align-main">
1316
<h1>Alt Text Generator</h1>
1417

1518
<p>Generate alt text for your images and help make the internet more accessible!</p>
1619

1720
<AltText />
1821
</div>
19-
</main>
20-
<div class="footer">
21-
<p>Support this project by <a href="https://github.com/adityaoberai/Alt-Text-Generator" target="_blank">starring ⭐</a> and <a href="https://github.com/sponsors/adityaoberai" target="_blank">sponsoring 💸</a> on GitHub</p>
22-
</div>
2322

23+
<div class="footer">
24+
<p>Support this project by <a href="https://github.com/adityaoberai/Alt-Text-Generator" target="_blank">starring ⭐</a> and <a href="https://github.com/sponsors/adityaoberai" target="_blank">sponsoring 💸</a> on GitHub</p>
25+
</div>
26+
</main>
2427

2528
<style>
2629
h1 {
27-
font-size: 3.2em;
30+
font-size: 4rem;
2831
line-height: 1.1;
2932
max-width: 80vw;
3033
}
3134
3235
p {
36+
font-size: 1.5rem;
37+
max-width: 80vw;
38+
}
39+
40+
.footer p {
3341
max-width: 80vw;
42+
font-size: 1rem;
3443
}
3544
</style>

src/app.css

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,41 +16,56 @@
1616

1717
body {
1818
max-width: 100vw;
19-
min-height: 100vh;
2019
margin: 0;
21-
display: flex;
22-
place-items: center;
2320
}
2421

2522
#app {
2623
margin: 0 auto;
2724
padding: 2rem;
2825
text-align: center;
26+
display: flex;
27+
flex-direction: column;
28+
justify-content: space-evenly;
2929
}
3030

31-
@media screen and (min-width: 769px) {
31+
.sponsor {
32+
display: flex;
33+
flex-direction: column;
34+
}
35+
.sponsor-label {
36+
font-size: 1rem;
37+
padding: 1rem;
38+
border-radius: 8px;
39+
border: 1.5px solid;
40+
display: flex;
41+
flex-direction: column;
42+
text-align: left;
43+
}
44+
45+
@media screen and (min-width: 1201px) {
3246
.sponsor-image {
33-
width: 40%;
47+
width: 25vw;
3448
}
3549
}
3650

37-
@media screen and (max-width: 768px) and (min-width: 481px) {
51+
@media screen and (min-width: 601px) and (max-width: 1200px) {
3852
.sponsor-image {
39-
width: 65%;
53+
width: 65vw;
4054
}
4155
}
4256

43-
@media screen and (max-width: 480px) {
57+
@media screen and (max-width: 600px) {
4458
.sponsor-image {
45-
width: 100%;
59+
width: 90vw;
4660
}
4761
}
4862

4963
main {
5064
display: flex;
51-
justify-content: center;
65+
flex-direction: column;
66+
justify-content: space-evenly;
5267
align-items: center;
53-
min-height: 70vh;
68+
min-height: 100vh;
5469
}
5570

5671
.align-main {
@@ -80,7 +95,7 @@ button {
8095
border-radius: 8px;
8196
border: 1.5px solid #f9f9f9;
8297
padding: 0.6em 1.2em;
83-
font-size: 1em;
98+
font-size: 1.5rem;
8499
font-weight: 500;
85100
font-family: inherit;
86101
background-color: #242424;
@@ -100,14 +115,12 @@ button:focus-visible {
100115
display: block;
101116
border-top: 2px solid #f9f9f9;
102117
bottom: 0;
103-
left: 0;
104-
right: 0;
105118
margin: 0 5vw;
106119
text-align: center;
107120
}
108121

109122
.footer p {
110-
padding: 0 5vw;
123+
padding: 1vw 5vw;
111124
line-height: 2.5rem;
112125
}
113126

0 commit comments

Comments
 (0)