Skip to content

Instantly share code, notes, and snippets.

@dfeng
Created June 30, 2015 20:42
Show Gist options
  • Select an option

  • Save dfeng/c7cbad16ff7b455e187c to your computer and use it in GitHub Desktop.

Select an option

Save dfeng/c7cbad16ff7b455e187c to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"$if(lang)$ lang="$lang$" xml:lang="$lang$"$endif$>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />
$for(author-meta)$
<meta name="author" content="$author-meta$" />
$endfor$
$if(date-meta)$
<meta name="date" content="$date-meta$" />
$endif$
<title>$if(title-prefix)$$title-prefix$ - $endif$$pagetitle$</title>
$for(header-includes)$
$header-includes$
$endfor$
$if(highlightjs)$
<style type="text/css">code{white-space: pre;}</style>
<link rel="stylesheet"
href="$highlightjs$/$if(highlightjs-theme)$$highlightjs-theme$$else$default$endif$.css"
$if(html5)$$else$type="text/css" $endif$/>
<script src="$highlightjs$/highlight.js"></script>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs && document.readyState && document.readyState === "complete") {
window.setTimeout(function() {
hljs.initHighlighting();
}, 0);
}
</script>
$endif$
$if(highlighting-css)$
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
$highlighting-css$
</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
$endif$
$for(css)$
<link rel="stylesheet" href="$css$" $if(html5)$$else$type="text/css" $endif$/>
$endfor$
</head>
<body>
$if(theme)$
<style type = "text/css">
/*.main-container {
max-width: 940px;
margin-left: auto;
margin-right: auto;
}*/
pre {
/*display: none;*/
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
height: auto;
}
.table{
width: auto;
}
.title {
margin-bottom: 40px;
}
h2, h3 {
/*text-transform: uppercase;*/
}
/* TOC */
.sidebar{
position: fixed;
}
.sidebar>div {
position: fixed;
margin-top: -60px;
cursor: pointer;
margin-left: -5px;
font-size: 13px;
color: #111;
}
/* sidebar */
.sidebar {
padding-left: 20px;
margin-top: 120px;
margin-bottom: 20px;
}
/* all links */
.sidebar ul>li>a {
color: #555;
border-left: 2px solid transparent;
padding: 4px 20px;
font-size: 13px;
font-weight: 500; /* 700 */
}
/* nested links */
.sidebar ul ul>li>a {
padding-top: 1px;
padding-bottom: 1px;
padding-left: 30px;
font-size: 12px;
font-weight: 400;
}
/* active & hover links */
.sidebar ul>.active>a,
.sidebar ul>li>a:hover,
.sidebar ul>li>a:focus {
color: #111; /* 563d7c */
text-decoration: none;
background-color: transparent;
border-left-color: #111;
}
/* all active links */
.sidebar ul>.active>a,
.sidebar ul>.active:hover>a,
.sidebar ul>.active:focus>a {
font-weight: 700;
}
/* nested active links */
.sidebar ul ul>.active>a,
.sidebar ul ul>.active:hover>a,
.sidebar ul ul>.active:focus>a {
font-weight: 500;
}
/* hide inactive nested list */
.sidebar ul ul {
display: none;
}
/* show active nested list */
.sidebar ul>.active>ul {
display: block;
}
#toggle {
display: block;
padding: 4px 10px;
margin-top: 30px;
margin-left: 10px;
font-size: 12px;
font-weight: 500;
color: #999;
cursor: pointer;
}
#toggle:hover {
text-decoration: none;
}
</style>
<div class="container">
<div class="row">
$endif$
$if(toc)$
<div class="col-md-3 col-md-push-9">
<nav class="sidebar">
<!-- <button type="button" class="btn btn-default btn-sm" id="toggle"> -->
<!-- <div><span class="glyphicon glyphicon-flash" id="toggle" aria-hidden="true"></span></div> -->
<!-- </button> -->
$toc$
</nav>
</div>
$endif$
$for(include-before)$
$include-before$
$endfor$
<div class="col-md-9 col-md-pull-3">
$if(title)$
<div id="$idprefix$header">
<h1 class="title page-header">$title$</h1>
$if(subtitle)$
<h3 class="subtitle"><em>$subtitle$</em></h3>
$endif$
$for(author)$
$if(author.name)$
<h4 class="author"><em>$author.name$</em></h4>
$if(author.affiliation)$
<address class="author_afil">
$author.affiliation$<br>$endif$
$if(author.email)$
<a class="author_email" href="mailto:#">$author.email$</a>
</address>
$endif$
$else$
<h4 class="author"><em>$author$</em></h4>
$endif$
$endfor$
$if(date)$
<h4 class="date"><em>$date$</em></h4>
$endif$
</div>
$endif$
$body$
$for(include-after)$
$include-after$
$endfor$
</div>
$if(theme)$
</div>
</div>
<script>
// add bootstrap table styles to pandoc tables
$$(document).ready(function () {
$$('tr.header').parent('thead').parent('table').addClass('table table-condensed');
$$('.sidebar ul').addClass("nav");
$$('body').scrollspy({
target: '.sidebar',
offset: 40
});
$if(toc)$
$$('nav').append('<a id="toggle"><span class="glyphicon glyphicon-eye-open"></span> Toggle Code</a>')
$endif$
$$('#toggle').click(function(){
$$('pre').toggle();
});
});
</script>
$endif$
<!-- <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"></script> -->
<script type="text/javascript">
var fileref=document.createElement('script')
fileref.setAttribute("type","text/javascript")
fileref.setAttribute("src", "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML")
document.getElementsByTagName("head")[0].appendChild(fileref)
</script>
<script type="text/javascript">
MathJax.Hub.Config({
TeX: { equationNumbers: { autoNumber: "AMS" } },
tex2jax: {
inlineMath: [['$$','$$'], ['\\(','\\)']],
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre']
}
});
MathJax.Hub.Queue(function() {
var all = MathJax.Hub.getAllJax(), i;
for(i=0; i < all.length; i += 1) {
all[i].SourceElement().parentNode.className += ' has-jax';
}
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment