gitview/templates/index.html
templates/index.htmlRaw
1{{ define "index" }}<!doctype html><html lang="en">{{ template "head" . }}<body>{{ template "topbar" . }}<div class="workspace-layout"><aside class="sidebar"><a class="side-link selected" href="/">{{ template "i-repo" }}Repositories<span class="count">{{ .total }}</span></a><a class="side-link" href="#recent">{{ template "i-clock" }}Recent activity</a><div class="sidebar-divider"></div><div class="section-label side-section-title">REPOSITORIES<span>{{ .total }}</span></div>{{ range .info }}<a class="side-repo" href="/{{ .Name }}">{{ template "i-repo" }}{{ .DisplayName }}</a>{{ end }}<div class="sidebar-bottom">{{ template "i-terminal" }}Powered by Go & Git</div></aside>
2<main class="workspace-main"><section class="repository-section" id="recent"><div class="section-heading"><h2>Repositories <span class="count">{{ .total }}</span></h2></div><div class="filter-bar"><label class="repo-search">{{ template "i-search" }}<input id="repo-search" placeholder="Find a repository…" aria-label="Find a repository"><kbd>/</kbd></label><label class="sort-label"><select id="repo-sort" aria-label="Sort repositories"><option value="updated" data-description="{{ if .pinned }}pinned, then last updated{{ else }}last updated{{ end }}">{{ if .pinned }}Pinned, then updated{{ else }}Last updated{{ end }}</option><option value="name">Name: A–Z</option></select></label><button class="icon-button view-toggle" id="view-toggle" aria-label="Toggle compact view" title="Toggle compact view">{{ template "i-grid" }}</button></div><div class="result-label"><span><strong id="result-count">{{ .total }}</strong> repositories</span><span>{{ template "i-clock" }} Sorted by <span id="sort-description">{{ if .pinned }}pinned, then last updated{{ else }}last updated{{ end }}</span></span></div><div id="repo-list" class="repository-list">{{ range $index, $repo := .info }}<article class="repository-card" data-repo="{{ .DisplayName }}" data-index="{{ $index }}"><div class="repo-card-icon">{{ template "i-repo" }}</div><div class="repo-card-content"><div class="repo-card-title"><h3><a href="/{{ .Name }}">{{ .DisplayName }}</a></h3><span class="badge">Public</span></div><p>{{ if .Desc }}{{ .Desc }}{{ else }}A Git repository.{{ end }}</p><div class="repo-card-meta">{{ if .Languages }}{{ with index .Languages 0 }}<span class="repo-language"><span class="language-dot" style="background-color:{{ .Color }}" aria-hidden="true"></span>{{ .Name }}</span>{{ end }}{{ else }}<span>{{ template "i-branch" }}Git repository</span>{{ end }}<span class="meta-dot">·</span><span>Updated {{ .Idle }}</span></div></div><a class="repo-open" href="/{{ .Name }}" aria-label="Open {{ .DisplayName }}">{{ template "i-arrow" }}</a></article>{{ else }}<div class="empty-state">{{ template "i-repo" }}<h3>No repositories yet</h3><p>Add Git repositories to your configured scan directory to explore them here.</p><code>git clone --bare <repository-url> repos/my-project.git</code></div>{{ end }}</div><div class="empty-state" id="no-results" hidden>{{ template "i-search" }}<h3>No repositories found</h3><p>Try another repository name or description.</p></div></section><div class="workspace-tip">{{ template "i-terminal" }}<span>A familiar workflow. <strong>Clone any repository</strong> and get right to work.</span><span class="tip-key">git clone <url></span></div>{{ template "footer" . }}</main></div></body></html>{{ end }}