mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-07 14:05:52 +01:00
Use Bootstrap panels instead of GitBucket original styles
This commit is contained in:
@@ -24,55 +24,53 @@
|
||||
@if(loginAccount.isEmpty){
|
||||
@signinform(settings)
|
||||
} else {
|
||||
<div class="box-header">
|
||||
<div class="pull-right">
|
||||
<a href="@path/new" class="btn btn-success btn-sm">New repository</a>
|
||||
</div>
|
||||
<span class="strong">Your repositories</span> <span class="badge">@userRepositories.size</span>
|
||||
</div>
|
||||
@if(userRepositories.isEmpty){
|
||||
<div class="box-content-bottom">
|
||||
No repositories
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading strong">
|
||||
<div class="pull-right">
|
||||
<a href="@path/new" class="btn btn-success btn-sm">New repository</a>
|
||||
</div>
|
||||
} else {
|
||||
<div class="box-content-bottom" style="padding: 0px;">
|
||||
Your repositories <span class="badge">@userRepositories.size</span>
|
||||
</div>
|
||||
<ul class="list-group list-group-flush">
|
||||
@if(userRepositories.isEmpty){
|
||||
<li class="list-group-item">No repositories</li>
|
||||
} else {
|
||||
@defining(20){ max =>
|
||||
@userRepositories.zipWithIndex.map { case (repository, i) =>
|
||||
<div class="box-content-row repo-link" style="@if(i > max - 1){display:none;}">
|
||||
<li class="list-group-item repo-link" style="@if(i > max - 1){display:none;}">
|
||||
@helper.html.repositoryicon(repository, false)
|
||||
@if(repository.owner == loginAccount.get.userName){
|
||||
<a href="@url(repository)"><span class="strong">@repository.name</span></a>
|
||||
} else {
|
||||
<a href="@url(repository)">@repository.owner/<span class="strong">@repository.name</span></a>
|
||||
}
|
||||
</div>
|
||||
</li>
|
||||
}
|
||||
@if(userRepositories.size > max){
|
||||
<div class="box-content-row show-more">
|
||||
<li class="list-group-item show-more">
|
||||
<a href="javascript:void(0);" id="show-more-repos">Show more @{userRepositories.size - max} pages...</a>
|
||||
</div>
|
||||
</li>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
<div class="box-header">
|
||||
<span class="strong">Recent updated repositories</span>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading strong">Recent updated repositories</div>
|
||||
<ul class="list-group list-group-flush">
|
||||
@if(recentRepositories.isEmpty){
|
||||
<li class="list-group-item">No repositories</li>
|
||||
} else {
|
||||
@recentRepositories.map { repository =>
|
||||
<li class="list-group-item repo-link">
|
||||
@helper.html.repositoryicon(repository, false)
|
||||
<a href="@url(repository)">@repository.owner/<span class="strong">@repository.name</span></a>
|
||||
</li>
|
||||
}
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
@if(recentRepositories.isEmpty){
|
||||
<div class="box-content-bottom">
|
||||
No repositories
|
||||
</div>
|
||||
} else {
|
||||
<div class="box-content-bottom" style="padding: 0px;">
|
||||
@recentRepositories.map { repository =>
|
||||
<div class="box-content-row repo-link">
|
||||
@helper.html.repositoryicon(repository, false)
|
||||
<a href="@url(repository)">@repository.owner/<span class="strong">@repository.name</span></a>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -84,4 +82,4 @@ $(function(){
|
||||
$(e.target).parents('div.show-more').remove();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -1,25 +1,29 @@
|
||||
@(systemSettings: gitbucket.core.service.SystemSettingsService.SystemSettings)(implicit context: gitbucket.core.controller.Context)
|
||||
@import context._
|
||||
<div class="box-header">
|
||||
@if(systemSettings.allowAccountRegistration){
|
||||
<div class="pull-right">
|
||||
<a href="@path/register" class="btn btn-mini">Create new account</a>
|
||||
</div>
|
||||
}
|
||||
<span class="strong">Sign in</span>
|
||||
</div>
|
||||
<div class="box-content-bottom">
|
||||
<form action="@path/signin" method="POST" validate="true">
|
||||
<div class="form-group">
|
||||
<label for="userName">Username:</label>
|
||||
<span id="error-userName" class="error"></span>
|
||||
<input type="text" name="userName" id="userName" class="form-control" autofocus/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">Password:</label>
|
||||
<span id="error-password" class="error"></span>
|
||||
<input type="password" name="password" id="password" class="form-control"/>
|
||||
</div>
|
||||
<input type="submit" class="btn btn-success" value="Sign in"/>
|
||||
</form>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading strong">
|
||||
@if(systemSettings.allowAccountRegistration){
|
||||
<div class="pull-right">
|
||||
<a href="@path/register" class="btn btn-mini">Create new account</a>
|
||||
</div>
|
||||
}
|
||||
Sign in
|
||||
</div>
|
||||
<ul class="list-group list-group-flush">
|
||||
<li class="list-group-item">
|
||||
<form action="@path/signin" method="POST" validate="true">
|
||||
<div class="form-group">
|
||||
<label for="userName">Username:</label>
|
||||
<span id="error-userName" class="error"></span>
|
||||
<input type="text" name="userName" id="userName" class="form-control" autofocus/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">Password:</label>
|
||||
<span id="error-password" class="error"></span>
|
||||
<input type="password" name="password" id="password" class="form-control"/>
|
||||
</div>
|
||||
<input type="submit" class="btn btn-success" value="Sign in"/>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -395,11 +395,18 @@ div.box-content-row {
|
||||
padding: 4px;
|
||||
}
|
||||
*/
|
||||
/*
|
||||
div.repo-link {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
*/
|
||||
|
||||
li.repo-link {
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
div.box-content-bottom {
|
||||
background-color: white;
|
||||
|
||||
Reference in New Issue
Block a user