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
b6c75b10
Unverified
Commit
b6c75b10
authored
Jan 13, 2020
by
Torkel Ödegaard
Committed by
GitHub
Jan 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Login: Refactoring how login background is rendered (#21446)
* Login: Refactoring how login background is rendered * Tweak
parent
27a77f58
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
5 deletions
+18
-5
public/app/core/components/Branding/Branding.tsx
+12
-0
public/app/core/components/Login/LoginPage.tsx
+6
-3
public/sass/pages/_login.scss
+0
-2
No files found.
public/app/core/components/Branding/Branding.tsx
View file @
b6c75b10
import
React
,
{
FC
}
from
'react'
;
import
{
css
,
cx
}
from
'emotion'
;
export
interface
BrandComponentProps
{
className
?:
string
;
children
?:
JSX
.
Element
|
JSX
.
Element
[];
}
export
const
LoginLogo
:
FC
<
BrandComponentProps
>
=
({
className
})
=>
{
...
...
@@ -13,11 +15,21 @@ export const LoginLogo: FC<BrandComponentProps> = ({ className }) => {
);
};
export
const
LoginBackground
:
FC
<
BrandComponentProps
>
=
({
className
,
children
})
=>
{
const
background
=
css
`
background: url(public/img/heatmap_bg_test.svg);
background-size: cover;
`
;
return
<
div
className=
{
cx
(
background
,
className
)
}
>
{
children
}
</
div
>;
};
export
const
MenuLogo
:
FC
<
BrandComponentProps
>
=
({
className
})
=>
{
return
<
img
className=
{
className
}
src=
"public/img/grafana_icon.svg"
alt=
"Grafana"
/>;
};
export
class
Branding
{
static
LoginLogo
=
LoginLogo
;
static
LoginBackground
=
LoginBackground
;
static
MenuLogo
=
MenuLogo
;
}
public/app/core/components/Login/LoginPage.tsx
View file @
b6c75b10
// Libraries
import
React
,
{
FC
}
from
'react'
;
import
{
CSSTransition
}
from
'react-transition-group'
;
// Components
import
{
UserSignup
}
from
'./UserSignup'
;
import
{
LoginServiceButtons
}
from
'./LoginServiceButtons'
;
import
LoginCtrl
from
'./LoginCtrl'
;
import
{
LoginForm
}
from
'./LoginForm'
;
import
{
ChangePassword
}
from
'./ChangePassword'
;
import
{
CSSTransition
}
from
'react-transition-group'
;
import
{
Branding
}
from
'app/core/components/Branding/Branding'
;
export
const
LoginPage
:
FC
=
()
=>
{
return
(
<
div
className=
"login container"
>
<
Branding
.
LoginBackground
className=
"login container"
>
<
div
className=
"login-content"
>
<
div
className=
"login-branding"
>
<
Branding
.
LoginLogo
className=
"logo-icon"
/>
...
...
@@ -59,6 +62,6 @@ export const LoginPage: FC = () => {
<
div
className=
"clearfix"
/>
</
div
>
</
div
>
</
Branding
.
LoginBackground
>
);
};
public/sass/pages/_login.scss
View file @
b6c75b10
...
...
@@ -10,8 +10,6 @@ $login-border: #8daac5;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
background-image
:
url(../img/heatmap_bg_test.svg)
;
background-size
:
cover
;
color
:
#d8d9da
;
&
a
{
...
...
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