commit
ffd7fab0ce
@ -99,7 +99,7 @@ class Video(object):
|
||||
return ""
|
||||
|
||||
def generate_thumbnail(self, gm_geometry):
|
||||
thumbnail_name = ".".join(self.name.split(".")[:-1]) + "-%s.png" % gm_geometry
|
||||
thumbnail_name = ".".join(self.name.split(".")[:-1]) + "-%s.jpg" % gm_geometry
|
||||
|
||||
source, target = self.base_dir.joinpath(self.name), self.target_dir.joinpath(thumbnail_name)
|
||||
|
||||
|
@ -10,6 +10,12 @@
|
||||
|
||||
<!--Let browser know website is optimized for mobile-->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
{% if gallery.description %}
|
||||
<meta name="description" content="{{ gallery.description }}" />
|
||||
{% endif %}
|
||||
{% if gallery.lang %}
|
||||
<meta name="language" content="{{ gallery.lang }}" />
|
||||
{% endif %}
|
||||
<title>{{ gallery.title }} · {{ settings.title }}</title>
|
||||
</head>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
{% set image = Image(section.image) %}
|
||||
{{ image.copy() }}
|
||||
<div class="author-meta">
|
||||
<img src={{ image.generate_thumbnail("200x200") }} alt="" class="circle">
|
||||
<img src={{ image.generate_thumbnail("80x80") }} alt="" class="circle">
|
||||
<div>
|
||||
<span class=author-info>Story by
|
||||
<h4>{{ section.name }}</h4>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<section class="bordered-picture baguette" style="position: relative;">
|
||||
<div class="caption">
|
||||
<img class="lazy" data-original="{{ video.generate_thumbnail("2000") }}" src="" alt="">
|
||||
<video class="lazy" id="video" poster="{{ video.generate_thumbnail("2000") }}" alt="" autoplay="autoplay" loop="loop" preload="auto" muted>
|
||||
<video class="lazy" id="video" poster="{{ video.generate_thumbnail("2000") }}" alt="" autoplay="autoplay" loop="loop" preload="none" muted>
|
||||
<source src="{{ video }}" type="video/webm" data-source="{{ video }}" data-format="vp8" data-extension="webm">
|
||||
</video>
|
||||
{% if caption %}
|
||||
|
@ -32,7 +32,7 @@
|
||||
{% set image = Image(section.image) %}
|
||||
{{ image.copy() }}
|
||||
|
||||
<section class="full-picture" style="background: url('{{ image }}') no-repeat fixed center top / cover, url('{{ image.generate_thumbnail("x450") }}') no-repeat fixed center top / cover transparent;">
|
||||
<section class="full-picture" style="background: url('{{ image.generate_thumbnail("x2000") }}') no-repeat fixed center top / cover, url('{{ image.generate_thumbnail("x450") }}') no-repeat fixed center top / cover transparent;">
|
||||
|
||||
{% if section.text %}
|
||||
<div class="picture-text">
|
||||
|
Loading…
x
Reference in New Issue
Block a user