Migrate Components

This commit is contained in:
Aron Malcher 2023-11-09 14:43:14 +01:00
parent c51593dbc4
commit 036a2d1e4a
Signed by: aronmal
GPG key ID: 816B7707426FC612
7 changed files with 302 additions and 352 deletions

View file

@ -1,61 +0,0 @@
---
interface Props {
title: string;
body: string;
href: string;
}
const { href, title, body } = Astro.props;
---
<li class="link-card">
<a href={href}>
<h2>
{title}
<span>&rarr;</span>
</h2>
<p>
{body}
</p>
</a>
</li>
<style>
.link-card {
list-style: none;
display: flex;
padding: 1px;
background-color: #23262d;
background-image: none;
background-size: 400%;
border-radius: 7px;
background-position: 100%;
transition: background-position 0.6s cubic-bezier(0.22, 1, 0.36, 1);
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.link-card > a {
width: 100%;
text-decoration: none;
line-height: 1.4;
padding: calc(1.5rem - 1px);
border-radius: 8px;
color: white;
background-color: #23262d;
opacity: 0.8;
}
h2 {
margin: 0;
font-size: 1.25rem;
transition: color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
p {
margin-top: 0.5rem;
margin-bottom: 0;
}
.link-card:is(:hover, :focus-within) {
background-position: 0;
background-image: var(--accent-gradient);
}
.link-card:is(:hover, :focus-within) h2 {
color: rgb(var(--accent-light));
}
</style>

172
src/components/Footer.astro Normal file
View file

@ -0,0 +1,172 @@
---
---
<footer class="footer">
<div class="footerIcon">
<img
class="footerImage"
src={"https://static.moonleay.net/img/lilJuddWeb/lilJudd.png"}
alt={"A cute Image of lil Judd <3"}
/>
<p>li'l Judd</p>
<p class="footerImageNote">Your competitive Splatoon assistant.</p>
</div>
<div class="footerTable">
<div>
<h3>Navigation</h3>
<div class="footerLinks">
<a href={"/"} target={"_self"}>Home</a>
<a href={"/features"} target={"_self"}>Features</a>
<a href={"/how-do-i"} target={"_self"}>How do I...?</a>
<a href={"/stack"} target={"_self"}>The Stack</a>
<a href={"/about"} target={"_self"}>About</a>
</div>
</div>
<div>
<h3>The Software</h3>
<div class="footerLinks">
<a
href={"https://git.moonleay.net/DiscordBots/lilJudd"}
target={"_blank"}>The Bot Code</a
>
<a
href={"https://git.moonleay.net/Websites/liljudd-website"}
target={"_blank"}>The Website Code</a
>
<a href={"/acknowledgements"} target={"_self"}>Acknowledgements</a>
</div>
</div>
<div>
<h3>More</h3>
<div class="footerLinks">
<a href={"https://moonleay.net/"} target={"_self"}>My homepage</a>
<a href={"https://moonleay.net/blog/"} target={"_blank"}>My blog</a>
<a href={"/contact"} target={"_self"}>Contact me</a>
<a href={"https://up.moonleay.net/"} target={"_blank"}>Uptime Status</a>
</div>
</div>
<div>
<h3>Legal</h3>
<div class="footerLinks">
<a href={"/imprint"} target={"_self"}>Imprint</a>
<a href={"/privacy-policy"} target={"_self"}>Privacy Policy</a>
<a href={"/terms-of-service"} target={"_self"}>Terms of Service</a>
<a
href={"https://git.moonleay.net/DiscordBots/lilJudd/src/branch/master/LICENSE"}
target={"_blank"}>The license</a
>
</div>
</div>
</div><div class="footerNotice">
<p>
This website is NOT affiliated with Nintendo or any other party. All
product names, logos, and brands are property of their respective owners.
</p>
<p>
li'l Judd &copy; 2023 <a href={"https://moonleay.net/"} target={"_blank"}
>moonleay</a
>
</p>
</div>
</footer>
<style>
.footer {
align-items: center;
margin: 100px 1px 0 0;
background-color: rgba(0, 0, 0, 0.4);
backdrop-filter: blur(5px);
bottom: 0;
width: 100%;
padding: 5px;
}
.footerIcon {
display: block;
text-align: center;
}
.footerImage {
max-width: initial;
max-height: initial;
width: 48px;
margin: 0.5rem auto;
}
.footerImageNote {
font-size: 0.75rem;
}
.footerTable {
padding: 20px 0;
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 20px;
}
.footerTable h3 {
margin-bottom: 8px;
}
.footerLinks {
display: flex;
flex-direction: column;
align-items: baseline;
}
.footerLinks a {
position: relative;
color: #ffffff;
text-decoration: none;
}
.footerLinks a:hover {
color: #ffffff;
}
.footerLinks a::before {
content: "";
position: absolute;
display: block;
width: 100%;
height: 2px;
bottom: 0;
left: 0;
transform: scaleX(0);
transform-origin: left;
background-color: #ffffff;
transition: transform 0.3s ease;
}
.footerLinks a:hover::before {
transform: scaleX(1);
}
.footerNotice {
margin: 0 auto;
text-align: center;
font-size: 0.75rem;
}
@media (min-width: 768px) {
.footer {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
column-gap: 0px;
margin: 0 auto;
}
.footerIcon {
grid-column: span 1;
justify-self: center;
}
.footerTable {
grid-column: span 3;
}
.footerNotice {
grid-column: span 4;
}
}
</style>

View file

@ -0,0 +1,17 @@
---
interface SectionProps {
imgUrl: string;
imgAlt: string;
title: string;
description: string;
note: string;
}
const { imgUrl, imgAlt, title, description, note } = Astro.props;
---
<section>
<h1>{title}</h1>
<img src={imgUrl} alt={imgAlt} />
<p>{description}</p>
<p>{note}</p>
</section>

111
src/components/NavBar.astro Normal file
View file

@ -0,0 +1,111 @@
<nav class="navMenu">
<ul class="grid">
<li class="navElem">
<div class="logoWtxt">
<a class:list={["pad3px", "textBx"]} href={"/"} target={"_self"}
><img
class:list={["logo", "pad3px"]}
src={"https://static.moonleay.net/img/lilJuddWeb/logos/logox256.png"}
alt={"The Bots Logo"}
/>li'l Judd</a
>
</div>
</li>
<li class="navElem">
<a class="navLink" href={"/features"} target={"_self"}>Features</a>
</li>
<li class="navElem">
<a class="navLink" href={"/how-do-i"} target={"_self"}>How do I...?</a>
</li>
<li class="navElem">
<a class="navLink" href={"/stack"} target={"_self"}>The Stack</a>
</li>
<li class="navElem">
<a class="navLink" href={"/about"} target={"_self"}>About</a>
</li>
<li class="navElemR">
<a
class="navLink"
href={"https://discord.com/api/oauth2/authorize?client_id=1024410658973941862&permissions=8&scope=bot"}
target={"_blank"}>Invite to your server</a
>
</li>
</ul>
</nav>
<style>
.navMenu {
display: flex;
flex-direction: column;
background-color: rgba(0, 0, 0, 0.4);
backdrop-filter: blur(5px);
position: sticky;
border-radius: 5px;
}
.logo {
width: 32px;
height: 32px;
border-radius: 100%;
max-width: initial;
max-height: initial;
margin: 0.35rem;
}
.navElem {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
transition: 0.5s;
}
.navElem:hover {
color: rgb(96 59 255) !important;
}
.navElemR {
transition: 0.5s;
}
.navElemR:hover {
color: rgb(96 59 255) !important;
}
.logoWtxt {
display: flex;
align-items: center;
margin: 0;
padding: 0;
}
.pad3px {
padding: 3px;
}
.textBx {
display: flex;
align-items: center;
}
@media (min-width: 768px) {
.grid {
display: grid;
/*grid-template-columns: repeat(6, 1fr);*/
grid-template-columns: repeat(8, 1fr);
}
.navElem {
grid-column: span 1;
margin: 0.5rem 0.5rem 0.5rem 0.5rem;
align-items: center;
text-align: center;
}
.navElemR {
grid-column: 8;
margin: 0.5rem 0.5rem 0.5rem 0.5rem;
align-items: center;
text-align: center;
}
}
</style>

View file

@ -1,194 +0,0 @@
.navMenu {
display: flex;
flex-direction: column;
background-color: rgba(0, 0, 0, 0.4);
backdrop-filter: blur(5px);
position: sticky;
border-radius: 5px;
}
.logo {
width: 32px;
height: 32px;
border-radius: 100%;
max-width: initial;
max-height: initial;
margin: .35rem;
}
.navElem {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
transition: .5s;
}
.navElem:hover {
color: rgb(96 59 255) !important;
}
.navElemR {
transition: .5s;
}
.navElemR:hover {
color: rgb(96 59 255) !important;
}
.logoWtxt {
display: flex;
align-items: center;
margin: 0;
padding: 0;
}
.pad3px {
padding: 3px;
}
.textBx {
display: flex;
align-items: center;
}
.footer {
align-items: center;
margin: 100px 1px 0 0;
background-color: rgba(0, 0, 0, 0.4);
backdrop-filter: blur(5px);
bottom: 0;
width: 100%;
padding: 5px;
}
.footerImageNote {
font-size: 0.75rem;
}
.footerIcon {
display: block;
text-align: center;
}
.footerImage {
max-width: initial;
max-height: initial;
width: 48px;
margin: 0.5rem auto;
}
.footerNotice {
margin: 0 auto;
text-align: center;
font-size: 0.75rem;
}
.footerTable {
padding: 20px 0;
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 20px;
}
.footerTable div {
}
.footerTable h3 {
margin-bottom: 8px;
}
.footerLinks {
display: flex;
flex-direction: column;
align-items: baseline;
}
.table {
align-items: center;
width: 100%;
}
.table th {
padding: 4px 7px;
text-decoration: underline;
}
.table td {
padding: 4px 7px;
}
.footerLinks a {
position: relative;
color: #ffffff;
text-decoration: none;
}
.footerLinks a:hover {
color: #ffffff;
}
.footerLinks a::before {
content: "";
position: absolute;
display: block;
width: 100%;
height: 2px;
bottom: 0;
left: 0;
transform: scaleX(0);
transform-origin: left;
background-color: #ffffff;
transition: transform 0.3s ease;
}
.footerLinks a:hover::before {
transform: scaleX(1);
}
@media (min-width: 768px) {
.footer {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
column-gap: 0px;
margin: 0 auto;
}
.grid {
display: grid;
/*grid-template-columns: repeat(6, 1fr);*/
grid-template-columns: repeat(8, 1fr);
}
.navElem {
grid-column: span 1;
margin: 0.5rem 0.5rem 0.5rem 0.5rem;
align-items: center;
text-align: center;
}
.navElemR {
grid-column: 8;
margin: 0.5rem 0.5rem 0.5rem 0.5rem;
align-items: center;
text-align: center;
}
.footerIcon {
grid-column: span 1;
justify-self: center;
}
.footerTable {
grid-column: span 3;
}
.footerNotice {
grid-column: span 4;
}
}

View file

@ -1,96 +0,0 @@
import styles from "./wrapping_objects.module.css"
export function NavBar(){
return(
<nav className={styles.navMenu}>
<ul className={styles.grid}>
<li className={styles.navElem}>
<div className={styles.logoWtxt}>
<a className={[styles.pad3px, styles.textBx].join(" ")} href={"/"} target={"_self"}><img className={`${styles.logo} ${styles.pad3px}`}src={"https://static.moonleay.net/img/lilJuddWeb/logos/logox256.png"}alt={"The Bots Logo"}/>li'l Judd</a>
</div>
</li>
<li className={styles.navElem}>
<a className={styles.navLink} href={"/features"} target={"_self"}>Features</a>
</li>
<li className={styles.navElem}>
<a className={styles.navLink} href={"/how-do-i"} target={"_self"}>How do I...?</a>
</li>
<li className={styles.navElem}>
<a className={styles.navLink} href={"/stack"} target={"_self"}>The Stack</a>
</li>
<li className={styles.navElem}>
<a className={styles.navLink} href={"/about"} target={"_self"}>About</a>
</li>
<li className={styles.navElemR}>
<a className={styles.navLink} href={"https://discord.com/api/oauth2/authorize?client_id=1024410658973941862&permissions=8&scope=bot"}
target={"_blank"}>Invite to your server</a>
</li>
</ul>
</nav>
)
}
export function Footer() {
return (
<>
<footer className={styles.footer}>
<div className={styles.footerIcon}>
<img className={styles.footerImage} src={"https://static.moonleay.net/img/lilJuddWeb/lilJudd.png"}
alt={"A cute Image of lil Judd <3"}/>
<p>li'l Judd</p>
<p className={styles.footerImageNote}>Your competitive Splatoon assistant.</p>
</div>
<div className={styles.footerTable}>
<div>
<h3 className={styles.fong}>Navigation</h3>
<div className={styles.footerLinks}>
<a href={"/"} target={"_self"}>Home</a>
<a href={"/features"} target={"_self"}>Features</a>
<a href={"/how-do-i"} target={"_self"}>How do I...?</a>
<a href={"/stack"} target={"_self"}>The Stack</a>
<a href={"/about"} target={"_self"}>About</a>
</div>
</div>
<div>
<h3 className={styles.fong}>The Software</h3>
<div className={styles.footerLinks}>
<a href={"https://git.moonleay.net/DiscordBots/lilJudd"} target={"_blank"}>The Bot Code</a>
<a href={"https://git.moonleay.net/Websites/liljudd-website"} target={"_blank"}>The Website
Code</a>
<a href={"/acknowledgements"} target={"_self"}>Acknowledgements</a>
</div>
</div>
<div>
<h3 className={styles.fong}>More</h3>
<div className={styles.footerLinks}>
<a href={"https://moonleay.net/"} target={"_self"}>My homepage</a>
<a href={"https://moonleay.net/blog/"} target={"_blank"}>My blog</a>
<a href={"/contact"} target={"_self"}>Contact me</a>
<a href={"https://up.moonleay.net/"} target={"_blank"}>Uptime Status</a>
</div>
</div>
<div>
<h3 className={styles.fong}>Legal</h3>
<div className={styles.footerLinks}>
<a href={"/imprint"} target={"_self"}>Imprint</a>
<a href={"/privacy-policy"} target={"_self"}>Privacy Policy</a>
<a href={"/terms-of-service"} target={"_self"}>Terms of Service</a>
<a href={"https://git.moonleay.net/DiscordBots/lilJudd/src/branch/master/LICENSE"}
target={"_blank"}>The license</a>
</div>
</div>
</div>
<Notice/>
</footer>
</>
)
}
export function Notice() {
return (
<div className={styles.footerNotice}>
<p>This website is NOT affiliated with Nintendo or any other party. All product names, logos, and brands are property of their respective owners.</p>
<p>li'l Judd &copy; 2023 <a href={"https://moonleay.net/"} target={"_blank"}>moonleay</a></p>
</div>
)
}

View file

@ -1,5 +1,6 @@
---
import { Footer, NavBar } from "@components/wrapping_objects";
import Footer from "@components/Footer.astro";
import NavBar from "@components/NavBar.astro";
---
<!doctype html>