💄 Hide navigation during printing

pull/170/head
Miki Vanusek 2022-04-03 13:51:52 +10:00 committed by James Panther
parent 8161979384
commit a13b35c505
No known key found for this signature in database
GPG Key ID: D36F789E45745D17
4 changed files with 6 additions and 6 deletions

View File

@ -7,14 +7,14 @@
<h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral"> <h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">
{{ .Title | emojify }} {{ .Title | emojify }}
</h1> </h1>
<div class="mt-8 mb-12 text-base text-neutral-500 dark:text-neutral-400"> <div class="mt-8 mb-12 text-base text-neutral-500 dark:text-neutral-400 print:hidden">
{{ partial "article-meta.html" (dict "context" . "scope" "single") }} {{ partial "article-meta.html" (dict "context" . "scope" "single") }}
</div> </div>
</header> </header>
<section class="flex flex-col max-w-full mt-0 prose lg:flex-row dark:prose-invert"> <section class="flex flex-col max-w-full mt-0 prose lg:flex-row dark:prose-invert">
{{ if and (.Params.showTableOfContents | default (.Site.Params.article.showTableOfContents | default false)) (in .TableOfContents "<ul") }} {{ if and (.Params.showTableOfContents | default (.Site.Params.article.showTableOfContents | default false)) (in .TableOfContents "<ul") }}
<div class="order-first px-0 lg:max-w-xs ltr:lg:pl-8 rtl:lg:pr-8 lg:order-last"> <div class="order-first px-0 lg:max-w-xs ltr:lg:pl-8 rtl:lg:pr-8 lg:order-last">
<div class="ltr:pl-5 rtl:pr-5 toc lg:sticky lg:top-10"> <div class="ltr:pl-5 rtl:pr-5 toc lg:sticky lg:top-10 print:hidden">
{{ partial "toc.html" . }} {{ partial "toc.html" . }}
</div> </div>
</div> </div>
@ -23,7 +23,7 @@
{{ .Content | emojify }} {{ .Content | emojify }}
</div> </div>
</section> </section>
<footer class="pt-8 max-w-prose"> <footer class="pt-8 max-w-prose print:hidden">
{{ partial "author.html" . }} {{ partial "author.html" . }}
{{ partial "sharing-links.html" . }} {{ partial "sharing-links.html" . }}
{{ partial "article-pagination.html" . }} {{ partial "article-pagination.html" . }}

View File

@ -1,4 +1,4 @@
<ol class="text-sm text-neutral-500 dark:text-neutral-400"> <ol class="text-sm text-neutral-500 dark:text-neutral-400 print:hidden">
{{ template "crumb" (dict "p1" . "p2" .) }} {{ template "crumb" (dict "p1" . "p2" .) }}
</ol> </ol>
{{ define "crumb" }} {{ define "crumb" }}

View File

@ -1,4 +1,4 @@
<footer class="py-10"> <footer class="py-10 print:hidden">
{{/* Footer menu */}} {{/* Footer menu */}}
{{ if .Site.Menus.footer }} {{ if .Site.Menus.footer }}
<nav class="pb-4 text-base font-medium text-neutral-500 dark:text-neutral-400"> <nav class="pb-4 text-base font-medium text-neutral-500 dark:text-neutral-400">

View File

@ -1,5 +1,5 @@
<header <header
class="flex justify-between py-6 font-semibold sm:items-center sm:py-10 text-neutral-900 dark:text-neutral" class="flex justify-between py-6 font-semibold sm:items-center sm:py-10 text-neutral-900 dark:text-neutral print:hidden"
> >
{{/* Site logo/title */}} {{/* Site logo/title */}}
<div> <div>