Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
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
Jacklull
wiki-js
Commits
06b49e03
You need to sign in or sign up before continuing.
Commit
06b49e03
authored
Jul 01, 2017
by
NGPixel
Committed by
Nicolas Giard
Jul 09, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: Dark/Light Theme support for code blocks
parent
8cf3f6f0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
1 deletion
+53
-1
markdown-content.scss
client/scss/components/markdown-content.scss
+52
-0
view.pug
server/views/pages/view.pug
+1
-1
No files found.
client/scss/components/markdown-content.scss
View file @
06b49e03
...
...
@@ -281,6 +281,58 @@
}
&
.is-code-dark
{
pre
,
pre
.hljs
{
background-color
:
mc
(
'blue-grey'
,
'900'
);
border-left-color
:
mc
(
'blue-grey'
,
'500'
);
>
code
{
color
:
mc
(
'blue-grey'
,
'100'
);
}
}
}
&
.is-code-light
{
@import
'node_modules/highlight.js/styles/atom-one-light'
;
pre
,
pre
.hljs
{
background-color
:
lighten
(
mc
(
'blue-grey'
,
'50'
)
,
3%
);
border-left
:
7px
solid
mc
(
'blue-grey'
,
'100'
);
border-top
:
1px
solid
mc
(
'blue-grey'
,
'100'
);
border-bottom
:
1px
solid
mc
(
'blue-grey'
,
'100'
);
>
code
{
color
:
mc
(
'blue-grey'
,
'800'
);
}
}
}
&
.is-code-dark
,
&
.is-code-light
{
pre
,
pre
.hljs
{
padding
:
20px
20px
20px
13px
;
font-family
:
$core-font-monospace
;
white-space
:
pre
;
overflow-x
:
auto
;
>
code
{
border-radius
:
5px
;
font-weight
:
400
;
background-color
:
transparent
;
padding
:
0
;
font-family
:
$core-font-monospace
;
font-size
:
13px
;
}
&
+
p
{
padding-top
:
1em
;
}
&
+
h1
,
&
+
h2
,
&
+
h3
{
margin-top
:
1px
;
}
}
}
.align-right
{
float
:right
;
margin
:
0
0
10px
10px
;
...
...
server/views/pages/view.pug
View file @
06b49e03
...
...
@@ -77,7 +77,7 @@ block content
h1.title#title= pageData.meta.title
if pageData.meta.subtitle
h2.subtitle= pageData.meta.subtitle
.content.mkcontent(v-pre)
.content.mkcontent(v-pre
, class=[appconfig.theme.code.dark ? 'is-code-dark' : 'is-code-light']
)
!= pageData.html
modal-create-page(basepath=pageData.meta.path)
...
...
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