Welcome to mirror list, hosted at ThFree Co, Russian Federation.

video.html « content-type « partials « layouts - github.com/Lednerb/bilberry-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 291462fb324319feb56ada0d845472d4084aecef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<a class="bubble" href="{{ .ctx.Permalink }}">
    <i class="fas fa-fw {{or .ctx.Params.icon "fa-video" }}"></i>
</a>

<article class="video">
    {{ partial "featured-image.html" .ctx }}

    {{ if and (isset .ctx.Params "youtube") (ne .ctx.Params.youtube "") }}
        <div class="responsive-video youtube">
            <div>
                <a href="https://www.youtube.com/watch?v={{ .ctx.Params.youtube }}" target="_blank" data-video="{{ .ctx.Params.youtube }}">
                    {{ if .ctx.Resources.GetMatch "videoPoster.*" }}
                        <img src="{{ (.ctx.Resources.GetMatch "videoPoster.*").RelPermalink }}" alt="">
                    {{ else }}
                        <img src="https://i.ytimg.com/vi/{{ .ctx.Params.youtube }}/maxresdefault.jpg" alt="">
                    {{ end }}
                    <div class="overlay">
                        <i class="fab fa-youtube"></i>
                    </div>
                </a>
            </div>
        </div>
    {{ end }}

    {{ with .ctx.Params.vimeo }}
        <div class="responsive-video vimeo">
            <iframe class="no-js-hidden" src="https://player.vimeo.com/video/{{ . }}" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>

            <div class="no-js-message">
                The vimeo player can not be loaded with disabled javascript. <br>
                The following video is embedded here: <br>

                <a href="https://vimeo.com/{{ . }}" target="_blank">
                    https://vimeo.com/{{ . }}
                </a>
            </div>
        </div>
    {{ end }}

    {{ with .ctx.Params.prezi }}
        <div class="responsive-video prezi">
            <iframe src="https://prezi.com/embed/{{ . }}/" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
        </div>
    {{ end }}

    {{ if isset .ctx.Params "mp4video" }}
        <div class="responsive-video local">
          <video width="100%" controls poster="{{ .ctx.Params.mp4videoImage }}">
            <source src="{{ .ctx.Params.mp4video }}" type="video/mp4">
            Your browser does not support the video tag.
          </video>
        </div>
    {{ end }}

    {{ partial "default-content.html" (dict "ctx" .ctx "template_type" .template_type) }}
    {{ partial "article-footer.html" .ctx }}
</article>