diff --git a/less/admin.less b/less/admin.less
index d9d659e..86dc9ff 100644
--- a/less/admin.less
+++ b/less/admin.less
@@ -32,6 +32,19 @@ nav#admin {
display: flex;
justify-content: center;
+ &:not(.pages) {
+ display: block;
+ margin: 0.5em 0;
+ a {
+ margin-left: 0;
+ .rounded(.25em);
+
+ &+a {
+ margin-left: 0.5em;
+ }
+ }
+ }
+
a {
color: #333;
font-family: @sansFont;
diff --git a/less/core.less b/less/core.less
index b502c5d..85e97e6 100644
--- a/less/core.less
+++ b/less/core.less
@@ -430,6 +430,15 @@ nav#full-nav a.simple-btn, .tool button {
text-decoration: none;
}
+#user-nav {
+ a:link, a:visited, a:hover {
+ color: @primary;
+ }
+ >a:hover {
+ text-decoration: underline !important;
+ }
+}
+
.post-title {
a {
&:link {
@@ -743,6 +752,18 @@ input, button, select.inputform, textarea.inputform, a.btn {
}
}
+.btn.pager {
+ border: 1px solid @lightNavBorder;
+ font-size: .86em;
+ padding: .5em 1em;
+ white-space: nowrap;
+ font-family: @sansFont;
+ &:hover {
+ text-decoration: none;
+ background: @lightNavBorder;
+ }
+}
+
div.flat-select {
display: inline-block;
position: relative;
@@ -965,7 +986,12 @@ footer.contain-me {
}
ul {
&.collections {
+ padding-left: 0;
margin-left: 0;
+ h3 {
+ margin-top: 0;
+ font-weight: normal;
+ }
li {
&.collection {
a.title {
@@ -1095,7 +1121,8 @@ body#pad-sub #posts, .atoms {
}
.electron {
font-weight: normal;
- margin-left: 0.5em;
+ font-size: 0.86em;
+ margin-left: 0.75rem;
}
}
h3, h4 {
diff --git a/less/new-core.less b/less/new-core.less
index 87d8158..c9e7a17 100644
--- a/less/new-core.less
+++ b/less/new-core.less
@@ -127,7 +127,6 @@ textarea {
&.collection {
a.title {
font-size: 1.3em;
- font-weight: bold;
}
}
}
diff --git a/templates.go b/templates.go
index 5ee4bcf..e29b390 100644
--- a/templates.go
+++ b/templates.go
@@ -11,6 +11,7 @@
package writefreely
import (
+ "errors"
"html/template"
"io"
"io/ioutil"
@@ -38,6 +39,9 @@ var (
"localhtml": localHTML,
"tolower": strings.ToLower,
"title": strings.Title,
+ "hasPrefix": strings.HasPrefix,
+ "hasSuffix": strings.HasSuffix,
+ "dict": dict,
}
)
@@ -103,6 +107,7 @@ func initUserPage(parentDir, path, key string) {
filepath.Join(parentDir, templatesDir, "user", "include", "header.tmpl"),
filepath.Join(parentDir, templatesDir, "user", "include", "footer.tmpl"),
filepath.Join(parentDir, templatesDir, "user", "include", "silenced.tmpl"),
+ filepath.Join(parentDir, templatesDir, "user", "include", "nav.tmpl"),
))
}
@@ -200,3 +205,19 @@ func localHTML(term, lang string) template.HTML {
s = strings.Replace(s, "write.as", "writefreely", 1)
return template.HTML(s)
}
+
+// from: https://stackoverflow.com/a/18276968/1549194
+func dict(values ...interface{}) (map[string]interface{}, error) {
+ if len(values)%2 != 0 {
+ return nil, errors.New("dict: invalid number of parameters")
+ }
+ dict := make(map[string]interface{}, len(values)/2)
+ for i := 0; i < len(values); i += 2 {
+ key, ok := values[i].(string)
+ if !ok {
+ return nil, errors.New("dict: keys must be strings")
+ }
+ dict[key] = values[i+1]
+ }
+ return dict, nil
+}
diff --git a/templates/user/admin/users.tmpl b/templates/user/admin/users.tmpl
index 714fa24..4b2404e 100644
--- a/templates/user/admin/users.tmpl
+++ b/templates/user/admin/users.tmpl
@@ -26,7 +26,7 @@
{{end}}
-