Add contextual blog menu

This commit is contained in:
Matt Baer 2020-08-19 17:09:47 -04:00
parent cef51a7797
commit 9d0ba2bed4
4 changed files with 37 additions and 2 deletions

View file

@ -10,6 +10,8 @@
@proSelectedCol: #71D571;
@textLinkColor: rgb(0, 0, 238);
@accent: #767676;
body {
font-family: @serifFont;
font-size-adjust: 0.5;
@ -1565,3 +1567,26 @@ div.row {
pre.code-block {
overflow-x: auto;
}
#org-nav {
font-family: @sansFont;
font-size: 1.1em;
color: #888;
em, strong {
color: #000;
}
&+h1 {
margin-top: 0.5em;
}
a:link, a:visited, a:hover {
color: @accent;
}
a:first-child {
margin-right: 0.25em;
}
a.coll-name {
font-weight: bold;
margin-left: 0.25em;
}
}

View file

@ -20,7 +20,10 @@ textarea.section.norm {
{{if .Silenced}}
{{template "user-silenced"}}
{{end}}
<h1>Customize {{.DisplayTitle}}</h1>
{{template "collection-breadcrumbs" .}}
<h1>Customize</h1>
{{template "collection-nav" (dict "Alias" .Alias "Path" .Path "SingleUser" .SingleUser)}}

View file

@ -1,3 +1,7 @@
{{define "collection-breadcrumbs"}}
{{if and .Collection (not .SingleUser)}}<nav id="org-nav"><a href="/me/c/">Blogs</a> / <a class="coll-name" href="/{{.Collection.Alias}}/">{{.Collection.DisplayTitle}}</a></nav>{{end}}
{{end}}
{{define "collection-nav"}}
<header class="admin">
<nav class="pager">

View file

@ -20,7 +20,10 @@ td.none {
{{if .Silenced}}
{{template "user-silenced"}}
{{end}}
<h1 id="posts-header">{{if .Collection}}{{.Collection.DisplayTitle}} {{end}}Stats</h1>
{{template "collection-breadcrumbs" .}}
<h1 id="posts-header">Stats</h1>
{{if .Collection}}
{{template "collection-nav" (dict "Alias" .Collection.Alias "Path" .Path "SingleUser" .SingleUser)}}