Skip to content

Commit

Permalink
Merge pull request #31 from ixartz/demo-banner
Browse files Browse the repository at this point in the history
fix: add demo banner at the top of the landing page
  • Loading branch information
ixartz authored Aug 31, 2024
2 parents 11cb4e5 + 4acaef9 commit 81a0ffc
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
build:
strategy:
matrix:
node-version: [20.x, 22.x]
node-version: [20.x, 22.6]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

name: Build with ${{ matrix.node-version }}
Expand Down
2 changes: 2 additions & 0 deletions src/app/[locale]/(unauth)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { getTranslations, unstable_setRequestLocale } from 'next-intl/server';

import { CTA } from '@/templates/CTA';
import { DemoBanner } from '@/templates/DemoBanner';
import { FAQ } from '@/templates/FAQ';
import { Features } from '@/templates/Features';
import { Footer } from '@/templates/Footer';
Expand All @@ -26,6 +27,7 @@ export default function IndexPage(props: { params: { locale: string } }) {

return (
<>
<DemoBanner />
<Navbar />
<Hero />
<Sponsors />
Expand Down
6 changes: 1 addition & 5 deletions src/components/DemoBadge.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
const DemoBadge = () => (
<div className="fixed bottom-0 right-20 z-10">
<a
href="https://github.com/ixartz/SaaS-Boilerplate"
target="_blank"
rel="noopener noreferrer"
>
<a href="https://react-saas.com" target="_blank" rel="noopener noreferrer">
<div className="rounded-md bg-gray-900 px-3 py-2 font-semibold text-gray-100">
<span className="text-gray-500">Demo of</span> SaaS Boilerplate
</div>
Expand Down
5 changes: 5 additions & 0 deletions src/features/landing/StickyBanner.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export const StickyBanner = (props: { children: React.ReactNode }) => (
<div className="sticky top-0 z-50 bg-primary p-4 text-center text-lg font-semibold text-primary-foreground [&_a:hover]:text-indigo-500 [&_a]:text-fuchsia-500">
{props.children}
</div>
);
10 changes: 10 additions & 0 deletions src/templates/DemoBanner.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import Link from 'next/link';

import { StickyBanner } from '@/features/landing/StickyBanner';

export const DemoBanner = () => (
<StickyBanner>
Live Demo of SaaS Boilerplate -{' '}
<Link href="/sign-up">Explore the User Dashboard</Link>
</StickyBanner>
);

0 comments on commit 81a0ffc

Please sign in to comment.