Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
dfef4727
Commit
dfef4727
authored
Feb 03, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated to sidemenu style
parent
3e5223b9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
74 deletions
+55
-74
src/app/controllers/sidemenuCtrl.js
+1
-28
src/app/partials/sidemenu.html
+21
-19
src/css/less/panel.less
+1
-1
src/css/less/sidemenu.less
+32
-26
No files found.
src/app/controllers/sidemenuCtrl.js
View file @
dfef4727
...
...
@@ -47,13 +47,6 @@ function (angular, _, $, config) {
});
}
if
(
$scope
.
grafana
.
user
.
isSignedIn
)
{
$scope
.
menu
.
push
({
text
:
"Profile"
,
href
:
$scope
.
getUrl
(
"/profile"
),
icon
:
"fa fa-user"
,
});
}
if
(
$scope
.
grafana
.
user
.
isGrafanaAdmin
)
{
$scope
.
menu
.
push
({
text
:
"Admin"
,
href
:
$scope
.
getUrl
(
"/admin/users"
),
...
...
@@ -67,40 +60,21 @@ function (angular, _, $, config) {
});
}
if
(
$scope
.
grafana
.
user
.
isSignedIn
)
{
$scope
.
menu
.
push
({
text
:
"Sign out"
,
href
:
$scope
.
getUrl
(
"/logout"
),
target
:
"_self"
,
icon
:
"fa fa-sign-out"
,
});
}
$scope
.
onAppEvent
(
'$routeUpdate'
,
function
()
{
$scope
.
updateState
();
});
$scope
.
onAppEvent
(
'$routeChangeSuccess'
,
function
()
{
$scope
.
updateState
();
});
$scope
.
updateState
=
function
()
{
var
currentPath
=
config
.
appSubUrl
+
$location
.
path
();
var
search
=
$location
.
search
();
var
activeIndex
;
_
.
each
(
$scope
.
menu
,
function
(
item
,
index
)
{
_
.
each
(
$scope
.
menu
,
function
(
item
)
{
item
.
active
=
false
;
if
(
item
.
href
===
currentPath
)
{
item
.
active
=
true
;
activeIndex
=
index
;
}
if
(
item
.
startsWith
)
{
if
(
currentPath
.
indexOf
(
item
.
startsWith
)
===
0
)
{
item
.
active
=
true
;
item
.
href
=
currentPath
;
activeIndex
=
index
;
}
}
...
...
@@ -124,7 +98,6 @@ function (angular, _, $, config) {
});
});
//$scope.menu.splice(0, 0, $scope.menu.splice(activeIndex, 1)[0]);
};
$scope
.
init
=
function
()
{
...
...
src/app/partials/sidemenu.html
View file @
dfef4727
<div
ng-controller=
"SideMenuCtrl"
ng-init=
"init()"
>
<ul
class=
"sidemenu"
>
<li
style=
"margin-bottom:
15
px;"
>
<li
style=
"margin-bottom:
2
px;"
>
<a
class=
"pointer sidemenu-top-btn"
ng-click=
"toggleSideMenu()"
>
<img
class=
"logo-icon"
src=
"img/fav32.png"
></img>
<i
class=
"pull-right fa fa-angle-left"
></i>
</a>
</li>
<li
ng-repeat=
"item in menu"
ng-class=
"{'active': item.active}"
>
<li
ng-repeat=
"item in menu"
>
<a
href=
"{{item.href}}"
class=
"sidemenu-item"
target=
"{{item.target}}"
>
<span
class=
"sidemenu-icon"
><i
class=
"{{item.icon}}"
></i></span>
<span
class=
"sidemenu-item-text"
>
{{item.text}}
</span>
</a>
</li>
<!-- <li ng-repeat-end ng-if="item.active"> -->
<!-- <ul class="sidemenu-links"> -->
<!-- <li ng-repeat="link in item.links"> -->
<!-- <a href="{{link.href}}" class="sidemenu-link" ng-class="{active: link.active}"><i class="fa fa-angle-right"></i>{{link.text}}</a> -->
<!-- </li> -->
<!-- </ul> -->
<!-- </li> -->
<li
ng-if=
"grafana.user.isSignedIn"
style=
"margin-top:50px"
>
<a
href=
"profile"
class=
"sidemenu-item sidemenu-user"
>
<img
ng-src=
"{{grafana.user.gravatarUrl}}"
>
<span
class=
"sidemenu-item-text"
>
{{grafana.user.name}}
</a>
</a>
</li>
<li
ng-if=
"grafana.user.isSignedIn"
>
<a
href=
"logout"
class=
"sidemenu-item"
target=
"_self"
>
<span
class=
"sidemenu-item-text no-icon"
>
Sign out
</span>
</a>
</li>
<li
ng-if=
"!grafana.user.isSignedIn"
style=
"margin-top:50px"
>
<a
href=
"/login"
class=
"sidemenu-item"
target=
"_self"
>
<span
class=
"sidemenu-icon"
><i
class=
"fa fa-sign-in"
></i></span>
<span
class=
"sidemenu-item-text"
>
Sign in
</span>
</a>
</li>
<!-- <li class="dropdown" ng-if="grafana.user.isSignedIn"> -->
<!-- <a class="sidemenu-user pointer" data-toggle="dropdown" title="{{grafana.user.email}}"> -->
<!-- <span class="gravatar-missing">f</span> -->
<!-- <img ng-src="{{grafana.user.gravatarUrl}}" width="35"> -->
<!-- <span class="gravatar-email small">{{grafana.user.login}}</span> -->
<!-- </a> -->
<!-- <ul class="dropdown-menu"> -->
<!-- <li><a href="{{appSubUrl}}/?logout">Logout</a></li> -->
<!-- </ul> -->
<!-- </li> -->
</ul>
</div>
src/css/less/panel.less
View file @
dfef4727
...
...
@@ -6,7 +6,7 @@
}
.panel-margin {
margin:
4
px;
margin:
5
px;
display: block;
}
...
...
src/css/less/sidemenu.less
View file @
dfef4727
...
...
@@ -31,31 +31,31 @@
list-style: none;
margin: 0;
padding: 0;
li {
height: 50px;
}
}
.sidemenu-user {
padding: 8px 10px 7px 15px;
display: block;
width: 170px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
.gravatar-missing {
display: none;
}
.gravatar-email {
padding-left: 4px;
.sidemenu-item-text {
width: 110px;
display: inline-block;
vertical-align: middle;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
img {
width: 35px;
padding-right: 10px;
border-radius: 50%;
width: 40px;
height: 40px;
box-shadow: 0 0 14px 2px rgba(255,255,255, 0.05);
}
border-bottom: 1px solid black;
}
.sidemenu-top-btn {
display: block;
padding: 14px 0px 10px 2
0
px;
padding: 14px 0px 10px 2
7
px;
background: @grafanaTargetBackground;
border: 1px solid rgb(55, 54, 54);
i {
...
...
@@ -67,30 +67,36 @@
.sidemenu-icon {
border-radius: 50%;
background:
black
;
box-shadow: 0 0 1
0px 6px #2E2E2E
;
width:
35
px;
height:
35
px;
background:
#000
;
box-shadow: 0 0 1
4px 2px rgba(255,255,255, 0.05)
;
width:
40
px;
height:
40
px;
display: inline-block;
i {
color: @textColor;
opacity: .7;
position: relative;
left:
9
px;
top:
2
px;
font-size: 1
20
%;
left:
11
px;
top:
5
px;
font-size: 1
35
%;
}
}
.sidemenu-item {
color:
@orange
;
color:
#f80
;
line-height: 34px;
padding: 14px 10px 14px 20px;
font-weight: bold;
padding: 14px 10px 14px 20px;
display: block;
display: block;
.sidemenu-item-text {
padding-left: 15px;
text-shadow: 1px 0px 10px @orange;
&.no-icon {
padding-left: 59px;
}
//text-shadow: 1px 0 10px #A25803;
//text-shadow: 1px 0 10px #f80;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment