OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/app/assets/stylesheets/layout/_top_menu.sass

332 lines
8.0 KiB

//-- copyright
// OpenProject is a project management system.
// Copyright (C) 2012-2018 the OpenProject Foundation (OPF)
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License version 3.
//
// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
// Copyright (C) 2006-2017 Jean-Philippe Lang
// Copyright (C) 2010-2013 the ChiliProject Team
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
// See docs/COPYRIGHT.rdoc for more details.
//++
$hamburger-right: -3px
$hamburger-width: 50px
#logo
width: 230px
@include varprop(height, header-height)
position: absolute
left: calc(50% - 230px / 2)
.home-link
margin-top: 15px
display: block
background: $header-home-link-bg
background-size: 140px
height: 42px
text-indent: -9999em
#top-menu
@include varprop(background-color, header-bg-color)
height: $header-height
width: 100%
padding: 0
z-index: 22
position: relative
border-bottom-style: solid
@include varprop(border-bottom-width, header-border-bottom-width)
@include varprop(border-bottom-color, header-border-bottom-color)
%absolute-layout-mode &
position: absolute
::-webkit-input-placeholder
color: $header-search-field-font-color
::-moz-placeholder
color: $header-search-field-font-color
.menu_root
margin: 0
padding: 0
float: left
height: $header-height
border-top: 0
position: relative
li.drop-down,
li.help-menu--overridden-link,
.accessibility-mode & #account-nav-left li
float: left
list-style-type: none
white-space: nowrap
position: relative
z-index: 5
padding: 0
> a
height: $header-height
line-height: $header-height
zoom: 1
@include varprop(color, header-item-font-color)
@include varprop(font-size, header-item-font-size)
text-decoration: none
padding: 0 15px
> a:hover
@include varprop(background, header-item-bg-hover-color)
@include varprop(color, header-item-font-hover-color)
> ul
min-width: 270px
padding: 6px 0
border: 1px solid $header-drop-down-border-color
border-top: 0
background-color: $header-drop-down-bg-color
max-height: calc(100vh - #{$header-height})
overflow-y: auto
overflow-x: hidden
@include styled-scroll-bar-vertical
li
float: none
> ul.drop-down--projects
width: 400px
left: 0px
li.drop-down.open
.button--dropdown-indicator:before
@include icon-mixin-pulldown-up
li.last-child > ul,
.drop-down--help,
.drop-down--modules
left: auto
right: 0
.drop-down--projects
> li
&:nth-last-child(2)
margin-bottom: 6px
.drop-down--help
.form--separator
margin-bottom: 10px
&+ li
margin-bottom: 5px
.drop-down--help-headline
padding-left: 10px
font-size: 12px
color: $gray-dark
text-transform: uppercase
#loggedas
float: right
margin-right: 0.5em
color: #fff
#nav-login-content
width: 506px
position: relative
position-top: 44px
float: right
background: #FFFFFF
border: 0 solid #194E60
border-top: 0
line-height: 19px
padding: 15px 10px 15px 15px
@include default-font(#555555, 13px)
a
display: inline
padding: 0
font-weight: normal
table td
padding: 3px
.skip-navigation-link:focus
top: 40px
left: 260px
@include varprop(color, font-color-on-primary)
.top-menu-search
display: inline-block
position: relative
&:not(.-collapsed) > div
padding-top: 9px
.top-menu-search--wrapper
float: left
.top-menu-search--button
line-height: $header-height
height: $header-height
width: $header-height
padding: 0 12px
@include varprop(color, header-item-font-color)
@include varprop(font-size, header-item-font-size)
font-weight: normal
background: transparent
&:hover
text-decoration: none
.top-menu-search:not(.-collapsed) &
position: absolute
top: 0
right: 0
color: $header-drop-down-item-font-color
-webkit-transform: scaleX(-1)
-moz-transform: scaleX(-1)
-o-transform: scaleX(-1)
-ms-transform: scaleX(-1)
transform: scaleX(-1)
.top-menu-search.-collapsed &
display: block
&:hover
@include varprop(background, header-item-bg-hover-color)
@include varprop(color, header-item-font-hover-color)
input.top-menu-search--input
margin: 0
padding: 0 20px 0 10px
display: inline-block
[27828] Feature: Query menu in sidenav (#6429) * in main menu add gantt as extra work package child item * Satisfy spec and code climate * Add gantt chart icon behin default gantt query name. * WIP Query menu in left sidebar * Shift query dropdown in left sidenav * Reload menu or load query on click from every project location * WIP set correct label for default queries * Query menu listens on all changes of queries (delete, create, rename, toggle starred) and updates immediatly * WIP: Inline edit, field validation * Inline Edit validation and comfirm * Inline edit: validation of duplicate name * Set default columns and sorting for static queries * Codeclimate issues fixed * WIP Inline edit validation not working perfectly in all error states * Inline edit working * Autocompleter hover disabled and hovering over categories fixed * Category hover and toggle fixed; tested in Chrome, Firefox and Opera * Placeholder cut off fixed and text wrap added * English and german wording adjusted * Styles of inline edit and menu adjusted; matching wiki page styles * prevent menus to be displayed to often * application menu only displayed on work package * specify using no_menu layout more often * adapt tests to altered production implementation * Hamburger icon only in project; on global wp page: default queries shown correctly and summary removed * searching for undefined leads to error * Accessible click fixed (listen on escape) * Gantt in top menu deleted (gantt chart is part of default queries on wp page) * load menu on wp summary page * reduce times queries are loaded * lowercase on second word * remove menu from search and home * Styles fixed (category toggle and correct highlighting) * reflect static query in url * fix autocomplete handling in specs * Open all global menus on default and hide hamburger icon on global pages; Rebuild changes that have been ovrwritten after merge" * Correct highlighting of default queries after reload * Replace summary cuke with spec * WIP * Clear up selectors * Avoid actively setting promises and instead use $state.go to load links [ci skip] * Make editable title component a little simpler We can reuse the component I built for the wiki, that wasn't present in the frontend beforehand. * Fix moving through the menu and selecting items [ci skip] * Add save button to query title when query changed * Improve static names lookup by comparing query_props * Adapt and fix specs * Allow inner scrolling of wp query results Also, style the webkit scrollbar to make it pretty where supported * Allow renaming the query through setting menu, but simply focus on field [ci skip]
6 years ago
border: none !important
border-radius: 25px
width: 180px
outline: 0
font-size: 0.75rem
&::-ms-clear
margin-right: 5px
width: 20px
.top-menu-search.-collapsed &
display: none
#quick-search
float: right
#top-menu-items
padding-top: 0
.top-menu-items-right
float: right
#header
.chzn-container .chzn-results .highlighted
background-color: #24b3e7
.account-nav
display: block
li
a
@include text-shortener
display: block
padding: 0 9px 0
#account-nav-left
.drop-down
// Half viewport width minus half logo.
max-width: calc((100vW/2) - 115px - #{$hamburger-width + $hamburger-right})
.nosidebar &
max-width: calc((100vW/2) - 115px)
#projects-menu
padding-right: 30px
font-weight: bold
7 years ago
padding-left: 6px
.nosidebar &
padding-left: 15px
.button--dropdown-text
@include text-shortener
float: left
// Half viewport width minus half logo minus margins.
max-width: calc((100vW/2) - 115px - 50px - #{$hamburger-width + $hamburger-right})
.nosidebar &
max-width: calc((100vW/2) - 115px - 50px)
&:after
position: absolute
right: 15px
top: calc(50% - 10px / 2)
#top-menu #account-nav-left .menu-drop-down-container
overflow: hidden
#account-nav-right
.drop-down.last-child
.avatar
// To accommodate the padding of the help icon which exists because of the circle
margin-top: -5px
.icon-help:before
border-width: 2px
border-style: solid
@include varprop(border-color, header-item-font-color)
border-radius: 50%
width: 26px
height: 26px
display: inline-block
.icon-help:hover:before
@include varprop(border-color, header-item-font-hover-color)
.icon-user
font-size: 18px
[class*="icon-"]:before
padding: 0.25rem
// Temporary overwrite searchfield styles for mobile view
// until we have a full responsive layout
input.top-menu-search--input
margin: 0
position: absolute
right: 0
bottom: 10px
z-index: 10
.top-menu-search:not(.-collapsed) .top-menu-search--button
position: relative
top: 0
z-index: 10
#main-menu-toggle
7 years ago
display: block
width: $hamburger-width
height: $header-height-mobile
float: left
text-align: center
margin-right: $hamburger-right
a
height: $header-height-mobile
line-height: $header-height-mobile
zoom: 1
@include varprop(color, header-item-font-color)
@include varprop(font-size, header-item-font-size)
text-decoration: none
padding: 0 15px
.nosidebar &
display: none
&:hover
@include varprop(background, header-item-bg-hover-color)
@include varprop(color, header-item-font-hover-color)
7 years ago
@media only screen and (max-width: 18.75rem)
#logo
max-width: 170px
@media only screen and (max-width: 15rem)
#logo
display: none