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

single.html « talks « layouts - github.com/xaprb/story.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 978951dd982c5a0a03c5e14a0a719b770415e98f (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
{{ define "title" }}{{ cond (eq .Site.Params.titlecase true) (.Title | title | markdownify) (.Title | markdownify) }} • {{ .Params.event }}{{ end }}
{{ define "main" }}
<article class="center bg-white br-3 pv1 ph4 nested-copy-line-height lh-copy f4 nested-links mw-100 measure-wide">
		{{ .Content }}
		{{ with .Params.slides }}
		<p><a id="slides_link" class="mb3 pv2 ph3 ba bw1 black br-pill dib" href="{{ . | absURL }}">Slides</a>
		{{ end }}
		{{ with .Params.video }}
		<a id="video_link" class="mb3 pv2 ph3 ba bw1 black br-pill dib" href="{{ . }}">Video</a>
		{{ end }}
		{{ with .Params.site }}
		<a class="mb3 pv2 ph3 ba bw1 black br-pill dib" href="{{ . }}">Website</a>
		{{ end }}
		{{ with .Params.location }}
		<a class="mb3 pv2 ph3 ba bw1 black br-pill dib" href="https://www.google.com/maps/place/{{ . }}">Venue</a>
		{{ end }}
</article>
<script type="text/javascript">
// Add event handlers to slide and video links, to open them in an iframe popup.
$( function() {
	if ( $( "#slides_link" ).length ) {
		$("#slides_link").click(function(eventObject) {
			eventObject.preventDefault();
			var elem = $( this );
			elem.parent().after($("<iframe class='h5 w-100 bn' src='" + elem.attr("href") + "'></iframe>"));
		});
	}
	if ( $( "#video_link" ).length ) {
		$("#video_link").click(function(eventObject) {
			var elem = $( this );
			var href = elem.attr("href");
			switch(true) {
				case /youtube.com/.test(href):
					eventObject.preventDefault();
					href = href.replace("watch?v=", "embed/");
					elem.parent().after($("<iframe class='h5 w-100 bn' src='" + href + "' allow='accelerometer; encrypted-media; gyroscope; picture-in-picture' allowfullscreen></iframe>"));
				// default is just to follow the link.
				// TODO: add a vimeo embedder here? If you're reading this source code, please submit a PR
				// for other video sources you want to be supported here.
			}
		});
	}
});

</script>
{{ end }}

{{ define "social" }}
		<meta property="og:title" content="{{ cond (eq .Site.Params.titlecase true) (.Title | title | markdownify) (.Title | markdownify) }}" />
		<meta property="og:type" content="article" />
		<meta property="og:image" content="{{ default (default "img/default-header-img.jpg" .Params.image) .Params.thumbnail | absURL }}" />
		<meta property="og:description" content="{{ .Description | markdownify }}" />
		<meta property="og:url" content="{{ .Permalink }}" />
		<meta property="og:site_name" content="{{ cond (eq .Site.Params.titlecase true) (.Title | title | markdownify) (.Title | markdownify) }}" />
		<meta name="twitter:card" content="summary_large_image" />
		<meta name="twitter:site" content="@{{ .Site.Params.twitter }}" />
{{ end }}