diff options
-rw-r--r-- | src/modelli/sugihara-impossible-objects/document.en.rest.txt | 10 | ||||
-rw-r--r-- | src/modelli/sugihara-impossible-objects/document.it.rest.txt | 10 | ||||
-rw-r--r-- | src/modelli/tachikoma/document.en.rest.txt | 7 | ||||
-rw-r--r-- | src/modelli/tachikoma/document.it.rest.txt | 7 | ||||
-rw-r--r-- | templates/du2html.xsl | 18 |
5 files changed, 40 insertions, 12 deletions
diff --git a/src/modelli/sugihara-impossible-objects/document.en.rest.txt b/src/modelli/sugihara-impossible-objects/document.en.rest.txt index c8f9183..24ce4be 100644 --- a/src/modelli/sugihara-impossible-objects/document.en.rest.txt +++ b/src/modelli/sugihara-impossible-objects/document.en.rest.txt @@ -12,11 +12,11 @@ objects. He had brought some examples, and I took pictures. An arrow that always points to the right: -.. raw:: html - - <video controls loop playsinline width="320" height="240"> - <source src="arrow.mp4" type="video/mp4"> - </video> +.. video:: arrow.mp4 + :loop: true + :type: video/mp4 + :width: 320 + :height: 240 This is what it looks like when viewed from above: diff --git a/src/modelli/sugihara-impossible-objects/document.it.rest.txt b/src/modelli/sugihara-impossible-objects/document.it.rest.txt index 36c14a4..76671ed 100644 --- a/src/modelli/sugihara-impossible-objects/document.it.rest.txt +++ b/src/modelli/sugihara-impossible-objects/document.it.rest.txt @@ -13,11 +13,11 @@ fatto foto. Una freccia che punta sempre a destra: -.. raw:: html - - <video controls loop playsinline width="320" height="240"> - <source src="arrow.mp4" type="video/mp4"> - </video> +.. video:: arrow.mp4 + :loop: true + :type: video/mp4 + :width: 320 + :height: 240 Vista dall'alto, si presenta così: diff --git a/src/modelli/tachikoma/document.en.rest.txt b/src/modelli/tachikoma/document.en.rest.txt index 89bf4ba..c9bdb0a 100644 --- a/src/modelli/tachikoma/document.en.rest.txt +++ b/src/modelli/tachikoma/document.en.rest.txt @@ -32,7 +32,12 @@ Was it worth it? See for yourself: :alt: LEGO Tachikoma, from behind :target: back.jpg -Also, `a short movie of the model in action <moving.mp4>`_. +Also, a short movie of the model in action: + +.. video:: moving.mp4 + :type: video/mp4 + :width: 320 + :height: 240 .. [*] if you don't know what a Tachikoma is, `Wikipedia can help <http://en.wikipedia.org/wiki/Tachikoma>`_ diff --git a/src/modelli/tachikoma/document.it.rest.txt b/src/modelli/tachikoma/document.it.rest.txt index 29e352e..bedebb8 100644 --- a/src/modelli/tachikoma/document.it.rest.txt +++ b/src/modelli/tachikoma/document.it.rest.txt @@ -33,7 +33,12 @@ Ne è valsa la pena? Guardate qua: :alt: Tachikoma LEGO, da dietro :target: back.jpg -Inoltre, `un breve filmato del modello in azione <moving.mp4>`_. +Inoltre, un breve filmato del modello in azione: + +.. video:: moving.mp4 + :type: video/mp4 + :width: 320 + :height: 240 .. [*] se non sapete cosa sia un Tachikoma, `Wikipedia aiuta <http://en.wikipedia.org/wiki/Tachikoma>`_ diff --git a/templates/du2html.xsl b/templates/du2html.xsl index aca58ba..a82b24e 100644 --- a/templates/du2html.xsl +++ b/templates/du2html.xsl @@ -170,6 +170,24 @@ </x:template> <x:template match="image" mode="twitter-card" priority="-1" /> + <x:template match="video"> + <video controls="true" playsinline="true"> + <x:if test="@loop"><x:attribute name="loop">true</x:attribute></x:if> + <x:attribute name="width"> + <x:value-of select="@width" /> + </x:attribute> + <x:attribute name="height"> + <x:value-of select="@height" /> + </x:attribute> + <source src="{@uri}"> + <x:if test="@type"> + <x:attribute name="type"><x:value-of select="@type"/></x:attribute> + </x:if> + </source> + <x:if test="@alt"><x:value-of select="@alt"/></x:if> + </video> + </x:template> + <!-- qui ce ne freghiamo del @source, tanto viene usata solo per i documenti stand-alone --> |