Commit 3c8ae940 authored by Julius Volz's avatar Julius Volz

Add header anchors.

parent 82d424a8
......@@ -24,7 +24,7 @@ end
compile '*' do
if item[:extension] == 'md'
#filter :kramdown
filter :redcarpet, options: {hard_wrap: true, filter_html: true, autolink: true, no_intraemphasis: true, fenced_code_blocks: true, gh_blockcode: true}
filter :redcarpet, options: {hard_wrap: true, filter_html: true, autolink: true, no_intraemphasis: true, fenced_code_blocks: true, gh_blockcode: true}, renderer_options: {with_toc_data: true}
filter :add_anchors
filter :bootstrappify
filter :admonition
......
......@@ -29,7 +29,7 @@
<body>
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<nav class="navbar navbar-inverse navbar-static-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
......
/* Move down content because we have a fixed navbar that is 50px tall */
body {
padding-top: 50px;
padding-bottom: 20px;
font-family: 'Open Sans', serif;
}
.navbar {
margin-bottom: 0;
}
.navbar-brand {
font-size: 20px;
}
......@@ -109,6 +111,41 @@ footer p {
font-size: 21px;
}
.doc-content a.header-anchor {
padding-left: 15px;
}
.doc-content a.header-anchor:after {
content: "\F0C1";
font-family: FontAwesome;
font-weight: normal;
font-size: .8em;
}
.doc-content a.header-anchor:link,
.doc-content a.header-anchor:visited {
visibility: hidden;
}
.doc-content h1:hover a.header-anchor:hover,
.doc-content h2:hover a.header-anchor:hover,
.doc-content h3:hover a.header-anchor:hover,
.doc-content h4:hover a.header-anchor:hover,
.doc-content h5:hover a.header-anchor:hover,
.doc-content h6:hover a.header-anchor:hover {
color: #000;
}
.doc-content h1:hover a.header-anchor,
.doc-content h2:hover a.header-anchor,
.doc-content h3:hover a.header-anchor,
.doc-content h4:hover a.header-anchor,
.doc-content h5:hover a.header-anchor,
.doc-content h6:hover a.header-anchor {
color: #999;
visibility: visible;
}
pre {
font-family: "Courier New", Monaco, Menlo, Consolas, monospace;
background-color: #444;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment