You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

78 lines
2.6 KiB

include @/helper/helper.pug
include @/helper/flush.pug
doctype html
html(lang='zh')
head
meta(charset='UTF-8')
meta(name='viewport', content='maximum-scale=1,minimum-scale=1,user-scalable=0,width=device-width,initial-scale=1')
meta(http-equiv='X-UA-Compatible', content='ie=edge')
title Edit-个人简历
link(rel='stylesheet', href='/public/static/css/prism.css')
link(rel='stylesheet', href='/public/static/css/index.css')
style#styleContent
body
pre#codeEdit.language-css(onscroll='toggleScrollBar(event)')
#resume(onscroll='toggleScrollBar(event)')
script(src='/public/static/js/textarr.js')
script(src='/public/static/js/write.js')
script.
let currentIndex_ = 0
function writeIntro (intro='', time, callback) {
let connect = document.querySelectorAll('.connect')
if(connect.length < 1){
resume.innerHTML = intro
}else{
connect[connect.length-1].innerHTML = intro
}
setTimeout(() => {
callback()
}, time);
}
function startResume () {
writeIntro(balloon, 700, ()=>{
writeIntro(line, 200, ()=>{
writeIntro(text, 0, ()=>{
writeText(textArr[currentIndex_])
})
})
})
}
let num = 0
let t = setInterval(() => {
if(num <= style.length){
codeEdit.innerHTML = Prism.highlight(style.substr(0, num), Prism.languages.css);
codeEdit.scrollTop = 100000
styleContent.innerHTML = style.substr(0, num)
num++
}else{
clearInterval(t)
}
}, 70)
setTimeout(() => {
if(document.body.clientWidth < 500){
setTimeout(() => {
resume.style.cssText = 'height:70vh!important'
}, 5000);
}
startResume()
}, 10000);
script(src='/public/static/js/prism.js')
script.
let sbTimer = null
function toggleScrollBar (self) {
self = self.target
clearTimeout(sbTimer)
if(self.getAttribute('class') != 'sbShow')
self.classList.add('sbShow')
sbTimer = setTimeout(() => {
self.classList.remove('sbShow')
}, 800);
}