mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-11 07:55:55 +01:00
(refs #1160)Fix mobile view
This commit is contained in:
@@ -239,7 +239,7 @@ object PluginRegistry {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case class Link(id: String, label: String, path: String)
|
case class Link(id: String, label: String, path: String, icon: Option[String] = None)
|
||||||
|
|
||||||
case class PluginInfo(
|
case class PluginInfo(
|
||||||
pluginId: String,
|
pluginId: String,
|
||||||
|
|||||||
@@ -6,13 +6,16 @@
|
|||||||
@import context._
|
@import context._
|
||||||
@import gitbucket.core.view.helpers._
|
@import gitbucket.core.view.helpers._
|
||||||
|
|
||||||
@menuitem(path: String, name: String, label: String, count: Int = 0) = {
|
@menuitem(path: String, name: String, label: String, icon: String, count: Int = 0) = {
|
||||||
<li @if(active == name){class="active"}>
|
<li @if(active == name){class="active"}>
|
||||||
<a href="@url(repository)@path">
|
<a href="@url(repository)@path">
|
||||||
@label
|
<i class="menu-icon octicon octicon-@icon"></i>
|
||||||
@if(count > 0){
|
<span class="pc">
|
||||||
<span class="badge">@count</span>
|
@label
|
||||||
}
|
@if(count > 0){
|
||||||
|
<span class="badge">@count</span>
|
||||||
|
}
|
||||||
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
@@ -41,23 +44,23 @@
|
|||||||
<div class="container body">
|
<div class="container body">
|
||||||
<div class="main-sidebar">
|
<div class="main-sidebar">
|
||||||
<ul class="nav nav-pills nav-stacked">
|
<ul class="nav nav-pills nav-stacked">
|
||||||
@menuitem("" ,"files" ,"Files")
|
@menuitem("" ,"files" ,"Files", "code")
|
||||||
@if(repository.commitCount != 0) {
|
@if(repository.commitCount != 0) {
|
||||||
@menuitem("/branches" ,"branches" ,"Branches", repository.branchList.length)
|
@menuitem("/branches" ,"branches" ,"Branches", "git-branch", repository.branchList.length)
|
||||||
@menuitem("/tags" ,"tags" ,"Tags", repository.tags.length)
|
@menuitem("/tags" ,"tags" ,"Tags", "tag", repository.tags.length)
|
||||||
}
|
}
|
||||||
@menuitem("/issues" ,"issues" ,"Issues", repository.issueCount)
|
@menuitem("/issues" ,"issues" ,"Issues", "issue-opened", repository.issueCount)
|
||||||
@menuitem("/pulls" ,"pulls" ,"Pull Requests", repository.pullCount)
|
@menuitem("/pulls" ,"pulls" ,"Pull Requests", "git-pull-request", repository.pullCount)
|
||||||
@menuitem("/issues/labels" ,"labels" ,"Labels")
|
@menuitem("/issues/labels" ,"labels" ,"Labels", "tag")
|
||||||
@menuitem("/issues/milestones" ,"milestones" ,"Milestones")
|
@menuitem("/issues/milestones" ,"milestones" ,"Milestones", "milestone")
|
||||||
@menuitem("/wiki" ,"wiki" ,"Wiki")
|
@menuitem("/wiki" ,"wiki" ,"Wiki", "book")
|
||||||
@menuitem("/network/members", "fork", "Forks", repository.forkedCount)
|
@menuitem("/network/members", "fork", "Forks", "repo-forked", repository.forkedCount)
|
||||||
@if(loginAccount.isDefined && (loginAccount.get.isAdmin || repository.managers.contains(loginAccount.get.userName))){
|
@if(loginAccount.isDefined && (loginAccount.get.isAdmin || repository.managers.contains(loginAccount.get.userName))){
|
||||||
@menuitem("/settings" , "settings" , "Settings")
|
@menuitem("/settings" , "settings" , "Settings", "tools")
|
||||||
}
|
}
|
||||||
@gitbucket.core.plugin.PluginRegistry().getRepositoryMenus.map { menu =>
|
@gitbucket.core.plugin.PluginRegistry().getRepositoryMenus.map { menu =>
|
||||||
@menu(repository, context).map { link =>
|
@menu(repository, context).map { link =>
|
||||||
@menuitem(link.path, link.id, link.label)
|
@menuitem(link.path, link.id, link.label, link.icon.getOrElse("ruby"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -1864,19 +1864,29 @@ div.container.blame-container{
|
|||||||
input[name=query] {
|
input[name=query] {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
#dashboard-signin-form {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.container {
|
.container {
|
||||||
width: auto !important;
|
width: auto !important;
|
||||||
}
|
}
|
||||||
.body>div.pull-left {
|
|
||||||
width: auto !important;
|
|
||||||
}
|
|
||||||
.pc {
|
.pc {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.dashboard-sidebar {
|
||||||
|
display: none;;
|
||||||
|
}
|
||||||
|
div.dashboard-content {
|
||||||
|
margin-left: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.main-sidebar {
|
||||||
|
width: 40px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
div.main-content {
|
||||||
|
margin-left: 42px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Adjust issue / comment form */
|
/* Adjust issue / comment form */
|
||||||
#issue-title {
|
#issue-title {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
@@ -1904,17 +1914,8 @@ div.container.blame-container{
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
.nav-tabs a.btn[href$="/_edit"] {
|
|
||||||
width: 24px;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
padding: 4px 6px;
|
|
||||||
margin: 3px 4px 0 0;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
body>div.container.body {
|
body>div.container.body {
|
||||||
margin: 0 -12px 40px -12px;
|
margin: 0 0 40px -12px;
|
||||||
}
|
}
|
||||||
/* Adjust sidemenu */
|
/* Adjust sidemenu */
|
||||||
.container.body>div[style="width: 170px;"]{
|
.container.body>div[style="width: 170px;"]{
|
||||||
|
|||||||
Reference in New Issue
Block a user