GameOver1337 / GitClone Public
К репозиторию
19.1 KB
templates/repo.html
19.1 KB
1{{define "title"}}{{.Repo.Owner.Username}}/{{.Repo.Name}}{{end}}
2{{define "content"}}
3<div class="repo-topline">
4 <a class="repo-topline-link" href="/{{.Repo.CloneURL}}">
5 <svg class="octicon" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true">
6 <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"/>
7 </svg>
8 <span class="repo-topline-owner">{{.Repo.Owner.Username}}</span>
9 <span class="repo-topline-sep">/</span>
10 <strong class="repo-topline-name">{{.Repo.Name}}</strong>
11 </a>
12 {{if .Repo.IsPrivate}}
13 <span class="badge badge-outline">Private</span>
14 {{else}}
15 <span class="badge badge-outline">Public</span>
16 {{end}}
17</div>
18
19<nav class="repo-tabs" aria-label="Разделы репозитория">
20 <a class="active" href="/{{.Repo.CloneURL}}{{if .ActiveBranch}}?branch={{.ActiveBranch | urlquery}}{{end}}">
21 <svg class="octicon" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 1 1-1.06 1.06L.47 8.53a.75.75 0 0 1 0-1.06Z"/></svg>
22 Code
23 </a>
24 <a href="/builds?repo={{.Repo.CloneURL}}">
25 <svg class="octicon" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"/></svg>
26 Actions
27 </a>
28 <a href="/{{.Repo.CloneURL}}/releases">
29 <svg class="octicon" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 16A8 8 0 1 1 8 0a8 8 0 0 1 0 16ZM4.5 8.5l2.5 2.5 4.5-4.5a1 1 0 0 0-1.414-1.414L6.99 8.172 5.914 7.086A1 1 0 0 0 4.5 8.5Z"/></svg>
30 Releases
31 </a>
32</nav>
33
34<header class="repo-heading">
35 <a class="avatar avatar-lg repo-avatar" href="/{{.Repo.Owner.Username}}" title="{{.Repo.Owner.Username}}">{{slice .Repo.Owner.Username 0 1}}</a>
36 <div class="repo-heading-main">
37 <h1 class="repo-heading-title">
38 <a class="repo-heading-owner" href="/{{.Repo.Owner.Username}}">{{.Repo.Owner.Username}}</a>
39 <span class="repo-heading-sep">/</span>
40 <a class="repo-heading-name" href="/{{.Repo.CloneURL}}">{{.Repo.Name}}</a>
41 </h1>
42 </div>
43 <div class="repo-heading-actions">
44 <a class="btn btn-sm" href="/builds?repo={{.Repo.CloneURL}}">
45 <svg class="octicon" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"/></svg>
46 Сборки
47 </a>
48 {{if .IsOwner}}
49 <form method="POST" action="/api/build/{{.Repo.CloneURL}}" class="inline-form">
50 <input type="hidden" name="csrf_token" value="{{.CSRF}}">
51 <input type="hidden" name="branch" value="{{.ActiveBranch}}">
52 <button type="submit" class="btn btn-sm">
53 <svg class="octicon" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"/></svg>
54 Собрать
55 </button>
56 </form>
57 {{end}}
58 </div>
59</header>
60
61<div class="repo-layout">
62 <div class="repo-main">
63 {{if .Branches}}
64 <div class="repo-toolbar">
65 <div class="branch-selector">
66 <svg class="octicon branch-selector-icon" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"/></svg>
67 <label class="sr-only" for="branch-select">Ветка</label>
68 <select id="branch-select" onchange="location.href='?branch='+encodeURIComponent(this.value)">
69 {{range .Branches}}
70 <option value="{{.}}" {{if eq . $.ActiveBranch}}selected{{end}}>{{.}}</option>
71 {{end}}
72 </select>
73 </div>
74
75 <span class="repo-counter" title="Веток">
76 <svg class="octicon" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"/></svg>
77 <span class="repo-counter-value">{{.BranchCount}}</span>
78 <span class="sr-only">веток</span>
79 </span>
80 <span class="repo-counter" title="Тегов">
81 <svg class="octicon" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M1 7.775V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.752 1.752 0 0 1 1 7.775Zm1.5 0c0 .066.026.13.073.177l6.25 6.25a.25.25 0 0 0 .354 0l5.025-5.025a.25.25 0 0 0 0-.354l-6.25-6.25a.25.25 0 0 0-.177-.073H2.75a.25.25 0 0 0-.25.25ZM6 5a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z"/></svg>
82 <span class="repo-counter-value">{{.TagCount}}</span>
83 <span class="sr-only">тегов</span>
84 </span>
85
86 <div class="toolbar-spacer"></div>
87
88 <div class="go-to-file">
89 <label class="sr-only" for="file-filter">Перейти к файлу</label>
90 <input id="file-filter" type="search" placeholder="Go to file" autocomplete="off">
91 <kbd class="search-kbd">t</kbd>
92 </div>
93
94 <div class="code-dropdown">
95 <button type="button" class="btn btn-success btn-code" data-dropdown="clone-popover" aria-expanded="false" aria-haspopup="true">
96 <svg class="octicon" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M2.75 14A1.75 1.75 0 0 1 1 12.25v-2.5a.75.75 0 0 1 1.5 0v2.5c0 .138.112.25.25.25h10.5a.25.25 0 0 0 .25-.25v-2.5a.75.75 0 0 1 1.5 0v2.5A1.75 1.75 0 0 1 13.25 14Z"/><path d="M7.25 7.689V2a.75.75 0 0 1 1.5 0v5.689l1.97-1.969a.749.749 0 1 1 1.06 1.06l-3.25 3.25a.749.749 0 0 1-1.06 0L4.22 6.78a.749.749 0 1 1 1.06-1.06l1.97 1.969Z"/></svg>
97 Code
98 <svg class="octicon" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"/></svg>
99 </button>
100 <div class="popover clone-popover" id="clone-popover" role="dialog" aria-label="Клонирование репозитория">
101 <div class="popover-title">Клонирование репозитория</div>
102 <div class="clone-field">
103 <input class="form-control" readonly value="{{.BaseURL}}/{{.Repo.CloneURL}}.git" aria-label="URL репозитория">
104 <button type="button" class="btn clone-copy" data-copy="{{.BaseURL}}/{{.Repo.CloneURL}}.git" aria-label="Скопировать URL" title="Скопировать URL">
105 <svg class="octicon" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"/><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"/></svg>
106 </button>
107 </div>
108 <p class="text-small muted popover-hint">HTTPS. Для push нужен логин владельца репозитория.</p>
109 </div>
110 </div>
111 </div>
112 {{end}}
113
114 {{if .TreeError}}
115 <div class="box empty-state">
116 <h3>Не удалось прочитать дерево файлов</h3>
117 <p>Проверьте, что ветка содержит файлы.</p>
118 </div>
119 {{else if not .Branches}}
120 <div class="box empty-repo">
121 <div class="empty-repo-icon">
122 <svg class="octicon" width="48" height="48" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"/></svg>
123 </div>
124 <h2>{{.Repo.Owner.Username}}/{{.Repo.Name}} — пустой репозиторий</h2>
125 <p class="muted">Пока здесь нет файлов. Запушьте первый коммит по HTTPS.</p>
126 <div class="clone-field empty-repo-clone">
127 <input class="form-control" readonly value="{{.BaseURL}}/{{.Repo.CloneURL}}.git">
128 <button type="button" class="btn" data-copy="{{.BaseURL}}/{{.Repo.CloneURL}}.git">Копировать</button>
129 </div>
130 <pre class="mini-code empty-repo-guide">git clone {{.BaseURL}}/{{.Repo.CloneURL}}.git
131cd {{.Repo.Name}}
132echo "# {{.Repo.Name}}" &gt;&gt; README.md
133git add README.md
134git commit -m "first commit"
135git branch -M main
136git remote add origin {{.BaseURL}}/{{.Repo.CloneURL}}.git
137git push -u origin main</pre>
138 </div>
139 {{else}}
140 <div class="box file-browser">
141 {{if .Commits}}
142 {{$latest := index .Commits 0}}
143 <div class="file-browser-head">
144 <span class="avatar avatar-sm commit-avatar" aria-hidden="true">
145 <svg class="octicon" width="12" height="12" viewBox="0 0 16 16" fill="currentColor"><path d="M10.561 8.073a6.005 6.005 0 0 1 3.432 5.142.75.75 0 1 1-1.498.07 4.5 4.5 0 0 0-8.99 0 .75.75 0 0 1-1.498-.07 6.004 6.004 0 0 1 3.431-5.142 3.999 3.999 0 1 1 5.123 0ZM10.5 5a2.5 2.5 0 1 0-5 0 2.5 2.5 0 0 0 5 0Z"/></svg>
146 </span>
147 <span class="head-commit-author">{{truncate $latest.Author 24}}</span>
148 <span class="head-commit-subject" title="{{$latest.Subject}}">{{truncate $latest.Subject 80}}</span>
149 <code class="commit-hash">{{$latest.Hash}}</code>
150 <time class="head-commit-time" title="{{$latest.Time.Format "02.01.2006 15:04:05"}}">{{relTime $latest.Time}}</time>
151 <div class="toolbar-spacer"></div>
152 <a class="head-commit-count" href="#commits-list">{{.CommitCount}} {{pluralRu .CommitCount "коммит" "коммита" "коммитов"}}</a>
153 </div>
154 {{end}}
155
156 <table class="file-table">
157 <thead class="sr-only">
158 <tr><th scope="col">Имя</th><th scope="col">Последний коммит</th><th scope="col">Дата</th></tr>
159 </thead>
160 <tbody>
161 {{range .Tree}}
162 <tr>
163 <td class="file-name">
164 <span class="file-icon" aria-hidden="true">
165 {{if eq .Type "tree"}}
166 <svg class="octicon" width="16" height="16" viewBox="0 0 16 16" fill="currentColor"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1Z"/></svg>
167 {{else}}
168 <svg class="octicon" width="16" height="16" viewBox="0 0 16 16" fill="currentColor"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"/></svg>
169 {{end}}
170 </span>
171 {{if eq .Type "tree"}}
172 <a href="/{{$.Repo.CloneURL}}?branch={{$.ActiveBranch | urlquery}}&path={{.Path | urlquery}}">{{.Name}}</a>
173 {{else}}
174 <a href="/files/{{$.Repo.CloneURL}}/{{.Path | escapePath}}?branch={{$.ActiveBranch | urlquery}}">{{.Name}}</a>
175 {{end}}
176 </td>
177 <td class="file-commit">
178 {{if .Commit}}
179 <span class="file-commit-subject" title="{{.Commit.Subject}}">{{truncate .Commit.Subject 90}}</span>
180 {{else}}
181 <span class="muted">—</span>
182 {{end}}
183 </td>
184 <td class="file-date">
185 {{if .Commit}}<time title="{{.Commit.Time.Format "02.01.2006 15:04:05"}}">{{relTime .Commit.Time}}</time>{{end}}
186 </td>
187 </tr>
188 {{else}}
189 <tr><td colspan="3" class="empty-row">Пустая директория</td></tr>
190 {{end}}
191 </tbody>
192 </table>
193 </div>
194
195 {{if .Commits}}
196 <div class="box commit-box" id="commits-list">
197 <div class="box-header">
198 <h2>Коммиты</h2>
199 <span class="counter">{{len .Commits}}</span>
200 </div>
201 <ul class="commit-list">
202 {{range .Commits}}
203 <li>
204 <span class="avatar avatar-sm commit-avatar" aria-hidden="true">
205 <svg class="octicon" width="12" height="12" viewBox="0 0 16 16" fill="currentColor"><path d="M10.561 8.073a6.005 6.005 0 0 1 3.432 5.142.75.75 0 1 1-1.498.07 4.5 4.5 0 0 0-8.99 0 .75.75 0 0 1-1.498-.07 6.004 6.004 0 0 1 3.431-5.142 3.999 3.999 0 1 1 5.123 0ZM10.5 5a2.5 2.5 0 1 0-5 0 2.5 2.5 0 0 0 5 0Z"/></svg>
206 </span>
207 <span class="commit-subject" title="{{.Subject}}">{{truncate .Subject 80}}</span>
208 <code class="commit-hash">{{.Hash}}</code>
209 <span class="commit-meta">{{.Author}} · <time title="{{.Time.Format "02.01.2006 15:04:05"}}">{{relTime .Time}}</time></span>
210 </li>
211 {{end}}
212 </ul>
213 </div>
214 {{end}}
215 {{end}}
216 </div>
217
218 <aside class="repo-sidebar">
219 <section class="sidebar-section">
220 <h2 class="sidebar-title">About</h2>
221 <p class="sidebar-desc">{{if .Repo.Description}}{{.Repo.Description}}{{else}}<span class="muted">Нет описания</span>{{end}}</p>
222 <ul class="sidebar-facts">
223 <li>
224 {{if .Repo.IsPrivate}}
225 <svg class="octicon" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M4 4a4 4 0 0 1 8 0v2h.25c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 12.25 15h-8.5A1.75 1.75 0 0 1 2 13.25v-5.5C2 6.784 2.784 6 3.75 6H4Zm8.25 3.5h-8.5a.25.25 0 0 0-.25.25v5.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-5.5a.25.25 0 0 0-.25-.25ZM10.5 6V4a2.5 2.5 0 1 0-5 0v2Z"/></svg>
226 Приватный репозиторий
227 {{else}}
228 <svg class="octicon" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM5.78 8.75a9.64 9.64 0 0 0 1.363 4.177c.255.426.542.832.857 1.215.245-.296.551-.705.857-1.215A9.64 9.64 0 0 0 10.22 8.75Zm4.44-1.5a9.64 9.64 0 0 0-1.363-4.177c-.307-.51-.612-.919-.857-1.215a9.927 9.927 0 0 0-.857 1.215A9.64 9.64 0 0 0 5.78 7.25Zm-5.944 1.5H1.543a6.507 6.507 0 0 0 4.666 5.5c-.123-.181-.24-.365-.352-.552-.715-1.192-1.437-2.874-1.581-4.948Zm-2.733-1.5h2.733c.144-2.074.866-3.756 1.58-4.948.12-.197.237-.381.353-.552a6.507 6.507 0 0 0-4.666 5.5Zm10.181 1.5c-.144 2.074-.866 3.756-1.58 4.948-.12.197-.237.381-.353.552a6.507 6.507 0 0 0 4.666-5.5Zm2.733-1.5a6.507 6.507 0 0 0-4.666-5.5c.123.181.24.365.352.552.715 1.192 1.437 2.874 1.581 4.948Z"/></svg>
229 Публичный репозиторий
230 {{end}}
231 </li>
232 <li>
233 <svg class="octicon" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm7.22-2.88a.75.75 0 0 1 1.06 0l.87.86.87-.86a.75.75 0 1 1 1.06 1.06l-1.4 1.4 1.4 1.4a.75.75 0 1 1-1.06 1.06L8.75 8.8l-.87.86a.75.75 0 0 1-1.06-1.06l1.4-1.4-1.4-1.4a.75.75 0 0 1 0-1.06Z"/></svg>
234 Обновлён {{relTime .Repo.UpdatedAt}}
235 </li>
236 </ul>
237 </section>
238
239 {{if .Branches}}
240 <section class="sidebar-section">
241 <h2 class="sidebar-title">Ветки</h2>
242 <ul class="sidebar-branches">
243 {{range .Branches}}
244 <li>
245 {{if eq . $.ActiveBranch}}
246 <span class="branch-current">
247 <svg class="octicon" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"/></svg>
248 {{.}}
249 </span>
250 {{else}}
251 <a href="?branch={{. | urlquery}}">
252 <svg class="octicon" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"/></svg>
253 {{.}}
254 </a>
255 {{end}}
256 </li>
257 {{end}}
258 </ul>
259 </section>
260 {{end}}
261
262 <section class="sidebar-section">
263 <h2 class="sidebar-title">Релизы</h2>
264 {{if .Releases}}
265 <ul class="sidebar-releases">
266 {{range .Releases}}
267 <li>
268 <a href="/{{$.Repo.CloneURL}}/releases">
269 <svg class="octicon" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 16A8 8 0 1 1 8 0a8 8 0 0 1 0 16ZM4.5 8.5l2.5 2.5 4.5-4.5a1 1 0 0 0-1.414-1.414L6.99 8.172 5.914 7.086A1 1 0 0 0 4.5 8.5Z"/></svg>
270 <span class="sidebar-release-tag">{{.Tag}}</span>
271 </a>
272 <span class="sidebar-release-date">{{relTime .CreatedAt}}</span>
273 </li>
274 {{end}}
275 </ul>
276 {{else}}
277 <p class="text-small muted">Релизов пока нет.</p>
278 {{end}}
279 <a class="sidebar-more" href="/{{.Repo.CloneURL}}/releases">Все релизы ({{.ReleaseCount}})</a>
280 </section>
281 </aside>
282</div>
283{{end}}