Compare commits

...

13 Commits

Author SHA1 Message Date
prototypa
59b7e373d8 Fix format
Some checks failed
GitHub Actions / build (18) (push) Has been cancelled
GitHub Actions / build (20) (push) Has been cancelled
GitHub Actions / build (22) (push) Has been cancelled
GitHub Actions / check (push) Has been cancelled
2025-08-19 00:00:01 -04:00
André B
87ccaf47b4 Merge pull request #630 from EffortlessSteven/chore/fix-prettier-formatting
chore(ci): resolve Prettier check failures in README, saas, and images.ts
2025-08-18 23:52:59 -04:00
André B
afb0409fe7 Merge pull request #631 from EffortlessSteven/chore/annotate-optimizedimage-only
fix(types): annotate optimized image type in adaptOpenGraphImages
2025-08-18 23:51:52 -04:00
prototypa
2381a12d64 Replace onwidget with arthelokyo 2025-08-18 23:50:18 -04:00
André B
ed3cc87a41 Merge pull request #646 from ContriFork/fix/theme-toggle-flickering
Fix flickering when toggling theme #643
2025-08-18 23:41:08 -04:00
André B
2e8f6ec459 Update Announcement.astro 2025-08-09 13:22:05 -04:00
André B
3fd1fea6a4 Update config.yaml 2025-08-09 13:19:21 -04:00
André B
30469922cf Update navigation.ts 2025-08-09 13:18:34 -04:00
André B
c8292582f0 Update README.md 2025-08-09 13:07:15 -04:00
André B
9e9e00d119 Update README.md 2025-08-09 13:04:45 -04:00
Robert P
c63cf4371f Fix flickering when toggling theme #643
* More here: https://github.com/onwidget/astrowind/issues/643#issuecomment-3146678129
2025-08-02 22:30:12 +03:00
Steven Zimmerman
c6ae31f58b fix(types): annotate optimized image type in adaptOpenGraphImages
Import ImagesOptimizer, define OptimizedImage alias, and annotate the `_image` variable to remove an implicit-any hint (ts7043) in `src/utils/images.ts`. No functional changes.
2025-05-02 03:57:20 -04:00
Steven Zimmerman
364183f989 git commit -m "style: fix formatting issues in README, saas template and image utils
Fix the failing CI "check" action by applying Prettier formatting to:
- README.md
- src/pages/homes/saas.astro
- src/utils/images.ts

This resolves the "prettier --check" errors without changing functionality."
2025-05-02 03:20:48 -04:00
20 changed files with 79 additions and 233 deletions

View File

