Skip to content

Commit

Permalink
Merge pull request #34 from Brahmware:add-rajhans
Browse files Browse the repository at this point in the history
Add-rajhans
  • Loading branch information
sanchayan721 authored Oct 4, 2023
2 parents 94db1de + 0bbec41 commit 12b77da
Show file tree
Hide file tree
Showing 41 changed files with 1,497 additions and 274 deletions.
91 changes: 48 additions & 43 deletions src/app/api/website/bharat-darshan/route.ts
Original file line number Diff line number Diff line change
@@ -1,49 +1,54 @@
import { Darshan } from "@datatypes/Darshan";
import { NextRequest, NextResponse } from "next/server";

export async function GET(req: NextRequest) {
const darshan: Darshan[] = [
{
id: '0be0dec4-c204-40b9-b086-8a7c6f94eb7f',
title: 'Samrat Ashoka:<br /> The Great Mauryan',
artist: 'Raja Ravi Varma',
imageUrl: '/images/bharat-darshan/samrat-ashoka.jpg',
description: 'Samrat Ashoka was the third ruler of the Mauryan Empire and was one of the greatest rulers in the history of India. He was the grandson of Chandragupta Maurya, founder of the Mauryan dynasty. He ruled over the Indian subcontinent from 268 BC to 232 BC. He was the first ruler who unified the whole of India under one administration. He was also known as Ashoka the Great.',
link: "https://en.wikipedia.org/wiki/Ashoka",
},
{
id: '0640fdac-8ce9-4bbe-bdb7-4e79ab796769',
title: 'King Shantanu & Satyavati',
artist: 'Raja Ravi Varma',
imageUrl: '/images/bharat-darshan/king-shantanu-and-satyavati.jpg',
description: 'Satyavati was the queen of the Kuru king, Shantanu of Hastinapur and the great-grandmother of the Pandava and Kaurava princes. She is also the mother of the seer Vyasa, author of the epic. She is sometimes identified with the goddess Jatputri.',
link: "https://en.wikipedia.org/wiki/Satyavati",
},
{
id: 'a0b0c0d0-e0f0-40b9-b086-8a7c6f94eb7f',
title: 'Hungry Bengal',
artist: 'Zainul Abedin',
imageUrl: '/images/bharat-darshan/hungry-bengal.jpg',
description: 'The Bengal famine of 1943 was a famine in the Bengal province of British India (now Bangladesh and eastern Bharat) during World War II. An estimated 2.1–3 million, out of a population of 60.3 million, died of starvation, malaria, or other diseases aggravated by malnutrition, population displacement, unsanitary conditions which was deliberately imposed on the Bengali populace by Winston Churchill.',
link: "https://en.wikipedia.org/wiki/Bengal_famine_of_1943",
},
{
id: 'b0c0d0e0-f0f0-40b9-b086-8a7c6f94eb7f',
title: 'Bharat Mata',
artist: 'Abanindranath Tagore',
imageUrl: '/images/bharat-darshan/bharat-mata.jpg',
description: 'Abanindranath Tagore was the principal artist and creator of the "Indian Society of Oriental Art". He was also the first major exponent of Swadeshi values in Indian art. He founded the influential Bengal school of art, which led to the development of modern Indian painting.He was also a noted writer, particularly for children.',
link: "https://en.wikipedia.org/wiki/Abanindranath_Tagore",
},
{
id: 'c0d0e0f0-0f0f-40b9-b086-8a7c6f94eb7f',
title: 'The Third World’s Modern Origins',
artist: 'Dadabhai Naoroji',
imageUrl: '/images/bharat-darshan/the-third-worlds-modern-origins.jpg',
description: 'How strange it is that the British rulers do not see that after they themselves are the main cause of all destruction that ensues from droughts; that it is the drain of India’s wealth by them that lays at their own door the dreadful results of misery, starvation, and the death of millions.',
link: "https://nickledanddimed.com/2021/10/18/the-third-worlds-modern-origins",
},
];
const darshan: Darshan[] = [
{
id: '0be0dec4-c204-40b9-b086-8a7c6f94eb7f',
title: 'Samrat Ashoka:<br /> The Great Mauryan',
artist: 'Raja Ravi Varma',
imageUrl: '/images/bharat-darshan/samrat-ashoka.jpg',
description: 'Samrat Ashoka was the third ruler of the Mauryan Empire and was one of the greatest rulers in the history of India. He was the grandson of Chandragupta Maurya, founder of the Mauryan dynasty. He ruled over the Indian subcontinent from 268 BC to 232 BC. He was the first ruler who unified the whole of India under one administration. He was also known as Ashoka the Great.',
link: "https://en.wikipedia.org/wiki/Ashoka",
},
{
id: '0640fdac-8ce9-4bbe-bdb7-4e79ab796769',
title: 'King Shantanu & Satyavati',
artist: 'Raja Ravi Varma',
imageUrl: '/images/bharat-darshan/king-shantanu-and-satyavati.jpg',
description: 'Satyavati was the queen of the Kuru king, Shantanu of Hastinapur and the great-grandmother of the Pandava and Kaurava princes. She is also the mother of the seer Vyasa, author of the epic. She is sometimes identified with the goddess Jatputri.',
link: "https://en.wikipedia.org/wiki/Satyavati",
},
{
id: 'a0b0c0d0-e0f0-40b9-b086-8a7c6f94eb7f',
title: 'Hungry Bengal',
artist: 'Zainul Abedin',
imageUrl: '/images/bharat-darshan/hungry-bengal.jpg',
description: 'The Bengal famine of 1943 was a famine in the Bengal province of British India (now Bangladesh and eastern Bharat) during World War II. An estimated 2.1–3 million, out of a population of 60.3 million, died of starvation, malaria, or other diseases aggravated by malnutrition, population displacement, unsanitary conditions which was deliberately imposed on the Bengali populace by Winston Churchill.',
link: "https://en.wikipedia.org/wiki/Bengal_famine_of_1943",
},
{
id: 'b0c0d0e0-f0f0-40b9-b086-8a7c6f94eb7f',
title: 'Bharat Mata',
artist: 'Abanindranath Tagore',
imageUrl: '/images/bharat-darshan/bharat-mata.jpg',
description: 'Abanindranath Tagore was the principal artist and creator of the "Indian Society of Oriental Art". He was also the first major exponent of Swadeshi values in Indian art. He founded the influential Bengal school of art, which led to the development of modern Indian painting.He was also a noted writer, particularly for children.',
link: "https://en.wikipedia.org/wiki/Abanindranath_Tagore",
},
{
id: 'c0d0e0f0-0f0f-40b9-b086-8a7c6f94eb7f',
title: 'The Third World’s Modern Origins',
artist: 'Dadabhai Naoroji',
imageUrl: '/images/bharat-darshan/the-third-worlds-modern-origins.jpg',
description: 'How strange it is that the British looters do not see that after they themselves are the main cause of all destruction that ensues from droughts; that it is the drain of India’s wealth by them that lays at their own door the dreadful results of misery, starvation, and the death of millions.',
link: "https://nickledanddimed.com/2021/10/18/the-third-worlds-modern-origins",
},
];

// the req should have a query param called number which is a number and is optional.
// if the number is not provided, return one random darshans
// if the number is provided, return that many random darshans
// if the number is more than the number of darshans, return all the darshans

export async function GET(req: NextRequest) {
return NextResponse.json(darshan);
}
6 changes: 6 additions & 0 deletions src/app/api/website/navigation-map/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export async function GET(req: NextRequest) {
const navMap: NavMap[] = [
{
title: 'Business',
link: '/business',
videoUrl: '/videos/navmenu/business.webm',
items: [
{
Expand All @@ -27,6 +28,7 @@ export async function GET(req: NextRequest) {
},
{
title: 'Media Network',
link: '/media-network',
videoUrl: '/videos/navmenu/media-network.webm',
items: [
{
Expand All @@ -49,6 +51,7 @@ export async function GET(req: NextRequest) {
},
{
title: 'Education & Teaching',
link: '/education-and-teaching',
videoUrl: '/videos/navmenu/education-and-teaching.webm',
items: [
{
Expand All @@ -67,6 +70,7 @@ export async function GET(req: NextRequest) {
},
{
title: 'Collaborators',
link: '/collaborators',
videoUrl: '/videos/navmenu/collaborators.webm',
items: [
{
Expand All @@ -81,6 +85,7 @@ export async function GET(req: NextRequest) {
},
{
title: 'Partners',
link: '/partners',
videoUrl: '/videos/navmenu/partners.webm',
items: [
{
Expand All @@ -95,6 +100,7 @@ export async function GET(req: NextRequest) {
},
{
title: 'Commercial',
link: '/commercial',
videoUrl: '/videos/navmenu/commercial.webm',
items: [
{
Expand Down
94 changes: 94 additions & 0 deletions src/components/ContactUs/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
import React, { useState } from 'react';
import { ContactTextProps } from '@interfaces/TypographyProps';
import { Snackbar, Typography, styled } from '@mui/material';
import SocialSection from './SocialSection';
import TitleText from '@components/Texts/TitleText';

const ContactTitle = styled(TitleText)(({ theme }) => ({
whiteSpace: 'nowrap',
fontSize: '1.125rem',
lineHeight: '1.75rem',
}));

const EmailString = styled(Typography)<ContactTextProps>(({ theme }) => ({
color: theme.palette.text.secondary,
cursor: 'pointer',
transition: theme.Transitions.createTransition({ property: 'color' }),
whiteSpace: 'nowrap',
}));

const StyledSnackbar = styled(Snackbar)(({ theme }) => ({
'& .MuiSnackbarContent-root': {
backgroundColor: theme.palette.error.main,
color: theme.palette.error.contrastText,
minWidth: 'unset',
minHeight: 'unset',
width: 'max-content',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
borderRadius: '2em',
padding: `0 ${theme.Spaces.sm}`,
fontWeight: theme.typography.fontWeightMedium,
}
}));

const anchorOrigin: any = {
vertical: 'bottom',
horizontal: 'center',
};

export interface ContactUsProps extends React.HTMLAttributes<HTMLDivElement> {
children?: React.ReactNode;
};

const Contact: React.FC<ContactUsProps> = (props) => {

const [isSnackbarOpen, setIsSnackbarOpen] = useState(false);

const handleCopyToClipboard = () => {
try {
const isSupported = navigator.clipboard && navigator.clipboard.writeText;
if (!isSupported) {
throw new Error('Copy to clipboard not supported');
}

const textCoppied = navigator.clipboard.writeText("namaste@indianmediasyndicate.com");
if (!textCoppied) {
throw new Error('Text not coppied');
}
setIsSnackbarOpen(true);

} catch (error) {
setIsSnackbarOpen(false);
};
};

return (
<section {...props}>
<ContactTitle>Contact Us</ContactTitle>
<EmailString
component='h2'
variant='body1'
onClick={handleCopyToClipboard}
>
namaste@indianmediasyndicate.com
</EmailString>
<SocialSection />
<StyledSnackbar
open={isSnackbarOpen}
message='Email copied to clipboard'
onClose={() => setIsSnackbarOpen(false)}
anchorOrigin={anchorOrigin}
autoHideDuration={2000}
/>
</section>
)
};

export default styled(Contact)(({ theme }) => ({
display: 'flex',
flexDirection: 'column',
alignSelf: 'end',
alignItems: 'flex-start',
}));
45 changes: 45 additions & 0 deletions src/components/Copyright/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import React from 'react';
import { CopyrightTextProps } from '@interfaces/TypographyProps';
import { Typography, styled } from '@mui/material';

const CopyRightText = styled(Typography)<CopyrightTextProps>(({ theme }) => ({
color: theme.palette.text.secondary,
margin: 0,
whiteSpace: 'nowrap',

'@media (max-width: 580px)': {
whiteSpace: 'unset',
},
}));

const CopyrightYear = styled('span')(({ theme }) => ({
color: theme.palette.primary.main,
marginRight: theme.spacing(0.6),
}));

export interface CopyRightProps extends React.HTMLAttributes<HTMLDivElement> {
children?: React.ReactNode;
};

const CopyRight: React.FC<CopyRightProps> = (props) => {

const today = new Date();

return (
<section {...props}>
<CopyRightText
component='h3'
variant='body1'
>
<CopyrightYear>© {today.getFullYear()}</CopyrightYear>
Indian Media Syndicate. All rights reserved.
</CopyRightText>
</section>
)
};

export default styled(CopyRight)(({ theme }) => ({
display: 'flex',
alignItems: 'center',
justifyContent: 'start',
}));
6 changes: 4 additions & 2 deletions src/components/Link/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,16 @@ const StyledArrowIcon = styled(ArrowIcon)(({ theme }) => ({

'& path': {
fill: theme.palette.primary.main,
}
}
}));

const Link = ({ href, target, rel, children }: LinkProps) => {
const Link = ({ href, target, rel, children, ...props }: LinkProps) => {

if (target === '_blank') {
return (
<StyledExternalLink
passHref
className={props.className}
href={href}
>
{children}
Expand All @@ -68,6 +69,7 @@ const Link = ({ href, target, rel, children }: LinkProps) => {
return (
<StyledLink
passHref
className={props.className}
href={href}
target={target}
rel={rel}
Expand Down
6 changes: 3 additions & 3 deletions src/components/Search/InputSearch/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { styled, useMediaQuery, useTheme } from '@mui/material';
import React from 'react'

const StyledInput = styled('input')(({ theme }) => ({
padding: `${theme.Spaces.sm} ${theme.Spaces.md}`,
Expand Down Expand Up @@ -55,6 +55,6 @@ const InputSearch = () => {
placeholder={`Search in ${showContractedText ? 'IMS' : 'Indian Media Syndicate'} `}
/>
)
}
};

export default InputSearch
export default InputSearch;
9 changes: 7 additions & 2 deletions src/components/Texts/BodyText/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
import React from 'react';
import { Typography, TypographyProps, styled } from '@mui/material';

const StyledTypography = styled(Typography)<TypographyProps>(({ theme }) => ({
export interface BodyTextProps extends TypographyProps {
children?: React.ReactNode;
href?: string;
};

const StyledTypography = styled(Typography)<BodyTextProps>(({ theme }) => ({
color: theme.palette.text.secondary,
}));

const BodyText: React.FC<TypographyProps> = ({ ...props }) => {
const BodyText: React.FC<BodyTextProps> = ({ ...props }) => {
return (
<StyledTypography
{...props}
Expand Down
Loading

0 comments on commit 12b77da

Please sign in to comment.