Moved sidebar out of microhook
Moved the sidebar out of the after-post-list microhook and into the base theme template. This should resolve the styling issue which will break sites using the before-post-list microhook. This does tie the plugin to Tiny-theme baseof theme, which is not great. Will need to resolve this in some way, but should work for now.
This commit is contained in:
parent
a9f0437fc7
commit
7a3eb89fd8
26
layouts/_default/baseof.html
Normal file
26
layouts/_default/baseof.html
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
{{ partial "head.html" . }}
|
||||||
|
|
||||||
|
<body>
|
||||||
|
{{ partial "header.html" . }}
|
||||||
|
|
||||||
|
<div class="page-content">
|
||||||
|
<div class="wrapper">
|
||||||
|
{{ block "main" . }}{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ partial "sidebar-for-tiny-theme/sidebar.html" . }}
|
||||||
|
</div>
|
||||||
|
{{ partial "footer.html" . }}
|
||||||
|
|
||||||
|
{{ range .Site.Params.plugins_js }}
|
||||||
|
<script src="{{ . }}"></script>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if templates.Exists "partials/microhook-before-closing-body.html" }}
|
||||||
|
{{ partial "microhook-before-closing-body.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
|
@ -1 +0,0 @@
|
||||||
{{ partial "sidebar-for-tiny-theme/sidebar.html" . }}
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{ if .IsHome -}}
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
{{ if templates.Exists "partials/sidebar.html" }}
|
{{ if templates.Exists "partials/sidebar.html" }}
|
||||||
{{ partial "sidebar.html" . }}
|
{{ partial "sidebar.html" . }}
|
||||||
|
@ -5,3 +6,4 @@
|
||||||
{{ partial "sidebar-for-tiny-theme/recommendations.html" . }}
|
{{ partial "sidebar-for-tiny-theme/recommendations.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
{{ end -}}
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"title": "Sidebar for Tiny Theme",
|
"title": "Sidebar for Tiny Theme",
|
||||||
"description": "Adds a sidebar to a blog using Tiny Theme",
|
"description": "Adds a sidebar to a blog using Tiny Theme",
|
||||||
"includes": [
|
"includes": [
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
max-width: 50em;
|
max-width: 50em;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.wrapper:has(div.sidebar) {
|
div.page-content:has(div.sidebar) {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: minmax(20em,35em) 15em;
|
grid-template-columns: minmax(20em,35em) 15em;
|
||||||
column-gap: 60px;
|
column-gap: 60px;
|
||||||
|
|
Loading…
Reference in a new issue