You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zr...@apache.org on 2020/10/19 12:35:15 UTC

[camel-website] branch master updated: refactor: YouTube video embedding fixes

This is an automated email from the ASF dual-hosted git repository.

zregvart pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-website.git


The following commit(s) were added to refs/heads/master by this push:
     new a13661d  refactor: YouTube video embedding fixes
a13661d is described below

commit a13661d9915420e08f1d9218d5fd4ea88ec7e18f
Author: Zoran Regvart <zr...@apache.org>
AuthorDate: Mon Oct 19 14:35:02 2020 +0200

    refactor: YouTube video embedding fixes
    
    With this the `Content-Security-Policy` should allow loading iframe from
    YouTube (already patched live). Also the `youtube` builtin shortcode was
    generating inline CSS if `class` parameter was not specified so a CSS
    class needed to be added so that the video content can be styled.
---
 antora-ui-camel/src/css/site.css                   |  1 +
 antora-ui-camel/src/css/videos.css                 | 14 +++++++++++
 .../blog/2020/10/ApacheCon-at-Home-videos/index.md | 28 +++++++++++-----------
 static/.htaccess                                   |  3 +--
 4 files changed, 30 insertions(+), 16 deletions(-)

diff --git a/antora-ui-camel/src/css/site.css b/antora-ui-camel/src/css/site.css
index 2b831d0..dfaf4f0 100644
--- a/antora-ui-camel/src/css/site.css
+++ b/antora-ui-camel/src/css/site.css
@@ -25,3 +25,4 @@
 @import 'community.css';
 @import 'docs.css';
 @import 'sitemap.css';
