|
| 1 | +{{ range $meetup_number, $meetup := site.Data.meetups }} |
| 2 | + |
| 3 | + {{ $time := .Site.Params.dateParse "2006-01-02" $meetup.date }} |
| 4 | + |
| 5 | + {{ $contentValue := printf ` |
| 6 | +## Informacje |
| 7 | +
|
| 8 | +**📅 data:** %s</br> |
| 9 | +**🕕 godzina:** %s</br> |
| 10 | +**📍 miejsce:** %s</br>` |
| 11 | + $meetup.date $meetup.time $meetup.place |
| 12 | + }} |
| 13 | + |
| 14 | + {{ if $meetup.live_stream }} |
| 15 | + {{ $liveLink := printf "{{< youtubeLite id=\"%s\" label=\"%s\" >}}" $meetup.live_stream "Label" }} |
| 16 | + {{ $contentValue = printf "%s \n ## Live Stream \n %s" $contentValue $liveLink }} |
| 17 | + {{ end }} |
| 18 | + |
| 19 | + {{ $contentValue := printf "%s \n ## Prelekcje" $contentValue}} |
| 20 | + |
| 21 | + {{ range $meetup.talks }} |
| 22 | + {{ $cleanedTitle := replace (replace .talk_title "\n" " ") "\t" " " }} |
| 23 | + {{ $cleanedTitle = replaceRE `\s+` " " $cleanedTitle }} |
| 24 | + {{ $contentValue = printf "%s \n ### %s" $contentValue $cleanedTitle }} |
| 25 | + {{ $contentValue = printf "%s \n %s" $contentValue (printf "{{< speaker speaker_id=\"%s\" >}}" .speaker_id) }} |
| 26 | + {{ if .talk_description }} |
| 27 | + {{ $contentValue = printf "%s \n %s" $contentValue .talk_description }} |
| 28 | + {{ end }} |
| 29 | + {{ end }} |
| 30 | + |
| 31 | + {{ $contentValue = printf "%s \n ## Sponsorzy" $contentValue }} |
| 32 | + {{ range $meetup.sponsors }} |
| 33 | + {{ $contentValue = printf "%s \n %s </br>" $contentValue (printf "{{< article link=\"/sponsorzy/%s/\" >}}" .) }} |
| 34 | + {{ end }} |
| 35 | + |
| 36 | + {{/* Add page. */}} |
| 37 | + {{ $content := dict "mediaType" "text/markdown" "value" $contentValue }} |
| 38 | + {{ $params := dict "talks" $meetup.talks }} |
| 39 | + |
| 40 | + {{ $dates := dict "date" (time.AsTime $meetup.date) }} |
| 41 | + {{ $page := dict |
| 42 | + "content" $content |
| 43 | + "dates" $dates |
| 44 | + "time" $meetup.time |
| 45 | + "place" $meetup.place |
| 46 | + "params" $params |
| 47 | + "path" $meetup_number |
| 48 | + "title" $meetup.title |
| 49 | + }} |
| 50 | + {{ $.AddPage $page }} |
| 51 | + |
| 52 | + {{/* Add featured image. */}} |
| 53 | + {{ $info_graphic := ""}} |
| 54 | + {{ if eq (len $meetup.talks) 1 }} |
| 55 | + {{- $info_graphic = partial "infographic-image-solo.html" (dict "meetup" $meetup) -}} |
| 56 | + {{ end }} |
| 57 | + {{ if eq (len $meetup.talks) 2 }} |
| 58 | + {{- $info_graphic = partial "infographic-image-duo.html" (dict "meetup" $meetup) -}} |
| 59 | + {{ end }} |
| 60 | + |
| 61 | + {{ $content := dict |
| 62 | + "mediaType" $info_graphic.MediaType.Type |
| 63 | + "value" $info_graphic |
| 64 | + }} |
| 65 | + {{ $resource := dict |
| 66 | + "content" $content |
| 67 | + "path" (printf "%s/featured.png" $meetup_number) |
| 68 | + }} |
| 69 | + {{ $.AddResource $resource }} |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | +{{ end }} |
0 commit comments