diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..8927e2c --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +# https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = false \ No newline at end of file diff --git a/src/assets/styles/base.css b/src/assets/styles/base.css index 7883b81..8c1c226 100644 --- a/src/assets/styles/base.css +++ b/src/assets/styles/base.css @@ -4,7 +4,7 @@ @layer components { .btn { - @apply inline-flex items-center justify-center rounded-md shadow-md border-gray-400 border bg-transparent font-medium text-center text-base text-gray-700 leading-snug transition py-3.5 px-6 md:px-7 ease-in duration-200 focus:ring-blue-500 focus:ring-offset-blue-200 focus:ring-2 focus:ring-offset-2 hover:bg-gray-100 hover:border-gray-600 dark:text-slate-300 dark:border-slate-500 dark:hover:bg-slate-800 dark:hover:border-slate-800; + @apply inline-flex items-center justify-center rounded-full shadow-md border-gray-400 border bg-transparent font-medium text-center text-base text-gray-700 leading-snug transition py-3.5 px-6 md:px-8 ease-in duration-200 focus:ring-blue-500 focus:ring-offset-blue-200 focus:ring-2 focus:ring-offset-2 hover:bg-gray-100 hover:border-gray-600 dark:text-slate-300 dark:border-slate-500 dark:hover:bg-slate-800 dark:hover:border-slate-800; } .btn-ghost { @@ -12,7 +12,11 @@ } .btn-primary { - @apply font-semibold bg-primary-800 text-white border-primary-800 hover:bg-primary-900 hover:border-primary-900 hover:text-white dark:text-white dark:bg-primary-700 dark:border-primary-700 dark:hover:border-primary-900 dark:hover:bg-primary-900; + @apply font-semibold bg-primary-800 text-white border-primary-800 hover:bg-primary-900 hover:border-primary-900 hover:text-white dark:text-white dark:bg-primary-800 dark:border-primary-800 dark:hover:border-primary-900 dark:hover:bg-primary-900; + } + + .bg-dark { + @apply bg-slate-900; } } diff --git a/src/components/blog/HighlightedPosts.astro b/src/components/blog/HighlightedPosts.astro index bddb1fd..08932dc 100644 --- a/src/components/blog/HighlightedPosts.astro +++ b/src/components/blog/HighlightedPosts.astro @@ -23,7 +23,7 @@ const { const posts = await findPostsByIds(postIds); --- -
+
{ diff --git a/src/components/common/ToggleTheme.astro b/src/components/common/ToggleTheme.astro index 3ab33d8..a49986e 100644 --- a/src/components/common/ToggleTheme.astro +++ b/src/components/common/ToggleTheme.astro @@ -1,6 +1,8 @@ --- import { Icon } from 'astro-icon'; +import { SITE } from '~/config.mjs'; + export interface Props { label?: string; class?: string; @@ -17,6 +19,10 @@ const { } = Astro.props; --- - +{ + !(SITE?.defaultTheme && SITE.defaultTheme.endsWith(':only')) && ( + + ) +} diff --git a/src/components/widgets/Content.astro b/src/components/widgets/Content.astro index 8dc0fba..009ad68 100644 --- a/src/components/widgets/Content.astro +++ b/src/components/widgets/Content.astro @@ -56,7 +56,7 @@ const { ) }
-
+
{content &&
} @@ -67,7 +67,7 @@ const { {items.map(({ title: title2, description, icon }) => (
-
+
diff --git a/src/components/widgets/Features2.astro b/src/components/widgets/Features2.astro index 23505af..ec521a9 100644 --- a/src/components/widgets/Features2.astro +++ b/src/components/widgets/Features2.astro @@ -24,7 +24,7 @@ const {
-
+
{ (title || subtitle || highlight) && ( diff --git a/src/components/widgets/Footer.astro b/src/components/widgets/Footer.astro index a968c27..b3ef413 100644 --- a/src/components/widgets/Footer.astro +++ b/src/components/widgets/Footer.astro @@ -1,94 +1,65 @@ --- import { Icon } from 'astro-icon'; -import { getHomePermalink, getPermalink, getAsset } from '~/utils/permalinks'; +import { SITE } from '~/config.mjs'; +import { getHomePermalink } from '~/utils/permalinks'; -const links = [ - { - title: 'Product', - items: [ - { title: 'Features', href: '#' }, - { title: 'Security', href: '#' }, - { title: 'Team', href: '#' }, - { title: 'Enterprise', href: '#' }, - { title: 'Customer stories', href: '#' }, - { title: 'Pricing', href: '#' }, - { title: 'Resources', href: '#' }, - ], - }, - { - title: 'Platform', - items: [ - { title: 'Developer API', href: '#' }, - { title: 'Partners', href: '#' }, - { title: 'Atom', href: '#' }, - { title: 'Electron', href: '#' }, - { title: 'AstroWind Desktop', href: '#' }, - ], - }, - { - title: 'Support', - items: [ - { title: 'Docs', href: '#' }, - { title: 'Community Forum', href: '#' }, - { title: 'Professional Services', href: '#' }, - { title: 'Skills', href: '#' }, - { title: 'Status', href: '#' }, - ], - }, - { - title: 'Company', - items: [ - { title: 'About', href: '#' }, - { title: 'Blog', href: '#' }, - { title: 'Careers', href: '#' }, - { title: 'Press', href: '#' }, - { title: 'Inclusion', href: '#' }, - { title: 'Social Impact', href: '#' }, - { title: 'Shop', href: '#' }, - ], - }, -]; +interface Link { + text?: string; + href?: string; + ariaLabel?: string; + icon?: string; +} -const social = [ - { label: 'Twitter', icon: 'tabler:brand-twitter', href: '#' }, - { label: 'Instagram', icon: 'tabler:brand-instagram', href: '#' }, - { label: 'Facebook', icon: 'tabler:brand-facebook', href: '#' }, - { label: 'RSS', icon: 'tabler:rss', href: getAsset('/rss.xml') }, - { label: 'Github', icon: 'tabler:brand-github', href: 'https://github.com/onwidget/astrowind' }, -]; +interface Links { + title?: string; + links: Array; +} + +export interface Props { + links: Array; + secondaryLinks: Array; + socialLinks: Array; + footNote?: string; + theme?: string; +} + +const { socialLinks = [], secondaryLinks = [], links = [], footNote = '', theme = 'light' } = Astro.props; --- -