build(hitokoto): modified hitokoto enable mode in the config

This commit is contained in:
XPoet 2022-10-27 14:27:20 +08:00
parent 9332a6fee2
commit 49e4b4a81f
2 changed files with 5 additions and 6 deletions

View File

@ -22,7 +22,7 @@ base_info:
# ---------------------------------------------------------------------------------------
style:
# Theme primary color
primary_color: "#0066CC"
primary_color: "#0066cc"
# Your blog website logo image
# You can use local image, image external link or dont fill
@ -68,8 +68,7 @@ style:
font_color:
# If enable hitokoto, first screen description is different every time when you enter the site
hitokoto:
enable: false # Option values: true | false
hitokoto: false # Option values: true | false
# Page scroll style settings
scroll:
@ -89,8 +88,8 @@ style:
menu:
Home: /
Archives: /archives
# Categories: /categories
# Tags: /tags
# Categories: /categories
# Links: /links
# About: /about
# Changelog: /changelog

View File

@ -8,14 +8,14 @@ const { enable: sc_enable, links: sc_links } = theme.social_contact
%>
<div class="first-screen-container flex-center fade-in-down-animation">
<div class="content flex-center">
<% if (final_description.length || fs_hitokoto.enable) { %>
<% if (final_description.length || fs_hitokoto === true) { %>
<div class="description hitokoto">
<% for (const idx in final_description) { %>
<div class="desc-item"><%= final_description[idx] %></div>
<% } %>
</div>
<% } %>
<% if (fs_hitokoto.enable) { %>
<% if (fs_hitokoto === true) { %>
<script async <%= theme.pjax.enable === true ? 'data-pjax' : '' %>
src="https://v1.hitokoto.cn/?encode=js"
>