Skip to content

Commit

Permalink
align the table of contents with the H1
Browse files Browse the repository at this point in the history
  • Loading branch information
afeld committed Nov 22, 2015
1 parent 68dadb3 commit 0edafd6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
4 changes: 2 additions & 2 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<body data-spy="scroll" data-target="#toc">
<div class="container">
<div class="row">
<div class="col-sm-4">
<div class="col-sm-3">
<nav id="toc" data-spy="affix" data-toggle="toc"></nav>
</div>
<div class="col-sm-8">
<div class="col-sm-9">
{{ content }}
</div>
</div>
Expand Down
17 changes: 14 additions & 3 deletions assets/screen.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
nav[data-toggle='toc'] {
top: 30px;
.container {
max-width: 800px;
padding-top: 40px;
padding-bottom: 40px;
}

/* override the Affix plugin so that the navigation isn't sticky on small screens */
/* small screens */
@media (max-width: 768px) {
/* override the Affix plugin so that the navigation isn't sticky */
.affix {
position: static;
}
}

/* large screens */
@media (min-width: 768px) {
h1:first-child {
margin-top: 0;
margin-bottom: 1.25em;
}
}

0 comments on commit 0edafd6

Please sign in to comment.