Skip to content

Commit

Permalink
Trip report in web
Browse files Browse the repository at this point in the history
  • Loading branch information
henrylee97 committed Nov 10, 2023
1 parent 8efd5a4 commit 80a1549
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
<meta charset="utf-8">
<title>{{ .Title }} - {{ .Site.Title }}</title>
{{ partial "head/bootstrap5.html" . }}
{{ block "head" . }}{{ end }}
</head>

<body>
{{ partial "header/navbar.html" . }}
<div class="mx-auto px-3 mt-4 container-xxl">
{{ block "main" . }}
{{ end }}
{{ block "main" . }}{{ end }}
{{ partial "footer/footer.html" . }}
</div>
{{ partial "foot/bootstrap5.html" . }}
Expand Down
43 changes: 43 additions & 0 deletions layouts/trips/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{{ define "head" }}
<style>
article.autonumbering {
counter-reset: section;
}

article.autonumbering > .fs-4 {
counter-reset: subsection;
}

article.autonumbering > .fs-4::before {
counter-increment: section;
content: counter(section)". "
}

article.autonumbering > .fs-5::before {
counter-increment: subsection;
content: counter(section)"."counter(subsection)". "
}
</style>
{{ end }}

{{ define "main" }}
<div class="fs-2 fw-bold">
{{ with .Param "title" }}{{ . }}{{ end }}
</div>
<div class="fs-6">
<span class="fw-bold">{{ with .Param "author" }}{{ . }}{{ end }}</span>
<span class="mx-0">
{{/* See "https://icons.getbootstrap.com/icons/dot/" */}}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-dot" viewBox="0 0 16 16">
<path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3z"/>
</svg>
</span>
<span>{{ with .Param "from" }}{{ . }}{{ end }} - {{ with .Param "to" }}{{ . }}{{ end }}</span>
</div>

<hr>

<article {{ if .Param "autonumbering" }}class="autonumbering"{{ end }}>
{{ .Content }}
</article>
{{ end }}

0 comments on commit 80a1549

Please sign in to comment.