Merge branch 'main' of https://github.com/widgeter/astrowind
This commit is contained in:
11
.vscode/astrowind/config-schema.json
vendored
11
.vscode/astrowind/config-schema.json
vendored
@ -239,14 +239,15 @@
|
|||||||
"googleAnalytics": {
|
"googleAnalytics": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"isEnabled": {
|
|
||||||
"type": "boolean"
|
|
||||||
},
|
|
||||||
"id": {
|
"id": {
|
||||||
"type": "null"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"partytown": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": ["isEnabled", "id"]
|
"required": ["id"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": ["googleAnalytics"]
|
"required": ["googleAnalytics"]
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- ✅ Integration with **Tailwind CSS** ([@astrojs/tailwind](https://docs.astro.build/en/guides/integrations-guide/tailwind/)) supporting **Dark mode**.
|
- ✅ Integration with **Tailwind CSS** ([@astrojs/tailwind](https://docs.astro.build/en/guides/integrations-guide/tailwind/)) supporting **Dark mode** and ***RTL***.
|
||||||
- ✅ **Production-ready** scores in [Lighthouse](https://web.dev/measure/) and [PageSpeed Insights](https://pagespeed.web.dev/) reports.
|
- ✅ **Production-ready** scores in [Lighthouse](https://web.dev/measure/) and [PageSpeed Insights](https://pagespeed.web.dev/) reports.
|
||||||
- ✅ **Fast and SEO friendly blog** with automatic **RSS feed** ([@astrojs/rss](https://docs.astro.build/en/guides/rss/)), [**MDX** support](https://docs.astro.build/en/guides/integrations-guide/mdx/), **Categories & Tags**, **Social Share**, ...
|
- ✅ **Fast and SEO friendly blog** with automatic **RSS feed** ([@astrojs/rss](https://docs.astro.build/en/guides/rss/)), [**MDX** support](https://docs.astro.build/en/guides/integrations-guide/mdx/), **Categories & Tags**, **Social Share**, ...
|
||||||
- ✅ **Image optimization** ([@astrojs/images](https://docs.astro.build/en/guides/integrations-guide/image/)) and **Font optimization**.
|
- ✅ **Image optimization** ([@astrojs/images](https://docs.astro.build/en/guides/integrations-guide/image/)) and **Font optimization**.
|
||||||
@ -213,7 +213,6 @@ apps:
|
|||||||
analytics:
|
analytics:
|
||||||
vendors:
|
vendors:
|
||||||
googleAnalytics:
|
googleAnalytics:
|
||||||
isEnabled: false
|
|
||||||
id: null # or "G-XXXXXXXXXX"
|
id: null # or "G-XXXXXXXXXX"
|
||||||
|
|
||||||
ui:
|
ui:
|
||||||
|
@ -17,7 +17,7 @@ import { SITE_CONFIG, ANALYTICS_CONFIG } from './src/utils/config.ts';
|
|||||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||||
|
|
||||||
const whenExternalScripts = (items = []) =>
|
const whenExternalScripts = (items = []) =>
|
||||||
ANALYTICS_CONFIG.vendors.googleAnalytics.isEnabled
|
ANALYTICS_CONFIG.vendors.googleAnalytics.id && ANALYTICS_CONFIG.vendors.googleAnalytics.partytown
|
||||||
? Array.isArray(items)
|
? Array.isArray(items)
|
||||||
? items.map((item) => item())
|
? items.map((item) => item())
|
||||||
: [items()]
|
: [items()]
|
||||||
@ -33,7 +33,7 @@ export default defineConfig({
|
|||||||
|
|
||||||
integrations: [
|
integrations: [
|
||||||
tailwind({
|
tailwind({
|
||||||
applyBaseStyles: false
|
applyBaseStyles: false,
|
||||||
}),
|
}),
|
||||||
sitemap(),
|
sitemap(),
|
||||||
image({
|
image({
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
"@types/lodash.merge": "^4.6.7",
|
"@types/lodash.merge": "^4.6.7",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.3.0",
|
"@typescript-eslint/eslint-plugin": "^6.3.0",
|
||||||
"@typescript-eslint/parser": "^6.3.0",
|
"@typescript-eslint/parser": "^6.3.0",
|
||||||
"astro": "^2.10.3",
|
"astro": "^2.10.5",
|
||||||
"astro-icon": "^1.0.0-next.2",
|
"astro-icon": "^1.0.0-next.2",
|
||||||
"eslint": "^8.46.0",
|
"eslint": "^8.46.0",
|
||||||
"eslint-plugin-astro": "^0.28.0",
|
"eslint-plugin-astro": "^0.28.0",
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
import { SITE_CONFIG } from '~/utils/config';
|
import { SITE_CONFIG } from '~/utils/config';
|
||||||
---
|
---
|
||||||
|
|
||||||
<span class="self-center ml-2 text-2xl md:text-xl font-bold text-gray-900 whitespace-nowrap dark:text-white">
|
<span class="self-center ml-2 rtl:ml-0 rtl:mr-2 text-2xl md:text-xl font-bold text-gray-900 whitespace-nowrap dark:text-white">
|
||||||
🚀 {SITE_CONFIG?.name}
|
🚀 {SITE_CONFIG?.name}
|
||||||
</span>
|
</span>
|
||||||
|
@ -47,7 +47,7 @@ const link = APP_BLOG_CONFIG?.post?.isEnabled ? getPermalink(post.permalink, 'po
|
|||||||
<div class="mb-1">
|
<div class="mb-1">
|
||||||
<span class="text-sm">
|
<span class="text-sm">
|
||||||
<Icon name="tabler:clock" class="w-3.5 h-3.5 inline-block -mt-0.5 dark:text-gray-400" />
|
<Icon name="tabler:clock" class="w-3.5 h-3.5 inline-block -mt-0.5 dark:text-gray-400" />
|
||||||
<time datetime={String(post.publishDate)}>{getFormattedDate(post.publishDate)}</time>
|
<time datetime={String(post.publishDate)} class="inline-block">{getFormattedDate(post.publishDate)}</time>
|
||||||
{
|
{
|
||||||
post.category && (
|
post.category && (
|
||||||
<>
|
<>
|
||||||
|
@ -25,13 +25,13 @@ const Content = post?.Content || null;
|
|||||||
<div class="flex justify-between flex-col sm:flex-row max-w-3xl mx-auto mt-0 mb-2 px-4 sm:px-6 sm:items-center">
|
<div class="flex justify-between flex-col sm:flex-row max-w-3xl mx-auto mt-0 mb-2 px-4 sm:px-6 sm:items-center">
|
||||||
<p>
|
<p>
|
||||||
<Icon name="tabler:clock" class="w-4 h-4 inline-block -mt-0.5 dark:text-gray-400" />
|
<Icon name="tabler:clock" class="w-4 h-4 inline-block -mt-0.5 dark:text-gray-400" />
|
||||||
<time datetime={String(post.publishDate)}>{getFormattedDate(post.publishDate)}</time>
|
<time datetime={String(post.publishDate)} class="inline-block">{getFormattedDate(post.publishDate)}</time>
|
||||||
{
|
{
|
||||||
post.category && (
|
post.category && (
|
||||||
<>
|
<>
|
||||||
{' '}
|
{' '}
|
||||||
·{' '}
|
·{' '}
|
||||||
<a class="capitalize hover:underline" href={getPermalink(post.category, 'category')}>
|
<a class="capitalize hover:underline inline-block" href={getPermalink(post.category, 'category')}>
|
||||||
{post.category.replaceAll('-', ' ')}
|
{post.category.replaceAll('-', ' ')}
|
||||||
</a>
|
</a>
|
||||||
</>
|
</>
|
||||||
@ -86,7 +86,7 @@ const Content = post?.Content || null;
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div class="mx-auto px-6 sm:px-6 max-w-3xl mt-8 flex justify-between flex-col sm:flex-row">
|
<div class="mx-auto px-6 sm:px-6 max-w-3xl mt-8 flex justify-between flex-col sm:flex-row">
|
||||||
<PostTags tags={post.tags} class="mr-5" />
|
<PostTags tags={post.tags} class="mr-5 rtl:mr-0 rtl:ml-5" />
|
||||||
<SocialShare url={url} text={post.title} class="mt-5 sm:mt-1 align-middle text-gray-500 dark:text-slate-600" />
|
<SocialShare url={url} text={post.title} class="mt-5 sm:mt-1 align-middle text-gray-500 dark:text-slate-600" />
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
|
@ -22,7 +22,7 @@ const { tags, class: className = 'text-sm', title = undefined, isCategory = fals
|
|||||||
</>
|
</>
|
||||||
<ul class={className}>
|
<ul class={className}>
|
||||||
{tags.map((tag) => (
|
{tags.map((tag) => (
|
||||||
<li class="bg-gray-100 dark:bg-slate-700 inline-block mr-2 mb-2 py-0.5 px-2 lowercase font-medium">
|
<li class="bg-gray-100 dark:bg-slate-700 inline-block mr-2 rtl:mr-0 rtl:ml-2 mb-2 py-0.5 px-2 lowercase font-medium">
|
||||||
{!APP_BLOG_CONFIG?.tag?.isEnabled ? (
|
{!APP_BLOG_CONFIG?.tag?.isEnabled ? (
|
||||||
tag
|
tag
|
||||||
) : (
|
) : (
|
||||||
|
@ -1,10 +1,17 @@
|
|||||||
---
|
---
|
||||||
import { Icon } from 'astro-icon/components';
|
import { Icon } from 'astro-icon/components';
|
||||||
import { getBlogPermalink } from '~/utils/permalinks';
|
import { getBlogPermalink } from '~/utils/permalinks';
|
||||||
|
import { I18N_CONFIG } from '~/utils/config';
|
||||||
|
|
||||||
|
const { textDirection } = I18N_CONFIG;
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="mx-auto px-6 sm:px-6 max-w-3xl pt-8 md:pt-4 pb-12 md:pb-20">
|
<div class="mx-auto px-6 sm:px-6 max-w-3xl pt-8 md:pt-4 pb-12 md:pb-20">
|
||||||
<a class="btn btn-ghost px-3 md:px-3" href={getBlogPermalink()}
|
<a class="btn btn-ghost px-3 md:px-3" href={getBlogPermalink()}
|
||||||
><Icon name="tabler:chevron-left" class="w-5 h-5 mr-1 -ml-1.5" /> Back to Blog</a
|
>
|
||||||
|
{textDirection === "rtl" ?
|
||||||
|
<Icon name="tabler:chevron-right" class="w-5 h-5 mr-1 -ml-1.5 rtl:-mr-1.5 rtl:ml-1" />
|
||||||
|
:
|
||||||
|
<Icon name="tabler:chevron-left" class="w-5 h-5 mr-1 -ml-1.5 rtl:-mr-1.5 rtl:ml-1" />} Back to Blog</a
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
---
|
---
|
||||||
import { GoogleAnalytics } from '@astrolib/analytics';
|
import { GoogleAnalytics } from '@astrolib/analytics';
|
||||||
import { ANALYTICS_CONFIG } from "~/utils/config";
|
import { ANALYTICS_CONFIG } from '~/utils/config';
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<!-- Google Analytics -->
|
{
|
||||||
{ANALYTICS_CONFIG?.vendors?.googleAnalytics?.isEnabled && <GoogleAnalytics id={String(ANALYTICS_CONFIG.vendors.googleAnalytics)} partytown={true} />}
|
ANALYTICS_CONFIG?.vendors?.googleAnalytics?.id ? (
|
||||||
|
<GoogleAnalytics id={String(ANALYTICS_CONFIG.vendors.googleAnalytics.id)} partytown={ANALYTICS_CONFIG?.vendors?.googleAnalytics?.partytown} />
|
||||||
|
) : null
|
||||||
|
}
|
||||||
|
@ -12,31 +12,31 @@ const { text, url, class: className = 'inline-block' } = Astro.props;
|
|||||||
|
|
||||||
<div class={className}>
|
<div class={className}>
|
||||||
<span class="align-super font-bold text-gray-400 dark:text-slate-400">Share:</span>
|
<span class="align-super font-bold text-gray-400 dark:text-slate-400">Share:</span>
|
||||||
<button class="ml-2" title="Twitter Share" data-aw-social-share="twitter" data-aw-url={url} data-aw-text={text}
|
<button class="ml-2 rtl:ml-0 rtl:mr-2" title="Twitter Share" data-aw-social-share="twitter" data-aw-url={url} data-aw-text={text}
|
||||||
><Icon
|
><Icon
|
||||||
name="ri:twitter-fill"
|
name="ri:twitter-fill"
|
||||||
class="w-6 h-6 text-gray-400 dark:text-slate-500 hover:text-black dark:hover:text-slate-300"
|
class="w-6 h-6 text-gray-400 dark:text-slate-500 hover:text-black dark:hover:text-slate-300"
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
<button class="ml-2" title="Facebook Share" data-aw-social-share="facebook" data-aw-url={url}
|
<button class="ml-2 rtl:ml-0 rtl:mr-2" title="Facebook Share" data-aw-social-share="facebook" data-aw-url={url}
|
||||||
><Icon
|
><Icon
|
||||||
name="ri:facebook-box-fill"
|
name="ri:facebook-box-fill"
|
||||||
class="w-6 h-6 text-gray-400 dark:text-slate-500 hover:text-black dark:hover:text-slate-300"
|
class="w-6 h-6 text-gray-400 dark:text-slate-500 hover:text-black dark:hover:text-slate-300"
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
<button class="ml-2" title="Linkedin Share" data-aw-social-share="linkedin" data-aw-url={url} data-aw-text={text}
|
<button class="ml-2 rtl:ml-0 rtl:mr-2" title="Linkedin Share" data-aw-social-share="linkedin" data-aw-url={url} data-aw-text={text}
|
||||||
><Icon
|
><Icon
|
||||||
name="ri:linkedin-box-fill"
|
name="ri:linkedin-box-fill"
|
||||||
class="w-6 h-6 text-gray-400 dark:text-slate-500 hover:text-black dark:hover:text-slate-300"
|
class="w-6 h-6 text-gray-400 dark:text-slate-500 hover:text-black dark:hover:text-slate-300"
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
<button class="ml-2" title="Whatsapp Share" data-aw-social-share="whatsapp" data-aw-url={url} data-aw-text={text}
|
<button class="ml-2 rtl:ml-0 rtl:mr-2" title="Whatsapp Share" data-aw-social-share="whatsapp" data-aw-url={url} data-aw-text={text}
|
||||||
><Icon
|
><Icon
|
||||||
name="ri:whatsapp-fill"
|
name="ri:whatsapp-fill"
|
||||||
class="w-6 h-6 text-gray-400 dark:text-slate-500 hover:text-black dark:hover:text-slate-300"
|
class="w-6 h-6 text-gray-400 dark:text-slate-500 hover:text-black dark:hover:text-slate-300"
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
<button class="ml-2" title="Email Share" data-aw-social-share="mail" data-aw-url={url} data-aw-text={text}
|
<button class="ml-2 rtl:ml-0 rtl:mr-2" title="Email Share" data-aw-social-share="mail" data-aw-url={url} data-aw-text={text}
|
||||||
><Icon
|
><Icon
|
||||||
name="ri:mail-fill"
|
name="ri:mail-fill"
|
||||||
class="w-6 h-6 text-gray-400 dark:text-slate-500 hover:text-black dark:hover:text-slate-300"
|
class="w-6 h-6 text-gray-400 dark:text-slate-500 hover:text-black dark:hover:text-slate-300"
|
||||||
|
@ -23,14 +23,14 @@ const {
|
|||||||
>
|
>
|
||||||
{text}
|
{text}
|
||||||
{icon && (
|
{icon && (
|
||||||
<Icon name={icon} class="w-5 h-5 ml-1 -mr-1.5 rtl:ml-1 rtl:-mr-1.5" />
|
<Icon name={icon} class="w-5 h-5 ml-1 -mr-1.5 rtl:mr-1 rtl:-ml-1.5" />
|
||||||
)}
|
)}
|
||||||
</a>
|
</a>
|
||||||
) : (
|
) : (
|
||||||
<a class="inline-flex items-center justify-center" href={href}>
|
<a class="inline-flex items-center justify-center" href={href}>
|
||||||
{text}
|
{text}
|
||||||
{icon && (
|
{icon && (
|
||||||
<Icon name={icon} class="w-5 h-5 ml-1 -mr-1.5 rtl:ml-1 rtl:-mr-1.5" />
|
<Icon name={icon} class="w-5 h-5 ml-1 -mr-1.5 rtl:mr-1 rtl:-ml-1.5" />
|
||||||
)}
|
)}
|
||||||
</a>
|
</a>
|
||||||
)
|
)
|
||||||
|
@ -29,7 +29,7 @@ const {
|
|||||||
index = 0
|
index = 0
|
||||||
) => (
|
) => (
|
||||||
<div class={twMerge("flex", panelClass, itemClasses?.panel)}>
|
<div class={twMerge("flex", panelClass, itemClasses?.panel)}>
|
||||||
<div class="flex flex-col items-center mr-4">
|
<div class="flex flex-col items-center mr-4 rtl:mr-0 rtl:ml-4">
|
||||||
<div>
|
<div>
|
||||||
<div class="flex items-center justify-center">
|
<div class="flex items-center justify-center">
|
||||||
{(icon || defaultIcon) && (
|
{(icon || defaultIcon) && (
|
||||||
|
@ -4,14 +4,14 @@
|
|||||||
<div
|
<div
|
||||||
class="text-muted text-sm bg-[#dbeafe] dark:bg-transparent dark:border-b dark:border-slate-800 dark:text-slate-400 hidden md:block overflow-hidden px-3 py-2 relative text-ellipsis whitespace-nowrap"
|
class="text-muted text-sm bg-[#dbeafe] dark:bg-transparent dark:border-b dark:border-slate-800 dark:text-slate-400 hidden md:block overflow-hidden px-3 py-2 relative text-ellipsis whitespace-nowrap"
|
||||||
>
|
>
|
||||||
<span class="dark:bg-slate-700 bg-white/40 dark:text-slate-300 font-semibold px-1 py-0.5 text-xs mr-0.5">NEW</span>
|
<span class="dark:bg-slate-700 bg-white/40 dark:text-slate-300 font-semibold px-1 py-0.5 text-xs mr-0.5 rtl:mr-0 rtl:ml-0.5 inline-block">NEW</span>
|
||||||
<a href="https://astro.build/blog/astro-2100/" class="text-muted hover:underline dark:text-slate-400 font-medium"
|
<a href="https://astro.build/blog/astro-2100/" class="text-muted hover:underline dark:text-slate-400 font-medium"
|
||||||
>Astro 2.10 is released. »</a
|
>Astro 2.10 is released. »</a
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener"
|
rel="noopener"
|
||||||
class="float-right"
|
class="float-right rtl:float-left"
|
||||||
title="If you like AstroWind, give us a star."
|
title="If you like AstroWind, give us a star."
|
||||||
href="https://github.com/onwidget/astrowind"
|
href="https://github.com/onwidget/astrowind"
|
||||||
>
|
>
|
||||||
|
@ -47,7 +47,7 @@ const {
|
|||||||
callToAction.href && (
|
callToAction.href && (
|
||||||
<div class="mt-6 max-w-xs mx-auto">
|
<div class="mt-6 max-w-xs mx-auto">
|
||||||
<a class="btn btn-primary w-full sm:w-auto" href={callToAction.href} target="_blank" rel="noopener">
|
<a class="btn btn-primary w-full sm:w-auto" href={callToAction.href} target="_blank" rel="noopener">
|
||||||
{callToAction.icon && <Icon name={callToAction.icon} class="w-5 h-5 mr-1 -ml-1.5" />}
|
{callToAction.icon && <Icon name={callToAction.icon} class="w-5 h-5 mr-1 -ml-1.5 rtl:-mr-1.5 rtl:ml-1" />}
|
||||||
{callToAction.text}
|
{callToAction.text}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -53,7 +53,7 @@ const {
|
|||||||
<Icon name={icon ? icon : 'tabler:check'} class="w-5 h-5" />
|
<Icon name={icon ? icon : 'tabler:check'} class="w-5 h-5" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ml-4">
|
<div class="ml-4 rtl:ml-0 rtl:mr-4">
|
||||||
{title2 && <h3 class="text-lg font-medium leading-6 dark:text-white">{title2}</h3>}
|
{title2 && <h3 class="text-lg font-medium leading-6 dark:text-white">{title2}</h3>}
|
||||||
{description && <p class="mt-2 text-muted dark:text-slate-400" set:html={description} />}
|
{description && <p class="mt-2 text-muted dark:text-slate-400" set:html={description} />}
|
||||||
</div>
|
</div>
|
||||||
|
@ -38,7 +38,7 @@ const { socialLinks = [], secondaryLinks = [], links = [], footNote = '', theme
|
|||||||
{
|
{
|
||||||
secondaryLinks.map(({ text, href }) => (
|
secondaryLinks.map(({ text, href }) => (
|
||||||
<a
|
<a
|
||||||
class="text-muted hover:text-gray-700 dark:text-gray-400 hover:underline transition duration-150 ease-in-out mr-2"
|
class="text-muted hover:text-gray-700 dark:text-gray-400 hover:underline transition duration-150 ease-in-out mr-2 rtl:mr-0 rtl:ml-2"
|
||||||
href={href}
|
href={href}
|
||||||
set:html={text}
|
set:html={text}
|
||||||
/>
|
/>
|
||||||
@ -72,7 +72,7 @@ const { socialLinks = [], secondaryLinks = [], links = [], footNote = '', theme
|
|||||||
<div class="md:flex md:items-center md:justify-between py-6 md:py-8">
|
<div class="md:flex md:items-center md:justify-between py-6 md:py-8">
|
||||||
{
|
{
|
||||||
socialLinks?.length ? (
|
socialLinks?.length ? (
|
||||||
<ul class="flex mb-4 md:order-1 -ml-2 md:ml-4 md:mb-0">
|
<ul class="flex mb-4 md:order-1 -ml-2 md:ml-4 md:mb-0 rtl:ml-0 rtl:-mr-2 rtl:md:ml-0 rtl:md:mr-4">
|
||||||
{socialLinks.map(({ ariaLabel, href, text, icon }) => (
|
{socialLinks.map(({ ariaLabel, href, text, icon }) => (
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
|
@ -125,7 +125,7 @@ const currentPath = `/${trimSlash(new URL(Astro.url).pathname)}`
|
|||||||
<div
|
<div
|
||||||
class:list={[
|
class:list={[
|
||||||
{ "ml-auto rtl:ml-0 rtl:mr-auto": position === "left" },
|
{ "ml-auto rtl:ml-0 rtl:mr-auto": position === "left" },
|
||||||
"hidden md:self-center flex md:flex items-center md:mb-0 fixed w-full md:w-auto md:static justify-end left-0 bottom-0 p-3 md:p-0",
|
"hidden md:self-center flex md:flex items-center md:mb-0 fixed w-full md:w-auto md:static justify-end left-0 rtl:left-auto rtl:right-0 bottom-0 p-3 md:p-0",
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<div class="items-center flex justify-between w-full md:w-auto">
|
<div class="items-center flex justify-between w-full md:w-auto">
|
||||||
@ -145,7 +145,7 @@ const currentPath = `/${trimSlash(new URL(Astro.url).pathname)}`
|
|||||||
</div>
|
</div>
|
||||||
{
|
{
|
||||||
actions?.length ? (
|
actions?.length ? (
|
||||||
<span class="ml-4 rtl:ml-0 rtl:mr-0">
|
<span class="ml-4 rtl:ml-0 rtl:mr-4">
|
||||||
{actions.map(({ text, href, class: className }) => (
|
{actions.map(({ text, href, class: className }) => (
|
||||||
<a class:list={["btn ml-2 py-2.5 px-5.5 md:px-6 font-semibold shadow-none text-sm", className]} href={href}>
|
<a class:list={["btn ml-2 py-2.5 px-5.5 md:px-6 font-semibold shadow-none text-sm", className]} href={href}>
|
||||||
<Fragment set:html={text} />
|
<Fragment set:html={text} />
|
||||||
|
@ -38,8 +38,7 @@ const {
|
|||||||
<a class="btn btn-primary sm:mb-0 w-full" href={callToAction?.href} target="_blank" rel="noopener">
|
<a class="btn btn-primary sm:mb-0 w-full" href={callToAction?.href} target="_blank" rel="noopener">
|
||||||
{callToAction?.icon && (
|
{callToAction?.icon && (
|
||||||
<>
|
<>
|
||||||
<Icon name={callToAction.icon} class="w-5 h-5 mr-1 -ml-1.5" />
|
<Icon name={callToAction.icon} class="w-5 h-5 mr-1 -ml-1.5 rtl:-mr-1.5 rtl:ml-1" />
|
||||||
|
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{callToAction?.text}
|
{callToAction?.text}
|
||||||
|
@ -50,7 +50,7 @@ const {
|
|||||||
<a class="btn btn-primary sm:mb-0 w-full" href={callToAction?.href} target="_blank" rel="noopener">
|
<a class="btn btn-primary sm:mb-0 w-full" href={callToAction?.href} target="_blank" rel="noopener">
|
||||||
{callToAction?.icon && (
|
{callToAction?.icon && (
|
||||||
<>
|
<>
|
||||||
<Icon name={callToAction.icon} class="w-5 h-5 mr-1 -ml-1.5" />{' '}
|
<Icon name={callToAction.icon} class="w-5 h-5 mr-1 -ml-1.5 rtl:-mr-1.5 rtl:ml-1" />{' '}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{callToAction?.text}
|
{callToAction?.text}
|
||||||
|
@ -24,13 +24,13 @@ const {
|
|||||||
<div class="grid grid-cols-3 gap-4 dark:text-white sm:grid-cols-2 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3">
|
<div class="grid grid-cols-3 gap-4 dark:text-white sm:grid-cols-2 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3">
|
||||||
{
|
{
|
||||||
prices &&
|
prices &&
|
||||||
prices.map(({ title, subtitle, price, period, items, callToAction, hasRibbon = false, ribbonTitle }) => (
|
prices.map(({ title, price, period, items, callToAction, hasRibbon = false, ribbonTitle }) => (
|
||||||
<div class="col-span-3 mx-auto flex w-full sm:col-span-1 md:col-span-1 lg:col-span-1 xl:col-span-1">
|
<div class="col-span-3 mx-auto flex w-full sm:col-span-1 md:col-span-1 lg:col-span-1 xl:col-span-1">
|
||||||
{price && period && (
|
{price && period && (
|
||||||
<div class="rounded-lg backdrop-blur border border-gray-200 dark:border-gray-700 bg-white dark:bg-slate-900 shadow px-6 py-8 flex w-full max-w-sm flex-col justify-between text-center">
|
<div class="rounded-lg backdrop-blur border border-gray-200 dark:border-gray-700 bg-white dark:bg-slate-900 shadow px-6 py-8 flex w-full max-w-sm flex-col justify-between text-center">
|
||||||
{hasRibbon && ribbonTitle && (
|
{hasRibbon && ribbonTitle && (
|
||||||
<div class="absolute right-[-5px] top-[-5px] z-[1] h-[100px] w-[100px] overflow-hidden text-right">
|
<div class="absolute right-[-5px] rtl:right-auto rtl:left-[-5px] top-[-5px] z-[1] h-[100px] w-[100px] overflow-hidden text-right">
|
||||||
<span class="absolute top-[19px] right-[-21px] block w-full rotate-45 bg-green-700 text-center text-[10px] font-bold uppercase leading-5 text-white shadow-[0_3px_10px_-5px_rgba(0,0,0,0.3)] before:absolute before:left-0 before:top-full before:z-[-1] before:border-[3px] before:border-r-transparent before:border-b-transparent before:border-l-green-800 before:border-t-green-800 before:content-[''] after:absolute after:right-0 after:top-full after:z-[-1] after:border-[3px] after:border-l-transparent after:border-b-transparent after:border-r-green-800 after:border-t-green-800 after:content-['']">
|
<span class="absolute top-[19px] right-[-21px] rtl:right-auto rtl:left-[-21px] block w-full rotate-45 rtl:-rotate-45 bg-green-700 text-center text-[10px] font-bold uppercase leading-5 text-white shadow-[0_3px_10px_-5px_rgba(0,0,0,0.3)] before:absolute before:left-0 before:top-full before:z-[-1] before:border-[3px] before:border-r-transparent before:border-b-transparent before:border-l-green-800 before:border-t-green-800 before:content-[''] after:absolute after:right-0 after:top-full after:z-[-1] after:border-[3px] after:border-l-transparent after:border-b-transparent after:border-r-green-800 after:border-t-green-800 after:content-['']">
|
||||||
{ribbonTitle}
|
{ribbonTitle}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -27,7 +27,7 @@ const {
|
|||||||
title={title}
|
title={title}
|
||||||
subtitle={subtitle}
|
subtitle={subtitle}
|
||||||
tagline={tagline}
|
tagline={tagline}
|
||||||
classes={{ container: "text-left", title: "text-3xl lg:text-4xl", ...((classes?.headline as {}) ?? {}) }}
|
classes={{ container: "text-left rtl:text-right", title: "text-3xl lg:text-4xl", ...((classes?.headline as {}) ?? {}) }}
|
||||||
/>
|
/>
|
||||||
<Timeline items={items} classes={classes?.items as {}} />
|
<Timeline items={items} classes={classes?.items as {}} />
|
||||||
</div>
|
</div>
|
||||||
|
@ -27,14 +27,14 @@ const {
|
|||||||
subtitle={subtitle}
|
subtitle={subtitle}
|
||||||
tagline={tagline}
|
tagline={tagline}
|
||||||
classes={{
|
classes={{
|
||||||
container: 'text-center md:text-left mb-4 md:mb-8',
|
container: 'text-center md:text-left rtl:md:text-right mb-4 md:mb-8',
|
||||||
title: 'mb-4 text-3xl lg:text-4xl font-bold font-heading',
|
title: 'mb-4 text-3xl lg:text-4xl font-bold font-heading',
|
||||||
subtitle: 'mb-8 text-xl text-muted dark:text-slate-400',
|
subtitle: 'mb-8 text-xl text-muted dark:text-slate-400',
|
||||||
// ...((classes?.headline as {}) ?? {}),
|
// ...((classes?.headline as {}) ?? {}),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div class="w-full text-center md:text-left">
|
<div class="w-full text-center md:text-left rtl:md:text-right">
|
||||||
{
|
{
|
||||||
typeof callToAction === 'string' ? (
|
typeof callToAction === 'string' ? (
|
||||||
<Fragment set:html={callToAction} />
|
<Fragment set:html={callToAction} />
|
||||||
@ -43,7 +43,7 @@ const {
|
|||||||
callToAction.text &&
|
callToAction.text &&
|
||||||
callToAction.href && (
|
callToAction.href && (
|
||||||
<a class="btn btn-primary mb-12" href={callToAction.href} target="_blank" rel="noopener">
|
<a class="btn btn-primary mb-12" href={callToAction.href} target="_blank" rel="noopener">
|
||||||
{callToAction.icon && <Icon name={callToAction.icon} class="w-5 h-5 mr-1 -ml-1.5" />}
|
{callToAction.icon && <Icon name={callToAction.icon} class="w-5 h-5 mr-1 -ml-1.5 rtl:-mr-1.5 rtl:ml-1" />}
|
||||||
{callToAction.text}
|
{callToAction.text}
|
||||||
</a>
|
</a>
|
||||||
)
|
)
|
||||||
@ -57,12 +57,12 @@ const {
|
|||||||
items && items.length
|
items && items.length
|
||||||
? items.map(({ title: title2, description, icon }, index) => (
|
? items.map(({ title: title2, description, icon }, index) => (
|
||||||
<li class="flex md:-mx-4">
|
<li class="flex md:-mx-4">
|
||||||
<div class="pr-4 sm:pl-4">
|
<div class="pr-4 sm:pl-4 rtl:pr-0 rtl:pl-4 rtl:sm:pl-0 rtl:sm:pr-4">
|
||||||
<span class="flex w-16 h-16 mx-auto items-center justify-center text-2xl font-bold rounded-full bg-blue-100 text-primary">
|
<span class="flex w-16 h-16 mx-auto items-center justify-center text-2xl font-bold rounded-full bg-blue-100 text-primary">
|
||||||
{icon ? <Icon name={icon} class="w-6 h-6 icon-bold" /> : index + 1}
|
{icon ? <Icon name={icon} class="w-6 h-6 icon-bold" /> : index + 1}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="pl-4">
|
<div class="pl-4 rtl:pl-0 rtl:pr-4">
|
||||||
<h3 class="mb-4 text-xl font-semibold font-heading" set:html={title2} />
|
<h3 class="mb-4 text-xl font-semibold font-heading" set:html={title2} />
|
||||||
<p class="text-muted dark:text-gray-400" set:html={description} />
|
<p class="text-muted dark:text-gray-400" set:html={description} />
|
||||||
</div>
|
</div>
|
||||||
|
@ -55,7 +55,7 @@ const {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div class="grow ml-3">
|
<div class="grow ml-3 rtl:ml-0 rtl:mr-3">
|
||||||
{name && <p class="text-base font-semibold">{name}</p>}
|
{name && <p class="text-base font-semibold">{name}</p>}
|
||||||
{job && <p class="text-xs text-muted">{job}</p>}
|
{job && <p class="text-xs text-muted">{job}</p>}
|
||||||
</div>
|
</div>
|
||||||
|
@ -63,7 +63,6 @@ apps:
|
|||||||
analytics:
|
analytics:
|
||||||
vendors:
|
vendors:
|
||||||
googleAnalytics:
|
googleAnalytics:
|
||||||
isEnabled: false
|
|
||||||
id: null # or "G-XXXXXXXXXX"
|
id: null # or "G-XXXXXXXXXX"
|
||||||
|
|
||||||
ui:
|
ui:
|
||||||
|
@ -148,7 +148,7 @@ export const footerData = {
|
|||||||
{ ariaLabel: 'Github', icon: 'tabler:brand-github', href: 'https://github.com/onwidget/astrowind' },
|
{ ariaLabel: 'Github', icon: 'tabler:brand-github', href: 'https://github.com/onwidget/astrowind' },
|
||||||
],
|
],
|
||||||
footNote: `
|
footNote: `
|
||||||
<span class="w-5 h-5 md:w-6 md:h-6 md:-mt-0.5 bg-cover mr-1.5 float-left rounded-sm bg-[url(https://onwidget.com/favicon/favicon-32x32.png)]"></span>
|
<span class="w-5 h-5 md:w-6 md:h-6 md:-mt-0.5 bg-cover mr-1.5 rtl:mr-0 rtl:ml-1.5 float-left rtl:float-right rounded-sm bg-[url(https://onwidget.com/favicon/favicon-32x32.png)]"></span>
|
||||||
Made by <a class="text-blue-600 hover:underline dark:text-gray-200" href="https://onwidget.com/"> onWidget</a> · All rights reserved.
|
Made by <a class="text-blue-600 hover:underline dark:text-gray-200" href="https://onwidget.com/"> onWidget</a> · All rights reserved.
|
||||||
`,
|
`,
|
||||||
};
|
};
|
||||||
|
@ -2,7 +2,7 @@ import fs from 'fs';
|
|||||||
import yaml from 'js-yaml';
|
import yaml from 'js-yaml';
|
||||||
import merge from 'lodash.merge';
|
import merge from 'lodash.merge';
|
||||||
|
|
||||||
import type { MetaSEO } from '~/types';
|
import type { MetaData } from '~/types';
|
||||||
|
|
||||||
export interface SiteConfig {
|
export interface SiteConfig {
|
||||||
name: string;
|
name: string;
|
||||||
@ -11,7 +11,7 @@ export interface SiteConfig {
|
|||||||
trailingSlash?: boolean;
|
trailingSlash?: boolean;
|
||||||
googleSiteVerificationId?: string;
|
googleSiteVerificationId?: string;
|
||||||
}
|
}
|
||||||
export interface MetaDataConfig extends Omit<MetaSEO, 'title'> {
|
export interface MetaDataConfig extends Omit<MetaData, 'title'> {
|
||||||
title?: {
|
title?: {
|
||||||
default: string;
|
default: string;
|
||||||
template: string;
|
template: string;
|
||||||
@ -61,8 +61,8 @@ export interface AppBlogConfig {
|
|||||||
export interface AnalyticsConfig {
|
export interface AnalyticsConfig {
|
||||||
vendors: {
|
vendors: {
|
||||||
googleAnalytics: {
|
googleAnalytics: {
|
||||||
isEnabled?: boolean;
|
|
||||||
id?: string;
|
id?: string;
|
||||||
|
partytown?: boolean;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -187,8 +187,8 @@ const getAnalytics = () => {
|
|||||||
const _default = {
|
const _default = {
|
||||||
vendors: {
|
vendors: {
|
||||||
googleAnalytics: {
|
googleAnalytics: {
|
||||||
isEnabled: false,
|
|
||||||
id: undefined,
|
id: undefined,
|
||||||
|
partytown: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user