satnaing / astro-paper

A minimal, accessible and SEO-friendly Astro blog theme
https://astro-paper.pages.dev/
MIT License
2.39k stars 502 forks source link

Change the layout in index.astro. #259

Closed monitor14 closed 1 month ago

monitor14 commented 8 months ago

image

Hi ,developer ,I want to change the layout of index.astro as above , I just a beginner of frontend learner , can give any tips about it ? I try many idea but can't implement.

satnaing commented 1 month ago

It's been a while since you opened this. So, I'm not sure this has been solved yourself.

In case I have to create such layout, I would use Flexbox of CSS. (in this case TailwindCSS)

Code

<div class="flex flex-col gap-y-2 sm:flex-row sm:gap-x-6">
  <div class="mx-auto size-56 flex-none bg-cyan-300">SVG</div>
  <p>
    Lorem ipsum dolor sit amet consectetur adipisicing elit. Eligendi
    voluptates unde reiciendis labore. Alias nemo maiores assumenda
    voluptatibus sunt molestias eum, enim id dolorem autem quia incidunt
    deleniti a voluptate?
  </p>
</div>

Result:

Mobile

Screenshot 2024-08-04 at 3 02 12 PM

Tablet & Web

Screenshot 2024-08-04 at 3 01 34 PM

Closing this issue for now. If you have any problems, feel free to open a new discussion. Thanks for your understanding.