Skip to content

Commit be1464c

Browse files
committed
More changes to index.html
1 parent b95a89d commit be1464c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

index.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/prettify/r298/prettify.js"></script>
1313
<script>
1414
$.get("README.md", function(md) {
15+
var user = location.hostname.split('.')[0];
16+
var repo = location.pathname.split('/')[1];
17+
$("a#github").attr("href", "https://github.com/"+user+"/"+repo);
1518
$("main").html(marked(md));
1619
$("pre > code").addClass("prettyprint");
1720
prettyPrint();
@@ -21,6 +24,9 @@
2124
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.css">
2225
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/prettify/r298/prettify.css">
2326
<style>
27+
body { margin-top: 0px; }
28+
a#github { background-color: #0090FF; border-radius: 0 0 2px 2px; box-shadow: 0 0 10px rgba(0,0,0,.5); color: #FFF; display: block; font-weight: 700; padding: 10px 20px; position: absolute; right: 10px; text-decoration: none; top: 0; z-index: 10; }
29+
h1 { font-weight: bold; }
2430
h2 { border-bottom: 1px solid #AAA; }
2531
li { margin-bottom: 0px; }
2632
</style>
@@ -29,6 +35,7 @@
2935
<body>
3036

3137
<div class="container">
38+
<a id="github" href="">View on GitHub</a>
3239
<main>MAIN CONTENT</main>
3340
</div>
3441

0 commit comments

Comments
 (0)