@@ -1,6 +1,6 @@
# 🚀 AstroWind
<img src="https://raw.githubusercontent.com/onwidget/.github/main/resources/astrowind/lighthouse-score.png" align="right"
<img src="https://raw.githubusercontent.com/arthelokyo/.github/main/resources/astrowind/lighthouse-score.png" align="right"
alt="AstroWind Lighthouse Score" width="100" height="358">
🌟 _Most *starred* & *forked* Astro theme in 2022, 2023 & 2024_. 🌟
@@ -17,15 +17,15 @@
<br>
![AstroWind Theme Screenshot](https://raw.githubusercontent.com/onwidget/.github/main/resources/astrowind/screenshot-astrowind-1.0.png)
![AstroWind Theme Screenshot](https://raw.githubusercontent.com/arthelokyo/.github/main/resources/astrowind/screenshot-astrowind-1.0.png)
[![onWidget](https://custom-icon-badges.demolab.com/badge/made%20by%20-onWidget-556bf2?style=flat-square&logo=onwidget&logoColor=white&labelColor=101827)](https://github.com/onwidget)
[![License](https://img.shields.io/github/license/onwidget/astrowind?style=flat-square&color=dddddd&labelColor=000000)](https://github.com/onwidget/astrowind/blob/main/LICENSE.md)
[![Maintained](https://img.shields.io/badge/maintained%3F-yes-brightgreen.svg?style=flat-square)](https://github.com/onwidget)
[![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat-square)](https://github.com/onwidget/astrowind#contributing)
[![Known Vulnerabilities](https://snyk.io/test/github/onwidget/astrowind/badge.svg?style=flat-square)](https://snyk.io/test/github/onwidget/astrowind)
[![Stars](https://img.shields.io/github/stars/onwidget/astrowind.svg?style=social&label=stars&maxAge=86400&color=ff69b4)](https://github.com/onwidget/astrowind)
[![Forks](https://img.shields.io/github/forks/onwidget/astrowind.svg?style=social&label=forks&maxAge=86400&color=ff69b4)](https://github.com/onwidget/astrowind)
[![arthelokyo](https://custom-icon-badges.demolab.com/badge/made%20by%20-arthelokyo-556bf2?style=flat-square&logo=arthelokyo&logoColor=white&labelColor=101827)](https://github.com/arthelokyo)
[![License](https://img.shields.io/github/license/arthelokyo/astrowind?style=flat-square&color=dddddd&labelColor=000000)](https://github.com/arthelokyo/astrowind/blob/main/LICENSE.md)
[![Maintained](https://img.shields.io/badge/maintained%3F-yes-brightgreen.svg?style=flat-square)](https://github.com/arthelokyo)
[![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat-square)](https://github.com/arthelokyo/astrowind#contributing)
[![Known Vulnerabilities](https://snyk.io/test/github/arthelokyo/astrowind/badge.svg?style=flat-square)](https://snyk.io/test/github/arthelokyo/astrowind)
[![Stars](https://img.shields.io/github/stars/arthelokyo/astrowind.svg?style=social&label=stars&maxAge=86400&color=ff69b4)](https://github.com/arthelokyo/astrowind)
[![Forks](https://img.shields.io/github/forks/arthelokyo/astrowind.svg?style=social&label=forks&maxAge=86400&color=ff69b4)](https://github.com/arthelokyo/astrowind)
<br>
@@ -60,15 +60,14 @@
We're embarking on an exciting journey with **AstroWind 2.0**, and we want you to be a part of it! We're currently taking the first steps in developing this new version and your insights are invaluable. Join the discussion and share your feedback, ideas, and suggestions to help shape the future of **AstroWind**. Let's make **AstroWind 2.0** even better, together!
[Share Your Feedback in Our Discussion!](https://github.com/onwidget/astrowind/discussions/392)
[Share Your Feedback in Our Discussion!](https://github.com/arthelokyo/astrowind/discussions/392)
<br>
## TL;DR
```shell
npm create astro@latest -- --template onwidget/astrowind
npm create astro@latest -- --template arthelokyo/astrowind
```
## Getting started
@@ -138,7 +137,7 @@ There's nothing special about `src/components/`, but that's where we like to put
Any static assets, like images, can be placed in the `public/` directory if they do not require any transformation or in the `assets/` directory if they are imported directly.
[![Edit AstroWind on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://githubbox.com/onwidget/astrowind/tree/main) [![Open in Gitpod](https://svgshare.com/i/xdi.svg)](https://gitpod.io/?on=gitpod#https://github.com/onwidget/astrowind) [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/onwidget/astrowind)
[![Edit AstroWind on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://githubbox.com/arthelokyo/astrowind/tree/main) [![Open in Gitpod](https://svgshare.com/i/xdi.svg)](https://gitpod.io/?on=gitpod#https://github.com/arthelokyo/astrowind) [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/arthelokyo/astrowind)
> 🧑‍🚀 **Seasoned astronaut?** Delete this file `README.md`. Update `src/config.yaml` and contents. Have fun!
@@ -266,13 +265,13 @@ prefer.
Clone this repository on your own GitHub account and deploy it to Netlify:
[![Netlify Deploy button](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/onwidget/astrowind)
[![Netlify Deploy button](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/arthelokyo/astrowind)
#### Deploy to Vercel
Clone this repository on your own GitHub account and deploy to Vercel:
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fonwidget%2Fastrowind)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Farthelokyo%2Fastrowind)
<br>
@@ -296,7 +295,7 @@ That would be very useful for all of us and we would be happy to listen and take
## Acknowledgements
Initially created by **onWidget** and maintained by a community of [contributors](https://github.com/onwidget/astrowind/graphs/contributors).
Initially created by **Arthelokyo** and maintained by a community of [contributors](https://github.com/arthelokyo/astrowind/graphs/contributors).
## License

View File

@@ -68,6 +68,9 @@ import { UI } from 'astrowind:config';
if (defaultTheme.endsWith(':only')) {
return;
}
Observer.removeAnimationDelay();
document.documentElement.classList.toggle('dark');
localStorage.theme = document.documentElement.classList.contains('dark') ? 'dark' : 'light';
});
@@ -167,6 +170,7 @@ import { UI } from 'astrowind:config';
observer: null,
delayBetweenAnimations: 100,
animationCounter: 0,
elements: null,
start() {
const selectors = [
@@ -179,7 +183,7 @@ import { UI } from 'astrowind:config';
'[class$=" intersect"]',
];
const elements = Array.from(document.querySelectorAll(selectors.join(',')));
this.elements = Array.from(document.querySelectorAll(selectors.join(',')));
const getThreshold = (element) => {
if (element.classList.contains('intersect-full')) return 0.99;
@@ -188,7 +192,7 @@ import { UI } from 'astrowind:config';
return 0;
};
elements.forEach((el) => {
this.elements.forEach((el) => {
el.setAttribute('no-intersect', '');
el._intersectionThreshold = getThreshold(el);
});
@@ -241,10 +245,25 @@ import { UI } from 'astrowind:config';
this.observer = new IntersectionObserver(callback.bind(this), { threshold: [0, 0.25, 0.5, 0.99] });
elements.forEach((el) => {
this.elements.forEach((el) => {
this.observer.observe(el);
});
},
/*
REF: #643;
We need to remove the delay to fix flickering/delay
when toggling the theme. Observer only removes them
after data-animated is gone (out of view).
*/
removeAnimationDelay() {
this.elements.forEach((el) => {
if (el.getAttribute('data-animated') === 'true') {
el.style.transitionDelay = '';
el.style.animationDelay = '';
}
});
},
};
Observer.start();

View File

@@ -15,9 +15,9 @@
<a
target="_blank"
rel="noopener"
class="ltr:ml-auto rtl:mr-auto w-[5.6rem] h-[1.25rem] ml-auto bg-contain inline-block bg-[url(https://img.shields.io/github/stars/onwidget/astrowind.svg?style=social&label=Stars&maxAge=86400)]"
class="ltr:ml-auto rtl:mr-auto w-[5.6rem] h-[1.25rem] ml-auto bg-contain inline-block bg-[url(https://img.shields.io/github/stars/arthelokyo/astrowind.svg?style=social&label=Stars&maxAge=86400)]"
title="If you like AstroWind, give us a star."
href="https://github.com/onwidget/astrowind"
href="https://github.com/arthelokyo/astrowind"
>
</a>
</div>

View File

@@ -23,8 +23,8 @@ metadata:
height: 628
type: website
twitter:
handle: '@onwidget'
site: '@onwidget'
handle: '@arthelokyo'
site: '@arthelokyo'
cardType: summary_large_image
i18n:

View File

@@ -12,196 +12,24 @@ metadata:
canonical: https://astrowind.vercel.app/astrowind-template-in-depth
---
import DListItem from '~/components/ui/DListItem.astro';
import ToggleTheme from '~/components/common/ToggleTheme.astro';
## Mauris velit laoreet vitae cursus augue
## Overview
Lorem ipsum dolor sit amet, consectetur adipiscing elit. **Pellentesque** euismod, nibh ac aliquam aliquam, dui nulla ultrices erat, sit amet dictum nisl ex id nunc. Sed malesuada, orci vitae tempus euismod, nunc erat semper nisi, in aliquet nibh nisl eget nulla. Donec eget ipsum vitae nibh blandit consequat. Donec facilisis, nibh id aliquam fermentum, mi lorem molestie nisl, id posuere nisi nisi at nulla.
It can be a somewhat daunting task trying to get a handle on _AstroWind_ internals, and particularly various points of usage.
Duis euismod, nulla sit amet mattis euismod, nibh nunc rhoncus nibh, id interdum nunc nisl id lorem. Donec id nunc quis nulla aliquam cursus. Integer vitae nunc nunc. Sed sed nulla vitae nibh interdum gravida. Sed a nunc nibh.
This page outlines and clarifies some of the techniques found in _AstroWind_. Use it as a guide for further modification, or an instructional for techniques to use in your own endeavors.
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Integer euismod, nunc eu lobortis mattis, lectus sem sagittis nunc, id laoreet nunc metus id lectus. Sed consectetur, urna at euismod consectetur, nunc nisi bibendum nibh, ut rhoncus nibh nunc vel mi.
## Styling
Nam eget nunc massa. Nulla facilisi. Sed a ligula vel nunc porta sollicitudin. **Pellentesque** vel mauris vitae nibh varius feugiat. Fusce eget nunc id ligula bibendum venenatis.
As the name suggests, _AstroWind_ relies on _TailWind_ for styling. Furthermore, _AstroWind_ defines custom low level style settings which are incorporated into _TailWind_ seamlessly, and which provides consistency for higher level styling constructs, as well as enabling dark mode.
### Nisi rutrum eros euismod
The styling mechanism consists of the following files (all paths are prefixed with `/src/` ):
Maecenas eget justo sed nibh consequat vulputate. Sed euismod neque vel nunc rhoncus, nec tincidunt nisl laoreet. Sed euismod justo id nulla varius, id cursus nibh tincidunt. Sed euismod est et nunc consectetur, id tempus nibh euismod.
<DListItem dt="assets/styles/tailwind.css">
This file is essentially an extension of _TailWind's_ base.css. High-level component styles are defined here. Note
also styling on elements selected by 'attribute' selectors at the bottom of the files, particularly those selected by
'data' attributes.
</DListItem>
<DListItem dt="components/CustomStyles.astro">
Defines custom colors and fonts. For these to take effect in the 'base.css' file, they need to be loaded in the html
header section. See next.
</DListItem>
<DListItem dt="layouts/Layout.astro">
This layout is used for all of the pages rendered by _AstroWind_. The contents of _tailwind.css_ and
_CustomStyles.astro_ component, described above, is injected into the html header.
</DListItem>
In hac habitasse platea dictumst. Integer euismod, nunc eu lobortis mattis, lectus sem sagittis nunc, id laoreet nunc metus id lectus. Aenean sagittis, ligula vel blandit aliquam, nisl nunc euismod elit, nec tincidunt lectus nunc vitae nunc. Sed euismod justo id nulla varius, id cursus nibh tincidunt. Sed euismod est et nunc consectetur, id tempus nibh euismod.
### Dark Mode
### Nisi rutrum eros euismod
_Dark Mode_ is triggered by the little 'sunlight' icon:<ToggleTheme/>in the page header. It is defined in the _components/common/ToggleTheme.astro_, but the event is attached and the action defined in _components/common/BasicScripts.astro_ in the following snippet:
Quisque euismod lectus ac nunc dictum, id eleifend nunc euismod. Sed euismod, nunc eu lobortis mattis, lectus sem sagittis nunc, id laoreet nunc metus id lectus. Sed consectetur, urna at euismod consectetur, nunc nisi bibendum nibh, ut rhoncus nibh nunc vel mi.
```javascript
attachEvent('[data-aw-toggle-color-scheme]', 'click', function () {
if (defaultTheme.endsWith(':only')) {
return;
}
document.documentElement.classList.toggle('dark');
localStorage.theme = document.documentElement.classList.contains('dark') ? 'dark' : 'light';
});
```
Note that this is a client event. _BasicScripts.astro_ defines several other client-side functionality as well as this one.
## Advanced Slot Usage
_slots_ are part of the component implementation, which is a common concept among many frameworks, including _Astrojs_. The typical slot definition in a component looks like this:
```astro
---
// (file: MyComponent.astro)
const { title } = Astro.props;
export interface Props {
title: string;
}
---
<div>
<h2>{title}</h2>
<slot />
<!-- slot contents injected here -->
<div></div>
</div>
```
And in usage elsewhere:
```astro
import MyComponent from "~/components/MyComponent"; ...
<MyComponent someArg="A Slot example">
<p>This content will be displayed in the slot</p>
</MyComponent>
```
### Alternate usage
There's another way we can use slots, useful particularly when a component can have markdown content is as follows (study carefully...):
```astro
---
// (file: MyComponent.astro)
const { title } = Astro.props;
export interface Props {
title: string;
}
const content: string = await Astro.props.render('default');
---
// renders the html to the 'content' variable
<div>
<h2>{title}</h2>
<div set:html={content} />
<!-- slot contents injected here -->
<div></div>
</div>
```
Whoa!! What's going on here?
Notice there is no slot definition in the html portion of the component. Instead, what we do is have _Astro_ render the slot content (here, the 'default' content, but you can also render named slots) into a variable, and then use that content in a _div_ (for instance).
So, if the usage is in a markdown file, like so:
```mdx
import MyComponent from '../../components/MyComponent';
# Using the above component in a .mdx file (that can take components)
{' '}
<MyComponent title="This is a slot implementor">### Here is some markdown content - With a bullet item.</MyComponent>
```
_MyComponent_ renders the markdown to html and then injects it into the div.
This actually has a big advantage -- consider that with the normal usage you don't have access to the slot contents: _Astro_ just plops the content into the _&lt;slot/&gt;_ tag. Using this method, however, allows you to access the content and further manipulate it before it gets inserted into the html.
This allows a great deal of flexibility in component design.
### Yet Another Step
Now, we get to the techniques used in _AstroWind_, we'll use the _pages/index.astro_ file to illustrate.
You'll note that the index file imports a lot of components, each one roughly analogous to a panel in the index page. Each of these components, in turn, is instantiated sequentially throughout the page. But, you'll notice that some of them use this kind of construct (we'll use the last section, _CallToAction_, as it is most illustrative of the technique):
```astro
<CallToAction
callToAction={{
text: 'Get template',
href: 'https://github.com/onwidget/astrowind',
icon: 'tabler:download',
}}
>
<Fragment slot="title">
Astro + <br class="block sm:hidden" /><span class="sm:whitespace-nowrap">Tailwind CSS</span>
</Fragment>
<Fragment slot="subtitle">
Be very surprised by these huge fake numbers you are seeing on this page. <br class="hidden md:inline" />Don't waste
more time! :P
</Fragment>
</CallToAction>
```
Some things to note, here:
<DListItem dt="The <em>callToAction</em> argument">
This argument is actually being passed a javascript object -- not a string. (However, in the TS definition, it could
be a string...)
</DListItem>
<DListItem dt="There are several <em>Fragment</em> children">
Furthermore, these &lt;Fragment/&gt; elements each have a _slot="(value)"_ specifier.
</DListItem>
The latter seems odd, because &lt;Fragment/&gt; is a built-in component over which you have no control, and doesn't have a provision for rendering slots, <em>per se</em>.
The answer lies in a paragraph in the _Astro_ docs, slots section, which states:
> Use a `slot="my-slot"` attribute on the child element that you want to pass through to a matching slot `name="my-slot" />` placeholder in your component.
That's pretty concise and a bit of a head-scratcher to read, but basically what it says is that:
1. Given a component that defines a slot:
1. you can reference a slot from a child element of that component and,
1. provide content to the parent component's slot from the child by naming the slot in the child with a `slot="<slot-name>"` property assignment, where the _slot-name_ is the parent's slot.
So, in the example above, the _CallToAction_ component defines the _subtitle_ slot, and the following _&lt;Fragment slot="subtitle"&gt;_ populates the slot with the following content:
```astro
<Fragment slot="subtitle">
Be very surprised by these huge fake numbers you are seeing on this page. <br class="hidden md:inline" />Don't waste
more time! :P
</Fragment>
```
And, the _CallToAction_ component defines and renders it thusly:
```astro
---
//...
const { subtitle = await Astro.slots.render('subtitle') } = Astro.props;
---
//...
{subtitle && <p class="text-xl text-muted dark:text-slate-400" set:html={subtitle} />}
//...
```
There's a lot to wrap your head around, here.
Notice first that _subtitle_ is defined as a prop/argument, but it's being processed as a slot. Interestingly, prop args and slots seem to be somewhat interchangeable: if the subtitle was just a string, it would simply take that assignment. The main difference is that if you render them independently, you have to call the render with an _await_ modifier.
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed euismod est et nunc consectetur, id tempus nibh euismod.

View File

@@ -23,7 +23,7 @@ const { metadata } = Astro.props;
actions={[
{
text: 'Download',
href: 'https://github.com/onwidget/astrowind',
href: 'https://github.com/arthelokyo/astrowind',
},
]}
showToggleTheme

View File

@@ -115,7 +115,7 @@ export const headerData = {
href: '#',
},
],
actions: [{ text: 'Download', href: 'https://github.com/onwidget/astrowind', target: '_blank' }],
actions: [{ text: 'Download', href: 'https://github.com/arthelokyo/astrowind', target: '_blank' }],
};
export const footerData = {
@@ -174,9 +174,9 @@ export const footerData = {
{ ariaLabel: 'Instagram', icon: 'tabler:brand-instagram', href: '#' },
{ ariaLabel: 'Facebook', icon: 'tabler:brand-facebook', href: '#' },
{ ariaLabel: 'RSS', icon: 'tabler:rss', href: getAsset('/rss.xml') },
{ ariaLabel: 'Github', icon: 'tabler:brand-github', href: 'https://github.com/onwidget/astrowind' },
{ ariaLabel: 'Github', icon: 'tabler:brand-github', href: 'https://github.com/arthelokyo/astrowind' },
],
footNote: `
Made by <a class="text-blue-600 underline dark:text-muted" href="https://github.com/onwidget"> onWidget</a> · All rights reserved.
Made by <a class="text-blue-600 underline dark:text-muted" href="https://github.com/arthelokyo"> Arthelokyo</a> · All rights reserved.
`,
};

View File

@@ -15,10 +15,10 @@ import Button from '~/components/ui/Button.astro';
import Image from '~/components/common/Image.astro';
const appStoreImg = '~/assets/images/app-store.png';
const appStoreDownloadLink = 'https://github.com/onwidget/astrowind';
const appStoreDownloadLink = 'https://github.com/arthelokyo/astrowind';
const googlePlayImg = '~/assets/images/google-play.png';
const googlePlayDownloadLink = 'https://github.com/onwidget/astrowind';
const googlePlayDownloadLink = 'https://github.com/arthelokyo/astrowind';
const metadata = {
title: 'Mobile App Homepage',
@@ -240,7 +240,7 @@ const metadata = {
callToAction={{
target: '_blank',
text: 'Read more testimonials',
href: 'https://github.com/onwidget/astrowind',
href: 'https://github.com/arthelokyo/astrowind',
icon: 'tabler:chevron-right',
}}
/>

View File

@@ -26,7 +26,7 @@ const metadata = {
{ text: 'Resume', href: '#resume' },
{ text: 'Porfolio', href: '#porfolio' },
{ text: 'Blog', href: '#blog' },
{ text: 'Github', href: 'https://github.com/onwidget' },
{ text: 'Github', href: 'https://github.com/arthelokyo' },
]}
actions={[
{

View File

@@ -42,7 +42,7 @@ const metadata = {
<Hero2
tagline="SaaS Web Demo"
actions={[
{ variant: 'primary', target: '_blank', text: 'Get Started', href: 'https://github.com/onwidget/astrowind' },
{ variant: 'primary', target: '_blank', text: 'Get Started', href: 'https://github.com/arthelokyo/astrowind' },
{ text: 'Learn more', href: '#features' },
]}
image={{
@@ -51,9 +51,8 @@ const metadata = {
}}
>
<Fragment slot="title">
Simplify web design with Astrowind: <br /> your ultimate <span class="text-accent dark:text-white"
>SaaS</span
> companion<br />
Simplify web design with Astrowind: <br /> your ultimate <span class="text-accent dark:text-white">SaaS</span> companion<br
/>
</Fragment>
<Fragment slot="subtitle">

View File

@@ -28,7 +28,7 @@ const metadata = {
variant: 'primary',
target: '_blank',
text: 'Get templates',
href: 'https://github.com/onwidget/astrowind',
href: 'https://github.com/arthelokyo/astrowind',
icon: 'tabler:download',
},
{ text: 'Learn more', href: '#features' },
@@ -302,7 +302,7 @@ const metadata = {
variant: 'primary',
target: '_blank',
text: 'Get templates',
href: 'https://github.com/onwidget/astrowind',
href: 'https://github.com/arthelokyo/astrowind',
icon: 'tabler:download',
},
]}

View File

@@ -26,7 +26,7 @@ const metadata = {
{
variant: 'primary',
text: 'Get template',
href: 'https://github.com/onwidget/astrowind',
href: 'https://github.com/arthelokyo/astrowind',
target: '_blank',
icon: 'tabler:download',
},
@@ -381,7 +381,7 @@ const metadata = {
{
variant: 'primary',
text: 'Get template',
href: 'https://github.com/onwidget/astrowind',
href: 'https://github.com/arthelokyo/astrowind',
target: '_blank',
icon: 'tabler:download',
},

View File

@@ -33,7 +33,7 @@ const metadata = {
{
variant: 'primary',
text: 'Download Template',
href: 'https://github.com/onwidget/astrowind',
href: 'https://github.com/arthelokyo/astrowind',
icon: 'tabler:download',
},
]}

View File

@@ -33,7 +33,7 @@ const metadata = {
{
variant: 'primary',
text: 'Download Template',
href: 'https://github.com/onwidget/astrowind',
href: 'https://github.com/arthelokyo/astrowind',
icon: 'tabler:download',
},
]}

View File

@@ -33,7 +33,7 @@ const metadata = {
{
variant: 'primary',
text: 'Download Template',
href: 'https://github.com/onwidget/astrowind',
href: 'https://github.com/arthelokyo/astrowind',
icon: 'tabler:download',
},
]}

View File

@@ -33,7 +33,7 @@ const metadata = {
{
variant: 'primary',
text: 'Download Template',
href: 'https://github.com/onwidget/astrowind',
href: 'https://github.com/arthelokyo/astrowind',
icon: 'tabler:download',
},
]}

View File

@@ -33,7 +33,7 @@ const metadata = {
{
variant: 'primary',
text: 'Download Template',
href: 'https://github.com/onwidget/astrowind',
href: 'https://github.com/arthelokyo/astrowind',
icon: 'tabler:download',
},
]}

View File

@@ -33,7 +33,7 @@ const metadata = {
{
variant: 'primary',
text: 'Download Template',
href: 'https://github.com/onwidget/astrowind',
href: 'https://github.com/arthelokyo/astrowind',
icon: 'tabler:download',
},
]}

View File

@@ -203,7 +203,7 @@ const metadata = {
callToAction={{
target: '_blank',
text: 'More testimonials...',
href: 'https://github.com/onwidget/astrowind',
href: 'https://github.com/arthelokyo/astrowind',
icon: 'tabler:chevron-right',
}}
/>

View File

@@ -1,6 +1,9 @@
import { isUnpicCompatible, unpicOptimizer, astroAssetsOptimizer } from './images-optimization';
import type { ImageMetadata } from 'astro';
import type { OpenGraph } from '@astrolib/seo';
import type { ImagesOptimizer } from './images-optimization';
/** The optimized image shape returned by our ImagesOptimizer */
type OptimizedImage = Awaited<ReturnType<ImagesOptimizer>>[0];
const load = async function () {
let images: Record<string, () => Promise<unknown>> | undefined = undefined;
@@ -71,7 +74,7 @@ export const adaptOpenGraphImages = async (
};
}
let _image;
let _image: OptimizedImage | undefined;
if (
typeof resolvedImage === 'string' &&
@@ -84,9 +87,7 @@ export const adaptOpenGraphImages = async (
typeof resolvedImage !== 'string' && resolvedImage?.width <= defaultWidth
? [resolvedImage?.width, resolvedImage?.height]
: [defaultWidth, defaultHeight];
_image = (
await astroAssetsOptimizer(resolvedImage, [dimensions[0]], dimensions[0], dimensions[1], 'jpg')
)[0];
_image = (await astroAssetsOptimizer(resolvedImage, [dimensions[0]], dimensions[0], dimensions[1], 'jpg'))[0];
}
if (typeof _image === 'object') {