Skip to content

Commit

Permalink
Onseason-25 and wappu colors
Browse files Browse the repository at this point in the history
  • Loading branch information
ebetoi committed Jan 8, 2025
1 parent 7165ab8 commit 0a6bb58
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 43 deletions.
19 changes: 10 additions & 9 deletions archiver/archiveCrawlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ import { parseSheetToShowList } from '@/scripts/google/client';
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' } }
// ];
// for(const { config, name, showStartTime } of sheetConfigs) {
// await archiveGogleSheet(config, name, showStartTime);
// }

const sheetConfigs = [
{ 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);
}
};

/** Helpers */
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 Calendar from '@/components/calendar';
import Image from 'next/image';
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

0 comments on commit 0a6bb58

Please sign in to comment.