make the title image redirect to about
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Michael Zhang 2024-09-20 12:52:03 -05:00
parent bc92b2184b
commit d344924a1d
2 changed files with 26 additions and 3 deletions

View file

@ -4,15 +4,21 @@ import { Content as ShortBio } from "../content/partials/shortBio.md";
import links from "../data/links"; import links from "../data/links";
import { Image } from "astro:assets"; import { Image } from "astro:assets";
import portrait from "../assets/self.png"; import portrait from "../assets/self.png";
const target = Astro.url.pathname === "/" ? "/about/" : "/";
--- ---
<nav class="side-nav"> <nav class="side-nav">
<div class="side-nav-content"> <div class="side-nav-content">
<a href="/" class="portrait"> <a href={target} class="portrait">
<Image src={portrait} alt="portrait" class="portrait" /> <Image src={portrait} alt="portrait" class="portrait" />
</a> </a>
<div class="me"> <div class="me">
<h1 class="title">Michael Zhang</h1> <div class="titleContainer">
<h1 class="title">
<a href={target}>Michael Zhang</a>
</h1>
</div>
<div class="links"> <div class="links">
{ {
links.map((link) => { links.map((link) => {

View file

@ -10,6 +10,16 @@
justify-content: space-evenly; justify-content: space-evenly;
flex-direction: column; flex-direction: column;
.title {
a {
color: inherit;
&:hover {
background-color: inherit;
}
}
}
.links { .links {
text-align: center; text-align: center;
font-size: 0.9rem; font-size: 0.9rem;
@ -76,12 +86,19 @@
justify-content: space-evenly; justify-content: space-evenly;
} }
.titleContainer {
container-type: inline-size;
}
h1.title { h1.title {
margin-top: 0;
margin-bottom: 5px; margin-bottom: 5px;
font-size: 14cqw;
} }
a.portrait img { a.portrait img {
max-height: 80px; max-height: 120px;
} }
.bio { .bio {