Sam Jeston
History
28 lines·
1.8 KB
·HTML
| 1 | <details class="dropdown dropdown-right clone-dropdown"> |
| 2 | <summary class="btn btn-primary">{{ crate::web::fmt::icon("code")|safe }} Clone {{ crate::web::fmt::icon("chevron-down")|safe }}</summary> |
| 3 | <div class="dropdown-menu dropdown-wide"> |
| 4 | <div class="clone-panel"> |
| 5 | <div class="clone-tabs" role="tablist"> |
| 6 | <button type="button" class="clone-tab selected" data-clone-tab="ssh">SSH</button> |
| 7 | <button type="button" class="clone-tab" data-clone-tab="https">HTTPS</button> |
| 8 | </div> |
| 9 | <div class="clone-pane" data-clone-pane="ssh"> |
| 10 | <div class="input-group"> |
| 11 | <input class="input input-mono" type="text" readonly value="{{ r.ssh_url }}" id="clone-ssh" aria-label="SSH clone URL"> |
| 12 | <button type="button" class="btn" data-copy="#clone-ssh" title="Copy">{{ crate::web::fmt::icon("copy")|safe }}</button> |
| 13 | </div> |
| 14 | <p class="hint">Use a password-protected SSH key. <a href="/settings/keys">Manage keys</a></p> |
| 15 | </div> |
| 16 | <div class="clone-pane" data-clone-pane="https" hidden> |
| 17 | <div class="input-group"> |
| 18 | <input class="input input-mono" type="text" readonly value="{{ r.http_url }}" id="clone-https" aria-label="HTTPS clone URL"> |
| 19 | <button type="button" class="btn" data-copy="#clone-https" title="Copy">{{ crate::web::fmt::icon("copy")|safe }}</button> |
| 20 | </div> |
| 21 | <p class="hint">HTTPS is read-only. Push over SSH.</p> |
| 22 | </div> |
| 23 | </div> |
| 24 | <div class="dropdown-divider"></div> |
| 25 | <a class="dropdown-item" href="{{ r.base() }}/archive/{{ crate::web::fmt::urlpath(view.refname) }}.zip">{{ crate::web::fmt::icon("download")|safe }} Download ZIP</a> |
| 26 | <a class="dropdown-item" href="{{ r.base() }}/archive/{{ crate::web::fmt::urlpath(view.refname) }}.tar.gz">{{ crate::web::fmt::icon("download")|safe }} Download tar.gz</a> |
| 27 | </div> |
| 28 | </details> |