Skip to content

Commit

Permalink
添加highlightStyle
Browse files Browse the repository at this point in the history
  • Loading branch information
ksky521 committed Jul 27, 2014
1 parent 0023d62 commit acac11a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion assets/css/nodeppt2.0.css

Large diffs are not rendered by default.

19 changes: 8 additions & 11 deletions assets/scss/nodeppt2.0.scss
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ $article-content-top-padding: 20px;
}

::-webkit-scrollbar {
height: 16px;
height: 10px;
overflow: visible;
width: 16px;
width: 10px;
}
::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, .1);
Expand Down Expand Up @@ -453,7 +453,7 @@ a {
text-decoration: none;
border-bottom: 1px dashed #FF8C78;
cursor: help;

margin:0 5px;
&:hover {
background-color: #F9FF95;
}
Expand Down Expand Up @@ -502,18 +502,13 @@ ul {
display: block;
li:before {
content: '-';
position: absolute;
margin-left: -1em;
font-weight: 600;
}
}
}

> li:before {
content: '\00B7';
margin-left: -1em;
position: absolute;
font-weight: 600;
}

ul {
margin-top: .5em;
}
Expand All @@ -535,6 +530,7 @@ ul {

pre {
display: inline-block;
overflow: auto;
font-family: 'Source Code Pro', 'Courier New', monospace;
font-size: 20px;
line-height: 1.2em;
Expand Down Expand Up @@ -563,7 +559,8 @@ code{
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
border: 1px solid #ddd;
background-color: #f8f8f8;
padding: 0 5px;
padding: 0 3px;
margin: 0 5px;
vertical-align: middle;
color: #dd1144;
@include text-shadow(none);
Expand Down
5 changes: 3 additions & 2 deletions lib/md_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ var defaultJSON = {
speaker: '',
content: '',
transition: 'kontext',
files: ''
files: '',
highlightStyle: 'monokai_sublime'
};

marked.setOptions({
Expand Down Expand Up @@ -50,7 +51,7 @@ var parser = function(string, callback, argvObj, queryObj) {
var config = require(path.join(libDir, '../package.json'));
json.nodeppt_version = config.version;
json.nodeppt_site = config.site;
json = mix(defaultJSON, json, {
json = mix({}, defaultJSON, json, {
query: mix(queryObj || {}, argvObj || {})
});
if (json.files) {
Expand Down
2 changes: 1 addition & 1 deletion template/markdown.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<link rel="stylesheet" media="all" href="/css/nodeppt2.0.css">
<link rel="stylesheet" media="only screen and (max-device-width: 480px)" href="/css/phone.css">
<link rel="stylesheet" media="print" href="/css/pdf.css">
<link rel="stylesheet" href="/js/highlight/styles/monokai_sublime.css">
<link rel="stylesheet" href="/js/highlight/styles/<%if (hasOwnProperty('highlightStyle') && highlightStyle!=='') { %><%- highlightStyle %><% }else{%>monokai_sublime<%}%>.css">
</head>
<body>
<div class="slides">
Expand Down

0 comments on commit acac11a

Please sign in to comment.