Skip to content

Commit ba31bbb

Browse files
committed
building blocks in events activities page tina
1 parent a3a1b5b commit ba31bbb

File tree

6 files changed

+92
-339
lines changed

6 files changed

+92
-339
lines changed

content/english/events/activities.md

Lines changed: 6 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ events:
4444
Presentation Fundamental Rights Impact Assessments (FRIAs) and inclusive,
4545
deliberative stakeholder panels for responsible AI – plenary JTC21
4646
CEN-CENELEC Dublin
47+
48+
49+
{{< pdf_frame
50+
articleUrl1="https://drive.google.com/file/d/1vadydN4_ZEXJ0h_Sj-4GRUwJSacM0fCK/preview"
51+
articleUrl2="https://drive.google.com/file/d/1vadydN4_ZEXJ0h_Sj-4GRUwJSacM0fCK/preview"
52+
width_desktop_pdf="6" width_mobile_pdf="12" >}}
4753
image: /images/events/jtc21.jpg
4854
date: 13-02-2024
4955
facets:
@@ -109,7 +115,6 @@ events:
109115
CEN-CENELEC
110116
image: /images/events/jtc21.jpg
111117
date: 07-01-2024
112-
pdf: /pdf-files/20240107_AA_stakeholder_panels.pdf
113118
facets:
114119
- value: type_presentation
115120
label: presentation
@@ -128,7 +133,6 @@ events:
128133
sent to the European Commission.
129134
image: /images/events/DSA.jpeg
130135
date: 27-06-2023
131-
pdf: ''
132136
facets:
133137
- value: type_event
134138
label: event
@@ -141,52 +145,3 @@ events:
141145
hide: true
142146
---
143147

144-
145-
146-
147-
148-
149-
150-
151-
152-
153-
154-
155-
156-
157-
158-
159-
160-
161-
162-
163-
164-
165-
166-
167-
168-
169-
170-
171-
172-
173-
174-
175-
176-
177-
178-
179-
180-
181-
182-
183-
184-
185-
186-
187-
188-
189-
190-
191-
192-

layouts/shortcodes/pdf_frame.html

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,32 @@
11
{{ $_hugo_config := `{ "version": 1 }` }}
22

33
<!-- in case 2 pdfs -->
4+
{{$mobile_width := "6"}}
5+
{{$desktop_width := "6"}}
6+
{{ if .Get "width_mobile_pdf" }} {{ $mobile_width = .Get "width_mobile_pdf" }} {{ end }}
7+
{{ if .Get "width_desktop_pdf" }} {{ $desktop_width = .Get "width_desktop_pdf" }} {{ end }}
48
{{ if .Get "articleUrl2" }}
5-
<div class="col-12 my-5" style="display:table;">
6-
{{ $articleUrl1 := .Get "articleUrl1" | relURL }}
7-
<iframe src="{{$articleUrl1}}" width="50%;" height="594px" allow="autoplay"></iframe>
8-
{{ $articleUrl2 := .Get "articleUrl2" | relURL }}
9-
<iframe src="{{$articleUrl2}}" width="50%;" height="594px" allow="autoplay"></iframe>
9+
<div class="row">
10+
<div class="col-{{ $mobile_width }} col-lg-{{ $desktop_width }} my-5" style="display:table;">
11+
{{ $articleUrl1 := .Get "articleUrl1" | relURL }}
12+
<iframe src="{{$articleUrl1}}" width="100%" height="594px" allow="autoplay"></iframe>
13+
</div>
14+
<div class="col-{{ $mobile_width }} col-lg-{{ $desktop_width }} my-5" style="display:table;">
15+
{{ $articleUrl2 := .Get "articleUrl2" | relURL }}
16+
<iframe src="{{$articleUrl2}}" width="100%" height="594px" allow="autoplay"></iframe>
17+
</div>
1018
</div>
1119
<!-- /in case 2 pdfs -->
1220

1321
<!-- in case 1 pdf -->
1422
{{ else }}
15-
<div class="col-lg-6 col-12 my-5" style="display:table;">
23+
{{$mobile_width := "6"}}
24+
{{$desktop_width := "6"}}
25+
{{ if .Get "width_mobile_pdf" }} {{ $mobile_width = .Get "width_mobile_pdf" }} {{ end }}
26+
{{ if .Get "width_desktop_pdf" }} {{ $desktop_width = .Get "width_desktop_pdf" }} {{ end }}
27+
<div class="col-{{ $mobile_width }} col-lg-{{ $desktop_width }} my-5" style="display:table;">
1628
{{ $articleUrl1 := .Get "articleUrl1" | relURL }}
17-
<iframe src="{{$articleUrl1}}" width="100%;" height="594px" allow="autoplay"></iframe>
29+
<iframe src="{{$articleUrl1}}" width="100%" height="594px" allow="autoplay"></iframe>
1830
</div>
1931
{{ end }}
2032
<!-- /in case 1 pdf -->

tina/collections/pages/algoprudence_cases.ts

Lines changed: 7 additions & 232 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ import building_blocks from "../shared/page/building_blocks";
77
import pdf_frame from "../shared/templates/pdf_frame";
88

