|
1 | | -@(recent: Seq[gitbucket.gist.model.Gist], |
2 | | - gist: Option[gitbucket.gist.model.Gist], |
| 1 | +@(gist: Option[gitbucket.gist.model.Gist], |
3 | 2 | files: Seq[(String, gitbucket.core.util.JGitUtil.ContentInfo)])(implicit context: gitbucket.core.controller.Context) |
4 | 3 | @import context._ |
5 | 4 | @import gitbucket.core.view.helpers._ |
6 | 5 | @gitbucket.core.html.main("Snippets"){ |
| 6 | + @gitbucket.gist.html.style() |
7 | 7 | <div class="container head"> |
8 | 8 | <div id="error"></div> |
9 | 9 | @if(gist.isEmpty){ |
10 | | - <div> |
11 | | - <ul style="list-style: none; margin-left: 0px; padding-left: 0px;"> |
12 | | - @recent.map { gist => |
13 | | - <li style="float: left; width: 200px;"> |
14 | | - <i class="octicon octicon-gist" style="width: 24px; height: 24px;"></i> |
15 | | - <div style="margin-left: 26px; font-size: 90%; position: relative; top: -24px; line-height: normal; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;"> |
16 | | - <a class="strong" href="@path/gist/@gist.userName/@gist.repositoryName">@gist.title</a><br> |
17 | | - @if(gist.description.nonEmpty){ |
18 | | - <span class="muted">@gist.description</span> |
19 | | - } else { |
20 | | - <span style="color: #dddddd;">No description.</span> |
21 | | - } |
22 | | - </div> |
23 | | - </li> |
24 | | - } |
25 | | - </ul> |
26 | | - <div class="pull-right"> |
27 | | - <a href="@path/gist/@context.loginAccount.get.userName" class="btn btn-default">Your Snippets</a> |
28 | | - </div> |
29 | | - </div> |
| 10 | + <h1 style="margin: 0px;">New snippet</h1> |
30 | 11 | } else { |
31 | 12 | @gist.map { x => |
32 | 13 | @avatar(gist.get.userName, 24) |
|
41 | 22 | } else { |
42 | 23 | <a href="@path/gist/@gist.get.userName/@gist.get.repositoryName/secret" class="btn btn-default">Make secret</a> |
43 | 24 | } |
44 | | - <a href="@path/gist/@gist.get.userName/@gist.get.repositoryName/delete" class="btn btn-default" id="delete">Delete</a> |
| 25 | + <a href="@path/gist/@gist.get.userName/@gist.get.repositoryName/delete" class="btn btn-danger" id="delete">Delete</a> |
45 | 26 | </div> |
46 | | - <div class="muted" style="margin-top: -10px; margin-left: 30px;"> |
| 27 | + <div class="muted" style="margin-left: 30px; font-size: 80%;"> |
47 | 28 | Created at @gist.get.registeredDate |
48 | 29 | </div> |
49 | 30 | } |
50 | 31 | } |
51 | 32 | </div> |
52 | 33 | <hr style="margin-bottom: 20px;"/> |
53 | 34 | <div class="container body"> |
54 | | - <form id="form" method="POST" action="#" class="form-inline"> |
55 | | - <input type="text" name="description" id="description" class="form-control" style="width: 950px; margin-bottom: 8px;" value="@gist.map(_.description)" placeholder="Snippet descriptions..."/> |
| 35 | + <form id="form" method="POST" action="#"> |
| 36 | + <input type="text" name="description" id="description" class="form-control" style="margin-bottom: 8px;" value="@gist.map(_.description)" placeholder="Snippet descriptions..."/> |
56 | 37 | <div id="editors"> |
57 | 38 | @files.zipWithIndex.map { case ((fileName, content), i) => |
58 | 39 | @gitbucket.gist.html.editor(i, fileName, content) |
|
0 commit comments