internal/web/templates/snippetnew.html

4a511e42574ead9c92dc73fd320f296cc4dbea07
gitbay/internal/web/templates/snippetnew.html

23 lines · 1319 bytes

 1{{define "width"}}bounded{{end}}
 2{{define "title"}}new snippet · {{.Owner}}{{end}}
 3{{define "content"}}
 4<div class="pagehead">
 5  <h1>New snippet</h1>
 6  <span class="grow"></span>
 7  <a class="button btn" href="/{{.Owner}}/-/snippets">Back to snippets</a>
 8</div>
 9{{if .Error}}<p class="error" role="alert">{{.Error}}</p>{{end}}
10<section class="setcard">
11<form method="post" action="/{{.Owner}}/-/snippets/new" class="commentform">
12  <p><input type="text" name="name" aria-label="File name" placeholder="filename" value="{{.Name}}" required autocomplete="off" spellcheck="false"></p>
13  <p><input type="text" name="description" aria-label="Description" placeholder="description" value="{{.Description}}"></p>
14  <p><select name="visibility" aria-label="Visibility">
15    <option value="unlisted"{{if or (eq .Visibility "unlisted") (eq .Visibility "")}} selected{{end}}>unlisted</option>
16    <option value="public"{{if eq .Visibility "public"}} selected{{end}}>public</option>
17    <option value="private"{{if eq .Visibility "private"}} selected{{end}}>private</option>
18  </select></p>
19  <p><textarea name="content" aria-label="Content" rows="16" required>{{.Content}}</textarea></p>
20  <p class="btngroup"><button type="submit">Create snippet</button> <span class="meta">⌘↵ to create</span></p>
21</form>
22</section>
23{{end}}
Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form