2022-09-24 00:20:47 +08:00
|
|
|
<%
|
2022-09-26 22:03:43 +08:00
|
|
|
const { description: fs_description, hitokoto: fs_hitokoto } = theme.style.first_screen
|
2022-09-24 00:20:47 +08:00
|
|
|
const { description: c_description } = config
|
2022-09-26 22:03:43 +08:00
|
|
|
let final_description = fs_description || c_description || ''
|
|
|
|
final_description = final_description.split('||').map(desc => desc.trim())
|
|
|
|
if (final_description.length > 2) { final_description.length = 2 }
|
2022-10-02 00:17:32 +08:00
|
|
|
const { enable: sc_enable, links: sc_links } = theme.social_contact
|
2022-09-24 00:20:47 +08:00
|
|
|
%>
|
2020-12-24 21:20:14 +08:00
|
|
|
<div class="first-screen-container flex-center fade-in-down-animation">
|
2020-11-19 11:58:54 +08:00
|
|
|
<div class="content flex-center">
|
2022-09-26 22:03:43 +08:00
|
|
|
<% if (final_description.length || fs_hitokoto.enable) { %>
|
2022-09-24 00:20:47 +08:00
|
|
|
<div class="description hitokoto">
|
2022-09-26 22:03:43 +08:00
|
|
|
<% for (const idx in final_description) { %>
|
|
|
|
<div><%= final_description[idx] %></div>
|
|
|
|
<% } %>
|
2022-09-24 00:20:47 +08:00
|
|
|
</div>
|
|
|
|
<% } %>
|
|
|
|
<% if (fs_hitokoto.enable) { %>
|
|
|
|
<script async <%= theme.pjax.enable === true ? 'data-pjax' : '' %>
|
|
|
|
src="https://v1.hitokoto.cn/?encode=js"
|
|
|
|
>
|
|
|
|
</script>
|
2022-04-27 14:30:06 +08:00
|
|
|
<% } %>
|
2022-10-02 00:17:32 +08:00
|
|
|
<% if (sc_enable) { %>
|
2020-12-11 12:05:03 +08:00
|
|
|
<div class="s-icon-list">
|
2022-10-02 00:17:32 +08:00
|
|
|
<% for (const key in sc_links) { %>
|
|
|
|
<% if(sc_links[key]) { %>
|
|
|
|
<%
|
|
|
|
const tmpl = sc_links[key].split('|').map(x => x.trim())
|
|
|
|
let isImg = false
|
|
|
|
let link = sc_links[key]
|
|
|
|
if (tmpl.length > 1) {
|
|
|
|
link = tmpl[1]
|
|
|
|
isImg = tmpl[0] === 'img'
|
|
|
|
}
|
|
|
|
%>
|
|
|
|
<div class="tooltip s-icon-item <%= isImg ? 'tooltip-img clear' : ''%>"
|
2022-09-29 15:24:19 +08:00
|
|
|
data-content="<%= __(key) %>"
|
2022-10-02 00:17:32 +08:00
|
|
|
data-name="<%= key %>"
|
|
|
|
<%= isImg ? 'data-img-url='+ link +'' : '' %>
|
2022-09-29 15:24:19 +08:00
|
|
|
>
|
|
|
|
<% if(key === 'email') { %>
|
2022-10-02 00:17:32 +08:00
|
|
|
<a href="mailto:<%- link %>">
|
2020-11-24 10:55:24 +08:00
|
|
|
<i class="fas fa-envelope"></i>
|
2020-11-15 22:06:32 +08:00
|
|
|
</a>
|
2022-09-29 15:24:19 +08:00
|
|
|
<% } else { %>
|
2022-10-02 00:17:32 +08:00
|
|
|
<% if(isImg) { %>
|
2020-11-24 10:55:24 +08:00
|
|
|
<i class="fab fa-<%= key %>"></i>
|
2022-10-02 00:17:32 +08:00
|
|
|
<% } else { %>
|
|
|
|
<a target="_blank" href="<%- link %>">
|
|
|
|
<i class="fab fa-<%= key %>"></i>
|
|
|
|
</a>
|
|
|
|
<% } %>
|
2022-09-29 15:24:19 +08:00
|
|
|
<% } %>
|
|
|
|
</div>
|
2020-11-15 22:06:32 +08:00
|
|
|
<% } %>
|
|
|
|
<% } %>
|
2020-12-11 12:05:03 +08:00
|
|
|
</div>
|
2020-11-15 22:06:32 +08:00
|
|
|
<% } %>
|
|
|
|
</div>
|
2020-11-13 14:43:22 +08:00
|
|
|
</div>
|