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
9ed45ba7
Commit
9ed45ba7
authored
Feb 20, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ux(): clean / simplify markup and css for navbar button
parent
52241b8e
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
58 additions
and
125 deletions
+58
-125
public/app/core/components/navbar/navbar.html
+11
-14
public/app/core/components/navbar/navbar.ts
+0
-23
public/app/features/dashboard/dashnav/dashnav.html
+5
-7
public/sass/_old_responsive.scss
+3
-3
public/sass/_variables.scss
+1
-1
public/sass/components/_dashboard.scss
+1
-1
public/sass/components/_navbar.scss
+31
-66
public/sass/components/_sidemenu.scss
+6
-10
No files found.
public/app/core/components/navbar/navbar.html
View file @
9ed45ba7
<div
class=
"navbar-inner"
>
<div
class=
"top-nav-btn top-nav-menu-btn"
>
<a
class=
"pointer"
ng-click=
"ctrl.contextSrv.toggleSideMenu()"
>
<span
class=
"top-nav-logo-background"
>
<img
class=
"logo-icon"
src=
"public/img/grafana_icon.svg"
></img>
</span>
<i
class=
"icon-gf icon-gf-grafana_wordmark"
></i>
<i
class=
"fa fa-caret-down"
></i>
</a>
</div>
<a
class=
"navbar-brand-btn pointer"
ng-click=
"ctrl.contextSrv.toggleSideMenu()"
>
<span
class=
"navbar-brand-btn-background"
>
<img
src=
"public/img/grafana_icon.svg"
></img>
</span>
<i
class=
"icon-gf icon-gf-grafana_wordmark"
></i>
<i
class=
"fa fa-caret-down"
></i>
</a>
<div
ng-if=
"ctrl.title"
>
<nav-button
title=
"{{ctrl.title}}"
title-url=
"{{ctrl.titleUrl}}"
icon=
"{{ctrl.icon}}"
>
</nav-button>
</div>
<a
href=
"{{::ctrl.titleUrl}}"
class=
"navbar-page-btn"
ng-show=
"ctrl.title"
>
<i
class=
"{{::ctrl.icon}}"
></i>
{{::ctrl.title}}
</a>
<div
ng-transclude
></div>
</div>
public/app/core/components/navbar/navbar.ts
View file @
9ed45ba7
...
...
@@ -30,28 +30,5 @@ export function navbarDirective() {
};
}
var
navButtonTemplate
=
`
<div class="top-nav-btn dashnav-dashboards-btn">
<a href="{{::titleUrl}}">
<i class="{{::icon}}"></i>
<span class="dashboard-title">{{::title}}</span>
</a>
</div>
`
;
function
navButton
()
{
return
{
restrict
:
'E'
,
template
:
navButtonTemplate
,
scope
:
{
title
:
"@"
,
titleUrl
:
"@"
,
},
link
:
function
(
scope
,
elem
,
attrs
,
ctrl
)
{
scope
.
icon
=
attrs
.
icon
;
}
};
}
coreModule
.
directive
(
'navbar'
,
navbarDirective
);
coreModule
.
directive
(
'navButton'
,
navButton
);
public/app/features/dashboard/dashnav/dashnav.html
View file @
9ed45ba7
<navbar>
<div
class=
"top-nav-btn dashnav-dashboards-btn"
ng-if=
"!dashboardMeta.isSnapshot"
>
<a
class=
"pointer"
ng-click=
"openSearch()"
>
<i
class=
"icon-gf icon-gf-dashboard"
></i>
<span
class=
"dashboard-title"
>
{{dashboard.title}}
</span>
<i
class=
"fa fa-caret-down"
></i>
</a>
</div>
<a
class=
"pointer navbar-page-btn"
ng-show=
"!dashboardMeta.isSnapshot"
ng-click=
"openSearch()"
>
<i
class=
"icon-gf icon-gf-dashboard"
></i>
<span>
{{dashboard.title}}
</span>
<i
class=
"fa fa-caret-down"
></i>
</a>
<div
class=
"top-nav-btn dashnav-dashboards-btn"
ng-if=
"dashboardMeta.isSnapshot"
>
<a
class=
"pointer"
bs-tooltip=
"titleTooltip"
data-placement=
"bottom"
ng-click=
"openSearch()"
>
...
...
public/sass/_old_responsive.scss
View file @
9ed45ba7
...
...
@@ -17,7 +17,7 @@
body
{
padding
:
0
;
}
.
dashnav-dashboards-btn
a
{
.
page-dashboard
.navbar-page-btn
{
max-width
:
200px
;
}
.gf-timepicker-nav-btn
{
...
...
@@ -34,7 +34,7 @@
// form styles
@include
media-breakpoint-up
(
md
)
{
.
dashnav-dashboards-btn
a
{
.
page-dashboard
.navbar-page-btn
{
max-width
:
180px
;
}
.gf-timepicker-nav-btn
{
...
...
@@ -51,7 +51,7 @@
}
@include
media-breakpoint-up
(
lg
)
{
.
dashnav-dashboards-btn
a
{
.
page-dashboard
.navbar-page-btn
{
max-width
:
290px
;
}
.gf-timepicker-nav-btn
{
...
...
public/sass/_variables.scss
View file @
9ed45ba7
...
...
@@ -211,4 +211,4 @@ $btn-padding-y-lg: .75rem !default;
$btn-border-radius
:
3px
;
// sidemenu
$side-menu-width
:
1
5
rem
;
$side-menu-width
:
1
4
rem
;
public/sass/components/_dashboard.scss
View file @
9ed45ba7
...
...
@@ -58,7 +58,7 @@
.row-open
{
margin-top
:
5px
;
left
:
-
28
px
;
left
:
-
30
px
;
position
:
absolute
;
z-index
:
100
;
transition
:
.10s
left
;
...
...
public/sass/components/_navbar.scss
View file @
9ed45ba7
...
...
@@ -56,52 +56,30 @@
background-color
:
$navbarLinkBackgroundActive
;
}
.fa.top-nav-breadcrumb-icon
{
margin
:
18px
0
6px
5px
;
float
:
left
;
font-size
:
120%
;
color
:
$text-color
;
}
.top-nav-btn
{
.navbar-brand-btn
{
display
:
block
;
position
:
relative
;
float
:
left
;
margin
:
0
;
font-size
:
1
.4em
;
border-right
:
1px
solid
$tight-form-border
;
background-color
:
$navbarButtonBackground
;
padding
:
0
.6rem
1
.0rem
0
.5rem
1rem
;
.fa-caret-down
{
font-size
:
55%
;
position
:
absolute
;
right
:
8px
;
top
:
23px
;
margin-right
:
2px
;
font-size
:
70%
;
}
a
{
color
:
darken
(
$link-color
,
5%
);
background-color
:
$navbarButtonBackground
;
display
:
inline-block
;
&
:hover
{
background
:
$navbarButtonBackgroundHighlight
;
color
:
$link-color
;
// border-bottom: 1px solid $blue;
}
&
:hover
{
background
:
$navbarButtonBackgroundHighlight
;
}
}
.top-nav-menu-btn
{
a
{
padding
:
7px
20px
6px
13px
;
}
img
{
width
:
30px
;
position
:
relative
;
top
:
-2px
;
}
.top-nav-logo-background
{
.navbar-brand-btn-background
{
display
:
inline-block
;
border
:
1px
solid
$body-bg
;
padding
:
4px
;
...
...
@@ -110,6 +88,7 @@
width
:
40px
;
height
:
40px
;
}
.icon-gf-grafana_wordmark
{
font-size
:
21px
;
position
:
relative
;
...
...
@@ -119,13 +98,28 @@
}
}
.dashnav-dashboards-btn
{
a
{
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;
display
:
block
;
padding
:
11px
17px
12px
13px
;
.navbar-page-btn
{
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;
float
:
left
;
display
:
block
;
margin
:
0
;
font-size
:
1
.4em
;
border-right
:
1px
solid
$tight-form-border
;
color
:
darken
(
$link-color
,
5%
);
background-color
:
$navbarButtonBackground
;
font-size
:
$font-size-lg
;
padding
:
1rem
0
.8rem
;
&
:hover
{
background
:
$navbarButtonBackgroundHighlight
;
color
:
$link-color
;
}
.fa-caret-down
{
font-size
:
60%
;
padding-left
:
0
.2rem
;
}
.fa-th-large
{
...
...
@@ -141,32 +135,3 @@
}
}
.dashboard-title
{
padding
:
0
0
.4rem
0
0
.5rem
;
font-size
:
$font-size-lg
;
}
.top-nav-icon
{
margin
:
5px
0px
0
11px
;
line-height
:
41px
;
float
:
left
;
}
.top-nav-section
{
display
:
block
;
float
:
left
;
padding
:
19px
9px
8px
0
;
font-weight
:
bold
;
i
{
padding-left
:
8px
;
}
}
.top-nav-title
{
display
:
block
;
float
:
left
;
font-size
:
17px
;
padding
:
18px
10px
10px
13px
;
color
:
$link-color
;
}
public/sass/components/_sidemenu.scss
View file @
9ed45ba7
...
...
@@ -30,16 +30,15 @@
min-height
:
calc
(
100%
-
54px
);
}
.dashboard-container
{
padding-left
:
$side-menu-width
;
padding-left
:
$side-menu-width
+
0
.2rem
;
}
.page-container
{
margin-left
:
$side-menu-width
;
}
.top-nav-menu-btn
{
a
{
background-color
:
$page-bg
;
width
:
$side-menu-width
;
}
.navbar-brand-btn
{
background-color
:
$page-bg
;
width
:
$side-menu-width
;
.icon-gf-grafana_wordmark
{
display
:
inline-block
;
}
...
...
@@ -47,9 +46,6 @@
display
:
none
;
}
}
.sidemenu-org
{
box-shadow
:
none
;
}
.search-container
{
left
:
auto
;
}
...
...
@@ -176,7 +172,7 @@
.sidemenu
.fa-caret-right
{
position
:
absolute
;
top
:
38%
;
right
:
25
px
;
right
:
6
px
;
font-size
:
14px
;
color
:
$link-color
;
}
...
...
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