forked from mozilla/kitsune
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adds a common function for video/image hooks * Adds support for modal + placeholder html text + title * Multiple modals on the same page * Close modals with escape or by clicking on overlay
- Loading branch information
Paul Craciunoiu
committed
Nov 19, 2010
1 parent
783b681
commit 926a86a
Showing
11 changed files
with
266 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{# vim: set ts=2 et sts=2 sw=2: #} | ||
|
||
<div class="video{% if params['modal'] %} modal-trigger{% endif %}"> | ||
{% if params['modal'] %} | ||
<a href="{% if sources %}{{ sources[0].src }}{% else %}{{ fallback }}{% endif %}" class="video-modal-trigger" data-modal-selector=""> | ||
<span class="video-placeholder"> | ||
{% if params['placeholder'] %} | ||
{{ params['placeholder']|safe }} | ||
{% else %} | ||
<img class="video-thumbnail" src="{{ video.thumbnail_url_if_set() }}"/> | ||
{% endif %} | ||
</span> | ||
</a>{# /video-modal#} | ||
<div class="video-modal fixed-modal pop-in"> | ||
<h1> | ||
{% if params['title'] %} | ||
{{ params['title'] }} | ||
{% else %} | ||
{{ video.title }} | ||
{% endif %} | ||
</h1> | ||
<div class="wrap"> | ||
{% endif %} | ||
|
||
<video data-fallback="{{ fallback }}" height="{{ height }}" width="{{ width }}" controls=""> | ||
{% for s in sources %} | ||
<source src="{{ s.src }}" type="video/{{ s.type }}"> | ||
{% endfor %} | ||
</video> | ||
|
||
{% if params['modal'] %} | ||
</div> | ||
</div> | ||
{% endif %} | ||
</div> | ||
|
||
|
Oops, something went wrong.