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

Add header anchors.

parent 82d424a8
...@@ -24,7 +24,7 @@ end ...@@ -24,7 +24,7 @@ end
compile '*' do compile '*' do
if item[:extension] == 'md' if item[:extension] == 'md'
#filter :kramdown #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 :add_anchors
filter :bootstrappify filter :bootstrappify
filter :admonition filter :admonition
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<body> <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="container">
<div class="navbar-header"> <div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> <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 */ /* Move down content because we have a fixed navbar that is 50px tall */
body { body {
padding-top: 50px;
padding-bottom: 20px;
font-family: 'Open Sans', serif; font-family: 'Open Sans', serif;
} }
.navbar {
margin-bottom: 0;
}
.navbar-brand { .navbar-brand {
font-size: 20px; font-size: 20px;
} }
...@@ -109,6 +111,41 @@ footer p { ...@@ -109,6 +111,41 @@ footer p {
font-size: 21px; 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 { pre {
font-family: "Courier New", Monaco, Menlo, Consolas, monospace; font-family: "Courier New", Monaco, Menlo, Consolas, monospace;
background-color: #444; 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