everfu / hexo-theme-solitude

An elegant Hexo theme that supports lazy loading, PWA, Latex, and multiple commenting systems. 一款设计师风格的 Hexo 主题,支持懒加载、PWA、Latex以及多种评论系统。
https://solitude.js.org
MIT License
616 stars 53 forks source link

为手机端顶栏添加postchat按钮 #310

Closed Stars-harbor closed 3 months ago

Stars-harbor commented 3 months ago

功能简介

便于手机端postchat的访问

问题描述

购买并成功向站点部署postchat后,进电脑端与平板端可在左下角显示postchat按钮,手机端无便捷入口,希望可以在顶栏增加一个按钮便于用户使用postchat(参考张洪heo手机端样式)

实现效果

当左下角可显示postchat按钮时,顶栏不显示该按钮,当左下角无法显示postchat时(手机端),顶栏常驻显示postchat按钮

你想到的可行的替代方案

No response

其他内容

heo样式(未向上滑动) Screenshot_20240623_154424 heo样式(向上滑动并开始显示已读百分比时) Screenshot_20240623_154435

everfu commented 3 months ago

自定义按钮,自行添加

Stars-harbor commented 3 months ago

定义按钮不是在手机端无法显示的吗?我看到开往的那个按钮就在手机端不显示

Stars-harbor commented 3 months ago

我昨天尝试在主题/layout/widgets/nav/right.pug里面按照其他的格式加了这么几行 if theme.tianli_talk.enable .nav-button#efuTalk-button a.site-page.social(onclick="togglePostChatContainer(); return false;" title=postchat) i.solitude.st-robot-fill 这个按钮手机端倒是显示了,但依旧显示在左下角,而且还带有延展效果,但本来会显示“智能客服与搜索”的那部分也不显示字了,我调了好多东西都不出现在右上角🫠