adding samples page
This commit is contained in:
Родитель
7663008f5a
Коммит
23abbc157c
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 779 B |
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="12px" height="16px" viewBox="0 0 12 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 40.3 (33839) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>gist</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="Octicons" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="gist" fill="#000000">
|
||||
<path d="M7.5,5 L10,7.5 L7.5,10 L6.75,9.25 L8.5,7.5 L6.75,5.75 L7.5,5 L7.5,5 Z M4.5,5 L2,7.5 L4.5,10 L5.25,9.25 L3.5,7.5 L5.25,5.75 L4.5,5 L4.5,5 Z M0,13 L0,2 C0,1.45 0.45,1 1,1 L11,1 C11.55,1 12,1.45 12,2 L12,13 C12,13.55 11.55,14 11,14 L1,14 C0.45,14 0,13.55 0,13 L0,13 Z M1,13 L11,13 L11,2 L1,2 L1,13 L1,13 Z" id="Shape"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 841 B |
|
@ -0,0 +1,63 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=1000">
|
||||
<title>WWT Samples rendered using bl.ocks.org</title>
|
||||
<style>
|
||||
|
||||
@import url("https://bl.ocks.org/style.css");
|
||||
|
||||
</style>
|
||||
|
||||
<header>
|
||||
<div class="column">
|
||||
<div class="navigation">
|
||||
 </div>
|
||||
WWT Samples rendered using <a href="bl.ocks.org">bl.ocks.org</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="column gists">
|
||||
<br clear="both">
|
||||
</div>
|
||||
|
||||
<script src="//d3js.org/d3.v3.min.js"></script>
|
||||
<script>
|
||||
|
||||
var parseDate = d3.time.format.iso.parse;
|
||||
|
||||
render([{"id":"81d70d196ec5fbcc28f859905dce0978","sha":"81d70d196ec5fbcc28f859905dce0978","owner":{"login":"philrosenfield", "name": "WorldWide Telescope"},"description":"WWT WebClient Arrived"},
|
||||
{"id":"bed1c0a32430b914fbfcf98bd6c9503c","sha":"bed1c0a32430b914fbfcf98bd6c9503c","owner":{"login":"philrosenfield", "name": "WorldWide Telescope"},"description":"WWT WebClient Click Event" },
|
||||
{"description":"WWT WebClient Earth City Search","id":"46d2ebace646db016d7249d942b85569","sha":"46d2ebace646db016d7249d942b85569","owner":{"login":"philrosenfield", "name": "WorldWide Telescope"}},
|
||||
{"description":"WWT WebClient FOV","id":"935ea8244b5e7628824b5e2e428ec899","sha":"935ea8244b5e7628824b5e2e428ec899","owner":{"login":"philrosenfield", "name": "WorldWide Telescope"}},
|
||||
{"description":"WWT WebClient Local View","id":"8c7c38936d3a905d0dc26fe2dc9ca0f9","sha":"8c7c38936d3a905d0dc26fe2dc9ca0f9","owner":{"login":"philrosenfield", "name": "WorldWide Telescope"}},
|
||||
{"description":"WWT WebClient Mars Explorer","id":"b23f05efdea71aa382efee79a76b6b94","sha":"b23f05efdea71aa382efee79a76b6b94","owner":{"login":"philrosenfield", "name": "WorldWide Telescope"}},
|
||||
{"description":"WWT WebClient Poly","id":"ab13be544d0189a6571b892b231b401d","sha":"ab13be544d0189a6571b892b231b401d","owner":{"login":"philrosenfield", "name": "WorldWide Telescope"}},
|
||||
{"description":"WWT WebClient Simple","id":"0edd8e5e2f2e92ac27596204b3e47932","sha":"0edd8e5e2f2e92ac27596204b3e47932","owner":{"login":"philrosenfield", "name": "WorldWide Telescope"}},
|
||||
{"description":"WWT Webclient Images","id":"80344030734766655ebee946788169e7","sha":"80344030734766655ebee946788169e7","owner":{"login":"philrosenfield", "name": "WorldWide Telescope"}},
|
||||
{"description":"WWT Webclient Tours","id":"7c58348c5da096709d9ff65c0d4f6599","sha":"7c58348c5da096709d9ff65c0d4f6599","owner":{"login":"philrosenfield", "name": "WorldWide Telescope"}}]);
|
||||
|
||||
function render(gists) {
|
||||
if (!gists.length) return;
|
||||
|
||||
gists.forEach(function(d) {
|
||||
d.created_at = parseDate(d.created_at);
|
||||
d.updated_at = parseDate(d.updated_at);
|
||||
});
|
||||
|
||||
var gist = d3.select(".gists").selectAll(".gist")
|
||||
.data(gists, function(d) { return d.id; })
|
||||
.enter().insert("a", "br")
|
||||
.attr("class", "gist gist--thumbnail")
|
||||
.attr("href", function(d) { return "https://bl.ocks.org/" + d.owner.login + "/" + d.id; })
|
||||
.style("background-image", function(d) { return "url(https://bl.ocks.org/" + d.owner.login + "/raw/" + d.id + (d.sha ? "/" + d.sha : "") + "/thumbnail.png)"; });
|
||||
|
||||
gist.append("div")
|
||||
.attr("class", "gist-description gist-underline")
|
||||
.text(function(d) { return d.description || d.id; });
|
||||
|
||||
gist.append("div")
|
||||
.attr("class", "gist-author")
|
||||
.text(function(d) { return d.owner.name; });
|
||||
}
|
||||
|
||||
</script>
|
Загрузка…
Ссылка в новой задаче