This commit is contained in:
Will Rinehart 2023-10-17 15:20:44 -04:00
parent 5e0bad32e0
commit 7a58953fbf
2 changed files with 27 additions and 10 deletions

View File

@ -362,3 +362,21 @@ body[dir="rtl"] .book-menu {
padding: $padding-16 * 2 $padding-16;
}
}
hr {
border: none;
border-top: 3px double #333;
color: #333;
overflow: visible;
text-align: center;
height: 10px;
padding-bottom: 5px;
}
hr:after {
background: #fff;
content: '§';
padding: 0 4px;
position: relative;
top: -13px;
}

View File

@ -1,17 +1,16 @@
<div class="flex flex-wrap justify-between">
{{ if .Params.date }} <!-- Check if the date is specified in the page's front matter -->
<div>
{{- $date := .Params.date.Format .Site.Params.BookDateFormat }} <!-- Format the date based on your site's parameters -->
<a class="flex align-center" title='{{ i18n "Page dated" }} | {{ $date }}'>
<img src="{{ "svg/calendar.svg" | relURL }}" class="book-icon" alt="Calendar" />
<span>{{ $date }}</span>
</a>
<hr> <!-- This horizontal rule will only render if .Params.date exists -->
<div class="flex flex-wrap justify-between">
<div>
{{- $date := .Params.date.Format .Site.Params.BookDateFormat }} <!-- Format the date based on your site's parameters -->
<a class="flex align-center" title='{{ i18n "Page dated" }} | {{ $date }}'>
<img src="{{ "svg/calendar.svg" | relURL }}" class="book-icon" alt="Calendar" />
<span>{{ $date }}</span>
</a>
</div>
</div>
{{ end }}
</div>
{{ $script := resources.Get "clipboard.js" | resources.Minify }}
{{ with $script.Content }}
<script>{{ . | safeJS }}</script>