hexo/node_modules/hexo-theme-fluid/layout/_partials/header/banner.ejs

34 lines
1.4 KiB
Plaintext
Raw Normal View History

2023-10-03 11:14:36 +08:00
<%
var banner_img = page.banner_img || theme.index.banner_img
var banner_img_height = parseFloat(page.banner_img_height || theme.index.banner_img_height)
var banner_mask_alpha = parseFloat(page.banner_mask_alpha || theme.index.banner_mask_alpha)
var subtitle = page.subtitle || page.title
%>
<div id="banner" class="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 class="mask flex-center" style="background-color: rgba(0, 0, 0, <%= parseFloat(banner_mask_alpha) %>)">
<div class="banner-text text-center fade-in-up">
<div class="h2">
<% if(theme.fun_features.typing.enable && in_scope(theme.fun_features.typing.scope)) { %>
<span id="subtitle" data-typed-text="<%= subtitle %>"></span>
<% } else { %>
<span id="subtitle"><%- subtitle %></span>
<% } %>
</div>
<% if (is_post()) { %>
<%- inject_point('postMetaTop') %>
<% } %>
</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>