diff --git a/settings.yaml b/settings.yaml index fbd917ba..da28e754 100644 --- a/settings.yaml +++ b/settings.yaml @@ -399,6 +399,12 @@ spec: profileDesc: socialMedia: children: + - $formkit: text + name: helloText + label: 作者打招呼 + placeholder: 请填写作者打招呼 + value: 🤖️ 数码科技爱好者, 🔍 分享与热心帮助, 🏠 智能家居小能手, 🔨 设计开发一条龙, 🤝 专修交互与设计, 🏃 脚踏实地行动派, 🧱 团队小组发动机, 💢 壮汉人狠话不多 + help: 注意格式 (🤖️ 数码科技爱好者, 🔍 分享与热心帮助 ) 以逗号隔开 - $formkit: text name: profileName label: 卡片名称 diff --git a/templates/assets/js/heo.js b/templates/assets/js/heo.js index 28491bc7..420ab54d 100644 --- a/templates/assets/js/heo.js +++ b/templates/assets/js/heo.js @@ -5,6 +5,7 @@ var heo_musicFirst = false; var heo_musicPlaying = false; let heo_keyboard = false; let heo_intype = false; +let lastSayHello = ""; // 私有函数 var heo = { // 检测显示模式 @@ -474,6 +475,16 @@ var heo = { $htmlDom.toggle('hide-aside') }, + changeSayHelloText: function() { + const e = GLOBAL_CONFIG.helloText.length == 0 ? ["🤖️ 数码科技爱好者", "🔍 分享与热心帮助", "🏠 智能家居小能手", "🔨 设计开发一条龙", "🤝 专修交互与设计", "🏃 脚踏实地行动派", "🧱 团队小组发动机", "💢 壮汉人狠话不多"] : GLOBAL_CONFIG.helloText + , t = document.getElementById("author-info__sayhi"); + let o = e[Math.floor(Math.random() * e.length)]; + for (; o === lastSayHello; ) + o = e[Math.floor(Math.random() * e.length)]; + t.textContent = o, + lastSayHello = o + }, + //初始化console图标 initConsoleState: function() { diff --git a/templates/assets/zhheo/zhheoblog.css b/templates/assets/zhheo/zhheoblog.css index 9e10a111..f3ebae58 100644 --- a/templates/assets/zhheo/zhheoblog.css +++ b/templates/assets/zhheo/zhheoblog.css @@ -2099,10 +2099,17 @@ blockquote footer cite::before { } #aside-content .card-info img { - width: 110px; - height: 110px; - border-radius: 70px; + width: 28px; + right: 24px; + top: 20px; + border-radius: 500px; transition: all 0.5s ease 0s; + position: absolute; +} + +.author-info__top-group { + display: flex; + height: 28px; } #aside-content .card-info .author-info__name { @@ -10302,6 +10309,14 @@ div#author-info__sayhi { padding: 2px 8px; border-radius: 12px; width: fit-content; + cursor: pointer; + -webkit-user-select: none; + transition: 0.3s; +} + +div#author-info__sayhi:hover { + background: var(--heo-card-bg); + color: var(--heo-fontcolor); } #aside-content .card-info .author-info__name { @@ -10311,7 +10326,7 @@ div#author-info__sayhi { font-size: 28px; line-height: 1.1; margin-top: 0.8rem; - margin-bottom: 1rem; + margin-bottom: 0.4rem; } /* 作者卡片背景 */ diff --git a/templates/modules/head.html b/templates/modules/head.html index 234e0120..00383b30 100644 --- a/templates/modules/head.html +++ b/templates/modules/head.html @@ -174,6 +174,7 @@ allPlaylist: [[${theme.config.tool.nav_music.all_playlist}]], navMusicEnable:[[${theme.config.tool.nav_music.nav_musicEnable}]], isMusic: [[${ htmlType == 'music'}]], + helloText: [[${#strings.listSplit(theme.config.sidebar.profile.helloText, ',')}]], source: { jQuery: 'https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/jquery/3.6.0/jquery.min.js', justifiedGallery: { diff --git a/templates/modules/widgets/aside/profile.html b/templates/modules/widgets/aside/profile.html index 919fc281..4b747eb6 100644 --- a/templates/modules/widgets/aside/profile.html +++ b/templates/modules/widgets/aside/profile.html @@ -6,7 +6,11 @@