style: newTab icon; larger back link

This commit is contained in:
Ayo 2022-10-18 14:42:19 +02:00
parent e019f2bd95
commit bc9e038ab1
3 changed files with 13 additions and 5 deletions

View file

@ -5,14 +5,15 @@ export interface Props {
const { url } = Astro.props; const { url } = Astro.props;
--- ---
<nav><a href={url}>&larr; Back</a></nav> <nav><a class="back-link" href={url}>&larr; Back</a></nav>
<style> <style>
nav { nav {
margin-bottom: -1rem; margin-bottom: -1rem;
} }
nav a { nav a.back-link {
font-size: var(--font-size-lg);
text-decoration: none; text-decoration: none;
} }
</style> </style>

View file

@ -3,16 +3,21 @@ export interface Props {
title: string; title: string;
body: string; body: string;
href: string; href: string;
newTab?: boolean;
} }
const { href, title, body } = Astro.props; const { href, title, body, newTab = false } = Astro.props;
--- ---
<li class="link-card"> <li class="link-card">
<a href={href}> <a href={href} target={newTab ? '_blank' : null}>
<h2> <h2>
{title} {title}
<span>&rarr;</span> {
newTab
? (<span>&nearr;</span>)
: (<span>&rarr; </span>)
}
</h2> </h2>
<p> <p>
{body} {body}

View file

@ -25,11 +25,13 @@ import Footer from "../components/Footer.astro";
<section class="cards-section"> <section class="cards-section">
<ul role="list" class="cards-section__grid"> <ul role="list" class="cards-section__grid">
<Card <Card
newTab={true}
href="https://drive.google.com/file/d/1MhN8qWRJnSHM_epU9GFQL9lEsMFtHWQK/view?usp=sharing" href="https://drive.google.com/file/d/1MhN8qWRJnSHM_epU9GFQL9lEsMFtHWQK/view?usp=sharing"
title="CV / Resume" title="CV / Resume"
body="Download and peruse my skills and experience." body="Download and peruse my skills and experience."
/> />
<Card <Card
newTab={true}
href="https://github.com/ayoayco" href="https://github.com/ayoayco"
title="Github" title="Github"
body="See my public projects over at Github. ❤️" body="See my public projects over at Github. ❤️"