Skip to content

Commit d11dd1b

Browse files
committed
2 parents 033daba + 89fd1e5 commit d11dd1b

File tree

1 file changed

+0
-87
lines changed

1 file changed

+0
-87
lines changed

_layouts/default-layout.html

Lines changed: 0 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -93,98 +93,11 @@
9393
{%- endif -%}
9494

9595
<script type="text/javascript">
96-
$('#sideBarCnt').css({'width': $('.sideBar').width() + 'px'})
97-
$('.container .head').css({'width': $('.docContainer').width() + 'px'})
98-
99-
$(window).resize(function() {
100-
$('#sideBarCnt').css({'width': $('.sideBar').width() + 'px'})
101-
$('.container .head').css({'width': $('.docContainer').width() + 'px'})
102-
realFunc()
103-
})
104-
105-
window.addEventListener('scroll', realFunc);
106-
107-
function realFunc(){
108-
var sd = $(window).scrollTop();
109-
var dcheight = $('.docContainer').height() + 65 - sd
110-
if (breakpoint() == 'lg') {
111-
if (sd > 65 && dcheight>0) {
112-
if (!$('.subHeadWrapper').hasClass('shw-fixed')) {
113-
$('.subHeadWrapper').addClass('shw-fixed')
114-
$('.docContainer').addClass('dc-fixed')
115-
$('#sideBarCnt').addClass('ftm-fixed')
116-
$('.rightSideMenu').addClass('rsm-fixed')
117-
$('#docHead').addClass('ch-fixed')
118-
}
119-
if (dcheight > document.body.clientHeight) {
120-
$('#sideBarCnt.ftm-fixed').css({'height': 'calc(100vh - 170px)'})
121-
$('.rightSideMenu.rsm-fixed').css({'height': 'calc(100vh - 170px)'})
122-
} else {
123-
$('#sideBarCnt.ftm-fixed').css({'height': (dcheight - 40) + 'px'})
124-
$('.rightSideMenu.rsm-fixed').css({'height': (dcheight - 40) + 'px'})
125-
}
126-
$('.markdown-body').css({'margin-top': (100 + $('.container .head').height()) + 'px'})
127-
} else {
128-
$('.subHeadWrapper').removeClass('shw-fixed')
129-
$('.docContainer').removeClass('dc-fixed')
130-
$('#sideBarCnt').removeClass('ftm-fixed')
131-
$('.rightSideMenu').removeClass('rsm-fixed')
132-
$('.container .head').removeClass('ch-fixed')
133-
$('.markdown-body').css({'margin-top': '40px'})
134-
}
135-
}
136-
if (breakpoint() == 'md') {
137-
if (sd > 65 && dcheight > 0) {
138-
if (!$('.subHeadWrapper').hasClass('shw-fixed')) {
139-
$('.subHeadWrapper').addClass('shw-fixed')
140-
$('.docContainer').addClass('dc-fixed')
141-
$('#sideBarCnt').addClass('ftm-fixed')
142-
$('#docHead').addClass('ch-fixed')
143-
}
144-
$('.markdown-body').css({'margin-top': (100 + $('.container .head').height()) + 'px'})
145-
} else {
146-
$('.subHeadWrapper').removeClass('shw-fixed')
147-
$('.docContainer').removeClass('dc-fixed')
148-
$('#sideBarCnt').removeClass('ftm-fixed')
149-
$('#docHead').removeClass('ch-fixed')
150-
$('.markdown-body').css({'margin-top': '40px'})
151-
}
152-
}
153-
}
154-
155-
$('.sideBarIcon').click(function() {
156-
$(".sideBar").toggleClass('hide-sm');
157-
$(".sideBar").toggleClass('hide-xs');
158-
setTimeout(function() {
159-
console.log('sidebar' + $('.sideBar').width())
160-
$('#sideBarCnt').css({'width': $('.sideBar').width() + 'px'})
161-
}, 100)
162-
})
163-
164-
let timeInt = setInterval(function() {
165-
var container = $('#sideBarCnt'), scrollTo = $('#sideBarCnt .activeLink');
166-
console.log(scrollTo)
167-
if (scrollTo.length>0) {
168-
container.scrollTop(
169-
scrollTo.offset().top - container.offset().top + container.scrollTop()
170-
);
171-
clearInterval(timeInt)
172-
}
173-
}, 500)
174-
175-
function onSearchFinish(e) {
176-
var evt = window.event || e;
177-
if (evt.keyCode == 13) {
178-
179-
}
180-
}
181-
18296
$('#txtSearch').keydown(function(e) {
18397
if (e.keyCode == 13) {
18498
window.location.href = '/web-twain/docs/search.html?q=' + $('#txtSearch').val()
18599
}
186100
})
187-
188101
</script>
189102

190103
{%- include livehelp.html -%}

0 commit comments

Comments
 (0)