v1.0.0.0729
1. 更新文档显示问题
This commit is contained in:
@@ -34,6 +34,10 @@ xmSelect.render({
|
||||
|
||||
<h3>更新日志</h3>
|
||||
`, js: ``, comment: `
|
||||
[2019-07-29] v1.0.0.0729
|
||||
1. 更新文档显示问题
|
||||
|
||||
|
||||
[2019-07-27] v1.0.0.0727
|
||||
1. 新增单选模式, {radio: true|false}
|
||||
2. 新增重复选模式, {repeat: true|false}
|
||||
|
||||
@@ -4,10 +4,15 @@
|
||||
.syntaxhighlighter .toolbar a{display: none!important;}
|
||||
.syntaxhighlighter .line.alt1,.syntaxhighlighter .line.alt2{background-color: #FAFAFA !important;}
|
||||
.syntaxhighlighter{background-color: #FAFAFA !important; padding: 10px; width: calc(100% - 20px) !important; border-radius: 5px;}
|
||||
div.slide{width: 90vw; overflow: auto;}
|
||||
/* div.slide{width: 90vw; overflow: auto;} */
|
||||
h3{font-size: 20px; font-weight: bold; margin-bottom: 20px;}
|
||||
.dcode{margin-top: 100px;}
|
||||
.mt10{margin-top: 10px;}
|
||||
#header{left: 5vw; right: 5vw; top: 20px; position: fixed;}
|
||||
|
||||
p{font-size: 14px; color: #5e6d82; line-height: 1.5em;margin: 15px 0 10px;}
|
||||
a{color: #409eff; text-decoration: none;}
|
||||
#content{height: calc(100vh - 99px); overflow: auto; padding: 10px;}
|
||||
/* #header{left: 5vw; right: 5vw; top: 20px; position: fixed;} */
|
||||
#header{padding: 20px 50px; background-color: #0B0D10; top: 0; left: 0; right: 0; z-index: 99999; border-bottom: 1px solid #DCDFE5;}
|
||||
#header xm-select{background-color: #17191C; color: #FFF;}
|
||||
body{margin: 0;}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
|
||||
var htmls = [], js = [];
|
||||
data.forEach(function(item){
|
||||
data.forEach(function(item, index){
|
||||
htmls.push([
|
||||
'<div class="slide">',
|
||||
'<div class="slide" id="XM'+index+'">',
|
||||
item.html,
|
||||
'<div class="dcode mt10"><script type="syntaxhighlighter" class="brush:html"><![CDATA[',
|
||||
item.comment ? item.comment.replace(/</g, '<') : item.html.replace(/</g, '<'),
|
||||
@@ -17,6 +17,8 @@ data.forEach(function(item){
|
||||
|
||||
var box = $('#content');
|
||||
box.append($(htmls.join('')));
|
||||
// var box = document.getElementById('content');
|
||||
|
||||
|
||||
js.forEach(function(item){
|
||||
eval(item);
|
||||
@@ -26,7 +28,7 @@ SyntaxHighlighter.defaults["quick-code"] = false;
|
||||
SyntaxHighlighter.defaults["gutter"] = false;
|
||||
SyntaxHighlighter.all();
|
||||
|
||||
var ele = new Fathom('#content')
|
||||
// var ele = new Fathom('#content')
|
||||
|
||||
xmSelect.render({
|
||||
el: '#header',
|
||||
@@ -53,6 +55,10 @@ xmSelect.render({
|
||||
radio: true,
|
||||
clickClose: true,
|
||||
on: function(data){
|
||||
data.selected && ele.scrollToSlide($('.slide:nth-child('+(data.item.value + 1)+')'));
|
||||
window.location.hash = '#XM' + data.item.value;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var hash = window.location.hash;
|
||||
window.location.hash = '';
|
||||
window.location.hash = hash;
|
||||
|
||||
Reference in New Issue
Block a user