Add debug page info to the bottom left corner of the page
This commit is contained in:
parent
83f9550849
commit
6c915ab925
3 changed files with 44 additions and 0 deletions
|
@ -8,6 +8,7 @@
|
||||||
<main>
|
<main>
|
||||||
{{ block "main" . }}{{ end }}
|
{{ block "main" . }}{{ end }}
|
||||||
</main>
|
</main>
|
||||||
|
{{ partial "development/page_info.html" . }}
|
||||||
{{ block "footer" . }}{{ end }}
|
{{ block "footer" . }}{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</body>
|
</body>
|
||||||
|
|
11
layouts/partials/development/page_info.html
Normal file
11
layouts/partials/development/page_info.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{{ if not hugo.IsProduction }}
|
||||||
|
<div class="platter" id="debug-page-info">
|
||||||
|
<details open>
|
||||||
|
<summary>Debug Page Info</summary>
|
||||||
|
<table>
|
||||||
|
<tr><td>.Section</td><td>{{ .Section }}</td></tr>
|
||||||
|
<tr><td>.Type</td><td>{{ .Type }}</td></tr>
|
||||||
|
</table>
|
||||||
|
</details>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
|
@ -20,3 +20,35 @@
|
||||||
.draft:after {
|
.draft:after {
|
||||||
content: "]";
|
content: "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#debug-page-info {
|
||||||
|
background-color: var(--background-color);
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
border-radius: 6px;
|
||||||
|
box-shadow: 4px 5px 5px rgba(230, 230, 230, 0.5);
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 12px;
|
||||||
|
|
||||||
|
position: fixed;
|
||||||
|
bottom: 2rem;
|
||||||
|
left: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#debug-page-info details {
|
||||||
|
margin: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#debug-page-info table {
|
||||||
|
display: block;
|
||||||
|
margin-block-start: 0.5em;
|
||||||
|
margin-inline-start: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#debug-page-info td {
|
||||||
|
border: 1px solid black;
|
||||||
|
padding: 0.4em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#debug-page-info tr:nth-child(even) {
|
||||||
|
background-color: #efefef;
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue