This repository has been archived by the owner on Feb 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
visualizer_browser.html
154 lines (130 loc) · 5.57 KB
/
visualizer_browser.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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<!--
# Visualizer Tempaltes
-->
<script id="title" type="text/x-handlebars-template">
<div style="height: 235px; width: 100%; float: left; overflow: scroll;">
<h1>{{title.title.u}}</h1>
</div>
</script>
<script id="text" type="text/x-handlebars-template">
<div style="height: 235px; width: 470px; float: left; overflow: scroll;">
<p>{{text.u}}</p>
</div>
</script>
<script id="person_name" type="text/x-handlebars-template">
<div style="height: 235px; width: 235px; float: left; overflow: hidden;">
{{person_name.lastName.u}} {{person_name.firstName.u}}
</div>
</script>
<script id="address_line3" type="text/x-handlebars-template">
<div style="height: 235px; width: 235px; float: left; overflow: hidden;">
{{#each address}}
{{this.country.u}}-{{this.postalCode.u}} {{this.city.u}}
{{/each}}
</div>
</script>
<script id="address" type="text/x-handlebars-template">
<div style="height: 235px; width: 235px; float: left; overflow: hidden;">
{{addressBlock.person_name.firstName.u}} {{addressBlock.person_name.lastName.u}}<br />
{{#each addressBlock.addressLink}}
{{#if addressPartCombine.address_line2.street.u}}{{addressPartCombine.address_line2.street.u}}<br />{{/if}}
{{#if addressPartCombine.address_line2.street2.u}}{{addressPartCombine.address_line2.street2.u}}<br />{{/if}}
{{addressPartCombine.address_line3.country.u}}-{{addressPartCombine.address_line3.postalCode.u}} {{addressPartCombine.address_line3.city.u}}
{{/each}}
</div>
</script>
<script id="inventor" type="text/x-handlebars-template">
<div style="height: 235px; width: 235px; float: left; overflow: hidden;">
Inventors
<ul>
{{#each inventor}}
<li>{{this.lastName.u}}</li>
{{/each}}
</ul>
</div>
</script>
<script id="license" type="text/x-handlebars-template">
<div style="height: 235px; width: 235px; float: left; overflow: scroll;">
<p><small>© {{license.u}}</small></p>
</div>
</script>
<script id="title_text" type="text/x-handlebars-template">
<div style="height: 235px; width: 470px; float: left; overflow: scroll;">
<h1>{{title}}</h1>
<p>{{text}}</p>
</div>
</script>
<script id="community" type="text/x-handlebars-template">
<div style="height: 235px; width: 470px; background-color: lightgrey; padding: 4px; float: left; overflow: scroll;">
<div style="width: 235px; height: 235px; overflow: hidden; margin: -4px;" class="pull-right">
<img style="min-width: 235px; min-height: 235px; max-width: 300px; max-height: 300px" src="{{community.img_url.u}}" />
</div>
<h1>{{community.label_comment.title.u}}</h1>
<p>{{community.label_comment.text.u}}</p>
</div>
</script>
<script id="label_comment" type="text/x-handlebars-template">
<div style="height: 235px; width: 470px; float: left; overflow: scroll; padding: 4px;">
<h1>{{title.u}}</h1>
<p>{{text.u}}</p>
</div>
</script>
<script id="location" type="text/x-handlebars-template">
<div id="map-canvas" style="height: 235px; width: 235px; float: left;">
<big>⌖</big> {{location.lat.u}} / {{location.long.u}}
</div>
</script>
<script id="creator" type="text/x-handlebars-template">
<div style="height: 235px; width: 235px; float: left;">
{{#each creator}}
This resource was created by {{this.title.u}}.
{{/each}}
</div>
</script>
<script id="created" type="text/x-handlebars-template">
<div style="height: 235px; width: 235px; float: left;">
This resource was created on {{created.u}}.
</div>
</script>
<script id="createMeta" type="text/x-handlebars-template">
<div style="height: 235px; width: 235px; float: left;">
This resource was created by {{#each creator}}{{this.title.u}}{{/each}} on {{created.u}}
</div>
</script>
<script id="location_js" type="text/x-handlebars-template">
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "http://maps.googleapis.com/maps/api/js?key=AIzaSyAFRTcPPyYit9ERj9COlgpgYW-Ve-lUeUs&sensor=false&callback=initializeMap";
document.body.appendChild(script);
initializeMap = function () {
var myLatlng = new google.maps.LatLng({{location.lat.u}}, {{location.long.u}});
var mapOptions = { center: myLatlng, disableDefaultUI: true, zoomControl: true, zoom: 12, mapTypeId: google.maps.MapTypeId.ROADMAP };
var map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);
};
</script>
<!--<script id="pmid" type="text/x-handlebars-template">
<div>
<p>Online at <a href="http://www.ncbi.nlm.nih.gov/pubmed/{{pmid}}">http://www.ncbi.nlm.nih.gov/pubmed/{{pmid}}</a></p>
</div>
</script>-->
<script id="img" type="text/x-handlebars-template">
<div style="width: 235px; height: 235px; float: left">
<img style="min-width: 235px; min-height: 235px;" src="{{img_url.u}}" class="img-responsive" />
</div>
</script>
<script id="literal" type="text/x-handlebars-template">
{{#with literal}}
<div style="width: 235px; height: 235px; float: left"><p title="{{{subject.u}}} - {{{predicate.u}}}"><b>{{{name.u}}}</b>:<br /> {{{text.u}}}</p></div>
{{/with}}
</script>
<!-- void -->
<script id="void" type="text/x-handlebars-template">
</script>
<!-- unknown -->
<script id="unknown" type="text/x-handlebars-template">
<div style="width: 235px; height: 235px; float: left; overflow: scroll">
{{#with unknown}}
<small><p>{{{subject.u}}}<br />█<br />{{{predicate.u}}}<br />█<br />{{{object.u}}}</p></small>
{{/with}}
</div>
</script>