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

single.html « slides « layouts - github.com/xaprb/story.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e9a44cc8e3c1e602f688c4b11a2445c661e1124f (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
{{ define "title" }}{{ cond (eq .Site.Params.titlecase true) (.Title | title | markdownify) (.Title | markdownify) }}{{ end }}

{{ define "layout" }}
		{{- if .Site.Params.less -}}
			{{- with .Params.themes -}}
				{{- range . }}
					<link rel="stylesheet/less" type="text/css" href="{{ "css/" | absURL }}{{ . }}.less"></style>
				{{- end -}}
				<script type="text/javascript" src="{{ "js/less.min.js" | absURL }}"></script>
			{{- end }}
		{{ else }}
			{{- with .Params.themes -}}
				{{- range . }}
					<link rel="stylesheet" type="text/css" href="{{ "css/" | absURL }}{{ . }}.css"></style>
				{{- end -}}
			{{- else }}
			<link rel="stylesheet" type="text/css" href="{{ "css/" | absURL }}{{ .Params.theme }}.css"></style>
			{{- end }}
		{{- end -}}
		<style type="text/css">
		/* Fixes a RemarkJS print-to-PDF bug; assumes 16:9 or 4:3 ratio */
		@page {
				  size: {{ if eq "16:9" .Params.ratio }} 1216px 684px; {{ else }} 912px 684px; {{ end }}
				  margin: 0;
		}
		</style>
		<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
		<link href="https://fonts.googleapis.com/css?family=Quattrocento+Sans:400,400i,700,700i|Quattrocento:400,700|Spectral:400,400i,700,700i&amp;subset=latin-ext" rel="stylesheet">
{{ end }}

{{ define "header" }}
  <!-- simply override the "header" from baseof.html to make it empty -->
{{ end }}

{{ define "main" }}
    <textarea id="source">
			{{- .RawContent -}}
    </textarea>
    <script type="text/javascript" src="{{ "js/qrcode.js" | absURL }}"></script>
    <script src="{{ "js/remark.js" | absURL }}"></script>
    <script>
      var slideshow = remark.create({
         {{ with .Params.ratio }} ratio: "{{ . }}", {{ end }}
         navigation: {
            scroll: false
         },
         countIncrementalSlides: false,
         slideNumberFormat: '%current%',
			highlightLanguage: "xaprb",
			placeholder: "dummy value to end the list without a comma"
      });

		// Shrink headers until they fit. (They have to be momentarily made
		// visible first.)
		$(".remark-slide-content.fit-h1 h1").each(function(i, e) {
			var $e = $(e);
			var $p = $e.closest('div.remark-slide-container');
			var needsToggle = !$p.hasClass('remark-visible');
			if ( needsToggle ) $p.toggleClass('remark-visible');
			while (e.scrollHeight > e.clientHeight + 1 && $e.css('font-size') != '1px') {
				$e.css('font-size', (parseInt($e.css('font-size')) - 1) + "px");
				// console.log($e.css('font-size') + "sh:" + e.scrollHeight + "ch:" +
				// 	e.clientHeight);
			}
			if ( needsToggle ) $p.toggleClass('remark-visible');
		});

		$( function() {
			if ( $( "body.feature-qrcode:not(.feature-noqrcode)" ).length ) {
				if ( $( ".qrcode" ).length ) {
					new QRCode($(".qrcode")[0], {
						"useSVG": true,
						"text": window.location.href.replace(/#\d*$/, "")
					});
				}
			}
		});

    </script>
{{ end }}

{{ define "social" }}
		<meta name="og:title" content="{{ cond (eq .Site.Params.titlecase true) (.Title | title | markdownify) (.Title | markdownify) }}" />
		<meta name="og:type" content="article" />
		<meta name="og:image" content="{{ default .Params.image .Params.thumbnail | absURL }}" />
		<meta name="og:description" content="{{ .Description | markdownify }}" />
		<meta name="og:url" content="{{ .Permalink }}" />
		<meta name="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 }}

{{ define "about" }}
  <!-- simply override the "header" from baseof.html to make it empty -->
{{ end }}
{{ define "footer" }}
  <!-- simply override the "header" from baseof.html to make it empty -->
{{ end }}