now shows the 88x31 buttons added website link to the forum and updated styles
This commit is contained in:
@@ -6,6 +6,7 @@ import Icon from '../components/Icon.astro';
|
|||||||
|
|
||||||
import { SITE_DESCRIPTION, SITE_TITLE } from '../consts';
|
import { SITE_DESCRIPTION, SITE_TITLE } from '../consts';
|
||||||
|
|
||||||
|
import SkillCard from '../components/skillCard.astro'
|
||||||
import { desc } from "drizzle-orm";
|
import { desc } from "drizzle-orm";
|
||||||
import { drizzle } from "drizzle-orm/d1";
|
import { drizzle } from "drizzle-orm/d1";
|
||||||
import { GuestLog } from "../schema";
|
import { GuestLog } from "../schema";
|
||||||
@@ -21,9 +22,11 @@ if (Astro.request.method === 'POST') {
|
|||||||
console.log(formData);
|
console.log(formData);
|
||||||
const name = formData.get('name');
|
const name = formData.get('name');
|
||||||
const message = formData.get('message');
|
const message = formData.get('message');
|
||||||
|
const website_link = formData.get('website_link');
|
||||||
|
|
||||||
if (
|
if (
|
||||||
typeof name === 'string' &&
|
typeof name === 'string' &&
|
||||||
|
typeof website_link === 'string' &&
|
||||||
typeof message === 'string' &&
|
typeof message === 'string' &&
|
||||||
name !== "" &&
|
name !== "" &&
|
||||||
message !== ""
|
message !== ""
|
||||||
@@ -36,16 +39,21 @@ if (Astro.request.method === 'POST') {
|
|||||||
await db.insert(GuestLog).values([{
|
await db.insert(GuestLog).values([{
|
||||||
name : name,
|
name : name,
|
||||||
message : message,
|
message : message,
|
||||||
|
website_link : website_link,
|
||||||
date_viewed : new Date(),
|
date_viewed : new Date(),
|
||||||
}]);
|
}]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let guest_logs : {id: number; name: string; message: string | null; date: Date;}[] = [];
|
||||||
const guest_logs = await db
|
try {
|
||||||
|
guest_logs = await db
|
||||||
.select()
|
.select()
|
||||||
.from(GuestLog)
|
.from(GuestLog)
|
||||||
.orderBy(desc(GuestLog.date));
|
.orderBy(GuestLog.date);
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
|
||||||
guest_logs.forEach(log => {
|
guest_logs.forEach(log => {
|
||||||
console.log(log)
|
console.log(log)
|
||||||
@@ -60,28 +68,99 @@ guest_logs.forEach(log => {
|
|||||||
<body>
|
<body>
|
||||||
<Header />
|
<Header />
|
||||||
<main>
|
<main>
|
||||||
|
<div class="IntroHeader"></div>
|
||||||
|
<h1 class="greeting">Hello!!, im sirlilpanda</h1>
|
||||||
<Icon />
|
<Icon />
|
||||||
|
|
||||||
|
|
||||||
|
<h1 id="about_me">About me</h1>
|
||||||
|
<p1>
|
||||||
|
im an insane computer engineer who has to many hobbies and projects for me to actually work on.
|
||||||
|
That is just the best way to describe me you think of a hobby ive probably dabbled in it.
|
||||||
|
</p1>
|
||||||
|
|
||||||
<h1>guest book</h1>
|
<h1>guest book</h1>
|
||||||
<ul>
|
<ul>
|
||||||
{
|
{
|
||||||
guest_logs.map((log) => (
|
guest_logs.map((log) => (
|
||||||
<li>
|
<li>
|
||||||
<p>[{log.date.toDateString()}] {log.name} : {log.message}</p>
|
<p>[{log.date.toDateString()}] {log.name}
|
||||||
|
{log.website_link? (<a href={log.website_link}>{log.website_link}</a>) : ""}
|
||||||
|
: {log.message}</p>
|
||||||
</li>
|
</li>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
</ul>
|
</ul>
|
||||||
<h1>sign the guest book</h1>
|
<h1>sign the <span style="background-color: blueviolet;">guest</span> book</h1>
|
||||||
<form method="POST" style="display: grid">
|
<form method="POST" style="display: grid">
|
||||||
<label for="name">Name</label>
|
<label for="name">Name</label>
|
||||||
<input id="name" name="name" />
|
<input id="name" name="name" />
|
||||||
|
|
||||||
|
<label for="website_link">Website link(optional)</label>
|
||||||
|
<input id="website_link" name="website_link" />
|
||||||
|
|
||||||
<label for="message">message</label>
|
<label for="message">message</label>
|
||||||
<textarea id="message" name="message"></textarea>
|
<textarea id="message" name="message"></textarea>
|
||||||
|
|
||||||
<button type="submit">Submit</button>
|
<button type="submit">Submit</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<a href="https://sirlilpanda.studio" title="Visit sirlilpandas website">
|
||||||
|
<img src="panda_big.gif" alt="check out a man driven to insanity" width={88*4} height={31*4}>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="https://onio.neocities.org" title="Visit Onio Café">
|
||||||
|
<img src="https://onio.neocities.org/thebutton.gif" alt="Come Chat With Us!" width="88" height="31">
|
||||||
|
</a>
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
<Footer />
|
<Footer />
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.IntroHeader {
|
||||||
|
display: flexbox;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@keyframes gradient {
|
||||||
|
0% {
|
||||||
|
background-position: 0% 90%;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
background-position: 90% 0%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.greeting{
|
||||||
|
background : linear-gradient(
|
||||||
|
-45deg,
|
||||||
|
#ff0000,
|
||||||
|
#ffbc7e,
|
||||||
|
#fcff4e,
|
||||||
|
#27ff88,
|
||||||
|
#27ffff,
|
||||||
|
#1e0ff5,
|
||||||
|
#9e27ff,
|
||||||
|
#ff0000,
|
||||||
|
#ffbc7e,
|
||||||
|
#fcff4e,
|
||||||
|
#27ff88,
|
||||||
|
#27ffff,
|
||||||
|
#1e0ff5,
|
||||||
|
#9e27ff,
|
||||||
|
#ff0000
|
||||||
|
);
|
||||||
|
background-size: 300% 300%;
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
background-clip: text;
|
||||||
|
color: transparent;
|
||||||
|
transition: 250ms;
|
||||||
|
animation: gradient 2s linear infinite;
|
||||||
|
font-size: 2.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user