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
ff239470
Commit
ff239470
authored
Jun 08, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ux: very early start to new sidemenu
parent
ef9fa7b0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
42 deletions
+47
-42
public/app/core/components/sidemenu/sidemenu.html
+34
-30
public/sass/components/_sidemenu.scss
+13
-12
No files found.
public/app/core/components/sidemenu/sidemenu.html
View file @
ff239470
<ul
class=
"sidemenu"
>
<ul
class=
"sidemenu"
>
<li
ng-repeat=
"item in ::ctrl.mainLinks"
class=
"dropdown"
>
<a
href=
"{{::item.url}}"
class=
"sidemenu-item sidemenu-main-link"
target=
"{{::item.target}}"
>
<span
class=
"icon-circle sidemenu-icon"
>
<i
class=
"{{::item.icon}}"
ng-show=
"::item.icon"
></i>
<img
ng-src=
"{{::item.img}}"
ng-show=
"::item.img"
>
</span>
</a>
<ul
class=
"dropdown-menu"
role=
"menu"
ng-if=
"::item.children"
>
<li
class=
"side-menu-header"
>
<span
class=
"sidemenu-item-text"
>
{{::item.text}}
</span>
</li>
<li
ng-repeat=
"child in ::item.children"
ng-class=
"{divider: child.divider}"
>
<a
href=
"{{::child.url}}"
>
<i
class=
"{{::child.icon}}"
ng-show=
"::child.icon"
></i>
{{::child.text}}
</a>
</li>
</ul>
</li>
<li
ng-show=
"::!ctrl.isSignedIn"
>
<a
href=
"{{ctrl.loginUrl}}"
class=
"sidemenu-item"
target=
"_self"
>
<span
class=
"icon-circle sidemenu-icon"
><i
class=
"fa fa-fw fa-sign-in"
></i></span>
<span
class=
"sidemenu-item-text"
>
Sign in
</span>
</a>
</li>
<li
class=
"sidemenu-org-section"
ng-if=
"::ctrl.isSignedIn"
class=
"dropdown"
>
<li
class=
"sidemenu-org-section"
ng-if=
"::ctrl.isSignedIn"
class=
"dropdown"
>
<a
class=
"sidemenu-
org
"
href=
"profile"
>
<a
class=
"sidemenu-
item sidemenu-main-link
"
href=
"profile"
>
<
div
class=
"
sidemenu-org-avatar"
>
<
span
class=
"icon-circle sidemenu-icon
sidemenu-org-avatar"
>
<img
ng-src=
"{{::ctrl.user.gravatarUrl}}"
>
<img
ng-src=
"{{::ctrl.user.gravatarUrl}}"
>
<span
class=
"sidemenu-org-avatar--missing"
>
<span
class=
"sidemenu-org-avatar--missing"
>
<i
class=
"fa fa-fw fa-user"
></i>
<i
class=
"fa fa-fw fa-user"
></i>
</span>
</span>
</div>
</div>
<div
class=
"sidemenu-org-details"
>
<span
class=
"sidemenu-org-user sidemenu-item-text"
>
{{::ctrl.user.name}}
</span>
<span
class=
"sidemenu-org-name sidemenu-item-text"
>
{{::ctrl.user.orgName}}
</span>
</div>
</a>
</a>
<ul
class=
"dropdown-menu"
role=
"menu"
>
<ul
class=
"dropdown-menu"
role=
"menu"
>
<li
class=
"side-menu-header"
>
<span
class=
"sidemenu-org-user sidemenu-item-text"
>
{{::ctrl.user.name}}
</span>
<span
class=
"sidemenu-org-name sidemenu-item-text"
>
{{::ctrl.user.orgName}}
</span>
</li>
<li
ng-repeat=
"menuItem in ctrl.orgMenu"
ng-class=
"::menuItem.cssClass"
>
<li
ng-repeat=
"menuItem in ctrl.orgMenu"
ng-class=
"::menuItem.cssClass"
>
<span
ng-show=
"::menuItem.section"
>
{{::menuItem.section}}
</span>
<span
ng-show=
"::menuItem.section"
>
{{::menuItem.section}}
</span>
<a
href=
"{{::menuItem.url}}"
ng-show=
"::menuItem.url"
target=
"{{::menuItem.target}}"
>
<a
href=
"{{::menuItem.url}}"
ng-show=
"::menuItem.url"
target=
"{{::menuItem.target}}"
>
...
@@ -34,30 +62,6 @@
...
@@ -34,30 +62,6 @@
</ul>
</ul>
</li>
</li>
<li
ng-repeat=
"item in ::ctrl.mainLinks"
class=
"dropdown"
>
<a
href=
"{{::item.url}}"
class=
"sidemenu-item sidemenu-main-link"
target=
"{{::item.target}}"
>
<span
class=
"icon-circle sidemenu-icon"
>
<i
class=
"{{::item.icon}}"
ng-show=
"::item.icon"
></i>
<img
ng-src=
"{{::item.img}}"
ng-show=
"::item.img"
>
</span>
<span
class=
"sidemenu-item-text"
>
{{::item.text}}
</span>
</a>
<ul
class=
"dropdown-menu"
role=
"menu"
ng-if=
"::item.children"
>
<li
ng-repeat=
"child in ::item.children"
ng-class=
"{divider: child.divider}"
>
<a
href=
"{{::child.url}}"
>
<i
class=
"{{::child.icon}}"
ng-show=
"::child.icon"
></i>
{{::child.text}}
</a>
</li>
</ul>
</li>
<li
ng-show=
"::!ctrl.isSignedIn"
>
<a
href=
"{{ctrl.loginUrl}}"
class=
"sidemenu-item"
target=
"_self"
>
<span
class=
"icon-circle sidemenu-icon"
><i
class=
"fa fa-fw fa-sign-in"
></i></span>
<span
class=
"sidemenu-item-text"
>
Sign in
</span>
</a>
</li>
<li>
<li>
<a
class=
"sidemenu-item"
target=
"_self"
ng-hide=
"ctrl.contextSrv.pinned"
ng-click=
"ctrl.contextSrv.setPinnedState(true)"
>
<a
class=
"sidemenu-item"
target=
"_self"
ng-hide=
"ctrl.contextSrv.pinned"
ng-click=
"ctrl.contextSrv.setPinnedState(true)"
>
...
...
public/sass/components/_sidemenu.scss
View file @
ff239470
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
position
:
absolute
;
position
:
absolute
;
top
:
52px
;
top
:
52px
;
left
:
0
;
left
:
0
;
border-top
:
1px
solid
$
navbarB
order
;
border-top
:
1px
solid
$
tight-form-b
order
;
width
:
$side-menu-width
;
width
:
$side-menu-width
;
background-color
:
$side-menu-bg
;
background-color
:
$side-menu-bg
;
z-index
:
1000
;
z-index
:
1000
;
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
// again by the mouse getting outside the hover space
// again by the mouse getting outside the hover space
left
:
$side-menu-width
-
5px
;
left
:
$side-menu-width
-
5px
;
background-color
:
$side-menu-bg
;
background-color
:
$side-menu-bg
;
@include
animation
(
'dropdown-anim
150ms ease-in-out 10
0ms forwards'
);
@include
animation
(
'dropdown-anim
0ms ease-in-out
0ms forwards'
);
z-index
:
-9999
;
z-index
:
-9999
;
}
}
}
}
...
@@ -121,7 +121,6 @@
...
@@ -121,7 +121,6 @@
border-left
:
1px
solid
transparent
;
border-left
:
1px
solid
transparent
;
position
:
relative
;
position
:
relative
;
.sidemenu-item-text
{
.sidemenu-item-text
{
padding-left
:
11px
;
padding-left
:
11px
;
position
:
absolute
;
position
:
absolute
;
...
@@ -145,6 +144,12 @@
...
@@ -145,6 +144,12 @@
}
}
}
}
.side-menu-header
{
padding
:
8px
10px
8px
10px
;
background-color
:
$side-menu-item-hover-bg
;
font-size
:
18px
;
}
.sidemenu-org-section
.dropdown-menu-title
{
.sidemenu-org-section
.dropdown-menu-title
{
margin
:
0
10px
0
6px
;
margin
:
0
10px
0
6px
;
padding
:
7px
0
7px
;
padding
:
7px
0
7px
;
...
@@ -194,25 +199,21 @@
...
@@ -194,25 +199,21 @@
}
}
.sidemenu-org-avatar
{
.sidemenu-org-avatar
{
width
:
40px
;
height
:
40px
;
background-color
:
$gray-2
;
border-radius
:
50%
;
text-align
:
center
;
>
img
{
>
img
{
position
:
absolute
;
position
:
absolute
;
width
:
40
px
;
width
:
35
px
;
height
:
40
px
;
height
:
35
px
;
border-radius
:
50%
;
border-radius
:
50%
;
left
:
14px
;
left
:
14px
;
top
:
12px
;
z-index
:
10
;
}
}
}
}
.sidemenu-org-avatar--missing
{
.sidemenu-org-avatar--missing
{
color
:
$gray-4
;
color
:
$gray-4
;
text-shadow
:
0
1px
0
$dark-1
;
text-shadow
:
0
1px
0
$dark-1
;
line-height
:
40
px
;
line-height
:
28
px
;
font-size
:
$font-size-lg
;
font-size
:
$font-size-lg
;
}
}
...
...
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