<!DOCTYPE HTML>
<html lang="<%= config.language %>">
<%- partial('_partial/head') %>
<body>
<%- partial('_partial/header') %>
<%- body %>
<%- partial('_partial/footer') %>
<%- partial('_partial/search') %>
<%- partial('_partial/back-top') %>
<script src="<%- theme.libs.js.materialize %>"></script>
<script src="<%- theme.libs.js.masonry %>"></script>
<script src="<%- theme.libs.js.aos %>"></script>
<script src="<%- theme.libs.js.scrollProgress %>"></script>
<script src="<%- theme.libs.js.lightgallery %>"></script>
<script src="/js/matery.js"></script>

<!-- å�šå®¢æ ‡ç­¾åŠ¨æ€�æ��ç¤º -->
<script type="text/javascript">
    var OriginTitile = document.title,
        st;
    document.addEventListener("visibilitychange", function () {
        document.hidden ? (document.title = "çœ‹ä¸�è§�æˆ‘ğŸ™ˆ~çœ‹ä¸�è§�æˆ‘ğŸ™ˆ~", clearTimeout(st)) : (document.title =
            "(à¹‘â€¢Ì€ã…‚â€¢Ì�) âœ§è¢«å�‘ç�°äº†ï½�", st = setTimeout(function () {
            document.title = OriginTitile
        }, 3e3))
    })
</script>

<!--æ·»åŠ é¼ æ ‡ç‚¹å‡»çƒŸèŠ±çˆ†ç‚¸æ•ˆæ�œ-->
<% if (theme.fireworks.enable) { %>
    <canvas class="fireworks" style="position: fixed; left: 0; top: 0; z-index: 1; pointer-events: none;"></canvas>
    <script type="text/javascript" src="//cdn.bootcss.com/animejs/2.2.0/anime.min.js"></script>
    <script type="text/javascript" src="/js/fireworks.js"></script>
<% } %>

<!--æ·»åŠ å±�è”½ç½‘é¡µæº�ç �-->
<script type="text/javascript">
    window.onload = function () {
        //å±�è”½é”®ç›˜äº‹ä»¶
        document.onkeydown = function () {
            var e = window.event || arguments[0];
            //F12
            if (e.keyCode == 123) {
                return false;
                //Ctrl+Shift+I
            } else if ((e.ctrlKey) && (e.shiftKey) && (e.keyCode == 73)) {
                return false;
                //Shift+F10
            } else if ((e.shiftKey) && (e.keyCode == 121)) {
                return false;
                //Ctrl+U
            } else if ((e.ctrlKey) && (e.keyCode == 85)) {
                return false;
            }
        };
        //å±�è”½é¼ æ ‡å�³é”®
        document.oncontextmenu = function () {
            return false;
        }
    }
</script>


<%- partial('_partial/google-analytics') %>
<%- partial('_partial/baidu-analytics') %>
<%- partial('_partial/baidu-push') %>

<!--ä¸�è’œå­�-->
<% if (theme.busuanziStatistics && theme.busuanziStatistics.enable) { %>
    <script async src="<%- theme.libs.js.busuanzi %>"></script>
<% } %>

<!--Tidio-->
<% if (theme.tidio.enable) { %>
    <script src="//code.tidio.co/<%- theme.tidio.public_key %>.js"></script>
    <script>
        $(document).ready(function () {
            setInterval(change_Tidio, 50);

            function change_Tidio() {
                var tidio = $("#tidio-chat iframe");
                if (tidio.css("display") == "block" && $(window).width() > 977) {
                    document.getElementById("tidio-chat-iframe").style.bottom = ($("div#backTop.top-scroll").css("display") == "none" && $(window).width() > 977) > 0 ? "-40px" : ($("div.toc-title").length && $(window).width() > 977) > 0 ? "<% if(theme.toc.showToggleBtn){ %>85px<% }else{ %>20px<% } %>" : "20px";
                    document.getElementById("tidio-chat-iframe").style.right = "-15px";
                    document.getElementById("tidio-chat-iframe").style.height = parseInt(tidio.css("height")) >= 520 ? "520px" : tidio.css("height");
                    document.getElementById("tidio-chat-iframe").style.zIndex = "997";
                } else if (tidio.css("display") == "block" && $(window).width() > 601 && $(window).width() < 992) {
                    document.getElementById("tidio-chat-iframe").style.bottom = ($("div#backTop.top-scroll").css("display") == "none" && 601 < $(window).width() < 992) > 0 ? "-40px" : "20px";
                    document.getElementById("tidio-chat-iframe").style.right = "-15px";
                    document.getElementById("tidio-chat-iframe").style.zIndex = "997";
                } else if (tidio.css("display") == "block" && $(window).width() < 601 && parseInt(tidio.css("height")) < 230) {
                    document.getElementById("tidio-chat-iframe").style.bottom = ($("div#backTop.top-scroll").css("display") == "none" && $(window).width() < 601) > 0 ? "-10px" : "45px";
                    document.getElementById("tidio-chat-iframe").style.zIndex = "997";
                }
                if (tidio.css("display") == "block" && $(window).width() < 601 && parseInt(tidio.css("height")) >= 230) {
                    document.getElementById("tidio-chat-iframe").style.zIndex = "998";
                }
            }
        });
    </script>
<% } %>

<!--DaoVoice-->
<% if (theme.daovoice.enable) { %>
    <script>
        (function (i, s, o, g, r, a, m) {
            i["DaoVoiceObject"] = r;
            i[r] = i[r] || function () {
                (i[r].q = i[r].q || []).push(arguments)
            }, i[r].l = 1 * new Date();
            a = s.createElement(o), m = s.getElementsByTagName(o)[0];
            a.async = 1;
            a.src = g;
            a.charset = "utf-8";
            m.parentNode.insertBefore(a, m)
        })(window, document, "script", ('https:' == document.location.protocol ? 'https:' : 'http:') +
            "//widget.daovoice.io/widget/6984b559.js", "daovoice")
        daovoice('init', {
            app_id: "<%- theme.daovoice.app_id %>"
        });
        daovoice('update');
    </script>
<% } %>

<!-- èƒŒæ™¯çº¿æ�¡-->
<% if (theme.canvas_nest.enable) { %>
    <script type="text/javascript" color="<%- theme.canvas_nest.color %>"
            pointColor="<%- theme.canvas_nest.pointColor %>" opacity='<%- theme.canvas_nest.opacity %>'
            zIndex="<%- theme.canvas_nest.zIndex %>" count="<%- theme.canvas_nest.count %>"
            src="<%- theme.libs.js.canvas_nest %>"></script>
<% } %>

<!--èƒŒæ™¯é�™æ­¢å½©å¸¦-->
<% if (theme.ribbon.enable) { %>
    <script type="text/javascript" size="<%- theme.ribbon.size %>" alpha='<%- theme.ribbon.alpha %>'
            zIndex="<%- theme.ribbon.zIndex %>" src="<%- theme.libs.js.ribbon %>" async="async"></script>
<% } %>

<!--èƒŒæ™¯åŠ¨æ€�å½©å¸¦.-->
<% if (theme.ribbon_dynamic.enable) { %>
    <script type="text/javascript" src="<%- theme.libs.js.ribbon_dynamic %>" async="async"></script>
<% } %>

<!--ç½‘é¡µé¢„åŠ è½½-->
<% if (theme.instantpage.enable) { %>
    <script src="<%- theme.libs.js.instantpage %>" type="module"></script>
<% } %>

</body>
</html>