forked from enjalot/tributary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.handlebars
132 lines (103 loc) · 4.49 KB
/
header.handlebars
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Tributary</title>
<!-- Place favicon.ico and apple-touch-icon.png in the root of your domain and delete these references
<link rel="shortcut icon" href="/favicon.ico">
-->
<link rel="icon"
type="image/png"
href="/static/img/favicon.32.png" />
<link rel="shortcut icon" href="/static/img/favicon.ico">
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link rel="stylesheet" media="all" href=""/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<!-- Adding "maximum-scale=1" fixes the Mobile Safari auto-zoom bug: http://filamentgroup.com/examples/iosScaleBug/ -->
<!-- TODO: separate out tributary ui styling from header styling? some of it overlaps -->
<link rel="stylesheet" href="/static/css/trib.css">
<link rel="stylesheet" href="/static/css/animation.css">
<link href='http://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="/static/css/tipsy.css">
<link rel='stylesheet' type='text/css' href='http://yui.yahooapis.com/2.9.0/build/reset/reset-min.css' />
<!-- And the main styles -->
<link rel="stylesheet" href="/static/css/header.css" type="text/css" media="screen" title="Primary Stylesheet" charset="utf-8">
<!-- Add jQuery -->
<script src="/static/lib/jquery-1.7.min.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-30237258-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<div id="container">
{{#unless embedRoute}}
<header id="title">
<h1>
<a href="/inlet/" target="_blank">Tributary</a>
<small><a href="/" target="_blank"><i title="Tributary home page" class="explain-this-shit icon-help-circled"></i></a></small>
</h1>
<section id="inlet-info">
<input id="gist-title" val="{{ title }}">
<span id="author-avatar"> by <img class="avatar"/></span>
<span id="inlet-author">{{author}}</span>
{{#if inletRoute}}
<button id="save" title="Save current state" onclick='$(".icon-load").css("opacity", 1);'>Save</button>
<button id="fork" title="Save a copy" style="display:none;">Fork</button>
<i class="icon-load animate-spin" style="opacity: 0;"></i>
{{/if}}
</section>
{{#if inletRoute}}
<button id="exit-fullscreen" style="display: none;">Exit fullscreen</button>
<section id="login">
{{#if loggedin}}
<span id="current-user">
<span class="user-avatar">
<img id="user-avatar" class="avatar" src="{{avatar_url}}"/>
</span>
<a id="current-username" href="http://tributary.io/s/6094415?user={{user.login}}">{{ user.name }}</a>
</span>
<button id="loginPanel">Log out</button>
{{else}}
<button id="loginPanel">Log in <i class="icon-github"></i></button>
{{/if}}
</section>
{{/if}}
</header>
{{/unless}}
<iframe id="sandbox" src="{{ sandboxOrigin }}" frameBorder=0></iframe>
<!-- Essential 3rd party libraries -->
<script src="/static/lib/d3.min.js"></script>
<script src="/static/lib/underscore-min.js"></script>
<script src="/static/lib/handlebars-1.0.rc.1.js"></script>
<script src="/static/lib/jquery.tipsy.js" type="text/javascript" charset="utf-8"></script>
<script src="/static/templates.js"></script>
<script>
//TODO: lets not make these globals;
var header = {};
header.gistid = "{{ gistid }}";
header.loggedin = "{{ loggedin }}";
header.username = "{{ user.login }}";
header.avatar = "{{ user.avatar_url }}";
header.userid = parseInt("{{user.id}}");
//header.userurl = "{{ user.html_url }}";
header.userurl = "http://tributary.io/s/6094415?user={{user.login}}";
header.origin = "{{ sandboxOrigin }}";
header.query = {{{query}}};
{{#unless inletRoute}}
header.fullscreen = true;
{{/unless}}
$('i').tipsy({fade: true, gravity: 'n', opacity: 0.86});
</script>
<!-- header.js sets up the header and does communication with child iframe -->
<script src='/static/header.js?v=0.9'></script>
</body>
</html>