From 5b7f37aed8f70273c8d5fcd49abb6d4507476b86 Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Thu, 9 Jan 2020 11:16:26 -0500 Subject: [PATCH] Restyle Import page - Changes Import link location in dropdown menu - Makes design consistent with Invite People page (and extracts some common CSS into core.less) - Selects the user's first blog by default in the dropdown - Changes the copy a bit Ref T609 --- account_import.go | 2 +- less/core.less | 18 ++++++++++ templates/user/import.tmpl | 53 ++++++++++++++++++------------ templates/user/include/header.tmpl | 4 +-- templates/user/invite.tmpl | 15 ++------- 5 files changed, 55 insertions(+), 37 deletions(-) diff --git a/account_import.go b/account_import.go index 8d8a6e7..87882c6 100644 --- a/account_import.go +++ b/account_import.go @@ -18,7 +18,7 @@ import ( func viewImport(app *App, u *User, w http.ResponseWriter, r *http.Request) error { // Fetch extra user data - p := NewUserPage(app, r, u, "Import", nil) + p := NewUserPage(app, r, u, "Import Posts", nil) c, err := app.db.GetCollections(u, app.Config().App.Host) if err != nil { diff --git a/less/core.less b/less/core.less index 8844c84..c963e1a 100644 --- a/less/core.less +++ b/less/core.less @@ -1317,6 +1317,24 @@ form { font-size: 0.86em; line-height: 2; } + + &.prominent { + margin: 1em 0; + + label { + font-weight: bold; + } + input, select { + width: 100%; + } + select { + font-size: 1em; + padding: 0.5rem; + display: block; + border-radius: 0.25rem; + margin: 0.5rem 0; + } + } } div.row { display: flex; diff --git a/templates/user/import.tmpl b/templates/user/import.tmpl index 0fd8a93..2b6a4c3 100644 --- a/templates/user/import.tmpl +++ b/templates/user/import.tmpl @@ -1,37 +1,48 @@ {{define "import"}} {{template "header" .}} +
+

Import posts

{{if .Message}}

{{.Message}}

{{end}} -

Import

-

Upload text or markdown files to import as posts.

+ {{if .Flashes}} + + {{end}} +

Publish plain text or Markdown files to your account by uploading them below.

-
- - -
- - -
+ + +
- {{if .Flashes}} - - {{end}}
{{template "footer" .}} diff --git a/templates/user/include/header.tmpl b/templates/user/include/header.tmpl index 3b57387..0704854 100644 --- a/templates/user/include/header.tmpl +++ b/templates/user/include/header.tmpl @@ -10,8 +10,8 @@

  • {{if .IsAdmin}}
  • Admin
  • {{end}}
  • Settings
  • +
  • Import posts
  • Export
  • -
  • Import

  • Log out
  • @@ -33,8 +33,8 @@