forked from PHPDX/cascadiaphp.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlayout.php
97 lines (78 loc) · 3.63 KB
/
layout.php
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
<?php
/**
* @var \Psr\Container\ContainerInterface $container
* @var \CascadiaPHP\Site\Template\Template $this
* @var string|null $title
* @var string|null $url
*/
use CascadiaPHP\Site\SEO\SEOTools;
?>
<!doctype html>
<html amp class="bg-white">
<head>
<?php /** Enable AMP */ ?>
<meta charset="utf-8">
<script async src="https://cdn.ampproject.org/v0.js"></script>
<?= $this->section('metatags', $container->get(SEOTools::class)->generate()) ?>
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<title><?= $this->e($title ?? 'Cascadia PHP 2018') ?></title>
<link rel="canonical" href="<?= $this->fullUri($url ?? '') ?>" />
<?= $this->section('schema', $container->get('schema')) ?>
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
<style amp-custom><?= $this->section('css') ?></style>
<?= $this->section('components') ?>
<script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>
<script async custom-element="amp-fit-text" src="https://cdn.ampproject.org/v0/amp-fit-text-0.1.js"></script>
<script async custom-element="amp-sidebar" src="https://cdn.ampproject.org/v0/amp-sidebar-0.1.js"></script>
<script async custom-element="amp-position-observer" src="https://cdn.ampproject.org/v0/amp-position-observer-0.1.js"></script>
<script async custom-element="amp-animation" src="https://cdn.ampproject.org/v0/amp-animation-0.1.js"></script>
<script async custom-element="amp-install-serviceworker" src="https://cdn.ampproject.org/v0/amp-install-serviceworker-0.1.js"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:200,300,400,700">
</head>
<body class="cascadiaphp">
<amp-install-serviceworker src="/serviceworker.js"
data-iframe-src="<?= $this->formUri('/serviceworker') ?>"
layout="nodisplay">
</amp-install-serviceworker>
<?= $this->section('header') ?>
<amp-analytics type="googleanalytics">
<script type="application/json">
{
"vars": {
"account": "UA-115467305-1"
},
"triggers": {
"trackPageview": {
"on": "visible",
"request": "pageview"
}
}
}
</script>
</amp-analytics>
<?php
$this->insert('structure/sidebar', [
'active' => $active ?? ''
]);
?>
<div class="main-structure mx-auto relative flex flex-column justify-between">
<?php
if ($header ?? true) {
$this->insert('structure/header', [
'nologo' => $nologo ?? false,
'active' => $active ?? ''
]);
}
?>
<section class="main-content container">
<?= $this->section('content') ?>
</section>
<?php
if ($footer ?? true) {
$this->insert('structure/footer');
}
?>
</div>
<?= $this->section('footer') ?>
</body>
</html>