gbif / hosted-portals

Support material for establishing the GBIF Hosted Portals
Apache License 2.0
10 stars 6 forks source link

Use of <iframe> elements #109

Closed jenningsdt closed 3 years ago

jenningsdt commented 3 years ago

Would it be possible to use <iframe> elements in the hosted portal pages?

Specifically, we would like to have active content within news items. For example, when we hold quarterly regional online meetings, having a live Jamboard or Google Doc would be beneficial and could increase participation. However, these require <iframe>.

MortenHofft commented 3 years ago

Yes - Markdown supports iframes. Or any other html for that matter.

The Colombian site already have an example - notice that the page is structured a bit differently to have a larger iframe, and that a bit of custom css is added. The demo site video is also an iframe.

@RicardoOrtizG perhaps you have any recommendations?

MortenHofft commented 3 years ago

@jenningsdt let me know if you need help with the specific use case.

RicardoOrtizG commented 3 years ago

Hi!

We add iframes for youtube videos and google forms just by copying the iframe brackets (you can found them in the share options of each application) directly to the Markdown text. (Google Forms example, Example of videos in dropdown buttons). It is very simple and more responsive in cellphones or tablets. The other way is adding a custom and making a class in which you can add the iframe.

As Morten says you can customize it by adding some CSS as shown here in the. iframe-box object. and adding the iframes in the section custom.yml as shown in gacetero: and formularioRegistro:

Hope it is useful to you.