function addScript(url) { document.write(""); } addScript(); //不使用配置文件请注释点上面代码 //星光依旧灿烂,激情仍然燃烧。因为有梦想,所以我存在。你在你的领域里不惜青春,我在我的道路上不知疲倦。 $(function () { if (config) { $(".name").html(config.name); $(".sex").html(config.sex); $(".age").html(config.age); $(".phone").html(config.phone); $(".email").html(config.email); $(".address").html(config.address); $(".qq").html(config.qq); $(".log").html(config.log); $(".self-intro").html(config.welcome); $(".me").html(config.about); $(".for-work").html(config.excpect_work); $(".profile-page .page-header").css("background-image", "url(" + config.url[0] + ")"); $(".myphoto").attr("src", config.url[1]); $(".portfolio-section").css({ "background": "url(" + config.url[2] + ") no-repeat center top", "margin-top": "30px", "padding-top": "50px", "text-align": "center !important", "background-attachment": "relative !important", "background-position": "center center !important", "min-height": "800px", "width": "100%", "background-size": "100%", "background-size": "cover", "position": "relative !important" }); $(".others-section").css("background", "url(" + config.url[3] + ")"); $(".desc").html(config.skills_description); //------E------- if (config.skills) { for (let i = 0; i < config.skills.length; i++) { let skill_name = config.skills[i][0]; let num = config.skills[i][1]; let color = config.skills[i][2]; let s = "
\n" + "
\n" + " \n" + skill_name + " %\n" + " \n" + " \n" + "
\n" + "
"; $(".skill-body").append(s) } } let row_i = 0; if (config.portfolio) { for (let i = 0; i < config.portfolio.length; i++) { if (i % 3 == 0) { $(".portfolio-section-main-container").append("
"); row_i++; } let e = $(".portfolio-section-main-container .row").eq(row_i - 1); let img = config.portfolio[i][0]; let url = config.portfolio[i][1]; let projectName = config.portfolio[i][2]; let brief = config.portfolio[i][3]; e.append("
\n" + "
\n" + " \n" + "
\n" + " \"Image\"\n" + "
\n" + "
" + projectName + "
\n" + "

" + brief + "

\n" + "
\n" + "
\n" + "
\n" + "
\n" + "
"); } } if (config.work) { for (let i = 0; i < config.work.length; i++) { let time = config.work[i][0]; let what = config.work[i][1]; let desc = config.work[i][2]; $(".experience-section .container").append( "
\n" + "
\n" + "
\n" + "
\n" + "

\n" + " " + time + "\n" + "

\n" + " " + what + "\n" + "
\n" + "
\n" + "
\n" + "
\n" + desc + "
\n" + "
\n" + "
\n" + "
" ); } } if (config.others) { for (let i = 0; i < config.others.length; i++) { var e; if (i % 2 == 0) { e = $(".timeline-left .timeul"); } else { e = $(".timeline-right .timeul"); } let time = config.others[i][0]; let what = config.others[i][1]; let desc = config.others[i][2]; e.append( "
  • \n" + "
    " + time + "
    \n" + " \n" + "
    \n" + "
    " + what + "
    \n" + "

    " + desc + "

    \n" + "
    \n" + "\n" + "
  • " ) } } if (config.icon) { for (let i = 0; i < config.icon.length; i++) { let img = config.icon[i][0]; let url = config.icon[i][1]; let desc = config.icon[i][2]; $(".icon-insert").append( "\n" + " \"\"\n" + " " + desc + "\n" + "" ); } } } var h; $(window).resize(function () { h = $(".page-header").height() - $(".page-header .bg-primary").height(); }) progress(); if ($(window).scrollTop() >= $(".page-header").height() - $(".page-header .bg-primary").height()) { $(".page-header .bg-primary").css("cssText", "background-color:rgb(55 65 178)!important"); } $(window).scroll(function () { h = $(".page-header").height() - $(".page-header .bg-primary").height(); if ($(window).scrollTop() >= h) { $(".page-header .bg-primary").css("cssText", "background-color:rgb(55 65 178)!important"); } else { $(".page-header .bg-primary").css("cssText", "background-color:rgba(0,0,0,0.20)!important"); } if ($(".skill-section .card").hasClass("aos-animate")) { $(".progress-bar-inner").addClass("p-a"); progress(); } else { $(".progress-bar-inner").removeClass("p-a"); } }); function progress() { var progress = $(".progress-bar-inner"); progress.each(function (i) { var data = $(this).attr('data-value'); $(this).prev().find("span").html(data + "%"); }); } $(".send-btn").on("click", mailsend); function mailsend() { var subject = $(".subject").val(); var content = $(".message").val(); content = content.replace(new RegExp(' ', 'g'), '%20'); content = content.replace(new RegExp('\n', 'g'), '%0d%0a'); // if (confirm("你确定要向" + who + "放送邮件吗?") == true) { // location="mailto:sample@fly63.com?subject=test&cc=sample@hotmail.com&subject=主题&body=内容"; // } location = "mailto:" + config.email + "?subject=" + subject + "&body=" + content; } // ---- 座右铭字缓出效果 ----- var text = "衣带渐宽终不悔,为伊消得人憔悴"; var length = text.length; let index = 0; var mottoArrs = config.motto; // $.ajaxSettings.async = false; // $.getJSON("./motto.json", function (data) { // mottoArrs = data; // }) var e1 = setInterval(insWords, 150); var e2 = 0; function insWords() { if (index <= length + 1 && index >= 0) { $(".page-header .motto").append(text[index]); } index++; if (index > length) { index += 50; e2 = setInterval(delWords, 50); clearInterval(e1); } } function delWords() { if (index <= length && index >= 0) { let shower = text.substr(0, index); $(".page-header .motto").html(shower); } index--; if (index < 0) { index = -5; let i = Math.floor(mottoArrs.length * Math.random()); text = mottoArrs[i]; length = text.length; e1 = setInterval(insWords, 150); clearInterval(e2); } } // ----- END ------ //--- 绑定按钮特效和文字淡入淡出 --- $(".self-intro").fadeIn(3000); $(".hvr-bounce-to-right").fadeIn(3000); //----END--- });