Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

highlight active navigation entry better, fix #2096 #3150

Merged
merged 2 commits into from
Jan 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/theming/lib/Controller/ThemingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ public function getStylesheet() {
';
$responseCss .= sprintf('.nc-theming-main-background {background-color: %s}' . "\n", $color);
$responseCss .= sprintf('.nc-theming-main-text {color: %s}' . "\n", $color);
$responseCss .= sprintf('#app-navigation li:hover > a, #app-navigation li:focus > a, #app-navigation a:focus, #app-navigation .selected, #app-navigation .selected a, #app-navigation .active, #app-navigation .active a {box-shadow: inset 2px 0 %s}' . "\n", $color);

}
$logo = $this->config->getAppValue($this->appName, 'logoMime');
Expand Down
4 changes: 4 additions & 0 deletions apps/theming/tests/Controller/ThemingControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@ public function testGetStylesheetWithOnlyColor() {
';
$expectedData .= sprintf('.nc-theming-main-background {background-color: %s}' . "\n", $color);
$expectedData .= sprintf('.nc-theming-main-text {color: %s}' . "\n", $color);
$expectedData .= sprintf('#app-navigation li:hover > a, #app-navigation li:focus > a, #app-navigation a:focus, #app-navigation .selected, #app-navigation .selected a, #app-navigation .active, #app-navigation .active a {box-shadow: inset 2px 0 %s}' . "\n", $color);
$expectedData .= '.nc-theming-contrast {color: #ffffff}' . "\n";
$expectedData .= '.icon-file,.icon-filetype-text {' .
'background-image: url(\'./img/core/filetypes/text.svg?v=0\');' . "}\n" .
Expand Down Expand Up @@ -581,6 +582,7 @@ public function testGetStylesheetWithOnlyColorInvert() {
';
$expectedData .= sprintf('.nc-theming-main-background {background-color: %s}' . "\n", $color);
$expectedData .= sprintf('.nc-theming-main-text {color: %s}' . "\n", $color);
$expectedData .= sprintf('#app-navigation li:hover > a, #app-navigation li:focus > a, #app-navigation a:focus, #app-navigation .selected, #app-navigation .selected a, #app-navigation .active, #app-navigation .active a {box-shadow: inset 2px 0 %s}' . "\n", $color);
$expectedData .= '#header .header-appname, #expandDisplayName { color: #000000; }' . "\n";
$expectedData .= '#header .icon-caret { background-image: url(\'' . \OC::$WEBROOT . '/core/img/actions/caret-dark.svg\'); }' . "\n";
$expectedData .= '.searchbox input[type="search"] { background: transparent url(\'' . \OC::$WEBROOT . '/core/img/actions/search.svg\') no-repeat 6px center; color: #000; }' . "\n";
Expand Down Expand Up @@ -768,6 +770,7 @@ public function testGetStylesheetWithAllCombined() {
';
$expectedData .= sprintf('.nc-theming-main-background {background-color: %s}' . "\n", $color);
$expectedData .= sprintf('.nc-theming-main-text {color: %s}' . "\n", $color);
$expectedData .= sprintf('#app-navigation li:hover > a, #app-navigation li:focus > a, #app-navigation a:focus, #app-navigation .selected, #app-navigation .selected a, #app-navigation .active, #app-navigation .active a {box-shadow: inset 2px 0 %s}' . "\n", $color);
$expectedData .= sprintf(
'#header .logo {' .
'background-image: url(\'./logo?v=0\');' .
Expand Down Expand Up @@ -879,6 +882,7 @@ public function testGetStylesheetWithAllCombinedInverted() {
';
$expectedData .= sprintf('.nc-theming-main-background {background-color: %s}' . "\n", $color);
$expectedData .= sprintf('.nc-theming-main-text {color: %s}' . "\n", $color);
$expectedData .= sprintf('#app-navigation li:hover > a, #app-navigation li:focus > a, #app-navigation a:focus, #app-navigation .selected, #app-navigation .selected a, #app-navigation .active, #app-navigation .active a {box-shadow: inset 2px 0 %s}' . "\n", $color);
$expectedData .= sprintf(
'#header .logo {' .
'background-image: url(\'./logo?v=0\');' .
Expand Down
4 changes: 3 additions & 1 deletion core/css/apps.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/**
* @copyright Copyright (c) 2014, Jan-Christoph Borchardt (http://jancborchardt.net)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A time traveler 😱

* @copyright Copyright (c) 2017, John Molakvoæ (skjnldsv@protonmail.com)
*
* @license GNU AGPL version 3 or any later version
Expand Down Expand Up @@ -101,6 +102,7 @@ em {
.active,
.active a {
opacity: 1;
box-shadow: inset 2px 0 #0082c9;
}
.collapse {
display: none;
Expand Down Expand Up @@ -284,7 +286,7 @@ em {
.app-navigation-entry-utils ul, .app-navigation-entry-menu ul {
list-style-type: none;
}

/* editing an entry */
.app-navigation-entry-edit {
padding-left: 5px;
Expand Down