99
let specific_fields : TinaField[] = [
10+
{
11+
type: "string",
12+
name: "icon",
13+
label: "Icon",
14+
description: "From https://fontawesome.com/search (e.g. fa-square-poll-vertical from https://fontawesome.com/icons/square-poll-vertical?f=classic&s=solid)"
15+
},
1016
{
1117
type: "string",
1218
name: "layout",
@@ -18,237 +24,6 @@ let specific_fields : TinaField[] = [
1824
label: "Case"
1925
}
2026
]
21-
},
22-
{
23-
type: "string",
24-
name: "icon",
25-
label: "Icon",
26-
description: "From https://fontawesome.com/search (e.g. fa-square-poll-vertical from https://fontawesome.com/icons/square-poll-vertical?f=classic&s=solid)"
27-
},
28-
{
29-
type: "object",
30-
name: "key_takeaways",
31-
label: "Key takeaways",
32-
list: true,
33-
fields:
34-
[
35-
{
36-
type: "string",
37-
name: "title",
38-
label: "Title",
39-
required: true,
40-
},
41-
{
42-
type: "rich-text",
43-
name: "content",
44-
label: "Content",
45-
required: true,
46-
}
47-
]
48-
},
49-
{
50-
type: "rich-text",
51-
name: "summary",
52-
label: "Summary",
53-
},
54-
{
55-
type: "rich-text",
56-
name: "sources",
57-
label: "Source",
58-
},
59-
{
60-
type: "object",
61-
name: "additional_content",
62-
label: "Additinonal Content",
63-
list: true,
64-
fields:
65-
[
66-
{
67-
type: "string",
68-
name: "title",
69-
label: "Title",
70-
required: true,
71-
},
72-
{
73-
type: "rich-text",
74-
name: "content",
75-
label: "Content",
76-
required: true,
77-
},
78-
{
79-
type: "image",
80-
name: "image",
81-
label: "Image",
82-
},
83-
{
84-
type: "string",
85-
name: "image_link",
86-
label: "Image link",
87-
},
88-
{
89-
type: "number",
90-
name: "width",
91-
label: "Width of text (12 is the maximum)",
92-
description: "It's probably best to use 12 if you're not using an image and 8 if you are."
93-
}
94-
]
95-
},
96-
{
97-
type: "object",
98-
name: "algoprudence",
99-
label: "Algoprudence / Report",
100-
fields:
101-
[
102-
{
103-
type: "string",
104-
name: "title",
105-
label: "Title",
106-
required: true,
107-
},
108-
{
109-
type: "rich-text",
110-
name: "intro",
111-
label: "Intro",
112-
required: true,
113-
},
114-
{
115-
type: "object",
116-
name: "reports",
117-
label: "Reports",
118-
list: true,
119-
fields:
120-
[
121-
{
122-
type: "string",
123-
name: "url",
124-
label: "Url",
125-
required: true,
126-
}
127-
]
128-
}
129-
]
130-
},
131-
{
132-
type: "object",
133-
name: "normative_advice_members",
134-
label: "Normative Advice Commission Members",
135-
list: true,
136-
fields:
137-
[
138-
{
139-
type: "rich-text",
140-
name: "name",
141-
label: "Name, function (and department), university, link",
142-
required: true,
143-
}
144-
]
145-
},
146-
{
147-
type: "object",
148-
name: "funded_by",
149-
label: "Funded By",
150-
list: true,
151-
fields:
152-
[
153-
{
154-
type: "string",
155-
name: "url",
156-
label: "Url",
157-
required: true,
158-
},
159-
{
160-
type: "image",
161-
name: "image",
162-
label: "image",
163-
required: true,
164-
}
165-
]
166-
},
167-
{
168-
type: "object",
169-
name: "actions",
170-
label: "Follow-up actions",
171-
list: true,
172-
fields:
173-
[
174-
{
175-
type: "string",
176-
name: "id",
177-
label: "Id",
178-
description: "Id can be used to deeplink, for example with ?tab=actions&item={id}"
179-
},
180-
{
181-
type: "string",
182-
name: "title",
183-
label: "Title",
184-
required: true,
185-
},
186-
{
187-
type: "rich-text",
188-
name: "description",
189-
label: "description",
190-
templates: [
191-
pdf_frame
192-
]
193-
},
194-
{
195-
type: "image",
196-
name: "image",
197-
label: "image",
198-
required: true,
199-
},
200-
{
201-
type: "string",
202-
name: "date",
203-
label: "Date",
204-
required: true,
205-
description: "dd-MM-yyyy (i.e. 13-06-2024)"
206-
},
207-
facets
208-
]
209-
},
210-
{
211-
type: "object",
212-
name: "discussions",
213-
label: "Discussion & debate",
214-
list: true,
215-
fields:
216-
[
217-
{
218-
type: "string",
219-
name: "id",
220-
label: "Id",
221-
description: "Id can be used to deeplink, for example with ?tab=discussions&item={id}"
222-
},
223-
{
224-
type: "string",
225-
name: "title",
226-
label: "Title",
227-
required: true,
228-
},
229-
{
230-
type: "rich-text",
231-
name: "description",
232-
label: "description",
233-
templates: [
234-
pdf_frame
235-
]
236-
},
237-
{
238-
type: "image",
239-
name: "image",
240-
label: "image",
241-
required: true,
242-
},
243-
{
244-
type: "string",
245-
name: "date",
246-
label: "Date",
247-
required: true,
248-
description: "dd-MM-yyyy (i.e. 13-06-2024)"
249-
},
250-
facets
251-
]
25227
}
25328
];
25429

@@ -259,7 +34,7 @@ export default {
25934
match: {
26035
include: '**/algoprudence/cases/**',
26136
},
262-
fields: building_blocks.concat(specific_fields),
37+
fields: specific_fields.concat(building_blocks),
26338
defaultItem: () => {
26439
return {
26540
layout: "case"

0 commit comments

Comments
 (0)