style(ui): american spelling and softer repo descriptions
11 files changed, +39 −39
- admin.go modified +3 −3
- main.go modified +2 −2
- static/style.css modified +17 −17
- templates/admin.html modified +3 −3
- templates/index.html modified +1 −1
- templates/neworg.html modified +3 −3
- templates/org.html modified +2 −2
- templates/orgsettings.html modified +1 −1
- templates/reposettings.html modified +1 −1
- templates/user.html modified +1 −1
- web.go modified +5 −5
admin.go modified
| @@ -333,12 +333,12 @@ func (s *Server) newOrg(w http.ResponseWriter, r *http.Request) { | ||
| 333 | 333 | return |
| 334 | 334 | } |
| 335 | 335 | if r.Method == "GET" { |
| 336 | - s.render(w, r, "neworg", page{Title: "New organisation", User: u}) | |
| 336 | + s.render(w, r, "neworg", page{Title: "New organization", User: u}) | |
| 337 | 337 | return |
| 338 | 338 | } |
| 339 | 339 | name := strings.TrimSpace(r.FormValue("name")) |
| 340 | 340 | if s.limiter.blocked("org:" + u.Name) { |
| 341 | - s.render(w, r, "neworg", page{Title: "New organisation", User: u, Error: "Too many organisations created recently, try again later", Data: map[string]any{"Name": name}}) | |
| 341 | + s.render(w, r, "neworg", page{Title: "New organization", User: u, Error: "Too many organizations created recently, try again later", Data: map[string]any{"Name": name}}) | |
| 342 | 342 | return |
| 343 | 343 | } |
| 344 | 344 | org, err := s.store.CreateOrg(name) |
| @@ -347,7 +347,7 @@ func (s *Server) newOrg(w http.ResponseWriter, r *http.Request) { | ||
| 347 | 347 | } |
| 348 | 348 | if err != nil { |
| 349 | 349 | w.WriteHeader(400) |
| 350 | - s.render(w, r, "neworg", page{Title: "New organisation", User: u, Error: err.Error(), Data: map[string]any{"Name": name}}) | |
| 350 | + s.render(w, r, "neworg", page{Title: "New organization", User: u, Error: err.Error(), Data: map[string]any{"Name": name}}) | |
| 351 | 351 | return |
| 352 | 352 | } |
| 353 | 353 | s.limiter.fail("org:" + u.Name) |
main.go modified
| @@ -31,7 +31,7 @@ func main() { | ||
| 31 | 31 | ban name | unban name block or restore an account |
| 32 | 32 | delete name remove an account and its repositories |
| 33 | 33 | feature owner/repo... | -owner/repo set or clear the featured projects, in order |
| 34 | - org name [+user|-user]... create an organisation and add or remove members | |
| 34 | + org name [+user|-user]... create an organization and add or remove members | |
| 35 | 35 | mail address send a test message through the configured mailer |
| 36 | 36 | backup dir | file.db snapshot the database and bundle every changed repository into dir`) |
| 37 | 37 | } |
| @@ -146,7 +146,7 @@ func main() { | ||
| 146 | 146 | log.Fatal(err) |
| 147 | 147 | } |
| 148 | 148 | } else if !store.IsOrg(org.ID) { |
| 149 | - log.Fatalf("~%s is a user, not an organisation", args[1]) | |
| 149 | + log.Fatalf("~%s is a user, not an organization", args[1]) | |
| 150 | 150 | } |
| 151 | 151 | for _, spec := range args[2:] { |
| 152 | 152 | name := strings.TrimPrefix(strings.TrimLeft(spec, "+-"), "~") |
static/style.css modified
| @@ -2,7 +2,7 @@ | ||
| 2 | 2 | @font-face{font-family:"Source Sans 3";font-style:italic;font-weight:400;font-display:swap;src:url(/static/fonts/sans-400-italic.woff2) format('woff2')} |
| 3 | 3 | @font-face{font-family:"Source Sans 3";font-style:normal;font-weight:600;font-display:swap;src:url(/static/fonts/sans-600-normal.woff2) format('woff2')} |
| 4 | 4 | @font-face{font-family:"Source Sans 3";font-style:normal;font-weight:700;font-display:swap;src:url(/static/fonts/sans-700-normal.woff2) format('woff2')} |
| 5 | -:root{--accent:#44467d;--accentdark:#35366b;--accentsoft:#f3f4fd;--focus:#c4c8e8;--heat0:#ebedf0;--heat1:#c4c8e8;--heat2:#959acb;--heat3:#6a6ea8;--heat4:#44467d;--fg:#212529;--muted:#6c757d;--line:#dee2e6;--soft:#f8f9fa;--bar:#ddd;--add:#1a7f37;--del:#c0392b;--addbg:#e6ffec;--delbg:#ffebe9;--code:#f8f9fa;--bg:#fff;--raised:#e9ecef;--raisedhover:#dde1e5;--edge:#ced4da;--hl:#fff8c5;--warnbg:#fff3cd;--warnedge:#ffeeba;--warnfg:#5c4b00;--merged:#6f42c1;--dotedge:rgba(0,0,0,.12);--link:var(--accent);--tip:#16181b;--tipfg:#fff;color-scheme:light} | |
| 5 | +:root{--accent:#44467d;--accentdark:#35366b;--accentsoft:#f3f4fd;--focus:#c4c8e8;--heat0:#ebedf0;--heat1:#c4c8e8;--heat2:#959acb;--heat3:#6a6ea8;--heat4:#44467d;--fg:#212529;--muted:#6c757d;--line:#dee2e6;--soft:#f8f9fa;--bar:#ddd;--add:#1a7f37;--del:#c0392b;--addbg:#e6ffec;--delbg:#ffebe9;--code:#f8f9fa;--bg:#fff;--raised:#e9ecef;--raisedhover:#dde1e5;--edge:#ced4da;--hl:#fff8c5;--warnbg:#fff3cd;--warnedge:#ffeeba;--warnfg:#5c4b00;--merged:#6f42c1;--dotedge:rgba(0,0,0,.12);--link:var(--accent);--fg2:#555b61;--tip:#16181b;--tipfg:#fff;color-scheme:light} | |
| 6 | 6 | *{box-sizing:border-box} |
| 7 | 7 | html{font:15px/1.5 system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","DejaVu Sans",Arial,sans-serif;background:var(--bg);color:var(--fg)} |
| 8 | 8 | body{margin:0} |
| @@ -89,10 +89,10 @@ main{padding-bottom:3rem} | ||
| 89 | 89 | nav.tabs.small{background:var(--raised);align-self:flex-end;margin-bottom:.3rem} |
| 90 | 90 | nav.tabs.small a{padding:.1rem .8rem} |
| 91 | 91 | nav.tabs.small a.active{background:var(--bar)} |
| 92 | -.profile .avatar{display:block;width:260px;height:260px;margin-bottom:.9rem;border-radius:50%} | |
| 92 | +.profile .avatar{display:block;width:260px;height:260px;margin-bottom:1.1rem;border-radius:50%} | |
| 93 | 93 | .profile p{margin:.2rem 0} |
| 94 | -.profile .name{font-weight:400;font-size:1.3rem;line-height:1.25;margin:0;color:var(--fg)} | |
| 95 | -.profile .btn.block{display:block;text-align:center;margin-top:.45rem} | |
| 94 | +.profile .name{font-weight:400;font-size:1.45rem;line-height:1.2;margin:0;color:var(--fg)} | |
| 95 | +.profile .btn.block{display:block;text-align:center;margin:0} | |
| 96 | 96 | .info{background:var(--accentsoft);color:var(--fg);padding:.5rem .7rem;border:1px solid var(--focus);margin:0} |
| 97 | 97 | .avatar{object-fit:cover;border:1px solid var(--line);background:var(--soft)} |
| 98 | 98 | .bio{margin:.5rem 0 .6rem} |
| @@ -275,7 +275,7 @@ table.blame td.n{border-right:1px solid var(--bar)} | ||
| 275 | 275 | .events .event.repo{padding:.38rem .68rem .42rem;margin-bottom:.5rem} |
| 276 | 276 | .event.repo h4{font-size:.97rem} |
| 277 | 277 | .event.repo h4{border-bottom:0;padding:0;margin:0} |
| 278 | -.event.repo>p{margin:.08rem 0 0;font-size:.89rem} | |
| 278 | +.event.repo>p{margin:.08rem 0 0;font-size:.89rem;color:var(--fg2)} | |
| 279 | 279 | .event.repo p.tags{margin-top:.15rem} |
| 280 | 280 | .event p.repometa{display:flex;gap:.8rem;color:var(--muted);font-size:.76rem;margin:.25rem 0 0} |
| 281 | 281 | .repometa span{display:inline-flex;align-items:center} |
| @@ -361,15 +361,15 @@ pre.rangediff,pre.body{white-space:pre-wrap;overflow-wrap:anywhere} | ||
| 361 | 361 | .h0{background:var(--heat0)}.h1{background:var(--heat1)}.h2{background:var(--heat2)}.h3{background:var(--heat3)}.h4{background:var(--heat4)} |
| 362 | 362 | .activity .legend{display:flex;align-items:center;gap:3px;justify-content:flex-end;margin:.3rem 0 0} |
| 363 | 363 | .activity .legend i{display:inline-block;width:10px;height:10px;border-radius:2px} |
| 364 | -.profile .ident{margin-bottom:.7rem} | |
| 365 | -.profile .handle{color:var(--muted);font-size:1.05rem;margin:0} | |
| 364 | +.profile .ident{margin-bottom:1rem} | |
| 365 | +.profile .handle{color:var(--muted);font-size:1.05rem;margin:.1rem 0 0} | |
| 366 | 366 | .profile .bio{margin:0 0 .8rem} |
| 367 | 367 | .profile .bio p{margin:0 0 .4rem} |
| 368 | -.facts{list-style:none;margin:0 0 1rem;padding:0;font-size:.92rem;color:var(--muted)} | |
| 369 | -.facts li{display:flex;align-items:center;gap:.45rem;margin:.25rem 0;min-width:0} | |
| 368 | +.facts{list-style:none;margin:0 0 1.1rem;padding:0;font-size:.92rem;color:var(--muted)} | |
| 369 | +.facts li{display:flex;align-items:center;gap:.5rem;margin:.35rem 0;min-width:0} | |
| 370 | 370 | .facts a{color:var(--fg);overflow:hidden;text-overflow:ellipsis;white-space:nowrap} |
| 371 | 371 | .facts svg{flex:none;width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round} |
| 372 | -.ownactions{border-top:1px solid var(--line);padding-top:.6rem} | |
| 372 | +.ownactions{border-top:1px solid var(--line);padding-top:.9rem} | |
| 373 | 373 | .profile .bio.readme,.profile .bio.readme p{font-family:inherit;font-size:.98rem;line-height:1.5} |
| 374 | 374 | .navsearch{flex:0 1 20rem;margin-left:.5rem} |
| 375 | 375 | .navsearch input{width:100%;padding:.2rem .55rem;font-size:.9rem} |
| @@ -386,13 +386,13 @@ pre.rangediff,pre.body{white-space:pre-wrap;overflow-wrap:anywhere} | ||
| 386 | 386 | .hit h4{margin:0 0 .25rem;font-size:1.05rem;font-weight:400} |
| 387 | 387 | .hit h4 a{color:var(--link)} |
| 388 | 388 | .hit h4 a.owner{color:var(--muted)} |
| 389 | -.hit p{margin:.15rem 0} | |
| 389 | +.hit p{margin:.15rem 0;color:var(--fg2)} | |
| 390 | 390 | .hit .tags a{color:var(--muted);text-decoration:underline;margin-right:.6rem;font-size:.85rem} |
| 391 | 391 | .hit .meta{display:flex;gap:1.1rem;flex-wrap:wrap;color:var(--muted);font-size:.85rem;margin-top:.35rem} |
| 392 | 392 | .hit.user{display:grid;grid-template-columns:3rem 1fr;gap:.9rem;align-items:start} |
| 393 | 393 | .hit.org .hitavatar img{border-radius:6px} |
| 394 | 394 | .hitavatar img{display:flex;width:3rem;height:3rem;border-radius:50%;object-fit:cover;border:1px solid var(--line)} |
| 395 | -.hit .bio{color:var(--fg);overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical} | |
| 395 | +.hit .bio{color:var(--fg2);overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical} | |
| 396 | 396 | .langbar{display:flex;height:.5rem;border-radius:4px;overflow:hidden;margin:.2rem 0 .5rem;background:var(--line)} |
| 397 | 397 | .langbar span{display:block;height:100%} |
| 398 | 398 | .langlist{list-style:none;margin:0 0 1.2rem;padding:0;font-size:.85rem;display:flex;flex-wrap:wrap;gap:.2rem 1rem} |
| @@ -417,11 +417,11 @@ pre.rangediff,pre.body{white-space:pre-wrap;overflow-wrap:anywhere} | ||
| 417 | 417 | .dashhead h3{border:0;margin:0;padding:0} |
| 418 | 418 | @media(max-width:800px){.dash{grid-template-columns:1fr}} |
| 419 | 419 | |
| 420 | -.orglist{margin:0 0 1rem} | |
| 421 | -.orglist h4{font-size:.85rem;color:var(--muted);margin:0 0 .4rem;font-weight:600} | |
| 420 | +.orglist{margin:0;padding:.9rem 0 1rem;border-top:1px solid var(--line)} | |
| 421 | +.orglist h4{font-size:.85rem;color:var(--muted);margin:0 0 .55rem;font-weight:400} | |
| 422 | 422 | .orgicons{display:flex;flex-wrap:wrap;gap:.4rem} |
| 423 | 423 | .orglist a{display:flex} |
| 424 | -.orglist img{display:flex;width:2rem;height:2rem;border-radius:4px;object-fit:cover;font-size:.8rem} | |
| 424 | +.orglist img{display:flex;width:2.2rem;height:2.2rem;border-radius:4px;object-fit:cover;font-size:.8rem} | |
| 425 | 425 | .memberlist{list-style:none;margin:0 0 .8rem;padding:0;max-width:32rem} |
| 426 | 426 | .memberlist li{display:flex;align-items:center;justify-content:space-between;padding:.35rem 0;border-bottom:1px solid var(--line)} |
| 427 | 427 | .memberlist form{margin:0} |
| @@ -473,9 +473,9 @@ nav.site .me form{margin:0} | ||
| 473 | 473 | .branchpick>div a:hover{background:var(--soft);text-decoration:none} |
| 474 | 474 | .branchpick>div a.current{font-weight:600;color:var(--link)} |
| 475 | 475 | label.radio input{width:auto;margin:0} |
| 476 | -:root[data-theme=dark]{--accent:#5b5fa8;--accentdark:#4a4d91;--accentsoft:#2c2e48;--focus:#4a4d91;--link:#a3a7ee;--heat0:#2f3034;--heat1:#2f3262;--heat2:#454991;--heat3:#666bc4;--heat4:#9ca0f0;--fg:#f4f4f4;--muted:#a8a8a8;--line:#3e3f45;--soft:#28292d;--bar:#303136;--add:#42be65;--del:#fa4d56;--addbg:#0e2a17;--delbg:#3a1518;--code:#28292d;--bg:#212225;--raised:#2e2f34;--raisedhover:#393a40;--edge:#57585f;--hl:#3d3412;--warnbg:#2d2510;--warnedge:#5c4b10;--warnfg:#f1c21b;--merged:#a56eff;--dotedge:rgba(255,255,255,.15);--tip:#f4f4f4;--tipfg:#212225;color-scheme:dark} | |
| 476 | +:root[data-theme=dark]{--accent:#5b5fa8;--accentdark:#4a4d91;--accentsoft:#2c2e48;--focus:#4a4d91;--link:#a3a7ee;--heat0:#2f3034;--heat1:#2f3262;--heat2:#454991;--heat3:#666bc4;--heat4:#9ca0f0;--fg:#f4f4f4;--muted:#a8a8a8;--line:#3e3f45;--soft:#28292d;--bar:#303136;--add:#42be65;--del:#fa4d56;--addbg:#0e2a17;--delbg:#3a1518;--code:#28292d;--bg:#212225;--raised:#2e2f34;--raisedhover:#393a40;--edge:#57585f;--hl:#3d3412;--warnbg:#2d2510;--warnedge:#5c4b10;--warnfg:#f1c21b;--merged:#a56eff;--dotedge:rgba(255,255,255,.15);--tip:#f4f4f4;--tipfg:#212225;--fg2:#c2c4c9;color-scheme:dark} | |
| 477 | 477 | :root[data-theme=dark] nav.site .brand img{filter:brightness(2.2) saturate(.9)} |
| 478 | -@media (prefers-color-scheme:dark){:root:not([data-theme=light]){--accent:#5b5fa8;--accentdark:#4a4d91;--accentsoft:#2c2e48;--focus:#4a4d91;--link:#a3a7ee;--heat0:#2f3034;--heat1:#2f3262;--heat2:#454991;--heat3:#666bc4;--heat4:#9ca0f0;--fg:#f4f4f4;--muted:#a8a8a8;--line:#3e3f45;--soft:#28292d;--bar:#303136;--add:#42be65;--del:#fa4d56;--addbg:#0e2a17;--delbg:#3a1518;--code:#28292d;--bg:#212225;--raised:#2e2f34;--raisedhover:#393a40;--edge:#57585f;--hl:#3d3412;--warnbg:#2d2510;--warnedge:#5c4b10;--warnfg:#f1c21b;--merged:#a56eff;--dotedge:rgba(255,255,255,.15);--tip:#f4f4f4;--tipfg:#212225;color-scheme:dark}:root:not([data-theme=light]) nav.site .brand img{filter:brightness(2.2) saturate(.9)}} | |
| 478 | +@media (prefers-color-scheme:dark){:root:not([data-theme=light]){--accent:#5b5fa8;--accentdark:#4a4d91;--accentsoft:#2c2e48;--focus:#4a4d91;--link:#a3a7ee;--heat0:#2f3034;--heat1:#2f3262;--heat2:#454991;--heat3:#666bc4;--heat4:#9ca0f0;--fg:#f4f4f4;--muted:#a8a8a8;--line:#3e3f45;--soft:#28292d;--bar:#303136;--add:#42be65;--del:#fa4d56;--addbg:#0e2a17;--delbg:#3a1518;--code:#28292d;--bg:#212225;--raised:#2e2f34;--raisedhover:#393a40;--edge:#57585f;--hl:#3d3412;--warnbg:#2d2510;--warnedge:#5c4b10;--warnfg:#f1c21b;--merged:#a56eff;--dotedge:rgba(255,255,255,.15);--tip:#f4f4f4;--tipfg:#212225;--fg2:#c2c4c9;color-scheme:dark}:root:not([data-theme=light]) nav.site .brand img{filter:brightness(2.2) saturate(.9)}} | |
| 479 | 479 | .mdbar{display:flex;gap:.2rem;margin:.2rem 0 .3rem;font-size:.85rem} |
| 480 | 480 | .mdbar button{font:inherit;background:none;border:1px solid transparent;color:var(--muted);padding:.1rem .55rem;cursor:pointer} |
| 481 | 481 | .mdbar button:hover{color:var(--fg)} |
templates/admin.html modified
| @@ -7,14 +7,14 @@ | ||
| 7 | 7 | {{with $d.Stats}}<h3 class="rule">Site</h3> |
| 8 | 8 | <table class="keys"> |
| 9 | 9 | <tr><td>Users</td><td>{{.Users}}{{if .Banned}} <span class="muted">({{.Banned}} banned)</span>{{end}}</td></tr> |
| 10 | -<tr><td>Organisations</td><td>{{.Orgs}}</td></tr> | |
| 10 | +<tr><td>Organizations</td><td>{{.Orgs}}</td></tr> | |
| 11 | 11 | <tr><td>Repositories</td><td>{{.Repos}} <span class="muted">({{.Private}} private, {{.Unlisted}} unlisted)</span></td></tr> |
| 12 | 12 | <tr><td>Disk usage</td><td>{{size $d.Used}}{{if $d.Quota}} <span class="muted">(quota {{$d.QuotaText}} per owner)</span>{{end}}</td></tr> |
| 13 | 13 | <tr><td>Registration</td><td>{{if eq $d.Registration "open"}}open to everyone{{else if eq $d.Registration "invite"}}invite only{{else}}closed{{end}} <a class="muted" href="/admin?s=signup">change</a></td></tr> |
| 14 | 14 | <tr><td>Mail</td><td>{{if $d.Mail}}configured{{else}}not configured, resets go through <code>gitpocket passwd</code>{{end}}</td></tr> |
| 15 | 15 | </table>{{end}} |
| 16 | 16 | <h3 class="rule">Newest accounts</h3> |
| 17 | -<table class="keys">{{range $d.Recent}}<tr><td><a href="/~{{.Name}}">~{{.Name}}</a></td><td class="muted">{{if .Org}}organisation{{else if .Admin}}admin{{end}}{{if .Banned}} banned{{end}}</td><td class="when">{{ago .Created}}</td></tr>{{end}}</table> | |
| 17 | +<table class="keys">{{range $d.Recent}}<tr><td><a href="/~{{.Name}}">~{{.Name}}</a></td><td class="muted">{{if .Org}}organization{{else if .Admin}}admin{{end}}{{if .Banned}} banned{{end}}</td><td class="when">{{ago .Created}}</td></tr>{{end}}</table> | |
| 18 | 18 | {{end}} |
| 19 | 19 | |
| 20 | 20 | {{if eq $d.Section "people"}} |
| @@ -22,7 +22,7 @@ | ||
| 22 | 22 | <form method="get" action="/admin" class="inline"><input type="hidden" name="s" value="people"><input name="q" value="{{$d.Query}}" placeholder="Filter by name" aria-label="Filter by name"><button class="btn">Filter ▸</button>{{if $d.Query}}<a href="/admin?s=people">clear</a>{{end}}</form> |
| 23 | 23 | <table class="keys">{{range $d.Accounts}}<tr> |
| 24 | 24 | <td><a href="/~{{.Name}}">~{{.Name}}</a></td> |
| 25 | -<td class="muted">{{if .Org}}organisation{{else if .Admin}}admin{{end}}{{if .Banned}} banned{{end}}</td> | |
| 25 | +<td class="muted">{{if .Org}}organization{{else if .Admin}}admin{{end}}{{if .Banned}} banned{{end}}</td> | |
| 26 | 26 | <td class="muted">{{.Repos}} repos</td> |
| 27 | 27 | <td class="when">joined {{.Created.Format "2 Jan 2006"}}</td> |
| 28 | 28 | <td>{{if ne .Name $.User.Name}}<form method="post" action="/admin" class="inline"><input type="hidden" name="s" value="people"><input type="hidden" name="q" value="{{$d.Query}}"><input type="hidden" name="name" value="{{.Name}}">{{if not .Org}}{{if .Admin}}<button class="btn small" name="action" value="unadmin">Revoke admin</button>{{else}}<button class="btn small" name="action" value="admin">Make admin</button>{{end}}{{end}}{{if .Banned}}<button class="btn small" name="action" value="unban">Unban</button>{{else}}<button class="btn small danger" name="action" value="ban">Ban</button>{{end}}</form>{{end}}</td> |
templates/index.html modified
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | {{define "content"}} |
| 2 | 2 | {{if .User}} |
| 3 | 3 | <div class="dash"> |
| 4 | -<section><div class="dashhead"><h3>Your repositories</h3><span><a class="btn" href="/orgs/new">New organisation</a> <a class="btn primary" href="/create">New repository</a></span></div> | |
| 4 | +<section><div class="dashhead"><h3>Your repositories</h3><span><a class="btn" href="/orgs/new">New organization</a> <a class="btn primary" href="/create">New repository</a></span></div> | |
| 5 | 5 | {{if .Data.Repos}}{{template "repolist" .Data.Repos}}{{else}}<p class="muted">You have no repositories yet.</p>{{end}} |
| 6 | 6 | {{if .Data.Shared}}<h3>Shared with you</h3>{{template "repolist" .Data.Shared}}{{end}}</section> |
| 7 | 7 | {{else}} |
templates/neworg.html modified
| @@ -1,8 +1,8 @@ | ||
| 1 | 1 | {{define "content"}} |
| 2 | -<h3 class="rule">Create an organisation</h3> | |
| 3 | -<p class="muted">An organisation owns repositories on behalf of a group. You become its first member, and every member can push to its repositories, create new ones under it and edit its page.</p> | |
| 2 | +<h3 class="rule">Create an organization</h3> | |
| 3 | +<p class="muted">An organization owns repositories on behalf of a group. You become its first member, and every member can push to its repositories, create new ones under it and edit its page.</p> | |
| 4 | 4 | <form method="post" action="/orgs/new" class="stack wide"> |
| 5 | 5 | <label>Name <input name="name" required autofocus pattern="[a-z0-9][a-z0-9_.-]{0,38}" value="{{with .Data}}{{.Name}}{{end}}"><small>Lowercase letters, digits, dot, dash or underscore. It shares the namespace with users.</small></label> |
| 6 | -<div class="actions left"><button class="btn primary">Create organisation ▸</button></div> | |
| 6 | +<div class="actions left"><button class="btn primary">Create organization ▸</button></div> | |
| 7 | 7 | </form> |
| 8 | 8 | {{end}} |
templates/org.html modified
| @@ -13,12 +13,12 @@ | ||
| 13 | 13 | <li title="{{date $o.Created}}"><svg viewBox="0 0 16 16" aria-hidden="true"><rect x="2" y="3" width="12" height="11" rx="1.5"/><path d="M2 6.5h12M5.5 1.5v3M10.5 1.5v3"/></svg>Since {{$o.Created.Format "January 2006"}}</li> |
| 14 | 14 | </ul> |
| 15 | 15 | </div> |
| 16 | -{{if .Data.Member}}<div class="orgactions"><a class="btn" href="/~{{$o.Name}}/settings">Edit organisation</a></div>{{end}} | |
| 16 | +{{if .Data.Member}}<div class="orgactions"><a class="btn" href="/~{{$o.Name}}/settings">Edit organization</a></div>{{end}} | |
| 17 | 17 | </header> |
| 18 | 18 | <div class="columns orgbody"> |
| 19 | 19 | <div class="main"> |
| 20 | 20 | <nav class="tabs small orgtabs"><a class="active" href="/~{{$o.Name}}">about</a><a href="/~{{$o.Name}}/repos">repos{{if .Data.Total}} <span class="count">{{.Data.Total}}</span>{{end}}</a><a href="/~{{$o.Name}}/feed">feed</a></nav> |
| 21 | -{{with .Data.Activity}}<section class="activity"><div class="heathead"><p class="muted small">{{.Total}} commit{{if ne .Total 1}}s{{end}} across the organisation {{if .Year}}in {{.Year}}{{else}}in the past 12 months{{end}}</p><nav class="years">{{range .Years}}<a href="{{if eq . $.Data.Activity.Year}}?{{else}}?year={{.}}{{end}}"{{if eq . $.Data.Activity.Year}} class="active"{{end}}>{{.}}</a>{{end}}</nav></div>{{.Grid}}<p class="legend muted small">less <i class="h0"></i><i class="h1"></i><i class="h2"></i><i class="h3"></i><i class="h4"></i> more</p></section>{{end}} | |
| 21 | +{{with .Data.Activity}}<section class="activity"><div class="heathead"><p class="muted small">{{.Total}} commit{{if ne .Total 1}}s{{end}} across the organization {{if .Year}}in {{.Year}}{{else}}in the past 12 months{{end}}</p><nav class="years">{{range .Years}}<a href="{{if eq . $.Data.Activity.Year}}?{{else}}?year={{.}}{{end}}"{{if eq . $.Data.Activity.Year}} class="active"{{end}}>{{.}}</a>{{end}}</nav></div>{{.Grid}}<p class="legend muted small">less <i class="h0"></i><i class="h1"></i><i class="h2"></i><i class="h3"></i><i class="h4"></i> more</p></section>{{end}} | |
| 22 | 22 | {{if .Data.Repos}}<div class="events">{{range .Data.Repos}}{{template "repoitem" .}}{{end}}</div>{{end}} |
| 23 | 23 | </div> |
| 24 | 24 | <aside class="people"> |
templates/orgsettings.html modified
| @@ -19,7 +19,7 @@ | ||
| 19 | 19 | <input type="hidden" name="org" value="{{$o.Name}}"> |
| 20 | 20 | <div class="pair"> |
| 21 | 21 | <label>Handle <span class="muted">(you can't edit this)</span><input value="{{$o.Name}}" disabled></label> |
| 22 | -<label>Name <input name="display" value="{{$p.Display}}" maxlength="100" placeholder="Shown on the organisation page"></label> | |
| 22 | +<label>Name <input name="display" value="{{$p.Display}}" maxlength="100" placeholder="Shown on the organization page"></label> | |
| 23 | 23 | </div> |
| 24 | 24 | <div class="pair"> |
| 25 | 25 | <label>Location <input name="location" value="{{$p.Location}}" maxlength="100"></label> |
templates/reposettings.html modified
| @@ -33,7 +33,7 @@ | ||
| 33 | 33 | <h3 id="labels">Labels</h3> |
| 34 | 34 | {{if .Data.Labels}}<table class="keys">{{range .Data.Labels}}<tr><td><span class="label" style="background:{{.Colour}}">{{.Name}}</span></td><td><code>{{.Colour}}</code></td><td><form method="post" action="/{{$p.Repo.Path}}/labels"><input type="hidden" name="remove" value="{{.ID}}"><button class="btn danger">Remove</button></form></td></tr>{{end}}</table>{{end}} |
| 35 | 35 | <form method="post" action="/{{$p.Repo.Path}}/labels" class="stack"> |
| 36 | -<div class="pair"><label>Name <input name="name" required maxlength="40" placeholder="bug"></label><label>Colour <input name="colour" type="color" value="#0640e0"></label></div> | |
| 36 | +<div class="pair"><label>Name <input name="name" required maxlength="40" placeholder="bug"></label><label>Color <input name="colour" type="color" value="#0640e0"></label></div> | |
| 37 | 37 | <div class="actions left"><button class="btn primary">Add label ▸</button></div> |
| 38 | 38 | </form> |
| 39 | 39 | <h3 id="protection">Branch protection</h3> |
templates/user.html modified
| @@ -16,7 +16,7 @@ | ||
| 16 | 16 | {{range $p.Links}}<li><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M6.8 9.2a3 3 0 0 0 4.2 0l2.2-2.2a3 3 0 0 0-4.2-4.2l-.9.9"/><path d="M9.2 6.8a3 3 0 0 0-4.2 0L2.8 9a3 3 0 0 0 4.2 4.2l.9-.9"/></svg><a href="{{.}}" rel="nofollow me">{{bare .}}</a></li>{{end}} |
| 17 | 17 | <li title="{{date .Data.Owner.Created}}"><svg viewBox="0 0 16 16" aria-hidden="true"><rect x="2" y="3" width="12" height="11" rx="1.5"/><path d="M2 6.5h12M5.5 1.5v3M10.5 1.5v3"/></svg>Joined {{.Data.Owner.Created.Format "January 2006"}}</li> |
| 18 | 18 | </ul> |
| 19 | -{{with .Data.Orgs}}<div class="orglist"><h4>Organisations</h4><div class="orgicons">{{range .}}<a href="/~{{.Name}}" title="{{with .Profile.Display}}{{.}}{{else}}~{{.Name}}{{end}}" aria-label="~{{.Name}}"><img src="/~{{.Name}}/avatar?v={{.Profile.Avatar}}" alt=""></a>{{end}}</div></div>{{end}} | |
| 19 | +{{with .Data.Orgs}}<div class="orglist"><h4>Organizations</h4><div class="orgicons">{{range .}}<a href="/~{{.Name}}" title="{{with .Profile.Display}}{{.}}{{else}}~{{.Name}}{{end}}" aria-label="~{{.Name}}"><img src="/~{{.Name}}/avatar?v={{.Profile.Avatar}}" alt=""></a>{{end}}</div></div>{{end}} | |
| 20 | 20 | {{if $own}}<div class="ownactions"><a class="btn block" href="/settings">Edit profile</a></div>{{end}} |
| 21 | 21 | </aside> |
| 22 | 22 | <div class="main"> |
web.go modified
| @@ -441,7 +441,7 @@ func (s *Server) create(w http.ResponseWriter, r *http.Request) { | ||
| 441 | 441 | if o := r.FormValue("owner"); o != "" && o != u.Name { |
| 442 | 442 | org, err := s.store.UserByName(o) |
| 443 | 443 | if err != nil || !s.store.IsOrg(org.ID) || !s.store.IsMember(org.ID, u.ID) { |
| 444 | - s.fail(w, r, 403, "You are not a member of that organisation") | |
| 444 | + s.fail(w, r, 403, "You are not a member of that organization") | |
| 445 | 445 | return |
| 446 | 446 | } |
| 447 | 447 | owner = org |
| @@ -708,7 +708,7 @@ func (s *Server) subject(w http.ResponseWriter, r *http.Request) (*User, string) | ||
| 708 | 708 | } |
| 709 | 709 | org, err := s.store.UserByName(name) |
| 710 | 710 | if err != nil || !s.store.IsOrg(org.ID) || !s.store.IsMember(org.ID, u.ID) { |
| 711 | - s.fail(w, r, 403, "You are not a member of that organisation") | |
| 711 | + s.fail(w, r, 403, "You are not a member of that organization") | |
| 712 | 712 | return nil, "" |
| 713 | 713 | } |
| 714 | 714 | return &org, "/~" + org.Name + "/settings" |
| @@ -1595,7 +1595,7 @@ func (s *Server) orgSettings(w http.ResponseWriter, r *http.Request, org User, a | ||
| 1595 | 1595 | return |
| 1596 | 1596 | } |
| 1597 | 1597 | if !s.store.IsMember(org.ID, u.ID) { |
| 1598 | - s.fail(w, r, 403, "You are not a member of this organisation") | |
| 1598 | + s.fail(w, r, 403, "You are not a member of this organization") | |
| 1599 | 1599 | return |
| 1600 | 1600 | } |
| 1601 | 1601 | back := "/~" + org.Name + "/settings" |
| @@ -1607,7 +1607,7 @@ func (s *Server) orgSettings(w http.ResponseWriter, r *http.Request, org User, a | ||
| 1607 | 1607 | back += "?error=No+such+user" |
| 1608 | 1608 | case r.FormValue("remove") != "": |
| 1609 | 1609 | if len(s.store.Members(org.ID)) == 1 { |
| 1610 | - back += "?error=An+organisation+needs+at+least+one+member" | |
| 1610 | + back += "?error=An+organization+needs+at+least+one+member" | |
| 1611 | 1611 | } else { |
| 1612 | 1612 | s.store.SetMember(org.ID, target.ID, false) |
| 1613 | 1613 | } |
| @@ -1741,7 +1741,7 @@ func (s *Server) profileReadme(owner User) intro { | ||
| 1741 | 1741 | return in |
| 1742 | 1742 | } |
| 1743 | 1743 | |
| 1744 | -var nameWords = []string{"heron", "lantern", "harbour", "kestrel", "thicket", "anvil", "orchard", "beacon", "lattice", "meadow", "quarry", "sparrow", "tundra", "compass", "furnace", "willow", "ledger", "marrow", "pebble", "spindle", "cinder", "bramble", "atlas", "ferry", "loom", "estuary", "magpie", "bellows", "cairn", "fathom", "gantry", "hearth", "juniper", "keel", "lichen", "mortar", "nettle", "osprey", "plinth", "quill", "rookery", "sextant", "tinder", "umber", "vellum", "wicket", "yarrow", "zephyr", "sorrel", "flint"} | |
| 1744 | +var nameWords = []string{"heron", "lantern", "harbor", "kestrel", "thicket", "anvil", "orchard", "beacon", "lattice", "meadow", "quarry", "sparrow", "tundra", "compass", "furnace", "willow", "ledger", "marrow", "pebble", "spindle", "cinder", "bramble", "atlas", "ferry", "loom", "estuary", "magpie", "bellows", "cairn", "fathom", "gantry", "hearth", "juniper", "keel", "lichen", "mortar", "nettle", "osprey", "plinth", "quill", "rookery", "sextant", "tinder", "umber", "vellum", "wicket", "yarrow", "zephyr", "sorrel", "flint"} | |
| 1745 | 1745 | |
| 1746 | 1746 | func suggestName() string { |
| 1747 | 1747 | return nameWords[rand.IntN(len(nameWords))] |