From 1d25784d20537923889eb8a36d7efc2cfbdace32 Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Mon, 5 Aug 2019 09:54:05 -0400 Subject: [PATCH] Add `bare` editor option This adds a new editor template that strips away most of the customization features in the default editor and includes only: - publishing - editing - viewing word count It also restricts publishing to a user's first collection, so it's optimized for instances that only allow users to have a single collection and don't use Drafts. Ref T680 T677 --- less/core.less | 2 +- less/pad-theme.less | 4 +- less/pad.less | 7 ++ templates/bare.tmpl | 235 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 245 insertions(+), 3 deletions(-) create mode 100644 templates/bare.tmpl diff --git a/less/core.less b/less/core.less index b1b8301..f4332a9 100644 --- a/less/core.less +++ b/less/core.less @@ -421,7 +421,7 @@ nav#full-nav { } } -nav#full-nav a.simple-btn { +nav#full-nav a.simple-btn, .tool button { font-family: @sansFont; border: 1px solid #ccc !important; padding: .5rem 1rem; diff --git a/less/pad-theme.less b/less/pad-theme.less index af1f95c..a8f668e 100644 --- a/less/pad-theme.less +++ b/less/pad-theme.less @@ -63,7 +63,7 @@ body#pad, body#pad-sub { } } #belt { - a { + a, button { color: #000; } } @@ -100,7 +100,7 @@ body#pad, body#pad-sub { } } #belt { - a { + a, button { color: white; } } diff --git a/less/pad.less b/less/pad.less index d37c6bc..a132b30 100644 --- a/less/pad.less +++ b/less/pad.less @@ -222,6 +222,13 @@ body#pad, body#pad-sub { font-style: italic; } } + button { + font-family: @sansFont; + background-color: transparent; + padding-top: 0.25rem; + padding-bottom: 0.25rem; + border: 0; + } } } } diff --git a/templates/bare.tmpl b/templates/bare.tmpl new file mode 100644 index 0000000..1398a47 --- /dev/null +++ b/templates/bare.tmpl @@ -0,0 +1,235 @@ +{{define "pad"}} + + + + {{if .Editing}}Editing {{if .Post.Title}}{{.Post.Title}}{{else}}{{.Post.Id}}{{end}}{{else}}New Post{{end}} — {{.SiteName}} + + + + + + + + +
+ + + +
+
+ {{if not .SingleUser}}

{{.SiteName}}

{{end}} + + +
+ +
+ {{if .Editing}}{{end}} +
+
+
+ + + + +{{end}}