1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
| <% var subtitle = page.subtitle || page.title var banner_img = page.banner_img || theme.index.banner_img var banner_img_height = page.banner_img_height || theme.index.banner_img_height var banner_mask_alpha = page.banner_mask_alpha || theme.index.banner_mask_alpha var colorSchema = theme.dark_mode && theme.dark_mode.enable && theme.dark_mode.default ? theme.dark_mode.default : '' var banner_video = theme.index.banner_video %>
<!DOCTYPE html>
<html lang="<%= config.language %>" <%= colorSchema ? `data-default-color-scheme=${colorSchema}` : '' %>> <script type="text/javascript" src="/vvd_js/jquery.js"></script>
<%- partial('_partial/head') %>
<body> <header style="height: <%- banner_img_height %>vh;"> <%- partial('_partial/nav') %> <div class="banner" id="banner" <%- theme.banner && theme.banner.parallax && 'parallax=true' %> style="background: url('<%- url_for(banner_img) %>') no-repeat center center; background-size: cover;">
<div class="full-bg-img" > <div id="banner_video_insert"> </div> <% if(banner_video){ %> <script> var ua = navigator.userAgent; var ipad = ua.match(/(iPad).*OS\s([\d_]+)/), isIphone = !ipad && ua.match(/(iPhone\sOS)\s([\d_]+)/), isAndroid = ua.match(/(Android)\s+([\d.]+)/), isMobile = isIphone || isAndroid;
function set_video_attr(id){ var height = document.body.children[0].clientHeight var width = document.body.children[0].clientWidth var video_item = document.getElementById(id);
if (height / width < 0.56){ video_item.setAttribute('width', '100%'); video_item.setAttribute('height', 'auto'); } else { video_item.setAttribute('height', '100%'); video_item.setAttribute('width', 'auto'); } }
$.getJSON('/vvd_js/video_url.json', function(data){ if (!isMobile){ var video_list_length = data.length var seed = Math.random() index = Math.floor(seed * video_list_length) video_url = data[index][0] pre_show_image_url = data[index][1] banner_obj = document.getElementById("banner") banner_obj.style.cssText = "background: url('" + pre_show_image_url + "') no-repeat; background-size: cover;"
video_html_res = "<video id='video_item' style='position: absolute;' muted='muted' src=" + video_url + " autoplay='autoplay' loop='loop'></video>"
document.getElementById("banner_video_insert").innerHTML = video_html_res; set_video_attr('video_item')
}
});
if (!isMobile){ window.onresize = function(){ set_video_attr('video_item') } } </script> <% } %>
<div class="mask flex-center" style="background-color: rgba(0, 0, 0, <%= parseFloat(banner_mask_alpha) %>)"> <div class="page-header text-center fade-in-up"> <span class="h2" id="subtitle" title="<%= subtitle %>"> <% if(!theme.fun_features.typing.enable) { %> <%- subtitle %> <% } %> </span>
<% if(is_post() && page.meta !== false) { %> <%- partial('_partial/post-meta') %> <% } %> </div>
<% if (theme.scroll_down_arrow.enable && theme.scroll_down_arrow.banner_height_limit <= banner_img_height && page.layout !== '404') { %> <div class="scroll-down-bar"> <i class="iconfont icon-arrowdown"></i> </div> <% } %> </div> </div> </div> </header>
<main> <% if(is_post() || page.layout === '404') { %> <%- body %> <% } else { %> <div class="container nopadding-x-md"> <div class="py-5" id="board" <%- banner_img_height >= 100 && theme.banner && theme.banner.parallax ? 'style=margin-top:0' : '' %>> <% if(page.layout === 'about') { %> <div class="about-avatar"> <img src="<%= url_for(theme.about.avatar) %>" class="img-fluid" alt="avatar"> </div> <% } %> <div class="container"> <div class="row"> <div class="col-12 col-md-10 m-auto"> <%- body %> </div> </div> </div> </div> </div> <% } %>
<% if (theme.scroll_top_arrow.enable) { %> <a id="scroll-top-button" aria-label="TOP" href="#" role="button"> <i class="iconfont icon-arrowup" aria-hidden="true"></i> </a> <% } %>
<% if (theme.search.enable) { %> <%- partial('_partial/search') %> <% } %>
<% if (theme.custom_html) { %> <div class="col-lg-7 mx-auto nopadding-x-md"> <div class="container custom mx-auto"> <%- theme.custom_html %> </div> </div> <% } %> </main>
<%- partial('_partial/footer', { params: { subtitle: subtitle } }) %>
<%- partial('_partial/scripts') %>
</body> </html>
|