-
Notifications
You must be signed in to change notification settings - Fork 14
/
spa2.html
113 lines (92 loc) · 3.59 KB
/
spa2.html
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>Tutorial SPA Demo</title>
<script src="components/platform/platform.js"></script>
<link rel="import" href="spa-elements.html">
<link rel="import" href="components/core-ajax/core-ajax.html">
<link rel="stylesheet" href="styles.css" shim-shadowdom>
<base target="_blank"></base>
<style>
core-animated-pages > * {
font-size: inherit;
overflow-y: auto;
padding: 30px;
}
</style>
</head>
<body unresolved fullbleed>
<template is="auto-binding" id="t">
<!-- Route controller. -->
<flatiron-director route="{{route}}" autoHash></flatiron-director>
<!-- Keyboard nav controller. -->
<core-a11y-keys id="keys" target="{{parentElement}}"
keys="up down left right space space+shift"
on-keys-pressed="{{keyHandler}}"></core-a11y-keys>
<!-- Dynamic content controller -->
<core-ajax id="ajax" url="{{selectedPage.page.url}}" handleAs="document"
on-core-response="{{onResponse}}"></core-ajax>
<core-scaffold id="scaffold">
<nav>
<core-toolbar>
<img src="images/gdgtc.svg" style="height:64px" />
</core-toolbar>
<template repeat="{{page, i in pages}}">
<paper-item icon="label{{route != page.hash ? '-outline' : ''}}"
label="{{page.name}}" hash="{{page.hash}}">
<a href="#{{page.hash}}"></a>
</paper-item>
</template>
</nav>
<core-toolbar tool flex>
<div flex>{{selectedPage.page.name}}</div>
<core-icon-button icon="refresh"></core-icon-button>
<core-icon-button icon="add"></core-icon-button>
</core-toolbar>
<div layout horizontal center-center fit>
<core-animated-pages id="pages" selected="{{route}}" valueattr="hash"
transitions="slide-from-right">
<template repeat="{{page, i in pages}}">
<section hash="{{page.hash}}" layout vertical center-center>
<div style="max-width:100%;">Loading...</div>
</section>
</template>
</core-animated-pages>
</div>
</core-scaffold>
</template>
<script src="spa-app-ajax.js"></script>
<script>
</script>
<script>
// Hello Developers! See console.
console && console.log(
"%cWelcome to %cG%cD%cG %cT%cw%ci%cn %cC%ci%ct%ci%ce%cs%c!\n%cThis website code is at https://github.com/GDGTC/gdgtc-site-polymer/",
"font-size:1.5em;color:#4558c9;",
"font-size:1.5em;color:#0266C8;",
"font-size:1.5em;color:#F90101;",
"font-size:1.5em;color:#F2B50F;",
"font-size:1.5em;color:#4558c9;",
"font-size:1.5em;color:#00933B;",
"font-size:1.5em;color:#0266C8;",
"font-size:1.5em;color:#F90101;",
"font-size:1.5em;color:#F2B50F;",
"font-size:1.5em;color:#4558c9;",
"font-size:1.5em;color:#00933B;",
"font-size:1.5em;color:#0266C8;",
"font-size:1.5em;color:#F90101;",
"font-size:1.5em;color:#F2B50F;",
"font-size:1.5em;color:#00933B;",
"font-size:1em;color:#006600;");
// Analytics for pp.org
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-46026381-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>