Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
fe313515
Commit
fe313515
authored
Feb 19, 2019
by
Grandschtroumpf
Committed by
yann300
Mar 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add themeVariable for scrollbar
parent
f8c7308c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
theme-chooser.js
src/app/ui/styles-guide/theme-chooser.js
+11
-0
No files found.
src/app/ui/styles-guide/theme-chooser.js
View file @
fe313515
...
@@ -10,6 +10,12 @@ const themes = {
...
@@ -10,6 +10,12 @@ const themes = {
light
:
'https://bootstrap.themes.guide/herbie/theme.min.css'
,
light
:
'https://bootstrap.themes.guide/herbie/theme.min.css'
,
clean
:
'https://bootstrap.themes.guide/signal/theme.min.css'
clean
:
'https://bootstrap.themes.guide/signal/theme.min.css'
}
}
// Used for the scroll color
const
themeVariable
=
{
dark
:
'dark'
,
light
:
'light'
,
clean
:
'light'
}
module
.
exports
=
{
module
.
exports
=
{
chooser
:
function
()
{
chooser
:
function
()
{
...
@@ -17,16 +23,20 @@ module.exports = {
...
@@ -17,16 +23,20 @@ module.exports = {
if
(
themeStorage
.
exists
(
'theme'
))
{
if
(
themeStorage
.
exists
(
'theme'
))
{
if
(
themeStorage
.
get
(
'theme'
)
===
'dark'
)
{
if
(
themeStorage
.
get
(
'theme'
)
===
'dark'
)
{
document
.
getElementById
(
'theme-link'
).
setAttribute
(
'href'
,
themes
[
'dark'
])
document
.
getElementById
(
'theme-link'
).
setAttribute
(
'href'
,
themes
[
'dark'
])
document
.
documentElement
.
style
.
setProperty
(
'--theme'
,
'dark'
)
return
styleGuideDark
()
return
styleGuideDark
()
}
else
if
(
themeStorage
.
get
(
'theme'
)
===
'clean'
)
{
}
else
if
(
themeStorage
.
get
(
'theme'
)
===
'clean'
)
{
document
.
getElementById
(
'theme-link'
).
setAttribute
(
'href'
,
themes
[
'clean'
])
document
.
getElementById
(
'theme-link'
).
setAttribute
(
'href'
,
themes
[
'clean'
])
document
.
documentElement
.
style
.
setProperty
(
'--theme'
,
'light'
)
return
styleGuideClean
()
return
styleGuideClean
()
}
else
{
}
else
{
document
.
getElementById
(
'theme-link'
).
setAttribute
(
'href'
,
themes
[
'light'
])
document
.
getElementById
(
'theme-link'
).
setAttribute
(
'href'
,
themes
[
'light'
])
document
.
documentElement
.
style
.
setProperty
(
'--theme'
,
'light'
)
return
styleGuideLight
()
return
styleGuideLight
()
}
}
}
else
{
}
else
{
document
.
getElementById
(
'theme-link'
).
setAttribute
(
'href'
,
themes
[
'light'
])
document
.
getElementById
(
'theme-link'
).
setAttribute
(
'href'
,
themes
[
'light'
])
document
.
documentElement
.
style
.
setProperty
(
'--theme'
,
'light'
)
return
styleGuideLight
()
return
styleGuideLight
()
}
}
},
},
...
@@ -36,6 +46,7 @@ module.exports = {
...
@@ -36,6 +46,7 @@ module.exports = {
themeStorage
.
set
(
'theme'
,
theme
)
themeStorage
.
set
(
'theme'
,
theme
)
if
(
themes
[
theme
])
{
if
(
themes
[
theme
])
{
document
.
getElementById
(
'theme-link'
).
setAttribute
(
'href'
,
themes
[
theme
])
document
.
getElementById
(
'theme-link'
).
setAttribute
(
'href'
,
themes
[
theme
])
document
.
documentElement
.
style
.
setProperty
(
'--theme'
,
themeVariable
[
theme
])
}
}
// if (theme === 'dark') {
// if (theme === 'dark') {
// return styleGuideDark()
// return styleGuideDark()
...
...
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