From bd4bb52b9c8f6e18a9761e661bc7612d45679ac5 Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Mon, 22 Jul 2019 14:37:32 -0400 Subject: [PATCH 1/4] Hide Public blog option on single-user instances --- templates/user/collection.tmpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/user/collection.tmpl b/templates/user/collection.tmpl index 08e8886..8af3bda 100644 --- a/templates/user/collection.tmpl +++ b/templates/user/collection.tmpl @@ -58,6 +58,7 @@

A password is required to read this blog.

+ {{if not .SingleUser}}
  • + {{end}} From 3129b837f17a75383ca789b1285098d7fd78b96c Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Mon, 22 Jul 2019 14:40:10 -0400 Subject: [PATCH 2/4] Hide footer links to About and Privacy pages when single-user Previously, these links showed up on user backend pages on a single-user instance, despite them not working / only being applicable on multi-user instances. --- templates/user/include/footer.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/user/include/footer.tmpl b/templates/user/include/footer.tmpl index 36a69fa..572d9d6 100644 --- a/templates/user/include/footer.tmpl +++ b/templates/user/include/footer.tmpl @@ -8,10 +8,10 @@
    From a48b746706830c62321f738f526165beae2aac3d Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Mon, 22 Jul 2019 14:47:39 -0400 Subject: [PATCH 3/4] Fix empty Drafts page for single-user instances - This removes copy mentioning the Blogs page, which isn't used on single-user instances - This fixes the "Start writing" link, which on a single-user instance would've gone to the blog index, rather than the editor --- templates/user/articles.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/user/articles.tmpl b/templates/user/articles.tmpl index 4956301..67d3e0b 100644 --- a/templates/user/articles.tmpl +++ b/templates/user/articles.tmpl @@ -34,8 +34,8 @@ {{if .Summary}}

    {{.Summary}}

    {{end}} {{end}} {{ else }}

    You haven't saved any drafts yet.

    -

    They'll show up here once you do. Find your blog posts from the Blogs page.

    -

    Start writing

    {{ end }} +

    They'll show up here once you do. {{if not .SingleUser}}Find your blog posts from the Blogs page.{{end}}

    +

    Start writing

    {{ end }}
    From f6dc07850ba95c2ee8e1c42db4372962c70cda16 Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Wed, 7 Aug 2019 15:47:49 -0400 Subject: [PATCH 4/4] Fix pinned post URL on single-user instances Previously, the URL of the dynamically-added pinned post on a single-user instance would include the username, causing the link to go to a non-existent page. This fixes that. --- templates/collection-tags.tmpl | 2 +- templates/collection.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/collection-tags.tmpl b/templates/collection-tags.tmpl index 6849fee..7cad3b7 100644 --- a/templates/collection-tags.tmpl +++ b/templates/collection-tags.tmpl @@ -141,7 +141,7 @@ function pinPost(e, postID, slug, title) { var $header = document.getElementsByTagName('header')[0]; var $pinnedNavs = $header.getElementsByTagName('nav'); // Add link to nav - var link = ''+title+''; + var link = ''+title+''; if ($pinnedNavs.length == 0) { $header.insertAdjacentHTML("beforeend", ''); } else { diff --git a/templates/collection.tmpl b/templates/collection.tmpl index 18942a9..6623a2e 100644 --- a/templates/collection.tmpl +++ b/templates/collection.tmpl @@ -176,7 +176,7 @@ function pinPost(e, postID, slug, title) { var $header = document.getElementsByTagName('header')[0]; var $pinnedNavs = $header.getElementsByTagName('nav'); // Add link to nav - var link = ''+title+''; + var link = ''+title+''; if ($pinnedNavs.length == 0) { $header.insertAdjacentHTML("beforeend", ''); } else {