Skip to content

Commit

Permalink
speakers
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarotero committed Jun 30, 2024
1 parent 33b50a1 commit 844c3fe
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 1 deletion.
2 changes: 1 addition & 1 deletion _includes/blocks.vto
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="ly-blocks">
{{ for block of blocks }}
{{ include `./blocks/${block.type}/${block.type}.vto` { block } }}
{{ include `./blocks/${block.type}/${block.type}.vto` { block, blocks } }}
{{ /for }}
</div>
39 changes: 39 additions & 0 deletions _includes/blocks/calendar/calendar.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,43 @@
@media (width > 600px) {
margin: 0 0 0 150px;
}
}
.event-speakers {
list-style: none;
margin: 0;
padding: 1rem;
display: flex;
column-gap: 4rem;
row-gap: 2rem;
flex-wrap: wrap;

@media (width > 600px) {
margin: 0 0 0 150px;
}

button {
display: grid;
grid-template-columns: 100px 1fr;
align-items: center;
column-gap: 1rem;
padding: 1rem;
margin: 0;
border: none;
background: none;
border-radius: .5rem;
cursor: pointer;
max-width: 300px;
text-align: left;

&:hover {
background-color: var(--color-light);
}
}
img {
width: 100%;
aspect-ratio: 1;
}
p {
margin: 0;
}
}
22 changes: 22 additions & 0 deletions _includes/blocks/calendar/calendar.vto
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,28 @@
<div class="event-description type-txt">
{{ event.description |> md }}
</div>

{{ if event.speakers }}
{{ set speakers = blocks
.filter((block) => block.type === "speakers")
.shift()?.speakers
.filter((speaker) => event.speakers.includes(speaker.id))
}}

<ul class="event-speakers">
{{ for speaker of speakers }}
<li>
<button data-open="dialog-{{ speaker.id }}">
<img src="{{ speaker.image }}" alt="Retrato">
<div>
<strong class="type-txt-bold">{{ speaker.name }}</strong>
<p class="type-caption">{{ speaker.company }}<br> <em>{{ speaker.role }}</em></p>
</div>
</button>
</li>
{{ /for }}
</ul>
{{ /if }}
</details>
{{ /for }}
</div>
Expand Down
5 changes: 5 additions & 0 deletions _includes/blocks/calendar/fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ export default {
"title: text",
"subtitle: text",
"description: markdown",
{
type: "list",
name: "speakers",
description: "Select the speakers ID for this event",
}
],
},
],
Expand Down
2 changes: 2 additions & 0 deletions index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ blocks:
title: Item de agenda
subtitle: Subtítulo de item de agenda
description: "Esperamos que no, la Tarugoconf Sofá Edition será única e irrepetible, como las circunstancias en las que se organiza y celebra, pero si este experimento sale bien, es probable que la Tarugo se convierta en un evento híbrido que pueda ser disfrutado presencialmente y desde casa.\r\n"
speakers:
- david-bonilla
- title: 'Viernes, 15 de noviembre'
events:
- time: '9:00 - 12:00h'
Expand Down

0 comments on commit 844c3fe

Please sign in to comment.