Skip to content

Commit

Permalink
refactor: improve design with profile picture
Browse files Browse the repository at this point in the history
  • Loading branch information
MaevaWolff committed Aug 1, 2023
1 parent a7073b1 commit 331ad79
Showing 1 changed file with 19 additions and 26 deletions.
45 changes: 19 additions & 26 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -18,37 +18,30 @@ const posts = (await getCollection("posts")).sort(function (first, second) {

<Layout>
<main class="flex flex-col gap-20">
<article class="flex flex-col gap-8">
<h1 class="text-3xl text-neutral-100 text-center md:text-left">{presentation.title}</h1>
<!-- Paragraph on the left, Image on the right (for larger screens) -->
<div class="hidden md:flex">
<h2
class="w-auto leading-6"
set:html={convertAsteriskToStrongTag(presentation.description)}
/>
{
presentation.profile &&
<div class="md:w-1/2">
<img src={presentation.profile} class="rounded-full float-right"/>
</div>
}
</div>
<article
class="flex flex-col gap-8 md:flex-row-reverse md:justify-end md:gap-12"
>
{
presentation.profile && (
<img
src={presentation.profile}
class="w-1/4 self-center rounded-full"
/>
)
}

<div class="flex flex-col gap-8">
<h1 class="text-3xl text-neutral-100">
{presentation.title}
</h1>

<!-- For smaller screens, Image on top, Text at bottom -->
<div class="md:hidden text-center">
{
presentation.profile &&
<div class="flex place-content-center mb-4">
<img src={presentation.profile} class="rounded-full self-center w-1/3" />
</div>
}
<h2
class="mw-full leading-6"
class="w-auto max-w-[60ch] leading-6"
set:html={convertAsteriskToStrongTag(presentation.description)}
/>

<SocialLinks />
</div>
<SocialLinks />
</article>

<article class="flex flex-col gap-8">
Expand Down

1 comment on commit 331ad79

@vercel
Copy link

@vercel vercel bot commented on 331ad79 Aug 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.