From debc798aecac3461151fb6c5eb46f05647e165bf Mon Sep 17 00:00:00 2001 From: takezoe Date: Sat, 10 May 2014 14:44:19 +0900 Subject: [PATCH] Side-menu is completed! --- src/main/twirl/menu.scala.html | 145 ++++++------------ .../webapp/assets/common/css/gitbucket.css | 57 +++++++ 2 files changed, 106 insertions(+), 96 deletions(-) diff --git a/src/main/twirl/menu.scala.html b/src/main/twirl/menu.scala.html index 2fbb3ce54..2d54e0153 100644 --- a/src/main/twirl/menu.scala.html +++ b/src/main/twirl/menu.scala.html @@ -5,6 +5,21 @@ @import context._ @import view.helpers._ +@sidemenu(path: String, name: String, label: String) = { +
  • +
    + + @if(active == name){ + + } else { + + + } + @if(expand){ @label} + +
  • +} +
    @if(repository.commitCount > 0){
    @@ -28,87 +43,16 @@

    - -
    • -
    • -
      - @if(expand){ Code} -
    • -
    • -
      - @if(expand){ Issues} - @if(expand && repository.issueCount > 0){ -
      @repository.issueCount
      - } -
    • -
    • -
      - @if(expand){ Pull Requests} - @if(expand && repository.pullCount > 0){ -
      @repository.pullCount
      - } -
    • -
    • -
      - @if(expand){ Wiki} -
    • + @sidemenu("" , "code" , "Code") + @sidemenu("/issues", "issues", "Issues") + @sidemenu("/pulls" , "pulls" , "Pull Requests") + @sidemenu("/wiki" , "wiki" , "Wiki") @if(loginAccount.isDefined && (loginAccount.get.isAdmin || repository.managers.contains(loginAccount.get.userName))){ -
    • -
      - @if(expand){ Settings} -
    • + @sidemenu("/settings", "settings", "Settings") }
    @@ -132,18 +76,6 @@ $(function(){ }
    - @if(expand){ @repository.repository.description.map { description =>

    @description

    @@ -173,17 +105,38 @@ $(function(){ @body
    -@if(settings.ssh && loginAccount.isDefined){ -} diff --git a/src/main/webapp/assets/common/css/gitbucket.css b/src/main/webapp/assets/common/css/gitbucket.css index 4b052749e..cf691c006 100644 --- a/src/main/webapp/assets/common/css/gitbucket.css +++ b/src/main/webapp/assets/common/css/gitbucket.css @@ -282,6 +282,52 @@ span.highlight { width: 100%; } +/****************************************************************************/ +/* Side Menu */ +/****************************************************************************/ +ul.sidemenu { + margin-left: 0px; +} + +ul.sidemenu a:hover{ + text-decoration: none; +} + +ul.sidemenu li.active { + border-top: 1px solid #eee; + border-bottom: 1px solid #eee; + border-right: 2px solid #bb4444; + border-left: 1px solid white; +} + +ul.sidemenu div.gradient { + width: 5px; + height: 35px; + background: linear-gradient(to right, #eee, #fff); + margin-right: 4px; + border-left: 1px solid #eee; +} + +ul.sidemenu div.margin { + width: 5px; + height: 35px; + margin-right: 4px; + border-left: 1px solid white; +} + +ul.sidemenu li { + line-height: 35px; + height: 35px; + border-left: 1px solid #eee; + margin-left:0px; + border-right: 2px solid white; + list-style-type: none; +} + +ul.sidemenu span.badge { + padding-right: 4px; +} + /****************************************************************************/ /* Create Repository */ /****************************************************************************/ @@ -393,6 +439,17 @@ div.activity-content { /****************************************************************************/ /* Repository Viewer */ /****************************************************************************/ +a.header-link { + color: #888; +} +a.header-link strong { + color: black; +} +a.header-link:hover { + color: #0088cc; + text-decoration: none; +} + table.table-file-list { margin-bottom: 0px; }