Documents/Website/ReadMe.md
This folder contains the source code of the NanaZip website, built using Astro.
When taking screenshots for the website, please note the following guidelines:
Windows + Shift + S shortcut),
as it adds ugly borders around the screenshot. Use
ShareX (with transparency on and shadows off), or
an equivalent tool.
pngquant --force --ext .png --quality 85-85 <input-file.png>
When adding images to the website, place them in src/assets/images,
and reference them like this:
---
import exampleImage from '[path to picture]';
---
<Picture
src={exampleImage}
formats={["avif", "webp"]}
alt="[alt text]"
loading="[loading mode]" />
Where [loading mode] can be either eager or lazy.
Use eager for images that are above the fold (i.e. visible without scrolling),
and lazy for images that are below the fold.
If the image has both a light and a dark version,
you can use the ThemedLocalPicture component instead,
like this:
---
import exampleImageLight from '[path to light version of picture]';
import exampleImageDark from '[path to dark version of picture]';
---
<ThemedLocalPicture
lightSrc={exampleImageLight}
darkSrc={exampleImageDark}
alt="[alt text]"
loading="[loading mode]" />