Skip to content

Commit

Permalink
chore: update nav and header
Browse files Browse the repository at this point in the history
  • Loading branch information
cvgellhorn committed Jul 8, 2024
1 parent 6e54e30 commit 8e0eee0
Show file tree
Hide file tree
Showing 9 changed files with 96 additions and 89 deletions.
2 changes: 1 addition & 1 deletion src/components/widgets/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ const currentPath = `/${trimSlash(new URL(Astro.url).pathname)}`;
>
<div class="items-center flex justify-between w-full md:w-auto">
<div class="flex">
{showToggleTheme && <ToggleTheme iconClass="w-6 h-6 md:w-5 md:h-5 md:inline-block" />}
{
showRssFeed && (
<a
Expand All @@ -148,6 +147,7 @@ const currentPath = `/${trimSlash(new URL(Astro.url).pathname)}`;
</a>
)
}
{showToggleTheme && <ToggleTheme iconClass="w-6 h-6 md:w-5 md:h-5 md:inline-block" />}
</div>
{
actions?.length ? (
Expand Down
2 changes: 1 addition & 1 deletion src/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ site:
metadata:
title:
default: Sturmfrei Pty Ltd
template: '%s Sturmfrei'
template: '%s · Sturmfrei'
description: "\U0001F680 Delightful apps and tools for the web."
robots:
index: true
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/PageLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const { metadata } = Astro.props;
<Announcement />
</slot> -->
<slot name="header">
<Header {...headerData} isSticky showRssFeed showToggleTheme />
<Header {...headerData} isSticky showRssFeed={metadata?.showRssFeed} showToggleTheme />
</slot>
<main>
<slot />
Expand Down
174 changes: 88 additions & 86 deletions src/navigation.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { getPermalink, getAsset, getBlogPermalink } from './utils/permalinks';
import { getPermalink, getBlogPermalink } from './utils/permalinks';

export const headerData = {
links: [
{
text: 'Homes',
text: 'Products',
links: [
{
text: 'SaaS',
Expand All @@ -23,92 +23,94 @@ export const headerData = {
},
],
},
// {
// text: 'Pages',
// links: [
// {
// text: 'Features (Anchor Link)',
// href: getPermalink('/#features'),
// },
// {
// text: 'Services',
// href: getPermalink('/services'),
// },
// {
// text: 'Pricing',
// href: getPermalink('/pricing'),
// },
// {
// text: 'About us',
// href: getPermalink('/about'),
// },
// {
// text: 'Contact',
// href: getPermalink('/contact'),
// },
// {
// text: 'Terms',
// href: getPermalink('/terms'),
// },
// {
// text: 'Privacy policy',
// href: getPermalink('/privacy'),
// },
// ],
// },
{
text: 'Pages',
links: [
{
text: 'Features (Anchor Link)',
href: getPermalink('/#features'),
},
{
text: 'Services',
href: getPermalink('/services'),
},
{
text: 'Pricing',
href: getPermalink('/pricing'),
},
{
text: 'About us',
href: getPermalink('/about'),
},
{
text: 'Contact',
href: getPermalink('/contact'),
},
{
text: 'Terms',
href: getPermalink('/terms'),
},
{
text: 'Privacy policy',
href: getPermalink('/privacy'),
},
],
},
{
text: 'Landing',
links: [
{
text: 'Lead Generation',
href: getPermalink('/landing/lead-generation'),
},
{
text: 'Long-form Sales',
href: getPermalink('/landing/sales'),
},
{
text: 'Click-Through',
href: getPermalink('/landing/click-through'),
},
{
text: 'Product Details (or Services)',
href: getPermalink('/landing/product'),
},
{
text: 'Coming Soon or Pre-Launch',
href: getPermalink('/landing/pre-launch'),
},
{
text: 'Subscription',
href: getPermalink('/landing/subscription'),
},
],
text: 'About',
href: getPermalink('/landing/sales'),
// links: [
// {
// text: 'Lead Generation',
// href: getPermalink('/landing/lead-generation'),
// },
// {
// text: 'Long-form Sales',
// href: getPermalink('/landing/sales'),
// },
// {
// text: 'Click-Through',
// href: getPermalink('/landing/click-through'),
// },
// {
// text: 'Product Details (or Services)',
// href: getPermalink('/landing/product'),
// },
// {
// text: 'Coming Soon or Pre-Launch',
// href: getPermalink('/landing/pre-launch'),
// },
// {
// text: 'Subscription',
// href: getPermalink('/landing/subscription'),
// },
// ],
},
{
text: 'Blog',
links: [
{
text: 'Blog List',
href: getBlogPermalink(),
},
{
text: 'Article',
href: getPermalink('get-started-website-with-astro-tailwind-css', 'post'),
},
{
text: 'Article (with MDX)',
href: getPermalink('markdown-elements-demo-post', 'post'),
},
{
text: 'Category Page',
href: getPermalink('tutorials', 'category'),
},
{
text: 'Tag Page',
href: getPermalink('astro', 'tag'),
},
],
href: getBlogPermalink(),
// links: [
// {
// text: 'Blog List',
// href: getBlogPermalink(),
// },
// {
// text: 'Article',
// href: getPermalink('get-started-website-with-astro-tailwind-css', 'post'),
// },
// {
// text: 'Article (with MDX)',
// href: getPermalink('markdown-elements-demo-post', 'post'),
// },
// {
// text: 'Category Page',
// href: getPermalink('tutorials', 'category'),
// },
// {
// text: 'Tag Page',
// href: getPermalink('astro', 'tag'),
// },
// ],
},
],
// actions: [{ text: 'Download', href: 'https://github.com/onwidget/astrowind', target: '_blank' }],
Expand Down Expand Up @@ -169,8 +171,8 @@ export const footerData = {
{ ariaLabel: 'X', icon: 'tabler:brand-x', href: '#' },
{ 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/sturmfreico' },
// { ariaLabel: 'RSS', icon: 'tabler:rss', href: getAsset('/rss.xml') },
],
// footNote: `
// <img 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" src="https://onwidget.com/favicon/favicon-32x32.png" alt="onWidget logo" loading="lazy"></img>
Expand Down
1 change: 1 addition & 0 deletions src/pages/[...blog]/[...page].astro
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const metadata = {
openGraph: {
type: 'blog',
},
showRssFeed: true,
};
---

Expand Down
1 change: 1 addition & 0 deletions src/pages/[...blog]/[category]/[...page].astro
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const metadata = {
index: blogCategoryRobots?.index,
follow: blogCategoryRobots?.follow,
},
showRssFeed: true,
};
---

Expand Down
1 change: 1 addition & 0 deletions src/pages/[...blog]/[tag]/[...page].astro
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const metadata = {
index: blogTagRobots?.index,
follow: blogTagRobots?.follow,
},
showRssFeed: true,
};
---

Expand Down
1 change: 1 addition & 0 deletions src/pages/[...blog]/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const metadata = merge(
? { images: [{ url: image, width: (image as ImageMetadata)?.width, height: (image as ImageMetadata)?.height }] }
: {}),
},
showRssFeed: true,
},
{ ...(post?.metadata ? { ...post.metadata, canonical: post.metadata?.canonical || url } : {}) }
) as MetaData;
Expand Down
1 change: 1 addition & 0 deletions src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export interface MetaData {

openGraph?: MetaDataOpenGraph;
twitter?: MetaDataTwitter;
showRssFeed?: boolean;
}

export interface MetaDataRobots {
Expand Down

0 comments on commit 8e0eee0

Please sign in to comment.