-
Notifications
You must be signed in to change notification settings - Fork 0
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 #50 from tokyorubykaigi12/terfno/tt
publish timetable
- Loading branch information
Showing
18 changed files
with
1,060 additions
and
12 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
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import type { ComponentChildren, FunctionComponent } from 'preact'; | ||
import { useEffect } from 'preact/hooks'; | ||
|
||
type Props = { | ||
'client:only': boolean; | ||
stick: ComponentChildren; | ||
body: ComponentChildren; | ||
} | ||
|
||
const ScrollSync:FunctionComponent<Props> = (props) => { | ||
useEffect(()=>{ | ||
const stick = document.getElementById("stick"); | ||
const body = document.getElementById("body"); | ||
|
||
stick?.addEventListener("scroll", () => { | ||
if(body){body.scrollLeft = stick.scrollLeft} | ||
}); | ||
|
||
body?.addEventListener("scroll", () => { | ||
if(stick){stick.scrollLeft = body.scrollLeft} | ||
}); | ||
}, []) | ||
|
||
return ( | ||
<> | ||
{props.stick} | ||
{props.body} | ||
</> | ||
) | ||
} | ||
|
||
export default ScrollSync; |
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,36 @@ | ||
.tabs { | ||
width: 100%; | ||
display: flex; | ||
justify-content: center; | ||
gap: 24px; | ||
|
||
button { | ||
text-align: center; | ||
|
||
font-family: "Futura", "Jost", sans-serif; | ||
font-weight: 500; | ||
font-size: 20px; | ||
line-height: 27px; | ||
|
||
border-radius: 4px; | ||
border: none; | ||
padding: 16px 32px; | ||
} | ||
|
||
.default { | ||
background-color: #aeaeb2; | ||
color: #fff; | ||
} | ||
|
||
.selected { | ||
background-color: #000; | ||
color: #fff; | ||
} | ||
} | ||
@media screen and (width <= 720px) { | ||
.tabs { | ||
button { | ||
font-size: 15px; | ||
} | ||
} | ||
} |
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,51 @@ | ||
import type { ComponentChildren, FunctionComponent } from 'preact'; | ||
import {useStore} from '@nanostores/preact'; | ||
import { selectedTabStore, type Tab } from './tabStore'; | ||
import './TabToggle.css'; | ||
|
||
// for astro syntax | ||
type Props = { | ||
'client:only': boolean; | ||
main: ComponentChildren; | ||
zenyasai: ComponentChildren; | ||
} | ||
|
||
const Schedule:FunctionComponent<Props> = (props) => { | ||
const $tab = useStore(selectedTabStore); | ||
|
||
const isSelected = (tabName: Tab) => { | ||
return $tab === tabName; | ||
} | ||
|
||
const handleClick = (tabName: Tab) => { | ||
selectedTabStore.set(tabName); | ||
} | ||
|
||
return ( | ||
<> | ||
<div class="tabs"> | ||
<button | ||
type="button" | ||
onClick={() => handleClick('fri')} | ||
className={isSelected('fri') ? 'selected' : 'default'} | ||
> | ||
前夜祭 2025.1.17 | ||
</button> | ||
<button | ||
type="button" | ||
onClick={() => handleClick('sat')} | ||
className={isSelected('sat') ? 'selected' : 'default'} | ||
> | ||
2025.1.18 | ||
</button> | ||
</div> | ||
{$tab === 'sat' ? ( | ||
<>{props.main}</> | ||
) : ( | ||
<>{props.zenyasai}</> | ||
)} | ||
</> | ||
) | ||
} | ||
|
||
export default Schedule; |
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,186 @@ | ||
--- | ||
type Speaker = { | ||
name: string; | ||
ImageSrc: string; | ||
XId?: string; | ||
GitHubId?: string; | ||
} | ||
type Session = { | ||
keynote?: boolean; | ||
id: number; | ||
title: string; | ||
} | ||
export type TalkType = { | ||
speaker: Speaker; | ||
session: Session; | ||
} | ||
interface Props { | ||
id: number; | ||
talks: TalkType[]; | ||
} | ||
const {id, talks} = Astro.props; | ||
import GitHubMarkImage from "../../imgs/github-mark.png"; | ||
import XLogoBlackImage from '../../imgs/x-logo-black.png'; | ||
--- | ||
<style> | ||
.talk { | ||
display: flex; | ||
flex-direction: row; | ||
gap: 32px; | ||
|
||
.speaker-icon { | ||
img { | ||
border-radius: 12px; | ||
height: auto; | ||
width: 160px; | ||
} | ||
} | ||
@media screen and (width <= 720px) { | ||
.speaker-icon { | ||
img { | ||
width: 80px; | ||
} | ||
} | ||
} | ||
|
||
.description { | ||
width: 100%; | ||
|
||
.keynote { | ||
span { | ||
background: #FCECE8; | ||
padding: 2px 8px; | ||
border-radius: 2px; | ||
|
||
font-family: "Futura", "Jost", sans-serif; | ||
font-size: 12px; | ||
font-weight: 400; | ||
line-height: 18px; | ||
} | ||
|
||
margin-bottom: 10px; | ||
} | ||
|
||
.session-title { | ||
font-size: 20px; | ||
line-height: 30px; | ||
font-weight: 600; | ||
|
||
margin-bottom: 16px; | ||
} | ||
|
||
.speaker-name { | ||
font-family: "Futura", "Jost", sans-serif; | ||
font-size: 16px; | ||
font-weight: 500; | ||
|
||
margin-bottom: 16px; | ||
} | ||
|
||
.speaker-socials { | ||
display: flex; | ||
flex-wrap: wrap; | ||
gap: 16px 24px; | ||
|
||
a { | ||
font-size: 16px; | ||
font-weight: 500; | ||
line-height: 21px; | ||
text-decoration: none; | ||
vertical-align: top; | ||
} | ||
@media screen and (width <= 480px) { | ||
a { | ||
font-size: 16px; | ||
} | ||
} | ||
|
||
.social-x, | ||
.social-github { | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.social-x { | ||
img { | ||
width: 24px; | ||
height: 24px; | ||
margin: 0 8px 0 0; | ||
} | ||
@media screen and (width <= 480px) { | ||
img { | ||
width: 16px; | ||
height: 16px; | ||
} | ||
} | ||
} | ||
|
||
.social-github { | ||
img { | ||
width: 30px; | ||
height: 30px; | ||
margin: 0 8px 0 0; | ||
} | ||
@media screen and (width <= 480px) { | ||
img { | ||
width: 18px; | ||
height: 18px; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
@media screen and (width <= 720px) { | ||
.talk { | ||
flex-direction: column; | ||
align-items: center; | ||
/* todo: try to fit align up side */ | ||
} | ||
} | ||
</style> | ||
|
||
{talks.filter((entry)=>entry.session.id === id).map((talk)=>{ | ||
const session =talk.session | ||
const speaker =talk.speaker | ||
return ( | ||
<div class="talk"> | ||
<div class="speaker-icon"> | ||
<img src={speaker.ImageSrc} alt="Speaker" /> | ||
</div> | ||
<div class="description"> | ||
{session.keynote && <div class="keynote"> | ||
<span>Keynote</span> | ||
</div>} | ||
<h3 class="session-title"> | ||
{/* <a href={`tokyo12/talks/${session.id}`}></a> */} | ||
{session.title} | ||
</h3> | ||
<h4 class="speaker-name">{speaker.name}</h4> | ||
<div class="speaker-socials"> | ||
{speaker.GitHubId && ( | ||
<div class="social-github"> | ||
<img src={GitHubMarkImage.src} alt="github logo"/> | ||
<a href={`https://github.com/${speaker.GitHubId}`}> | ||
@{speaker.GitHubId} | ||
</a> | ||
</div> | ||
)} | ||
{speaker.XId && ( | ||
<div class="social-x"> | ||
<img src={XLogoBlackImage.src} alt="x logo"/> | ||
<a href={`https://x.com/${speaker.XId}`}> | ||
@{speaker.XId} | ||
</a> | ||
</div> | ||
)} | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
})} |
Oops, something went wrong.