M scss/main.scss => scss/main.scss +0 -8
@@ 16,11 16,3 @@
font-family: $font-family-monospace;
}
}
-
-// Compact grid for the database list on user and dashboard pages.
-.repo-list {
- display: grid;
- grid-template-columns: 1fr auto;
- grid-gap: 0.25rem 1rem;
- align-items: baseline;
-}
M web/templates.go => web/templates.go +1 -0
@@ 128,6 128,7 @@ func templateFuncs(icons map[string]template.HTML) template.FuncMap {
// humansize renders a byte count as a human-readable size.
"humansize": humanizeSize,
"upper": strings.ToUpper,
+ "lower": strings.ToLower,
// inc/dec support 1-based page arithmetic in pagination links.
"inc": func(n int) int { return n + 1 },
"dec": func(n int) int { return n - 1 },
M web/templates/index.html => web/templates/index.html +18 -5
@@ 1,14 1,27 @@
{{define "content" -}}
{{if .CurrentUser}}
<div class="row">
- <div class="col-md-8">
- <h2>Your databases</h2>
+ <div class="col-md-4">
+ <p>
+ Welcome back, {{.CurrentUser.Username}}! This is your Dolt database
+ hosting service: <code>dolt clone</code>, <code>push</code> and
+ <code>pull</code> over HTTPS, with a web UI for browsing branches,
+ commits and tables.
+ </p>
+ <a href="/create" class="btn btn-primary btn-block"
+ >Create new database {{icon "caret-right"}}</a>
+ <a href="/settings/keys" class="btn btn-default btn-block"
+ >Configure dolt credentials {{icon "caret-right"}}</a>
</div>
- <div class="col-md-4 text-right">
- <a href="/create" class="btn btn-primary">{{icon "plus-square"}} Create database</a>
+ <div class="col-md-8">
+ <hr class="d-md-none" />
+ {{template "repoList" .Repos}}
+ {{if .Repos}}
+ <a href="/~{{.CurrentUser.Username}}" class="btn btn-default pull-right"
+ >More on your profile {{icon "caret-right"}}</a>
+ {{end}}
</div>
</div>
-{{template "repoList" .Repos}}
{{else}}
<div class="header-extension"></div>
<h2>{{.SiteName}} <span class="text-danger">{{.SiteLabel}}</span></h2>
M web/templates/partials.html => web/templates/partials.html +12 -6
@@ 38,13 38,19 @@
{{define "repoList" -}}
{{if .}}
-<div class="repo-list">
+<div class="event-list">
{{range .}}
- <span>
- <a href="/~{{.OwnerName}}/{{.Name}}">~{{.OwnerName}}/{{.Name}}</a>
- {{template "visibilityBadge" .Visibility}}
- </span>
- <span class="text-muted">{{.Description}}</span>
+ <div class="event">
+ <h4>
+ <a href="/~{{.OwnerName}}/{{.Name}}">~{{.OwnerName}}/{{.Name}}</a>
+ {{if ne (printf "%s" .Visibility) "PUBLIC"}}
+ <small class="pull-right">{{lower (printf "%s" .Visibility)}}</small>
+ {{end}}
+ </h4>
+ {{if .Description}}
+ <p>{{.Description}}</p>
+ {{end}}
+ </div>
{{end}}
</div>
{{else}}