Fix whitespace issues with videos (fix #54).

This commit is contained in:
Simon Conseil
2013-12-27 23:25:30 +01:00
parent e46c8d5b12
commit 2637f0d09d
5 changed files with 7 additions and 7 deletions

View File

@@ -97,15 +97,15 @@
<div class="four columns thumbnail
{% if loop.index % 3 == 1 %}alpha{% endif%}
{% if loop.index % 3 == 0 %}omega{% endif%}">
<a href="#{{ media.file|replace('.', '') }}" class="gallery"
inline='yes' title="{{ media.file }}"
<a href="#{{ media.file|replace('.', '')|replace(' ', '') }}"
class="gallery" inline='yes' title="{{ media.file }}"
{% if media.big %} data-big="{{ media.big }}"{% endif %}>
<img src="{{ media.thumb }}" alt="{{ media.file }}"
title="{{ media.file }}" /></a>
</div>
<!-- This contains the hidden content for the video -->
<div style='display:none'>
<div id="{{ media.file|replace('.', '') }}">
<div id="{{ media.file|replace('.', '')|replace(' ', '') }}">
<video controls>
<source src='{{ media.file }}' type='video/webm' />
</video>

View File

@@ -84,7 +84,7 @@
<a href="{{ theme.url }}/img/empty.png">
<img src="{{ media.thumb }}" alt="{{ media.file }}"
data-layer="<video controls>
<source src={{ media.file }} type='video/webm' />
<source src='{{ media.file }}' type='video/webm' />
</video>" />
</a>
{% endif %}

View File

@@ -41,8 +41,8 @@ REF = {
},
'video': {
'title': 'Video',
'thumbnail': 'stallman-software-freedom-day-low.ogv',
'medias': ['stallman-software-freedom-day-low.ogv']
'thumbnail': 'stallman software-freedom-day-low.ogv',
'medias': ['stallman software-freedom-day-low.ogv']
}
}

View File

@@ -7,7 +7,7 @@ import os
from sigal.video import video_size, generate_video
CURRENT_DIR = os.path.dirname(__file__)
TEST_VIDEO = 'stallman-software-freedom-day-low.ogv'
TEST_VIDEO = 'stallman software-freedom-day-low.ogv'
SRCFILE = os.path.join(CURRENT_DIR, 'sample', 'pictures', 'video', TEST_VIDEO)