This repository has been archived by the owner on Mar 31, 2024. It is now read-only.
forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from spalger/implement/appSwitcherSidebar
move app switcher to a sidebar
- Loading branch information
Showing
7 changed files
with
100 additions
and
99 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
26 changes: 12 additions & 14 deletions
26
src/ui/public/chrome/directives/app_switcher/app_switcher.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,16 @@ | ||
<div class="app-links"> | ||
<div | ||
class="app-link" | ||
ng-repeat="link in switcher.getNavLinks()" | ||
ng-class="{ active: link.active }"> | ||
<div | ||
class="app-link" | ||
ng-repeat="link in switcher.getNavLinks()" | ||
ng-class="{ active: link.active }"> | ||
|
||
<a | ||
ng-click="switcher.ensureNavigation($event, link)" | ||
ng-href="{{ link.active ? link.url : (link.lastSubUrl || link.url) }}" | ||
data-test-subj="appLink"> | ||
<a | ||
ng-click="switcher.ensureNavigation($event, link)" | ||
ng-href="{{ link.active ? link.url : (link.lastSubUrl || link.url) }}" | ||
data-test-subj="appLink"> | ||
|
||
<div ng-if="link.icon" ng-style="{ 'background-image': 'url(../' + link.icon + ')' }" class="app-icon"></div> | ||
<div ng-if="!link.icon" class="app-icon app-icon-missing">{{ link.title[0] }}</div> | ||
<div ng-if="link.icon" ng-style="{ 'background-image': 'url(../' + link.icon + ')' }" class="app-icon"></div> | ||
<div ng-if="!link.icon" class="app-icon app-icon-missing">{{ link.title[0] }}</div> | ||
|
||
<div class="app-title">{{ link.title }}</div> | ||
</a> | ||
</div> | ||
<div class="app-title">{{ link.title }}</div> | ||
</a> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<kbn-notifications list="notifList"></kbn-notifications> | ||
<div class="content"> | ||
<kbn-app-switcher></kbn-app-switcher> | ||
<kbn-app-container ng-view></kbn-app-container> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
src/ui/public/chrome/directives/kbn_chrome/kbn_chrome.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
@import (reference) "~ui/styles/variables"; | ||
|
||
@app-icon-size: 48px; | ||
@app-icon-padding: 10px; | ||
|
||
body[kbn-chrome] { | ||
> .content { | ||
display: flex; | ||
flex-direction: row; | ||
overflow: hidden; | ||
|
||
kbn-app-container { | ||
display: flex; | ||
flex: 1 1 auto; | ||
flex-direction: column; | ||
} | ||
|
||
kbn-app-switcher { | ||
flex: 0 0 auto; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
|
||
.app-link { | ||
display: inline-block; | ||
vertical-align: top; | ||
text-align: left; | ||
width: @app-icon-size + (@app-icon-padding * 2); | ||
margin: 0px 10px; | ||
padding: @app-icon-padding; | ||
border-radius: @border-radius-base; | ||
|
||
.app-icon { | ||
display: block; | ||
height: @app-icon-size; | ||
width: @app-icon-size; | ||
background-position: center; | ||
background-size: contain; | ||
border-radius: @border-radius-base; | ||
background-color: @gray-light; | ||
width: 100%; | ||
|
||
&-missing { | ||
text-align: center; | ||
font-size: 2.7em; | ||
font-weight: bold; | ||
font-family: @font-family-sans-serif; | ||
color: #fff; | ||
} | ||
} | ||
|
||
.app-title { | ||
color: @text-color; | ||
font-size: 0.9em; | ||
width: 100%; | ||
text-align: center; | ||
margin-top: 3px; | ||
} | ||
|
||
&:hover .app-title { | ||
text-decoration: underline; | ||
} | ||
|
||
&.active { | ||
background: @gray-lighter; | ||
.app-title { | ||
text-decoration: underline; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |