Use bootstrap panel instead of custom box styles

This commit is contained in:
Naoki Takezoe
2015-12-14 00:16:18 +09:00
parent 7ad605afba
commit 8f36ff60de
8 changed files with 43 additions and 41 deletions

View File

@@ -11,8 +11,8 @@
@if(comment.newLine.isDefined){newline="@comment.newLine.get"} @if(comment.newLine.isDefined){newline="@comment.newLine.get"}
@if(comment.oldLine.isDefined){oldline="@comment.oldLine.get"}> @if(comment.oldLine.isDefined){oldline="@comment.oldLine.get"}>
<div class="issue-avatar-image">@avatar(comment.commentedUserName, 48)</div> <div class="issue-avatar-image">@avatar(comment.commentedUserName, 48)</div>
<div class="box commit-comment-box commit-comment-@comment.commentId"> <div class="panel- panel-default commit-comment-box commit-comment-@comment.commentId">
<div class="box-header"> <div class="panel-heading">
@user(comment.commentedUserName, styleClass="username strong") @user(comment.commentedUserName, styleClass="username strong")
<span class="muted"> <span class="muted">
commented commented
@@ -33,7 +33,7 @@
} }
</span> </span>
</div> </div>
<div class="box-content-bottom issue-content commit-commentContent-@comment.commentId markdown-body"> <div class="panel-body issue-content commit-commentContent-@comment.commentId markdown-body">
@markdown(comment.content, repository, false, true, true, hasWritePermission) @markdown(comment.content, repository, false, true, true, hasWritePermission)
</div> </div>
</div> </div>

View File

@@ -8,8 +8,8 @@
@import gitbucket.core.model.CommitComment @import gitbucket.core.model.CommitComment
@if(issue.isDefined){ @if(issue.isDefined){
<div class="issue-avatar-image">@avatar(issue.get.openedUserName, 48)</div> <div class="issue-avatar-image">@avatar(issue.get.openedUserName, 48)</div>
<div class="issue-comment-box"> <div class="panel panel-default issue-comment-box">
<div class="box-header"> <div class="panel-heading">
@user(issue.get.openedUserName, styleClass="username strong") <span class="muted">commented @helper.html.datetimeago(issue.get.registeredDate)</span> @user(issue.get.openedUserName, styleClass="username strong") <span class="muted">commented @helper.html.datetimeago(issue.get.registeredDate)</span>
<span class="pull-right"> <span class="pull-right">
@if(hasWritePermission || loginAccount.map(_.userName == issue.get.openedUserName).getOrElse(false)){ @if(hasWritePermission || loginAccount.map(_.userName == issue.get.openedUserName).getOrElse(false)){
@@ -17,7 +17,7 @@
} }
</span> </span>
</div> </div>
<div class="box-content-bottom issue-content markdown-body" id="issueContent"> <div class="panel-body issue-content markdown-body" id="issueContent">
@markdown(issue.get.content getOrElse "No description provided.", repository, false, true, true, hasWritePermission) @markdown(issue.get.content getOrElse "No description provided.", repository, false, true, true, hasWritePermission)
</div> </div>
</div> </div>

View File

@@ -11,8 +11,8 @@
<div class="row"> <div class="row">
<div class="col-md-10"> <div class="col-md-10">
<div class="issue-avatar-image">@avatar(loginAccount.get.userName, 48)</div> <div class="issue-avatar-image">@avatar(loginAccount.get.userName, 48)</div>
<div class="box issue-box"> <div class="panel panel-default issue-box">
<div class="box-content"> <div class="panel-body">
<span id="error-title" class="error"></span> <span id="error-title" class="error"></span>
<input type="text" name="title" class="form-control" value="" placeholder="Title" style="width: 680px;" autofocus/> <input type="text" name="title" class="form-control" value="" placeholder="Title" style="width: 680px;" autofocus/>
@helper.html.preview( @helper.html.preview(

View File

@@ -110,8 +110,7 @@
@repository.repository.description.map { description => @repository.repository.description.map { description =>
<p class="description">@detectAndRenderLinks(description)</p> <p class="description">@detectAndRenderLinks(description)</p>
} }
<div style="margin-bottom: 10px;" class="panel panel-default"> <div style="margin-bottom: 10px; padding: 4px;" class="panel panel-default">
<div class="panel-body">
<table class="fill-width"> <table class="fill-width">
<tr> <tr>
<td style="width: 33%; text-align: center;"> <td style="width: 33%; text-align: center;">
@@ -135,7 +134,6 @@
</tr> </tr>
</table> </table>
</div> </div>
</div>
} }
@body @body
</div> </div>

View File

@@ -56,8 +56,8 @@
<div class="row"> <div class="row">
<div class="col-md-10"> <div class="col-md-10">
<div class="issue-avatar-image">@avatar(loginAccount.get.userName, 48)</div> <div class="issue-avatar-image">@avatar(loginAccount.get.userName, 48)</div>
<div class="box issue-box"> <div class="panel panel-default issue-box">
<div class="box-content"> <div class="panel-body">
<span class="error" id="error-title"></span> <span class="error" id="error-title"></span>
<input type="text" name="title" class="form-control" style="width: 680px" placeholder="Title"/> <input type="text" name="title" class="form-control" style="width: 680px" placeholder="Title"/>
@helper.html.preview( @helper.html.preview(
@@ -99,7 +99,7 @@
</tr> </tr>
</table> </table>
} else { } else {
<div style="margin-bottom: 10px;" class="box-content"> <div style="margin-bottom: 10px; padding: 4px;" class="panel panel-default">
<table class="fill-width"> <table class="fill-width">
<tr> <tr>
<td style="width: 25%; text-align: center;"> <td style="width: 25%; text-align: center;">

View File

@@ -13,8 +13,8 @@
@if(!fileName.isDefined){ @if(!fileName.isDefined){
<div class="issue-avatar-image">@avatar(loginAccount.get.userName, 48)</div> <div class="issue-avatar-image">@avatar(loginAccount.get.userName, 48)</div>
} }
<div class="box issue-comment-box"> <div class="panel panel-default issue-comment-box">
<div class="box-content"> <div class="panel-body">
@helper.html.preview( @helper.html.preview(
repository = repository, repository = repository,
content = "", content = "",

View File

@@ -125,9 +125,9 @@
} }
</table> </table>
@readme.map { case(filePath, content) => @readme.map { case(filePath, content) =>
<div id="readme"> <div id="readme" class="panel panel-default">
<div class="box-header">@filePath.reverse.head</div> <div class="panel-heading">@filePath.reverse.head</div>
<div class="box-content-bottom markdown-body" style="padding-left: 20px; padding-right: 20px;">@renderMarkup(filePath, content, branch, repository, false, false, true)</div> <div class="panel-body markdown-body" style="padding-left: 20px; padding-right: 20px;">@renderMarkup(filePath, content, branch, repository, false, false, true)</div>
</div> </div>
} }
} }

View File

@@ -1214,6 +1214,10 @@ div.issue-comment-box, div.commit-comment-box {
/*padding: 8px;*/ /*padding: 8px;*/
} }
div.issue-box > div.panel-body {
padding: 4px;
}
div.issue-comment-box > div.panel-body, div.issue-comment-box > div.panel-body,
div.commit-comment-box > div.panel-body { div.commit-comment-box > div.panel-body {
padding: 8px; padding: 8px;