Skip to content

Commit

Permalink
add hero background image back
Browse files Browse the repository at this point in the history
  • Loading branch information
osamasayed committed Mar 1, 2024
1 parent 5d02ef5 commit 5db0997
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 8 deletions.
1 change: 1 addition & 0 deletions public/icons/learning-plan.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/components/HomePage/HomePageHero.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import dynamic from 'next/dynamic';
import Head from 'next/head';

import styles from './HomePageHero.module.scss';
import QuickLinks from './QuickLinks';
Expand All @@ -10,6 +11,10 @@ const PlayRadioButton = dynamic(() => import('./PlayRadioButton'));
const HomePageHero = () => {
return (
<div className={styles.outerContainer}>
<Head>
<link rel="preload" as="image" href="/images/background.jpg" />
</Head>
<div className={styles.backgroundImage} />
<div data-theme="light">
<PlayRadioButton />
<div className={styles.innerContainer}>
Expand Down
9 changes: 5 additions & 4 deletions src/components/HomePage/PlayRadioButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { StationType } from '../Radio/types';
import styles from './PlayRadioButton.module.scss';
import RadioInformation from './RadioInformation';

import Button, { ButtonType, ButtonSize } from '@/dls/Button/Button';
import Button, { ButtonType, ButtonSize, ButtonVariant } from '@/dls/Button/Button';
import Spinner from '@/dls/Spinner/Spinner';
import PauseIcon from '@/icons/pause.svg';
import PlayIcon from '@/icons/play-arrow.svg';
Expand Down Expand Up @@ -62,7 +62,8 @@ const PlayRadioButton = () => {
<div className={styles.container}>
<Button
href={getCoursesNavigationUrl()}
type={ButtonType.Success}
type={ButtonType.Secondary}
variant={ButtonVariant.Outlined}
size={ButtonSize.Small}
onClick={onCoursesClicked}
className={styles.ctaButton}
Expand All @@ -76,7 +77,7 @@ const PlayRadioButton = () => {
onClick={onPauseClicked}
type={ButtonType.Success}
size={ButtonSize.Small}
className={styles.ctaButton}
className={styles.playPauseButton}
>
{t('pause-radio')}
</Button>
Expand All @@ -87,7 +88,7 @@ const PlayRadioButton = () => {
shouldFlipOnRTL={false}
type={ButtonType.Success}
size={ButtonSize.Small}
className={styles.ctaButton}
className={styles.playPauseButton}
>
{t('play-radio')}
</Button>
Expand Down
5 changes: 3 additions & 2 deletions src/components/HomePage/QuickLinks/QuickLink.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';

import Button, { ButtonShape, ButtonSize, ButtonType } from '@/dls/Button/Button';
import Button, { ButtonShape, ButtonSize, ButtonType, ButtonVariant } from '@/dls/Button/Button';
import { logButtonClick } from '@/utils/eventLogger';

interface Props {
Expand All @@ -16,7 +16,8 @@ const QuickLink: React.FC<Props> = ({ text, slug, className, logKey, isExternalL
size={ButtonSize.Small}
className={className}
href={isExternalLink ? slug : `/${slug}`}
type={ButtonType.Success}
type={ButtonType.Secondary}
variant={ButtonVariant.Compact}
shape={ButtonShape.Pill}
onClick={() => {
logButtonClick(`quick_link_${logKey}`);
Expand Down
1 change: 1 addition & 0 deletions src/components/HomePage/QuickLinks/QuickLinks.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ $link-shadow: 0px 3px 11px 1px rgb(0 0 0 / 3%);
margin-block-end: var(--spacing-xxsmall);
&:hover {
box-shadow: var(--shadow-large);
color: var(--color-text-inverse);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import QuranReadingGoals from '@/components/HomePage/QuranGrowthJourneySection/C
import Collapsible, { CollapsibleDirection } from '@/dls/Collapsible/Collapsible';
import ChevronDownIcon from '@/icons/chevron-down.svg';
import GoalIcon from '@/icons/goal-1.svg';
import ReaderIcon from '@/icons/reader.svg';
import ReaderIcon from '@/icons/learning-plan.svg';

export enum CollapsibleType {
QuranReadingGoalsType = 'quran_reading_goals',
Expand Down
2 changes: 1 addition & 1 deletion src/components/Navbar/NavbarBody/ProfileAvatarButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import Button, { ButtonShape, ButtonVariant } from '@/dls/Button/Button';
import PopoverMenu from '@/dls/PopoverMenu/PopoverMenu';
import ClockIcon from '@/icons/clock.svg';
import ArrowIcon from '@/icons/east.svg';
import ReaderIcon from '@/icons/learning-plan.svg';
import LogoutIcon from '@/icons/logout.svg';
import IconPerson from '@/icons/person.svg';
import ReaderIcon from '@/icons/reader.svg';
import TickIcon from '@/icons/tick.svg';
import { logoutUser } from '@/utils/auth/api';
import { isLoggedIn } from '@/utils/auth/login';
Expand Down

0 comments on commit 5db0997

Please sign in to comment.