Skip to content

Commit bbd4292

Browse files
committed
Improve presentation
1 parent c672c67 commit bbd4292

File tree

5 files changed

+28
-36
lines changed

5 files changed

+28
-36
lines changed

src/main/twirl/gitbucket/gist/commentform.scala.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55
<hr/><br/>
66
<form method="POST" validate="true" action="@path/gist/@gist.userName/@gist.repositoryName/_comment">
77
<div class="issue-avatar-image">@avatar(loginAccount.get.userName, 48)</div>
8-
<div class="box issue-comment-box">
8+
<div class="issue-comment-box">
99
<div class="box-content">
10-
@gitbucket.gist.html.commentpreview(
11-
gist = gist,
12-
content = "",
13-
style = "width: 635px; height: 100px; max-height: 150px;",
14-
elastic = true
15-
)
10+
@gitbucket.gist.html.commentpreview(
11+
gist = gist,
12+
content = "",
13+
style = "width: 635px; height: 100px; max-height: 150px;",
14+
elastic = true
15+
)
16+
<div style="text-align: right;">
17+
<input type="submit" class="btn btn-success" value="Comment"/>
18+
</div>
1619
</div>
1720
</div>
18-
<div class="pull-right">
19-
<input type="submit" class="btn btn-success" value="Comment"/>
20-
</div>
2121
</form>
2222
}
2323
<script>

src/main/twirl/gitbucket/gist/commentlist.scala.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
@import gitbucket.core.view.helpers._
77
@comments.map { comment =>
88
<div class="issue-avatar-image">@avatar(comment.commentedUserName, 48)</div>
9-
<div class="box issue-comment-box" id="[email protected]">
9+
<div class="issue-comment-box" id="[email protected]">
1010
<div class="box-header-small">
1111
@user(comment.commentedUserName, styleClass="username strong")
1212
<span class="muted">
@@ -20,7 +20,7 @@
2020
}
2121
</span>
2222
</div>
23-
<div class="box-content"class="issue-content" id="[email protected]">
23+
<div class="box-content-bottom issue-content" id="[email protected]">
2424
<div class="markdown-body">@markdown(comment.content, repository, false, true, true, hasWritePermission)</div>
2525
</div>
2626
</div>

src/main/twirl/gitbucket/gist/detail.scala.html

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,21 @@
1616
@gist.description
1717
</div>
1818
@files.map { case (fileName, content) =>
19-
<table class="table table-bordered blobview">
20-
<tr>
21-
<th style="font-weight: normal;">
22-
@fileName
23-
<div class="pull-right">
24-
<a href="@path/gist/@gist.userName/@gist.repositoryName/raw/@revision/@fileName" class="btn btn-mini">Raw</a>
25-
</div>
26-
</th>
27-
</tr>
28-
<tr>
29-
<td>
30-
@if(isRenderable(fileName)){
31-
<div class="box-content markdown-body" style="border: none; padding-left: 16px; padding-right: 16px;">
32-
@renderMarkup(List(fileName), content, "master", gist.toRepositoryInfo, false, false, true)
33-
</div>
34-
} else {
35-
<pre class="prettyprint linenums blob">@content</pre>
36-
}
37-
</td>
38-
</tr>
39-
</table>
19+
<div class="box-header">
20+
@fileName
21+
<div class="pull-right">
22+
<a href="@path/gist/@gist.userName/@gist.repositoryName/raw/@revision/@fileName" class="btn btn-mini">Raw</a>
23+
</div>
24+
</div>
25+
@if(isRenderable(fileName)){
26+
<div class="box-content-bottom markdown-body" style="padding-left: 16px; padding-right: 16px;">
27+
@renderMarkup(List(fileName), content, "master", gist.toRepositoryInfo, false, false, true)
28+
</div>
29+
} else {
30+
<div class="box-content-bottom">
31+
<pre class="prettyprint linenums blob">@content</pre>
32+
</div>
33+
}
4034
}
4135
@gitbucket.gist.html.commentlist(gist, comments, editable, gist.toRepositoryInfo)
4236
@gitbucket.gist.html.commentform(gist)

src/main/twirl/gitbucket/gist/list.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
@renderMarkup(List(gistInfo.fileName), gistInfo.source, "master", gist.toRepositoryInfo, false, false, false)
6060
</div>
6161
} else {
62-
<pre class="list-code prettyprint linenums">@Html(gistInfo.source)</pre>
62+
<pre class="list-code box-content prettyprint linenums">@Html(gistInfo.source)</pre>
6363
}
6464
</div>
6565
</div>

src/main/twirl/gitbucket/gist/style.scala.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
padding-left: 16px;
66
padding-right: 16px;
77
margin-bottom: 20px;
8-
border-radius: 2px;
98
padding-left: 16px;
109
padding-right: 16px;
1110
}
@@ -14,7 +13,6 @@
1413
padding-left: 25px;
1514
background-color: transparent;
1615
border: 1px solid rgba(0, 0, 0, 0.15);
17-
border-radius: 2px;
1816
padding-left: 25px;
1917
}
2018
</style>

0 commit comments

Comments
 (0)