Skip to content

Commit acac11a

Browse files
committed
添加highlightStyle
1 parent 0023d62 commit acac11a

File tree

4 files changed

+13
-15
lines changed

4 files changed

+13
-15
lines changed

assets/css/nodeppt2.0.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/scss/nodeppt2.0.scss

+8-11
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ $article-content-top-padding: 20px;
9696
}
9797

9898
::-webkit-scrollbar {
99-
height: 16px;
99+
height: 10px;
100100
overflow: visible;
101-
width: 16px;
101+
width: 10px;
102102
}
103103
::-webkit-scrollbar-thumb {
104104
background-color: rgba(0, 0, 0, .1);
@@ -453,7 +453,7 @@ a {
453453
text-decoration: none;
454454
border-bottom: 1px dashed #FF8C78;
455455
cursor: help;
456-
456+
margin:0 5px;
457457
&:hover {
458458
background-color: #F9FF95;
459459
}
@@ -502,18 +502,13 @@ ul {
502502
display: block;
503503
li:before {
504504
content: '-';
505+
position: absolute;
506+
margin-left: -1em;
505507
font-weight: 600;
506508
}
507509
}
508510
}
509511

510-
> li:before {
511-
content: '\00B7';
512-
margin-left: -1em;
513-
position: absolute;
514-
font-weight: 600;
515-
}
516-
517512
ul {
518513
margin-top: .5em;
519514
}
@@ -535,6 +530,7 @@ ul {
535530

536531
pre {
537532
display: inline-block;
533+
overflow: auto;
538534
font-family: 'Source Code Pro', 'Courier New', monospace;
539535
font-size: 20px;
540536
line-height: 1.2em;
@@ -563,7 +559,8 @@ code{
563559
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
564560
border: 1px solid #ddd;
565561
background-color: #f8f8f8;
566-
padding: 0 5px;
562+
padding: 0 3px;
563+
margin: 0 5px;
567564
vertical-align: middle;
568565
color: #dd1144;
569566
@include text-shadow(none);

lib/md_parser.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ var defaultJSON = {
1717
speaker: '',
1818
content: '',
1919
transition: 'kontext',
20-
files: ''
20+
files: '',
21+
highlightStyle: 'monokai_sublime'
2122
};
2223

2324
marked.setOptions({
@@ -50,7 +51,7 @@ var parser = function(string, callback, argvObj, queryObj) {
5051
var config = require(path.join(libDir, '../package.json'));
5152
json.nodeppt_version = config.version;
5253
json.nodeppt_site = config.site;
53-
json = mix(defaultJSON, json, {
54+
json = mix({}, defaultJSON, json, {
5455
query: mix(queryObj || {}, argvObj || {})
5556
});
5657
if (json.files) {

template/markdown.ejs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<link rel="stylesheet" media="all" href="/css/nodeppt2.0.css">
1212
<link rel="stylesheet" media="only screen and (max-device-width: 480px)" href="/css/phone.css">
1313
<link rel="stylesheet" media="print" href="/css/pdf.css">
14-
<link rel="stylesheet" href="/js/highlight/styles/monokai_sublime.css">
14+
<link rel="stylesheet" href="/js/highlight/styles/<%if (hasOwnProperty('highlightStyle') && highlightStyle!=='') { %><%- highlightStyle %><% }else{%>monokai_sublime<%}%>.css">
1515
</head>
1616
<body>
1717
<div class="slides">

0 commit comments

Comments
 (0)