Improved breadcrumbs list
This commit is contained in:
1 parent
2b4e1dbc57
commit
ea3eba180b
4 files changed
+100
-36
No files matched your search
+66
-22
@@ -3,48 +3,56 @@
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>{{ .Title }}</title>
|
||||
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="/o/path:/system/static/css/main.css"
|
||||
>
|
||||
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="/o/path:/system/static/css/modes.css"
|
||||
>
|
||||
|
||||
<title>{{ .Name }}</title>
|
||||
<link rel="stylesheet" href="/o/path:/system/static/css/main.css">
|
||||
<link rel="stylesheet" href="/o/path:/system/static/css/modes.css">
|
||||
</head>
|
||||
|
||||
<body class="mode-page">
|
||||
<body class="mode-page {{ if .IsHome }}is-home-page{{ end }}">
|
||||
|
||||
<header class="topbar">
|
||||
|
||||
<div class="brand">
|
||||
<a href="/">{{ .WikiName }}</a>
|
||||
<a href="/">{{ .WikiName }}</a>
|
||||
</div>
|
||||
|
||||
|
||||
<nav>
|
||||
{{ range .NavItems }}
|
||||
<a href="{{ .ResolvedHref }}">{{ .Label }}</a>
|
||||
{{ end }}
|
||||
</nav>
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<main class="container">
|
||||
|
||||
<section class="card">
|
||||
<section>
|
||||
|
||||
<div class="path-label">
|
||||
{{ .Path }}
|
||||
</div>
|
||||
{{ if ne .Path "/" }}
|
||||
|
||||
<!-- DEBUG Breadcrumbs: {{ printf "%#v" .Breadcrumbs }} -->
|
||||
<nav class="breadcrumbs">
|
||||
|
||||
<a href="/">
|
||||
/
|
||||
</a>
|
||||
|
||||
{{ range .Breadcrumbs }}
|
||||
|
||||
<span class="breadcrumb-sep">
|
||||
/
|
||||
</span>
|
||||
|
||||
<a href="{{ .Path }}">
|
||||
{{ .Name }}
|
||||
</a>
|
||||
|
||||
{{ end }}
|
||||
|
||||
</nav>
|
||||
|
||||
{{ end }}
|
||||
|
||||
<article class="page-html">
|
||||
{{ .RenderedHTML }}
|
||||
@@ -56,6 +64,32 @@
|
||||
|
||||
<style>
|
||||
|
||||
.breadcrumbs {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
margin-bottom: 1rem;
|
||||
font-family:
|
||||
"JetBrains Mono",
|
||||
monospace;
|
||||
font-size: 0.86rem;
|
||||
}
|
||||
|
||||
.breadcrumbs a {
|
||||
text-decoration: none;
|
||||
color: #9cc8ff;
|
||||
}
|
||||
|
||||
.breadcrumbs a:hover {
|
||||
color: #d6e9ff;
|
||||
text-shadow:
|
||||
0 0 0.35rem rgba(120,180,255,0.28);
|
||||
}
|
||||
|
||||
.breadcrumb-sep {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.children-list ul {
|
||||
margin: 0;
|
||||
padding-left: 1.2rem;
|
||||
@@ -65,6 +99,16 @@
|
||||
margin: 0.15rem 0;
|
||||
}
|
||||
|
||||
|
||||
.is-root-page .breadcrumbs {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
.is-home-page .breadcrumbs {
|
||||
display: none;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</body>
|
||||
|
||||
Reference in new issue
Block a user