From eb018a6fe29fc8c13841c94e894e5aff192ea73f Mon Sep 17 00:00:00 2001
From: Justin Wind <justin.wind+git@gmail.com>
Date: Fri, 15 Mar 2024 17:47:04 -0700
Subject: [PATCH] rearrange navLinks, update readme

---
 README.md              | 4 ++--
 lib/template-helper.js | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index 205bbc5..32f2673 100644
--- a/README.md
+++ b/README.md
@@ -24,8 +24,8 @@ The context is referenced for authenticated user information, as well as messagi
 - `ctx.session.authenticatedIdentifier`
 - `ctx.session.authenticatedProfile`
 
-If either of these are present, a navigation link is added to the page header allowing the user to log out.  
-The link will point relatively to `/admin/logout`.
+If either of these are present, navigation links are added to the page header allowing the user to manage their account or log out.  
+The links will point relatively to `/admin/settings` and `/admin/logout`, respectively.
 
 - `ctx.url`
 
diff --git a/lib/template-helper.js b/lib/template-helper.js
index 747c525..e48cdb4 100644
--- a/lib/template-helper.js
+++ b/lib/template-helper.js
@@ -390,11 +390,11 @@ function htmlPage(pagePathLevel, ctx, options, main = []) {
     const logoutRedirect = ctx?.url ? `?r=${encodeURIComponent(ctx.url)}` : '';
     const adminPath = (pagePathLevel > 0) ? `${'../'.repeat(pagePathLevel - 1)}` : 'admin/';
     options.navLinks.push({
+      text: 'Account',
+      href: `${adminPath}settings`,
+    }, {
       text: `Logout (${user})`,
       href: `${adminPath}logout${logoutRedirect}`,
-    }, {
-      text: 'Settings',
-      href: `${adminPath}settings`,
     });
   }
 
-- 
2.49.0