@@ -10,7 +10,9 @@ | |||||
<link rel="stylesheet" href="/static/main.css" /> | <link rel="stylesheet" href="/static/main.css" /> | ||||
<link rel="stylesheet" href="/static/syntax.css" /> <!-- shamelessly stolen from https://github.com/mojombo/tpw/blob/master/css/syntax.css --> | <link rel="stylesheet" href="/static/syntax.css" /> <!-- shamelessly stolen from https://github.com/mojombo/tpw/blob/master/css/syntax.css --> | ||||
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css"> | <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css"> | ||||
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script> | |||||
<script src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> | <script src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> | ||||
<script src="/static/main.js"></script> | |||||
</head> | </head> | ||||
<body> | <body> | ||||
<div id="banner" class="banner-{% if page.title == "Home" %}large{% else %}small{% endif %}"> | <div id="banner" class="banner-{% if page.title == "Home" %}large{% else %}small{% endif %}"> | ||||
@@ -7,12 +7,13 @@ layout: base | |||||
<ul id="post-info"> | <ul id="post-info"> | ||||
<li><span><i class="fa fa-tag"></i> Tags:</span> {{ page.tags | join: ", " }}</li> | <li><span><i class="fa fa-tag"></i> Tags:</span> {{ page.tags | join: ", " }}</li> | ||||
<li><span><i class="fa fa-clock-o"></i> Date:</span> {{ page.date | date: "%B %-d, %Y" }}</li> | <li><span><i class="fa fa-clock-o"></i> Date:</span> {{ page.date | date: "%B %-d, %Y" }}</li> | ||||
<li><span><i class="fa fa-comments"></i></span> <a href="#disqus_thread">Jump to comments</a></li> | |||||
</ul> | </ul> | ||||
<div id="post"> | <div id="post"> | ||||
{{ content }} | {{ content }} | ||||
</div> | </div> | ||||
<div id="disqus_thread"></div> | <div id="disqus_thread"></div> | ||||
<script type="text/javascript"> | |||||
<script> | |||||
var disqus_shortname = 'earwig'; | var disqus_shortname = 'earwig'; | ||||
var disqus_identifier = '{{ page.id }}'; | var disqus_identifier = '{{ page.id }}'; | ||||
var disqus_title = '{{ page.title }}'; | var disqus_title = '{{ page.title }}'; | ||||
@@ -150,7 +150,7 @@ title: Home | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
</table> | </table> | ||||
<script type="text/javascript"> | |||||
<script> | |||||
var disqus_shortname = 'earwig'; | var disqus_shortname = 'earwig'; | ||||
var disqus_title = '{{ page.title }}'; | var disqus_title = '{{ page.title }}'; | ||||
var disqus_url = 'http://earwig.github.com{{ page.url }}'; | var disqus_url = 'http://earwig.github.com{{ page.url }}'; | ||||
@@ -6,8 +6,7 @@ body { | |||||
font-size: 16px; | font-size: 16px; | ||||
} | } | ||||
a:link { color: #3d7751; text-decoration: none; } | |||||
a:visited { color: #3d7751; text-decoration: none; } | |||||
a:link, a:visited { color: #3d7751; text-decoration: none; } | |||||
a:hover { color: #041; text-decoration: underline; } | a:hover { color: #041; text-decoration: underline; } | ||||
a:active { color: #403; text-decoration: underline; } | a:active { color: #403; text-decoration: underline; } | ||||
@@ -152,6 +151,21 @@ pre code { | |||||
color: #888; | color: #888; | ||||
} | } | ||||
.para-link { | |||||
margin-left: 0.5em; | |||||
padding: 0 0.25em 0 0.3em; | |||||
} | |||||
.para-link:link, .para-link:visited { | |||||
color: #A00; | |||||
text-decoration: none; | |||||
} | |||||
.para-link:hover, .para-link:active { | |||||
background-color: #A00; | |||||
color: white; | |||||
} | |||||
#footer { | #footer { | ||||
color: #444; | color: #444; | ||||
font-size: 85%; | font-size: 85%; | ||||
@@ -0,0 +1,10 @@ | |||||
$(document).ready(function() { | |||||
$("#post").find("h1, h2, h3, h4, h5, h6").hover(function() { | |||||
$(this).append($("<a>") | |||||
.attr("href", "#" + this.id) | |||||
.attr("class", "para-link") | |||||
.text("¶")); | |||||
}, function() { | |||||
$(this).find(".para-link").remove(); | |||||
}); | |||||
}); |