1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-24 10:22:23 +00:00

refact: edit banner

This commit is contained in:
ruanyf 2019-10-15 18:45:13 +08:00
parent 4ebdc52dfb
commit 247a499d6e

View File

@ -95,7 +95,7 @@ function init_sidebar_section() {
}
location.hash = menu[i + 1];
});
create_banner($(ditto.sidebar_id).find('p:nth-child(3)').first());
// create_banner($(ditto.sidebar_id).find('p:nth-child(3)').first());
}, "text").fail(function() {
alert("Opps! can't find the sidebar file to display!");
@ -219,12 +219,13 @@ function create_banner(element) {
'padding: 1em',
'background-color: #c4e0e1',
'border-radius: 5px',
'font-size: 75%',
'width: 210px',
'font-size: 90%',
// 'font-size: 75%',
// 'width: 210px',
'color: #333333'
].join(';');
var text = '<span style="color: #4682BE;">ES6 实战教程</span> ' +
var text = '<span style="color: #4682BE;">ES6 实战教程</span> ' +
'深入学习一线大厂必备 ES6 技能。VIP 教程限时免费领取。' +
'<span style="color: #4682BE;"> ⇐ 立即查看</span>';
@ -269,7 +270,7 @@ function create_page_anchors() {
.addClass('content-toc')
.attr('id', 'content-toc');
// create_banner(ul_tag);
create_banner(ul_tag);
for (var j = 0; j < headers.length; j++) {
var li_tag = $('<li></li>').html('<a href="#' + location.hash.split('#')[1] + '#' + headers[j] + '">' + headers[j] + '</a>');