Skip to content

Commit d4e663c

Browse files
some code refactor
1 parent eb64be9 commit d4e663c

File tree

1 file changed

+73
-86
lines changed

1 file changed

+73
-86
lines changed

src/pages/index.astro

+73-86
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ if (Astro.request.method === "POST") {
2929
3030
loading = false;
3131
32-
3332
// const hasErrors = Object.values(errors).some((msg) => msg);
3433
} catch (error) {
3534
if (error instanceof Error) {
@@ -39,7 +38,7 @@ if (Astro.request.method === "POST") {
3938
}
4039
---
4140

42-
<Layout title="Welcome to Astro.">
41+
<Layout title="AI Trip Planner">
4342
<main>
4443
<svg
4544
class="astro-a pt-10"
@@ -121,85 +120,72 @@ if (Astro.request.method === "POST") {
121120
set:html={res.replace(/\n/g, "<br />")}
122121
body={res}
123122
/>
124-
<!-- <ul role="list" class="link-card-grid">
125-
<Card
126-
href="https://docs.astro.build/"
127-
title="Documentation"
128-
body="Learn how Astro works and explore the official API docs."
129-
/>
130-
<Card
131-
href="https://astro.build/integrations/"
132-
title="Integrations"
133-
body="Supercharge your project with new frameworks and libraries."
134-
/>
135-
<Card
136-
href="https://astro.build/themes/"
137-
title="Themes"
138-
body="Explore a galaxy of community-built starter themes."
139-
/>
140-
<Card
141-
href="https://astro.build/chat/"
142-
title="Community"
143-
body="Come say hi to our amazing Discord community. ❤️"
144-
/>
145-
</ul> -->
123+
<br />
124+
<div class="flex justify-center">
125+
<a
126+
href="https://codingstark.com"
127+
target="_blank"
128+
class="text-white text-center"
129+
>
130+
Developed by <span class="text-gradient">Codingstark</span>
131+
</a>
132+
</div>
146133
</main>
147-
</Layout>
148134

149-
<style>
150-
main {
151-
margin: auto;
152-
padding: 1rem;
153-
width: 800px;
154-
max-width: calc(100% - 2rem);
155-
color: white;
156-
font-size: 20px;
157-
line-height: 1.6;
158-
}
159-
.astro-a {
160-
position: absolute;
161-
top: -32px;
162-
left: 50%;
163-
transform: translatex(-50%);
164-
width: 220px;
165-
height: auto;
166-
z-index: -1;
167-
}
168-
h1 {
169-
font-size: 4rem;
170-
font-weight: 700;
171-
line-height: 1;
172-
text-align: center;
173-
margin-bottom: 0.5em;
174-
}
175-
.text-gradient {
176-
background-image: var(--accent-gradient);
177-
-webkit-background-clip: text;
178-
-webkit-text-fill-color: transparent;
179-
background-size: 400%;
180-
background-position: 0%;
181-
}
182-
.instructions {
183-
margin-bottom: 2rem;
184-
border: 1px solid rgba(var(--accent-light), 25%);
185-
background: linear-gradient(
186-
rgba(var(--accent-dark), 66%),
187-
rgba(var(--accent-dark), 33%)
188-
);
189-
padding: 1.5rem;
190-
border-radius: 8px;
191-
}
192-
input {
193-
margin-bottom: 2rem;
194-
border: 1px solid rgba(var(--accent-light), 25%);
195-
background: linear-gradient(
196-
rgba(var(--accent-dark), 66%),
197-
rgba(var(--accent-dark), 33%)
198-
);
199-
/* padding: 1.5rem; */
200-
border-radius: 8px;
201-
}
202-
/* .instructions code {
135+
<style>
136+
main {
137+
margin: auto;
138+
padding: 1rem;
139+
width: 800px;
140+
max-width: calc(100% - 2rem);
141+
color: white;
142+
font-size: 20px;
143+
line-height: 1.6;
144+
}
145+
.astro-a {
146+
position: absolute;
147+
top: -32px;
148+
left: 50%;
149+
transform: translatex(-50%);
150+
width: 220px;
151+
height: auto;
152+
z-index: -1;
153+
}
154+
h1 {
155+
font-size: 4rem;
156+
font-weight: 700;
157+
line-height: 1;
158+
text-align: center;
159+
margin-bottom: 0.5em;
160+
}
161+
.text-gradient {
162+
background-image: var(--accent-gradient);
163+
-webkit-background-clip: text;
164+
-webkit-text-fill-color: transparent;
165+
background-size: 400%;
166+
background-position: 0%;
167+
}
168+
.instructions {
169+
margin-bottom: 2rem;
170+
border: 1px solid rgba(var(--accent-light), 25%);
171+
background: linear-gradient(
172+
rgba(var(--accent-dark), 66%),
173+
rgba(var(--accent-dark), 33%)
174+
);
175+
padding: 1.5rem;
176+
border-radius: 8px;
177+
}
178+
input {
179+
margin-bottom: 2rem;
180+
border: 1px solid rgba(var(--accent-light), 25%);
181+
background: linear-gradient(
182+
rgba(var(--accent-dark), 66%),
183+
rgba(var(--accent-dark), 33%)
184+
);
185+
/* padding: 1.5rem; */
186+
border-radius: 8px;
187+
}
188+
/* .instructions code {
203189
font-size: 0.8em;
204190
font-weight: bold;
205191
background: rgba(var(--accent-light), 12%);
@@ -210,10 +196,11 @@ if (Astro.request.method === "POST") {
210196
.instructions strong {
211197
color: rgb(var(--accent-light));
212198
} */
213-
.link-card-grid {
214-
display: grid;
215-
grid-template-columns: repeat(auto-fit, minmax(24ch, 1fr));
216-
gap: 2rem;
217-
padding: 0;
218-
}
219-
</style>
199+
.link-card-grid {
200+
display: grid;
201+
grid-template-columns: repeat(auto-fit, minmax(24ch, 1fr));
202+
gap: 2rem;
203+
padding: 0;
204+
}
205+
</style>
206+
</Layout>

0 commit comments

Comments
 (0)