Redesign mostly done

This commit is contained in:
Firq 2023-03-04 19:11:52 +01:00
parent a5521b479e
commit 8d2ef10fb7
Signed by: Firq
GPG key ID: 3ACC61C8CEC83C20
24 changed files with 204 additions and 145 deletions

View file

@ -1,62 +0,0 @@
---
export 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: 0.15rem;
background-color: white;
background-image: var(--accent-gradient);
background-size: 400%;
border-radius: 0.5rem;
background-position: 100%;
transition: background-position 0.6s cubic-bezier(0.22, 1, 0.36, 1);
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}
.link-card > a {
width: 100%;
text-decoration: none;
line-height: 1.4;
padding: 1rem 1.3rem;
border-radius: 0.35rem;
color: #111;
background-color: white;
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;
color: #444;
}
.link-card:is(:hover, :focus-within) {
background-position: 0;
}
.link-card:is(:hover, :focus-within) h2 {
color: rgb(var(--accent));
}
</style>

View file

@ -1,28 +1,12 @@
---
export interface Props {
currentPage: string;
}
const {currentPage } = Astro.props;
---
<header>
<a href="">
<a href="/" rel="noopener noreferrer" aria-label="Home">
<img src="link_192.png" alt="">
</a>
<ul role="navigation">
<li><a href="">
<i class="iconoir-home-alt"></i>
Home
</a></li>
<li><a href="">
<i class="iconoir-book-stack"></i>
Servants
</a></li>
<li><a href="">
<i class="iconoir-database-script"></i>
Blog
</a></li>
<ul>
<slot />
</ul>
</header>
@ -61,23 +45,4 @@ const {currentPage } = Astro.props;
margin-block-end: 0px;
line-height: 1.5em;
}
li {
align-items: center;
justify-content: center;
text-align: left;
display: flex;
width: 200px;
}
li > a {
color: white;
text-decoration: none;
justify-content: center;
align-items: center;
font-size: 1.4em;
height: 100%;
font-weight: bold;
}
li > a:hover{
color: #551a8b;
}
</style>

View file

@ -0,0 +1,50 @@
---
export interface Props {
currentPage?: string;
link: string;
text: string;
icon: string;
}
const {icon, text, link, currentPage } = Astro.props;
let currPage = "";
if (currentPage === link.replace(new RegExp('/', 'g'), "")) {
currPage = "current"
} else if (currentPage === "home" && link === "/") {
currPage = "current"
}
---
<li>
<a href={link} rel="noopener noreferrer" aria-label={text} class={currPage}>
<i class={icon}></i>
{text}
</a>
</li>
<style>
li {
align-items: center;
justify-content: center;
text-align: left;
display: flex;
width: 200px;
}
li > a {
color: white;
text-decoration: none;
justify-content: center;
align-items: center;
font-size: 1.4em;
height: 100%;
font-weight: bold;
}
li > a:hover{
color: #551a8b;
}
.current {
color: #b86cffed;
}
</style>