blob: 29f9f55656d5e30dee49a9d2ffe434dfb5c8d0ad (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
|
<script lang="ts">
import { env } from '$env/dynamic/public';
import localforage from 'localforage';
let heroSection = $state<HTMLElement>();
const scrollPastHero = () => {
if (!heroSection) return;
const heroBottom = heroSection.getBoundingClientRect().bottom + window.scrollY;
window.scrollTo({ top: heroBottom, behavior: 'smooth' });
};
</script>
<section class="hero" bind:this={heroSection}>
<div class="hero-content">
<p class="tagline">The AniList Companion</p>
<h1 class="headline">Never miss what's due.</h1>
<p class="subheadline">
Track airing episodes, new manga chapters, and subtitle releases—all in one place.
<br />
<br />
AniList keeps your list. <strong>due.moe</strong> keeps you current.
</p>
<a
class="cta"
href={`https://anilist.co/api/v2/oauth/authorize?client_id=${env.PUBLIC_ANILIST_CLIENT_ID}&redirect_uri=${env.PUBLIC_ANILIST_REDIRECT_URI}&response_type=code`}
onclick={async () => {
await localforage.setItem(
'redirect',
window.location.origin + window.location.pathname + window.location.search
);
}}
>
Connect with AniList
</a>
</div>
<button class="scroll-indicator" onclick={scrollPastHero}>
<span class="scroll-text">See More</span>
<span class="scroll-arrow">↓</span>
</button>
</section>
<style>
.hero {
min-height: calc(100vh - 8rem);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
padding: 2rem;
position: relative;
animation: heroSlideIn 0.6s ease forwards;
}
@keyframes heroSlideIn {
from {
transform: translateY(20px);
}
to {
transform: translateY(0);
}
}
/*.hero-content {
max-width: 640px;
}*/
.tagline {
font-size: 0.85rem;
/*text-transform: uppercase;*/
letter-spacing: 0.15em;
color: var(--base04);
margin: 0 0 1rem 0;
font-weight: 500;
}
.headline {
font-size: clamp(2.5rem, 8vw, 4.5rem);
font-weight: 700;
margin: 0 0 1.5rem 0;
color: var(--base06);
line-height: 1.1;
letter-spacing: -0.02em;
}
.subheadline {
font-size: 1.15rem;
color: var(--base04);
margin: 0 0 2.5rem 0;
line-height: 1.6;
}
.subheadline strong {
color: var(--base06);
font-weight: 600;
}
.cta {
display: inline-block;
padding: 0.9rem 2rem;
background-color: var(--base06);
color: var(--base00);
font-weight: 600;
font-size: 0.95rem;
border-radius: 6px;
text-decoration: none;
transition:
transform 0.2s ease,
box-shadow 0.2s ease;
}
.cta:hover {
text-decoration: none;
transform: translateY(-2px);
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.cta:active {
transform: translateY(0);
}
.scroll-indicator {
position: absolute;
bottom: 2rem;
display: flex;
flex-direction: column;
align-items: center;
gap: 0.5rem;
color: var(--base03);
animation: float 2s ease-in-out infinite;
background: none;
border: none;
cursor: pointer;
transition: color ease;
}
.scroll-indicator:hover {
color: var(--base04);
}
.scroll-text {
font-size: 0.75rem;
/*text-transform: uppercase;*/
letter-spacing: 0.1em;
}
.scroll-arrow {
font-size: 1.25rem;
}
@keyframes float {
0%,
100% {
transform: translateY(0);
}
50% {
transform: translateY(6px);
}
}
@media (max-width: 600px) {
.hero {
min-height: calc(100vh - 6rem);
padding: 1.5rem;
}
.subheadline {
font-size: 1rem;
}
.cta {
width: 100%;
text-align: center;
}
}
</style>
|