Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software:2222/vole.git

A free and open-source forge that lives in your Git repo.

Blame · server/web/templates/home.html

Line attribution on main · 101 line(s)

f09ef39e
Keenan Nemetz
15d ago
1 {{define "index"}}
2 {{template "header" .}}
074ae160
Keenan Nemetz
14d ago
3 <section class="hero">
4 <div class="hero-main">
6ce635a8
Keenan Nemetz
1d ago
5 <h1>{{.InstanceName}}</h1>
5cab7b18
Keenan Nemetz
15d ago
6 </div>
074ae160
Keenan Nemetz
14d ago
7 <div class="hero-actions">
ed03b3d1
Keenan Nemetz
8h ago
8 {{if and .InstanceAdmin .Cards}}<a class="button" href="/-/repos/new">{{icon "plus"}}New repository</a>{{end}}
074ae160
Keenan Nemetz
14d ago
9 {{if not .LoggedIn}}
ed03b3d1
Keenan Nemetz
8h ago
10 <a class="button secondary" href="/-/login">{{icon "user"}}Sign in</a>
11 {{if .OpenRegistration}}<a class="button secondary" href="/-/register">{{icon "user"}}Create an account</a>{{end}}
074ae160
Keenan Nemetz
14d ago
12 {{end}}
13 </div>
14 </section>
5cab7b18
Keenan Nemetz
15d ago
15
164ad9f5
Keenan Nemetz
1d ago
16 {{if and (not .Cards) (not .Query)}}{{template "home_readme" .}}{{end}}
6ce635a8
Keenan Nemetz
1d ago
17
074ae160
Keenan Nemetz
14d ago
18 {{if .Cards}}
19 <div class="home-grid">
b355db72
Keenan Nemetz
15d ago
20 <section class="home-main">
164ad9f5
Keenan Nemetz
1d ago
21 {{if not .Query}}{{template "home_readme" .}}{{end}}
074ae160
Keenan Nemetz
14d ago
22 <div class="section-head">
ab326d3a
Keenan Nemetz
14d ago
23 <h2>{{if .Query}}Results{{else}}Repositories{{end}}</h2>
6ce635a8
Keenan Nemetz
1d ago
24 {{if .Query}}<a class="more" href="/">clear search</a>{{end}}
b355db72
Keenan Nemetz
15d ago
25 </div>
074ae160
Keenan Nemetz
14d ago
26 <div class="repo-grid">
27 {{range .Cards}}{{template "repo_card" .}}{{end}}
b355db72
Keenan Nemetz
15d ago
28 </div>
29 </section>
30
074ae160
Keenan Nemetz
14d ago
31 {{if not .Query}}
32 <aside class="home-rail">
33 <div class="section-head">
34 <h2>Latest</h2>
ed03b3d1
Keenan Nemetz
8h ago
35 <a class="more" href="/-/activity">all activity</a>
b355db72
Keenan Nemetz
15d ago
36 </div>
074ae160
Keenan Nemetz
14d ago
37 {{if .Events}}
38 {{template "activity_events" .}}
b355db72
Keenan Nemetz
15d ago
39 {{else}}
074ae160
Keenan Nemetz
14d ago
40 <p class="muted">Nothing has happened yet. Push a commit, open an issue, or queue a run.</p>
b355db72
Keenan Nemetz
15d ago
41 {{end}}
42 </aside>
074ae160
Keenan Nemetz
14d ago
43 {{end}}
44 </div>
45 {{else if .Query}}
46 <div class="empty-state">
47 <p>No repositories match “{{.Query}}”.</p>
48 <p class="muted">Search looks at repository names and descriptions. Private repositories you cannot read are not included.</p>
49 <a href="/">Clear the search</a>
50 </div>
51 {{else if .InstanceAdmin}}
52 <div class="empty-state first-run">
53 <span class="empty-icon" aria-hidden="true">{{icon "folder"}}</span>
54 <h2>No repositories yet</h2>
b06184d1
Keenan Nemetz
11d ago
55 <p class="muted">A repository is where code, issues, changes, and runs live. Create the first one to get started.</p>
ed03b3d1
Keenan Nemetz
8h ago
56 <p class="empty-actions"><a class="button" href="/-/repos/new">{{icon "plus"}}New repository</a></p>
074ae160
Keenan Nemetz
14d ago
57 <p class="empty-hint">Or from the instance directory: <code>vole admin repo create demo --owner {{if .User}}{{.User}}{{else}}you{{end}}</code></p>
58 </div>
59 {{else if .LoggedIn}}
60 <div class="empty-state">
61 <p>You do not have access to any repositories yet.</p>
62 <p class="muted">An instance admin can grant your account a role on a repository. Once you have one, it appears here.</p>
63 </div>
64 {{else}}
65 <div class="empty-state">
66 <p>Nothing here is readable without an account.</p>
67 <p class="muted">Sign in with a passkey to see the repositories you have access to. Read-only clones of public repositories need no account.</p>
5cab7b18
Keenan Nemetz
15d ago
68 </div>
f09ef39e
Keenan Nemetz
15d ago
69 {{end}}
70 {{template "footer" .}}
71 {{end}}
074ae160
Keenan Nemetz
14d ago
72
6ce635a8
Keenan Nemetz
1d ago
73 {{define "home_readme"}}
ff9870f1
Keenan Nemetz
1d ago
74 {{if .Intro}}
6ce635a8
Keenan Nemetz
1d ago
75 <section class="panel readme-card" id="readme">
76 <div class="md readme-body">{{.Intro}}</div>
77 </section>
ff9870f1
Keenan Nemetz
1d ago
78 {{else if and .InstanceAdmin (not .RepoReady)}}
79 <p class="readme-empty">This instance has no repository for customization yet. Create it on the
ed03b3d1
Keenan Nemetz
8h ago
80 <a href="/-/admin?tab=configuration">Admin Configuration</a> page to customize this introduction, the styles, and the assets.</p>
6ce635a8
Keenan Nemetz
1d ago
81 {{end}}
82 {{end}}
83
074ae160
Keenan Nemetz
14d ago
84 {{define "repo_card"}}
85 <article class="repo-card">
86 <div class="repo-card-top">
87 <span class="repo-vis" title="{{if .Private}}Private repository{{else}}Public repository{{end}}">{{if .Private}}{{icon "lock"}}{{else}}{{icon "globe"}}{{end}}</span>
ed03b3d1
Keenan Nemetz
8h ago
88 <h3><a href="/{{.Name}}" title="{{if .Private}}Private repository{{else}}Public repository{{end}}">{{.Name}}</a></h3>
074ae160
Keenan Nemetz
14d ago
89 {{if .Language}}<span class="repo-lang"><span class="lang-dot {{.LangClass}}" aria-hidden="true"></span>{{.Language}}</span>{{end}}
90 {{if not .Updated.IsZero}}<span class="repo-updated" title="Last activity">{{since .Updated.Unix}}</span>{{end}}
91 </div>
92 {{if .Description}}<p class="repo-desc">{{.Description}}</p>{{end}}
93 {{if or .OpenIssues .OpenChanges .LastTag}}
94 <div class="repo-chips">
ed03b3d1
Keenan Nemetz
8h ago
95 {{if .OpenIssues}}<a class="chip" href="/{{.Name}}/issues">{{icon "circle-dot"}}{{.OpenIssues}} issue{{if ne .OpenIssues 1}}s{{end}}</a>{{end}}
96 {{if .OpenChanges}}<a class="chip" href="/{{.Name}}/changes">{{icon "git-pull-request"}}{{.OpenChanges}} change{{if ne .OpenChanges 1}}s{{end}}</a>{{end}}
97 {{if .LastTag}}<a class="chip" href="/{{.Name}}/releases/{{.LastTag.Name}}">{{icon "tag"}}{{.LastTag.Name}}</a>{{end}}
074ae160
Keenan Nemetz
14d ago
98 </div>
99 {{end}}
100 </article>
101 {{end}}