-
Notifications
You must be signed in to change notification settings - Fork 0
/
data.ts
141 lines (129 loc) Β· 3.37 KB
/
data.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
/** The value of the key used to indicate we want to show posters from all themes */
export const ALL_THEMES = "π― All Themes";
export const themes = [
// A hack to include the "All Themes" as a filter button
ALL_THEMES,
// Poster themes
"π Theme A",
"π Theme B",
"π‘ Theme C",
// Technically not themes but convenient to filter by a Q&A session
// "πββοΈ Poster Q&A 1",
// "πββ οΈPoster Q&A 2",
// "πββοΈ Poster Q&A 3",
] as const;
type Theme = typeof themes[number];
interface Poster {
id: number;
// The name of the person presenting the poster. Most often first author. If there are two or
// more people presenting the poster the value could be "Presenter 1 & Presenter 2"
presenter: string;
// The title of the poster. Ideally it should not end with a period.
name: string;
// A poster can belong to a theme and a Poster Q&A session
themes: Theme[];
// Presenters can if they want submit an audio recording where they summarize their poster in
// their own way. The value is the name of the audio file. Examples: "1.mp3", "2.m4a", etc.
audio_file?: string;
// If true a placeholder thumbnail and PDF is used. Useful while data is being populated. When we
// have the PDF file (which is the normal case) this property should not be used (just skip it).
missing_pdf?: boolean;
}
/** The posters that are displayed on the website */
export const posters: Poster[] = [
{
id: 1,
missing_pdf: true,
presenter: "Alan Turing",
name: "Poster name 1",
themes: ["π Theme A"],
audio_file: "0.m4a",
},
{
id: 2,
missing_pdf: true,
presenter: "Lilla Rogahn",
name: "Poster name 2",
themes: ["π Theme B"],
},
{
id: 3,
missing_pdf: true,
presenter: "Jamey Schamberger",
name: "Poster name 3",
themes: ["π‘ Theme C"],
},
{
id: 4,
missing_pdf: true,
presenter: "Ramona Batz & Rosalia Nienow",
name: "Poster name 4",
themes: ["π Theme A"],
},
{
id: 5,
missing_pdf: true,
presenter: "Makenna Ankunding",
name: "Poster name 5",
themes: ["π Theme B"],
audio_file: "0.m4a",
},
{
id: 6,
missing_pdf: true,
presenter: "Afton Bernhard",
name: "Poster name 6",
themes: ["π‘ Theme C"],
},
{
id: 7,
missing_pdf: true,
presenter: "Esta Kohler",
name: "Poster name 7",
themes: ["π Theme A"],
},
{
id: 8,
missing_pdf: true,
presenter: "Clara Altenwerth",
name: "Poster name 8",
themes: ["π Theme B"],
},
{
id: 9,
missing_pdf: true,
presenter: "Maximillian Koepp",
name: "Poster name 9",
themes: ["π‘ Theme C"],
audio_file: "0.m4a",
},
{
id: 10,
missing_pdf: true,
presenter: "Jerald Thompson & Caitlyn Ryan",
name: "Poster name 10",
themes: ["π Theme A"],
},
{
id: 11,
missing_pdf: true,
presenter: "Anissa Strosin",
name: "Poster name 11",
themes: ["π Theme B"],
},
{
id: 12,
missing_pdf: true,
presenter: "Johann Smith",
name: "Poster name 12",
themes: ["π Theme A"],
},
];
/** Returns the poster array filtered by theme. Returns all posters if all themes is selected */
export const getPostersByTheme = theme => {
if (theme === ALL_THEMES) {
return posters;
} else {
return posters.filter(poster => poster.themes.includes(theme));
}
}