mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-14 00:32:35 +10:00
feat(client): add product hunt announcement banner
This commit is contained in:
7
client/components/shared/Announcement.module.scss
Normal file
7
client/components/shared/Announcement.module.scss
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
.container {
|
||||||
|
@apply z-10 fixed top-0 left-0 right-0;
|
||||||
|
|
||||||
|
strong {
|
||||||
|
@apply font-semibold;
|
||||||
|
}
|
||||||
|
}
|
||||||
26
client/components/shared/Announcement.tsx
Normal file
26
client/components/shared/Announcement.tsx
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
import { AnnouncementOutlined } from '@mui/icons-material';
|
||||||
|
import { Alert, Collapse } from '@mui/material';
|
||||||
|
import { useState } from 'react';
|
||||||
|
|
||||||
|
import { PRODUCT_HUNT_URL } from '@/constants/index';
|
||||||
|
|
||||||
|
import styles from './Announcement.module.scss';
|
||||||
|
|
||||||
|
const Announcement = () => {
|
||||||
|
const [open, setOpen] = useState(true);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={styles.container}>
|
||||||
|
<Collapse in={open}>
|
||||||
|
<Alert icon={<AnnouncementOutlined />} severity="info" onClose={() => setOpen(false)}>
|
||||||
|
<a href={PRODUCT_HUNT_URL} target="_blank" rel="noreferrer">
|
||||||
|
<strong>Reactive Resume is featured on Product Hunt.</strong> If you liked this app, please show your
|
||||||
|
support by <strong>upvoting</strong>!
|
||||||
|
</a>
|
||||||
|
</Alert>
|
||||||
|
</Collapse>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Announcement;
|
||||||
@ -11,4 +11,5 @@ export const FILENAME_TIMESTAMP = 'DDMMYYYYHHmmss';
|
|||||||
// Links
|
// Links
|
||||||
export const DONATION_URL = 'https://www.buymeacoffee.com/AmruthPillai';
|
export const DONATION_URL = 'https://www.buymeacoffee.com/AmruthPillai';
|
||||||
export const GITHUB_URL = 'https://github.com/AmruthPillai/Reactive-Resume';
|
export const GITHUB_URL = 'https://github.com/AmruthPillai/Reactive-Resume';
|
||||||
|
export const PRODUCT_HUNT_URL = 'https://www.producthunt.com/posts/reactive-resume-v3';
|
||||||
export const GITHUB_ISSUES_URL = 'https://github.com/AmruthPillai/Reactive-Resume/issues/new/choose';
|
export const GITHUB_ISSUES_URL = 'https://github.com/AmruthPillai/Reactive-Resume/issues/new/choose';
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import { Trans, useTranslation } from 'next-i18next';
|
|||||||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
|
import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
|
||||||
|
|
||||||
import Testimony from '@/components/landing/Testimony';
|
import Testimony from '@/components/landing/Testimony';
|
||||||
|
import Announcement from '@/components/shared/Announcement';
|
||||||
import Footer from '@/components/shared/Footer';
|
import Footer from '@/components/shared/Footer';
|
||||||
import LanguageSwitcher from '@/components/shared/LanguageSwitcher';
|
import LanguageSwitcher from '@/components/shared/LanguageSwitcher';
|
||||||
import Logo from '@/components/shared/Logo';
|
import Logo from '@/components/shared/Logo';
|
||||||
@ -44,6 +45,8 @@ const Home: NextPage = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<main className={styles.container}>
|
<main className={styles.container}>
|
||||||
|
<Announcement />
|
||||||
|
|
||||||
<div className={styles.header}>
|
<div className={styles.header}>
|
||||||
<div className={styles.logo}>
|
<div className={styles.logo}>
|
||||||
<Logo size={256} />
|
<Logo size={256} />
|
||||||
|
|||||||
Reference in New Issue
Block a user