Unverified Commit 5454e6a7 authored by Ethan Madison's avatar Ethan Madison
Browse files

Fix floating sidebar module



For some reason, having `<main role="main">` in the was causing the first sidebar
module to float.
This commit removes the <main> element from the default single.html and
index.html layouts to fix the sidebar issue.

Since there were some table styles applied to .main, they were changed
to not require .main.
Signed-off-by: default avatarEthan Madison <ethan@ethanmad.com>
parent 8508704f
......@@ -4,18 +4,16 @@
<div class="container">
<div class="row">
<div class="col-sm-8 doc-main">
<main role="main">
<article>
<div class="doc-entry-meta">
{{ if not .Params.noshowdate }}
<span><time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 02, 2006" }}</time></span>
{{ end }}
</div>
<section>
{{ .Content }}
</section>
</article>
</main>
<article>
<div class="doc-entry-meta">
{{ if not .Params.noshowdate }}
<span><time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 02, 2006" }}</time></span>
{{ end }}
</div>
<section>
{{ .Content }}
</section>
</article>
</div> <!-- /.doc-main -->
{{ partial "sidebar-single.html" . }}
......
{{ $baseUrl := .Site.BaseURL }}
{{ partial "header.html" . }}
<main role="main">
{{ partial "jumbotron.html" . }}
<div class="container">
<div class="row">
<div class="col-sm-8 doc-main">
{{ range where .Site.Pages "Title" "_index" }}
<div class="row doc-main">
<article>
{{ range where .Site.Pages "Title" "_index" }}
<section>
{{ .Content }}
</div>
{{ end }}
{{ if isset .Site.Params "withSitePosts" }}
<hr />
<div class="row doc-main text-center">
<a href="{{ $baseUrl }}/post">See posts for {{ .Site.Title }}</a>
</div>
{{ end }}
</section>
{{ end }}
<article>
</div> <!-- /.doc-main -->
{{ partial "sidebar-single.html" . }}
</div> <!-- /.row -->
{{ partial "sidebar-single.html" . }}
</main>
</div> <!-- /.row -->
{{ partial "footer.html" . }}
......@@ -146,19 +146,19 @@ ul.doc-list-category > li > ul > li {
}
/* Tables */
main > article > section > table {
article > section > table {
border: 1px solid #ddd;
width: 100%;
max-width: 100%;
margin-bottom: 20px;
}
main > article > section > table > thead > tr > th,
main > article > section > table > tbody > tr > th,
main > article > section > table > tfoot > tr > th,
main > article > section > table > thead > tr > td,
main > article > section > table > tbody > tr > td,
main > article > section > table > tfoot > tr > td {
article > section > table > thead > tr > th,
article > section > table > tbody > tr > th,
article > section > table > tfoot > tr > th,
article > section > table > thead > tr > td,
article > section > table > tbody > tr > td,
article > section > table > tfoot > tr > td {
padding: 8px;
font-size: 16px;
line-height: 1.4;
......@@ -166,36 +166,36 @@ main > article > section > table > tfoot > tr > td {
border-top: 1px solid #ddd;
}
main > article > section > table > thead > tr > th {
article > section > table > thead > tr > th {
vertical-align: bottom;
border-bottom: 2px solid #ddd;
}
main > article > section > table > caption + thead > tr:first-child > th,
main > article > section > table > colgroup + thead > tr:first-child > th,
main > article > section > table > thead:first-child > tr:first-child > th,
main > article > section > table > caption + thead > tr:first-child > td,
main > article > section > table > colgroup + thead > tr:first-child > td,
main > article > section > table > thead:first-child > tr:first-child > td {
article > section > table > caption + thead > tr:first-child > th,
article > section > table > colgroup + thead > tr:first-child > th,
article > section > table > thead:first-child > tr:first-child > th,
article > section > table > caption + thead > tr:first-child > td,
article > section > table > colgroup + thead > tr:first-child > td,
article > section > table > thead:first-child > tr:first-child > td {
border-top: 0;
}
main > article > section > table > tbody + tbody {
article > section > table > tbody + tbody {
border-top: 2px solid #ddd;
}
main > article > section > table > thead > tr > th,
main > article > section > table > tbody > tr > th,
main > article > section > table > tfoot > tr > th,
main > article > section > table > thead > tr > td,
main > article > section > table > tbody > tr > td,
main > article > section > table > tfoot > tr > td {
article > section > table > thead > tr > th,
article > section > table > tbody > tr > th,
article > section > table > tfoot > tr > th,
article > section > table > thead > tr > td,
article > section > table > tbody > tr > td,
article > section > table > tfoot > tr > td {
border: 1px solid #ddd;
}
main > article > section > table > thead > tr > th,
main > article > section > table > thead > tr > td {
article > section > table > thead > tr > th,
article > section > table > thead > tr > td {
border-bottom-width: 2px;
}
main > article > section > table > tbody > tr:nth-of-type(odd) {
article > section > table > tbody > tr:nth-of-type(odd) {
background-color: #f9f9f9;
}
......
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