+@import 'videos.css';
diff --git a/antora-ui-camel/src/css/videos.css b/antora-ui-camel/src/css/videos.css
new file mode 100644
index 0000000..41446d6
--- /dev/null
+++ b/antora-ui-camel/src/css/videos.css
@@ -0,0 +1,14 @@
+.video {
+  position: relative;
+  overflow: hidden;
+  padding-bottom: 52.9986395%; /* height/width ratio 409.017/771.75=0.529986395 */
+}
+
+.video iframe {
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  border: 0;
+}
diff --git a/content/blog/2020/10/ApacheCon-at-Home-videos/index.md b/content/blog/2020/10/ApacheCon-at-Home-videos/index.md
index 84059d4..cf0de54 100644
--- a/content/blog/2020/10/ApacheCon-at-Home-videos/index.md
+++ b/content/blog/2020/10/ApacheCon-at-Home-videos/index.md
@@ -33,19 +33,19 @@ by [Andrea Cosentino](https://twitter.com/oscerd2) and
 
 [Slides](Cosentino_Andrea,_Ibsen_Claus_Whats_new_with_Apache_Camel_3.pdf)
 
-{{< youtube MBTtRE_n5Ng >}}
+{{< youtube id="MBTtRE_n5Ng" class="video" >}}
 
 ### Making Enterprise Integration Patterns Work for You
 
 by [Justin Reock](https://twitter.com/jreock)
 
-{{< youtube reiIjLWaFg8 >}}
+{{< youtube id="reiIjLWaFg8" class="video" >}}
 
 ### Getting started with Apache Camel on Quarkus
 
 by [Alexandre Gallice](https://twitter.com/AlexGallice)
 
-{{< youtube POWsZnGhVHM >}}
+{{< youtube id="POWsZnGhVHM" class="video" >}}
 
 ### Build and Deploy Cloud Native Camel Quarkus Routes With Tekton and Knative
 
@@ -53,7 +53,7 @@ by [Omar Al-Safi](https://twitter.com/omarsmak)
 
 [Slides](Omar_Al-Safi_Build_and_Deploy_Cloud_Native_Camel_Quarkus_Routes_With_Tekton_and_Knative.pptx)
 
-{{< youtube k8OFq6CnySE >}}
+{{< youtube id="k8OFq6CnySE" class="video" >}}
 
 ### Camel Kafka Connectors: when Camel meets Kafka
 
@@ -62,13 +62,13 @@ Guerrero](https://twitter.com/hguerreroo)
 
 [Slides](Tarocchi_Andrea,_Guerrero_Hugo_Camel_Kafka_Connectors_-_when_Camel_meets_Kafka.pdf)
 
-{{< youtube 0THM_HFFWTI >}}
+{{< youtube id="0THM_HFFWTI" class="video" >}}
 
 ### Integrating Postgres with Apache Camel and ActiveMQ
 
 by [Justin Reock](https://twitter.com/jreock)
 
-{{< youtube QZdktRXet2k >}}
+{{< youtube id="QZdktRXet2k" class="video" >}}
 
 ### Camel API Gateway
 
@@ -76,7 +76,7 @@ by [Rodrigo Coelho](https://twitter.com/rcoelho)
 
 [Slides](Rodrigo_Coelho_Open_Source_light_API_Gateway_built_with_Apache_Camel.pptx)
 
-{{< youtube sEKCI8IBCfc >}}
+{{< youtube id="sEKCI8IBCfc" class="video" >}}
 
 ### How to contribute textual tooling for Apache Camel in several IDEs
 
@@ -84,13 +84,13 @@ by [Aurélien Pupier](https://twitter.com/apupier)
 
 [Slides](Pupier_Aurélien_How_to_contribute_textual_tooling_for_Apache_Camel_in_several_IDEs.pdf)
 
-{{< youtube gL3GIzPT36Y >}}
+{{< youtube id="gL3GIzPT36Y" class="video" >}}
 
 ### Serverless Integration Anatomy
 
 by [Christina Lin](https://twitter.com/Christina_wm)
 
-{{< youtube etSwmRP8-Eo >}}
+{{< youtube id="etSwmRP8-Eo" class="video" >}}
 
 ### Testing Camel K integrations with Cloud Native BDD
 
@@ -98,7 +98,7 @@ by [Christoph Deppisch](https://twitter.com/freaky_styley)
 
 [Slides](Deppisch_Christoph_Testing_CamelK_with_Cloud_Native_BDD.pdf)
 
-{{< youtube aYLLtj6TdjM >}}
+{{< youtube id="aYLLtj6TdjM" class="video" >}}
 
 ### "Cloud Native" My Camel
 
@@ -106,13 +106,13 @@ by [Michael Costello](https://mike-costello.github.io/) and [David Gordon](https
 
 [Slides](Costello_Michael_CloudNativeMyCamel.1.00.001.pdf)
 
-{{< youtube HEB8TMmsEDg >}}
+{{< youtube id="HEB8TMmsEDg" class="video" >}}
 
 ### Software Architecture and Architectors: useless VS valuable
 
 by [Andrei Shakirin](https://twitter.com/ashakirin)
 
-{{< youtube SI1WqGST1SI >}}
+{{< youtube id="SI1WqGST1SI" class="video" >}}
 
 ## Panel and lightning talks
 
@@ -128,7 +128,7 @@ Panelists: [Omar Al-Safi](https://twitter.com/omarsmak),
 
 Moderated by [María Arias de Reyna](https://twitter.com/delawen/)
 
-{{< youtube 6EQy1kw03Ig >}}
+{{< youtube id="6EQy1kw03Ig" class="video" >}}
 
 ### Lightning talks
 
@@ -163,4 +163,4 @@ link](https://www.atlasmap.io/)
 **Camel from an outsider: Insights on the way to adoption**, [Jose Raez
 Rodriguez](https://twitter.com/JoshiRaez)
 
-{{< youtube Y40ebvXbQmU >}}
+{{< youtube id="Y40ebvXbQmU" class="video" >}}
diff --git a/static/.htaccess b/static/.htaccess
index 40ceb43..e0aefea 100644
--- a/static/.htaccess
+++ b/static/.htaccess
@@ -1546,7 +1546,7 @@ AddDefaultCharset utf-8
 
 <IfModule mod_headers.c>
     #                                   (1)                 (2)              (3)                 (4)                     (5)
-    Header set Content-Security-Policy "default-src 'self'; base-uri 'none'; form-action 'self'; frame-ancestors 'none'; upgrade-insecure-requests; connect-src https://*.algolia.net https://*.algolianet.com; img-src 'self' https://*.githubusercontent.com" "expr=%{CONTENT_TYPE} =~ m#text/html#i"
+    Header set Content-Security-Policy "default-src 'self'; base-uri 'none'; form-action 'self'; frame-ancestors 'none'; upgrade-insecure-requests; connect-src https://*.algolia.net https://*.algolianet.com; img-src 'self' https://*.githubusercontent.com; child-src https://www.youtube-nocookie.com" "expr=%{CONTENT_TYPE} =~ m#text/html#i"
 </IfModule>
 
 # ----------------------------------------------------------------------
@@ -2110,4 +2110,3 @@ FileETag None
     ExpiresByType text/x-cross-domain-policy            "access plus 1 week"
 
 </IfModule>
-