Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

Fix broken filter tags style on campaigns and subscribers pages.

Kailash Nadhd90833904ed6
diff --git a/static/admin/assets/css/style.css b/static/admin/assets/css/style.css
index 6db8d648..8b00276f 100644
--- a/static/admin/assets/css/style.css
+++ b/static/admin/assets/css/style.css
@@ -865,6 +865,17 @@ main {
}
+.page-heading {
+ flex-wrap: nowrap;
+ max-width: 100%;
+ overflow-x: auto;
+
+ > * {
+ flex-shrink: 0;
+ white-space: nowrap;
+ }
+}
+
/* Placeholder for empty tables, lists and cards ({{ template "empty-state" }}). */
.empty-state {
align-items: center;
diff --git a/static/admin/partials/breadcrumbs.html b/static/admin/partials/breadcrumbs.html
new file mode 100644
index 00000000..85ea8c52
--- /dev/null
+++ b/static/admin/partials/breadcrumbs.html
@@ -0,0 +1,16 @@
+{{ define "breadcrumbs" -}}
+<nav class="breadcrumbs" aria-label="Breadcrumb">
+ <ol>
+ {{- range $index, $parent := .Parents }}
+ <li>
+ {{- if $index }}<span aria-hidden="true">/</span>{{ end }}
+ {{- if .CanLink }}<a href="{{ .URL }}">{{ .Label }}</a>{{ else }}<span>{{ .Label }}</span>{{ end }}
+ </li>
+ {{- end }}
+ <li>
+ {{- if .Parents }}<span aria-hidden="true">/</span>{{ end }}
+ <a href="" aria-current="page">{{ .Current }}</a>
+ </li>
+ </ol>
+</nav>
+{{- end }}
diff --git a/static/admin/views/lists.html b/static/admin/views/lists.html
index 07d7452f..a88e9bcb 100644
--- a/static/admin/views/lists.html
+++ b/static/admin/views/lists.html
@@ -11,25 +11,25 @@
{{- $tags := $d.Page.Param "tag" -}}
<section class="lists" x-data="listsView">
- <header class="row page-header">
- <div class="col-4">
+ <header class="hstack justify-between page-header">
+ <div class="hstack page-heading">
<h1 class="page-title">
{{ .L.T "globals.terms.lists" }}
<span>({{ $d.Page.Total }})</span>
- {{- if eq $status "archived" }} {{ template "filter-badge" dict "Label" (.L.T "lists.archived") "URL" ($d.Page.FilterURL $base "status") }}{{ end }}
- {{- if $type }}
- {{- $typeIcon := "eye-off" }}{{ if eq $type "public" }}{{ $typeIcon = "eye" }}{{ end }}
- {{ template "filter-badge" dict "Label" (list (Icon $typeIcon) (.L.T (printf "lists.types.%s" $type))) "Class" "enum" "URL" ($d.Page.FilterURL $base "type") }}
- {{- end }}
- {{- if $optin }}
- {{- $optinIcon := "user-x" }}{{ if eq $optin "double" }}{{ $optinIcon = "user-check" }}{{ end }}
- {{ template "filter-badge" dict "Label" (list (Icon $optinIcon) (.L.T (printf "lists.optins.%s" $optin))) "Class" "enum" "URL" ($d.Page.FilterURL $base "optin") }}
- {{- end }}
- {{- if $tags }} {{ template "filter-badge" dict "Label" (printf "#%s" $tags) "Class" "tag" "URL" ($d.Page.FilterURL $base "tag") }}{{ end }}
- {{- if gt $d.Page.Page 1 }} {{ template "filter-badge" dict "Label" (.L.Ts "globals.terms.page" "n" (printf "%d" $d.Page.Page)) "URL" ($d.Page.FilterURL $base) }}{{ end }}
</h1>
+ {{- if eq $status "archived" }} {{ template "filter-badge" dict "Label" (.L.T "lists.archived") "URL" ($d.Page.FilterURL $base "status") }}{{ end }}
+ {{- if $type }}
+ {{- $typeIcon := "eye-off" }}{{ if eq $type "public" }}{{ $typeIcon = "eye" }}{{ end }}
+ {{ template "filter-badge" dict "Label" (list (Icon $typeIcon) (.L.T (printf "lists.types.%s" $type))) "Class" "enum" "URL" ($d.Page.FilterURL $base "type") }}
+ {{- end }}
+ {{- if $optin }}
+ {{- $optinIcon := "user-x" }}{{ if eq $optin "double" }}{{ $optinIcon = "user-check" }}{{ end }}
+ {{ template "filter-badge" dict "Label" (list (Icon $optinIcon) (.L.T (printf "lists.optins.%s" $optin))) "Class" "enum" "URL" ($d.Page.FilterURL $base "optin") }}
+ {{- end }}
+ {{- if $tags }} {{ template "filter-badge" dict "Label" (printf "#%s" $tags) "Class" "tag" "URL" ($d.Page.FilterURL $base "tag") }}{{ end }}
+ {{- if gt $d.Page.Page 1 }} {{ template "filter-badge" dict "Label" (.L.Ts "globals.terms.page" "n" (printf "%d" $d.Page.Page)) "URL" ($d.Page.FilterURL $base) }}{{ end }}
</div>
- <div class="col-8 hstack justify-end buttons">
+ <div class="hstack justify-end buttons">
<form method="get" action="{{ URI "/admin/lists" }}" class="search-form">
{{- $d.Page.FormFields "query" -}}
<fieldset class="group">
diff --git a/static/admin/views/subscribers.html b/static/admin/views/subscribers.html
index 048320dc..164acd4a 100644
--- a/static/admin/views/subscribers.html
+++ b/static/admin/views/subscribers.html
@@ -19,19 +19,19 @@
</script>
<section class="subscribers" x-data="subscribersView()">
- <header class="row page-header">
- <div class="col-4">
+ <header class="hstack justify-between page-header">
+ <div class="hstack page-heading">
<h1 class="page-title">
{{ .L.T "globals.terms.subscribers" }}
<span>({{ $d.Page.Total }})</span>
- {{- if $d.CurrentList }} {{ template "filter-badge" dict "Label" $d.CurrentList.Name "LabelURL" (printf "%s/%d" (URI "/admin/lists") $d.CurrentList.ID) "Avatar" (dict "Size" "xsmall" "Kind" "list" "Name" $d.CurrentList.Name "Disabled" (eq $d.CurrentList.Status "archived")) "URL" (URI "/admin/subscribers") }}{{ end }}
- {{- if eq $subStatus "none" }} {{ template "filter-badge" dict "Label" (.L.T "dashboard.orphanSubs") "URL" ($d.Page.FilterURL $base "subscription_status") }}
- {{- else if $subStatus }} {{ template "filter-badge" dict "Label" (list (Dot) (.L.T (printf "subscribers.status.%s" $subStatus))) "Class" (printf "status-%s" $subStatus) "URL" ($d.Page.FilterURL $base "subscription_status") }}{{ end }}
- {{- if $status }} {{ template "filter-badge" dict "Label" (list (Dot) (.L.T (printf "subscribers.status.%s" $status))) "Class" (printf "status-%s" $status) "URL" ($d.Page.FilterURL $base "status") }}{{ end }}
- {{- if gt $d.Page.Page 1 }} {{ template "filter-badge" dict "Label" (.L.Ts "globals.terms.page" "n" (printf "%d" $d.Page.Page)) "URL" ($d.Page.FilterURL $base) }}{{ end }}
</h1>
+ {{- if $d.CurrentList }} {{ template "filter-badge" dict "Label" $d.CurrentList.Name "LabelURL" (printf "%s/%d" (URI "/admin/lists") $d.CurrentList.ID) "Avatar" (dict "Size" "xsmall" "Kind" "list" "Name" $d.CurrentList.Name "Disabled" (eq $d.CurrentList.Status "archived")) "URL" (URI "/admin/subscribers") }}{{ end }}
+ {{- if eq $subStatus "none" }} {{ template "filter-badge" dict "Label" (.L.T "dashboard.orphanSubs") "URL" ($d.Page.FilterURL $base "subscription_status") }}
+ {{- else if $subStatus }} {{ template "filter-badge" dict "Label" (list (Dot) (.L.T (printf "subscribers.status.%s" $subStatus))) "Class" (printf "status-%s" $subStatus) "URL" ($d.Page.FilterURL $base "subscription_status") }}{{ end }}
+ {{- if $status }} {{ template "filter-badge" dict "Label" (list (Dot) (.L.T (printf "subscribers.status.%s" $status))) "Class" (printf "status-%s" $status) "URL" ($d.Page.FilterURL $base "status") }}{{ end }}
+ {{- if gt $d.Page.Page 1 }} {{ template "filter-badge" dict "Label" (.L.Ts "globals.terms.page" "n" (printf "%d" $d.Page.Page)) "URL" ($d.Page.FilterURL $base) }}{{ end }}
</div>
- <div class="col-8 hstack justify-end buttons">
+ <div class="hstack justify-end buttons">
<form action="{{ $base }}" class="search-form" :method="advanced ? 'post' : 'get'">
{{- $d.Page.FormFields "search" "query" "page" -}}
<ot-dropdown>