Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge develop into main #94

Merged
merged 2 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions archiver/archiveCrawlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import { getSheet, GoogleConfigSheets } from '@/scripts/google/google';
export const archiveOldShowlists = async () => {
// NOTE: Uncomment for archiving google sheet data
// const sheetConfigs = [
// { name: '2024-wappu', showStartTime: '2024-04-21T12:00:00', config: { apiKey: process.env.GA_API_KEY, spreadsheetId: '17AnknBC5fzo8ZS3Wxc1HExm_qVV4kEXkgQOUv80lbGg', range: 'Ohjelmakartta!A3:J106' } }
// // { name: '2023-wappu', showStartTime: '2023-04-20T12:00:00', config: { apiKey: process.env.GA_API_KEY, spreadsheetId: '1eHDK-MYm6B3BH8rewQr04-pd2IK4iFwsPY5HKkrVNJg', range: 'Ohjelmakartta!A3:J5' } },
// // { name: '2023-syssy', showStartTime: '2023-04-20T12:00:00', config: { apiKey: process.env.GA_API_KEY, spreadsheetId: '18UqWSStevUGa_rdIi9zF6NuCzbZc7H1ZnVMaIObV_Cg', range: 'Ohjelmakartta!A3:J32' } }
// { name: '2024-syssy', showStartTime: '2024-10-29T12:00:00', config: { apiKey: process.env.GA_API_KEY, spreadsheetId: '1gPIjpY_JWlDYXmMboHds3bEWerU9nDd4o0pFeek9PKM', range: 'Ohjelmakartta!A3:J35' } }
// { name: '2024-wappu', showStartTime: '2024-04-21T12:00:00', config: { apiKey: process.env.GA_API_KEY, spreadsheetId: '17AnknBC5fzo8ZS3Wxc1HExm_qVV4kEXkgQOUv80lbGg', range: 'Ohjelmakartta!A3:J106' } },
// { name: '2023-wappu', showStartTime: '2023-04-20T12:00:00', config: { apiKey: process.env.GA_API_KEY, spreadsheetId: '1eHDK-MYm6B3BH8rewQr04-pd2IK4iFwsPY5HKkrVNJg', range: 'Ohjelmakartta!A3:J5' } },
// { name: '2023-syssy', showStartTime: '2023-04-20T12:00:00', config: { apiKey: process.env.GA_API_KEY, spreadsheetId: '18UqWSStevUGa_rdIi9zF6NuCzbZc7H1ZnVMaIObV_Cg', range: 'Ohjelmakartta!A3:J32' } },
// ];
// for(const { config, name, showStartTime } of sheetConfigs) {
// await archiveGogleSheet(config, name, showStartTime);
Expand Down
67 changes: 34 additions & 33 deletions pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import { GetStaticProps, NextPage } from 'next';
import Head from 'next/head';
import Image from 'next/image';

// import Image from 'next/image';
// import Calendar from '@/components/calendar';
import Calendar from '@/components/calendar';
import Footer from '@/components/footer';
import Hero from '@/components/hero';
import Player from '@/components/player';
// import RichText from '@/components/richtext';
import { Showlist } from '@/components/showlist';
// import Player from '@/components/player';
import RichText from '@/components/richtext';
// import { Showlist } from '@/components/showlist';
import Sponsors, { ISponsorData } from '@/components/sponsors';
import {
fetchContent,
fetchNavigationItems,
NavigationItem,
} from '@/contentful/client';
// import { contentfulImageLoader } from '@/contentful/contentfulImageLoader';
import { contentfulImageLoader } from '@/contentful/contentfulImageLoader';
import { IndexDocument, IndexQuery } from '@/contentful/graphql/index.graphql';
import { fetchShowlist } from '@/scripts/google/client';
import { ShowsByDate } from '@/scripts/google/showlistHelpers';
// import { fetchShowlist } from '@/scripts/google/client';
// import { ShowsByDate } from '@/scripts/google/showlistHelpers';

const isPlayerLive = process.env.NEXT_PUBLIC_PLAYER_MODE === 'live';

Expand All @@ -33,7 +33,7 @@ interface IndexProps {
heroButtonText: string;
heroButtonLink: string;
navigationItems: NavigationItem[];
showsByDate: ShowsByDate;
//showsByDate: ShowsByDate;
firstDecorativeImage: {
url?: string;
width?: number;
Expand Down Expand Up @@ -62,18 +62,19 @@ const Index: NextPage<IndexProps & PlayerControls> = ({
heroButtonText,
heroButtonLink,
navigationItems,
showsByDate,
//showsByDate,
sponsors,
playing,
onPlayPause,
muted,
onMute,

// firstDecorativeImage,
// secondDecorativeImage,
// firstContent,
// secondContent,
// thirdContent,

//playing,
//onPlayPause,
//muted,
//onMute,

firstDecorativeImage,
secondDecorativeImage,
firstContent,
secondContent,
thirdContent,
}) => {
return (
<div className="min-h-screen w-full">
Expand All @@ -95,24 +96,24 @@ const Index: NextPage<IndexProps & PlayerControls> = ({
navigationItems={navigationItems}
isCompact={isPlayerLive}
/>
{isPlayerLive && (
{ /* isPlayerLive && (
<Player
playing={playing}
onPlayPause={onPlayPause}
muted={muted}
onMute={onMute}
showsByDate={showsByDate}
/>
)}
)*/ }

<Showlist showsByDate={showsByDate} />
{/* <Showlist showsByDate={showsByDate} /> */}

{/* First section */}
{/* <main className="flex flex-wrap-reverse items-center justify-center py-4 md:py-8">
{<main className="flex flex-wrap-reverse items-center justify-center py-4 md:py-8">
<div className="relative m-10 h-48 w-128 max-w-full md:m-8 md:h-96">
<Image
src={firstDecorativeImage.url}
// loader={contentfulImageLoader}
loader={contentfulImageLoader}
layout="fill"
objectFit="cover"
className="rounded"
Expand All @@ -122,32 +123,32 @@ const Index: NextPage<IndexProps & PlayerControls> = ({
<section className="m-4 w-128 max-w-full text-lg text-white md:m-8">
<RichText content={firstContent} />
</section>
</main> */}
</main> }

{/* Second section */}
{/* <div className="min-h-32 flex w-full flex-wrap items-center justify-center bg-radio-bg200 py-4 md:py-8">
{ <div className="min-h-32 flex w-full flex-wrap items-center justify-center bg-radio-bg200 py-4 md:py-8">
<section className="m-4 w-128 max-w-full text-base text-white md:m-8">
<RichText content={secondContent} />
</section>
<Calendar />
</div> */}
</div> }

{/* Third section */}
{/* <div className="flex flex-wrap items-center justify-center py-4 md:py-8">
{ <div className="flex flex-wrap items-center justify-center py-4 md:py-8">
<section className="m-4 w-128 max-w-full text-base text-white md:m-8">
<RichText content={thirdContent} />
</section>
<div className="relative m-10 h-48 w-128 max-w-full md:m-8 md:h-96">
<Image
src={secondDecorativeImage.url}
// loader={contentfulImageLoader}
loader={contentfulImageLoader}
layout="fill"
objectFit="cover"
className="rounded"
alt=""
/>
</div>
</div> */}
</div> }
<Sponsors sponsors={sponsors} />
<Footer navigationItems={navigationItems} />
</div>
Expand All @@ -174,7 +175,7 @@ export const getStaticProps: GetStaticProps<IndexProps> = async () => {

const navigationItems = await fetchNavigationItems();

const showsByDate = await fetchShowlist();
//const showsByDate = await fetchShowlist();

return {
props: {
Expand All @@ -184,7 +185,7 @@ export const getStaticProps: GetStaticProps<IndexProps> = async () => {
heroButtonText,
heroButtonLink,
navigationItems,
showsByDate,
//showsByDate,
firstDecorativeImage,
secondDecorativeImage,
firstContent,
Expand Down
2 changes: 1 addition & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const isSyssyColors = true;
const isSyssyColors = false;

module.exports = {
content: [
Expand Down
Loading