|
4 | 4 | {{ $meetup := .meetup }} |
5 | 5 |
|
6 | 6 |
|
7 | | -{{ $bg := resources.Get "images/infographic_template_solo.png" }} |
| 7 | +{{ $bg := resources.Get "images/infographic_template.png" }} |
8 | 8 |
|
9 | 9 |
|
10 | 10 | {{ $final := $bg }} |
11 | 11 |
|
12 | 12 |
|
13 | 13 | {{ $imgWidth := $final.Width }} |
| 14 | + |
| 15 | +{{ $bottomDateOptions := dict |
| 16 | + "color" "#393f5f" |
| 17 | + "size" 66 |
| 18 | + "x" 890 |
| 19 | + "y" 132 |
| 20 | + "font" $fontNormal |
| 21 | +}} |
| 22 | +{{ $final = $final.Filter (images.Text "ZAPRASZA" $bottomDateOptions) }} |
| 23 | + |
14 | 24 | {{ $date := (printf "%sr. godz. %s" ($meetup.date | time.Format "Monday 02.01.2006"| strings.ToUpper) $meetup.time) }} |
15 | 25 | {{ $mainDateOptions := dict |
16 | 26 | "color" "#393f5f" |
|
22 | 32 | }} |
23 | 33 | {{ $final = $final.Filter (images.Text $date $mainDateOptions) }} |
24 | 34 |
|
25 | | -{{ $bottomDateOptions := dict |
| 35 | +{{ $bottomDateOptions := dict |
26 | 36 | "color" "#393f5f" |
27 | | - "size" 32 |
| 37 | + "size" 28 |
28 | 38 | "x" 157 |
29 | | - "y" 1010.3 |
| 39 | + "y" 1014 |
30 | 40 | "font" $fontNormal |
31 | 41 | }} |
32 | 42 | {{ $final = $final.Filter (images.Text $date $bottomDateOptions) }} |
33 | 43 |
|
34 | | -{{ $talk1 := index $meetup.talks 0}} |
35 | | - |
36 | | -{{ $speaker1 := index site.Data.speakers $talk1.speaker_id }} |
37 | | -{{ $author1Options := dict |
| 44 | +{{ $bottomPlaceOptions := dict |
38 | 45 | "color" "#393f5f" |
39 | | - "size" 32 |
40 | | - "x" (div $imgWidth 2) |
41 | | - "y" 815 |
| 46 | + "size" 28 |
| 47 | + "x" 1156 |
| 48 | + "y" 1014 |
42 | 49 | "font" $fontNormal |
43 | | - "alignx" "center" |
44 | 50 | }} |
45 | | -{{ $final = $final.Filter (images.Text $speaker1.name $author1Options) }} |
46 | | - |
47 | | -{{ $title1Options := dict |
48 | | - "color" "#393f5f" |
49 | | - "size" 32 |
50 | | - "x" (div $imgWidth 2) |
51 | | - "y" 870 |
52 | | - "font" $fontBold |
53 | | - "alignx" "center" |
| 51 | +{{ $final = $final.Filter (images.Text $meetup.place $bottomPlaceOptions) }} |
| 52 | + |
| 53 | +{{ $avatarBackground := resources.Get "images/avatars/tba.png" }} |
| 54 | +{{ $final := $final.Filter (images.Overlay $avatarBackground 779.9 436) }} |
| 55 | + |
| 56 | +{{ if $meetup.talks }} |
| 57 | + {{ $talk1 := index $meetup.talks 0}} |
| 58 | + |
| 59 | + {{ $speaker1 := index site.Data.speakers $talk1.speaker_id }} |
| 60 | + {{ $author1Options := dict |
| 61 | + "color" "#393f5f" |
| 62 | + "size" 32 |
| 63 | + "x" (div $imgWidth 2) |
| 64 | + "y" 815 |
| 65 | + "font" $fontNormal |
| 66 | + "alignx" "center" |
54 | 67 | }} |
55 | | -{{ $final = $final.Filter (images.Text $talk1.talk_title $title1Options) }} |
56 | | - |
57 | | -{{ $avatarMaskFilter := images.Mask (resources.Get "images/avatars/mask.png") }} |
58 | | - |
59 | | -{{ $speaker1Img := resources.Get $speaker1.avatar }} |
60 | | -{{ $speaker1 := $speaker1Img.Fill "300x300 center" }} |
61 | | - |
62 | | -{{ $maskedSpeaker1 := $speaker1 | images.Filter $avatarMaskFilter }} |
63 | | - |
64 | | -{{ $final := $final.Filter (images.Overlay $maskedSpeaker1 (sub (div $imgWidth 2) 150) 465) }} |
65 | | - |
| 68 | + {{ $final = $final.Filter (images.Text $speaker1.name $author1Options) }} |
| 69 | + |
| 70 | + {{ $title1Options := dict |
| 71 | + "color" "#393f5f" |
| 72 | + "size" 32 |
| 73 | + "x" (div $imgWidth 2) |
| 74 | + "y" 870 |
| 75 | + "font" $fontBold |
| 76 | + "alignx" "center" |
| 77 | + }} |
| 78 | + {{ $final = $final.Filter (images.Text $talk1.talk_title $title1Options) }} |
| 79 | + |
| 80 | + {{ $avatarMaskFilter := images.Mask (resources.Get "images/avatars/mask.png") }} |
| 81 | + |
| 82 | + {{ $speaker1Img := resources.Get $speaker1.avatar }} |
| 83 | + {{ $speaker1 := $speaker1Img.Fill "300x300 center" }} |
| 84 | + |
| 85 | + {{ $maskedSpeaker1 := $speaker1 | images.Filter $avatarMaskFilter }} |
| 86 | + |
| 87 | + {{ $final = $final.Filter (images.Overlay $maskedSpeaker1 (sub (div $imgWidth 2) 150) 465) }} |
| 88 | + |
| 89 | +{{ else }} |
| 90 | + {{ $title1Options := dict |
| 91 | + "color" "#393f5f" |
| 92 | + "size" 80 |
| 93 | + "x" (div $imgWidth 2) |
| 94 | + "y" 800 |
| 95 | + "font" $fontBold |
| 96 | + "alignx" "center" |
| 97 | + }} |
| 98 | + {{ $final = $final.Filter (images.Text "TBA" $title1Options) }} |
| 99 | +{{ end }} |
66 | 100 |
|
67 | 101 | {{ return $final }} |
0 commit comments