mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
theme: make chapter a marker instead of a nested div #210
this makes styling easier as document has the same DOM for chapter and default
This commit is contained in:
parent
fe67f0c630
commit
7eee4a86d8
5 changed files with 20 additions and 34 deletions
|
@ -25,16 +25,14 @@
|
||||||
<body class="default-animation" data-url="/">
|
<body class="default-animation" data-url="/">
|
||||||
<div id="body default-animation" style="margin-left:0px;">
|
<div id="body default-animation" style="margin-left:0px;">
|
||||||
<div id="overlay"></div>
|
<div id="overlay"></div>
|
||||||
<div id="chapter">
|
<main id="body-inner" class="chapter">
|
||||||
<main id="body-inner">
|
<h1>{{ T "title-404" }}</h1>
|
||||||
<h1>{{ T "title-404" }}</h1>
|
<p></p>
|
||||||
<p></p>
|
<p>{{ T "message-404" }}</p>
|
||||||
<p>{{ T "message-404" }}</p>
|
<p></p>
|
||||||
<p></p>
|
<p><a href="{{ "" | relLangURL }}">{{ T "Go-to-homepage" }}</a></p>
|
||||||
<p><a href="{{ "" | relLangURL }}">{{ T "Go-to-homepage" }}</a></p>
|
<p><img src="{{ "/images/gopher-404.jpg" | relURL }}" style="width:50%" alt="Page not found!"></p>
|
||||||
<p><img src="{{ "/images/gopher-404.jpg" | relURL }}" style="width:50%" alt="Page not found!"></p>
|
</main>
|
||||||
</main>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -4,9 +4,6 @@
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</footer>
|
</footer>
|
||||||
</main><!-- #body-inner -->
|
</main><!-- #body-inner -->
|
||||||
{{- if .Params.chapter }}
|
|
||||||
</div> <!-- end chapter-->
|
|
||||||
{{- end }}
|
|
||||||
{{- partial "custom-comments.html" . }}
|
{{- partial "custom-comments.html" . }}
|
||||||
</div>
|
</div>
|
||||||
</div><!-- #body -->
|
</div><!-- #body -->
|
||||||
|
|
|
@ -98,10 +98,7 @@
|
||||||
{{- partial "toc.html" . }}
|
{{- partial "toc.html" . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</div></div>
|
</div></div>
|
||||||
{{- if .Params.chapter }}
|
<main id="body-inner"{{if .Params.chapter}} class="chapter"{{end}}>
|
||||||
<div id="chapter">
|
|
||||||
{{- end }}
|
|
||||||
<main id="body-inner">
|
|
||||||
<div id="head-tags">
|
<div id="head-tags">
|
||||||
{{- partial "tags.html" . }}
|
{{- partial "tags.html" . }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -73,7 +73,7 @@ pre {
|
||||||
hr{
|
hr{
|
||||||
border-bottom: 1px solid #ddd;
|
border-bottom: 1px solid #ddd;
|
||||||
}
|
}
|
||||||
#chapter h1 {
|
#body-inner.chapter h1 {
|
||||||
border-bottom: 1px solid #ddd;
|
border-bottom: 1px solid #ddd;
|
||||||
}
|
}
|
||||||
.footline {
|
.footline {
|
||||||
|
|
|
@ -52,16 +52,16 @@ body {
|
||||||
line-height: 1.574;
|
line-height: 1.574;
|
||||||
}
|
}
|
||||||
|
|
||||||
body #chapter h1 {
|
body #body-inner.chapter h1 {
|
||||||
font-size: 3.5rem;
|
font-size: 3.5rem;
|
||||||
}
|
}
|
||||||
@media only all and (min-width: 48em) and (max-width: 59.938em) {
|
@media only all and (min-width: 48em) and (max-width: 59.938em) {
|
||||||
body #chapter h1 {
|
body #body-inner.chapter h1 {
|
||||||
font-size: 3rem;
|
font-size: 3rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media only all and (max-width: 47.938em) {
|
@media only all and (max-width: 47.938em) {
|
||||||
body #chapter h1 {
|
body #body-inner.chapter h1 {
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -392,29 +392,23 @@ th {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#chapter {
|
#body-inner.chapter {
|
||||||
align-items: center;
|
margin-left: auto;
|
||||||
display: flex;
|
margin-right: auto;
|
||||||
height: 100%;
|
padding: 2rem 9rem;
|
||||||
justify-content: center;
|
|
||||||
padding: 2rem 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#chapter #body-inner {
|
#body-inner.chapter h3:first-of-type {
|
||||||
max-width: 80%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#chapter #body-inner h3:first-of-type {
|
|
||||||
font-weight: 200;
|
font-weight: 200;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#chapter h1 {
|
#body-inner.chapter h1 {
|
||||||
border-bottom: 4px solid rgba( 134, 134, 134, .125 );
|
border-bottom: 4px solid rgba( 134, 134, 134, .125 );
|
||||||
font-size: 5rem;
|
font-size: 5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#chapter p {
|
#body-inner.chapter p {
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue