-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #143 from pyconjp/feature/sprint_side
Add Sprint Slide
- Loading branch information
Showing
7 changed files
with
49 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import {IframeHTMLAttributes} from "react"; | ||
|
||
export default function GoogleSlide({slideId, ...props}: { | ||
slideId: string, | ||
props?: IframeHTMLAttributes<HTMLIFrameElement> | ||
}) { | ||
return <iframe | ||
src={`https://docs.google.com/presentation/d/${slideId}/embed?start=false&loop=false&delayms=60000`} | ||
width="960" height="569" allowFullScreen | ||
className='w-full h-full' | ||
{...props} | ||
/> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import {getSprints} from "@/lib/sprints"; | ||
import SectionSubTitle from "@/components/elements/SectionSubTitle"; | ||
import {getDictionary} from "@/lib/dictionaries"; | ||
import GoogleSlide from "@/components/elements/GoogleSlide"; | ||
|
||
export default async function SprintOutPutSection({lang}: { lang: 'ja' | 'en' }) { | ||
const sprints = await getSprints(); | ||
const dictionary = await getDictionary(lang); | ||
|
||
return <section className={'lg:mt-8 mt-6 lg:mb-20 mb-14' + (sprints.some(sprint => sprint.slide) ? '' : ' hidden')}> | ||
<SectionSubTitle title={'Sprint Output'} subtitle={dictionary.sprint.output}/> | ||
<div className="grid lg:grid-cols-2 grid-cols-1 lg:gap-6 gap-16 mx-auto lg:w-10/12 w-11/12"> | ||
{ | ||
sprints | ||
.filter(sprint => sprint.slide) | ||
.map( | ||
(sprint, index) => <div key={index} className="flex flex-col gap-2 text-lg"> | ||
<div className='w-full aspect-video'> | ||
<GoogleSlide slideId={sprint.slide}/> | ||
</div> | ||
<div className={'text-center'}>{sprint.leader}</div> | ||
</div> | ||
) | ||
} | ||
</div> | ||
</section> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export type Sprint = { | ||
leader: string, | ||
description: string, | ||
slide: string, | ||
} |