Git Product home page Git Product logo

typecho-butterfly's Introduction

Typecho-Butterfly

master version typecho version php version license

这是 Typecho 版本的 butterfly 主题 主题好看,但是由于经常换设备并且hexo操作还是不方便,某些功能受限于第三方 所以就移植了

原主题:hexo-butterfly

Demo:WeHao‘s Blog

使用文档:使用文档

💻安装

你最好从Release 页面下载,code页下载代码可能更新遗漏或者更新提前导致页面出错
下载好后放进博客usr/theme内解压即可

⭐帮助主题发展(加快更新)

  • 如果你发现主题bug或者建议可以去issues提交反馈
  • 如果你一定能力可以向主题提交PR来丰富主题
  • 如果你只是一个普通是使用者,你可以在右上角给主题点一个star来鼓励作者来加快更新

✌️移植特色

  1. 方便原hexo的博文转移,因为都是md文档
  2. 原butterfly的用户可以直接使用原版butterfly主题的css文件,拥有原先同样的效果
  3. 注意:移植并非为最新版butterfly,你的index.css可能会在本主题出现bug
  4. 由于使用动态博客,大部分功能可以让程序去实现,不用借助第三方api(可在主题外观设置中自定义)
  5. 在线编辑文档
  6. 搜索、加密和置顶文章可以直接使用(相比hexo无需太多额外配置)
  7. 相比hexo,程序安装更加方便,使用更加高效
  8. 网站咨询显示同时在线人数(某些虚拟主机似乎无法使用)
  9. 可在后台设置侧边栏信息以及侧边栏的隐藏和显示
  10. 后续将开发更多功能

🎉已实现的功能

  • 支持评论区谷歌人机验证、hcaptcha人机验证
  • 全站加密或禁止访问
  • 一键开启魔改主题
  • 单独设置文章过期提醒
  • 文章加密(博客程序自带)
  • 后台设置需要置顶文章
  • 后台设置友链并可以使html自定义友链
  • 文章内可设置回复可见
  • 卡片化设计
  • 支持二级目录
  • 双栏设计
  • 响应式主题
  • 夜间模式
  • Pjax
  • 文章阅读模式
  • 简体和繁体转换
  • 电脑和手机都可查看TOC目录
  • 内置多种代码配色(darker/pale night/light/ocean/mac/mac light),可自定义代码配色
  • 代码块显示代码语言/关闭或展开代码块/代码复制/代码自动换行
  • 可关闭文字复制/可开启内容复制增加版权信息)
  • 本地搜索
  • Mathjax 和 Katex
  • 内置404页面
  • 显示字数统计
  • 显示相关文章
  • 过期文章提醒
  • 多种在线聊天(Chatra/Tidio/Daovoice/Gitter/Crisp)
  • 谷歌广告/手动广告位置
  • 修改网站配色
  • 打字特效 activate_power_mode
  • 多种背景特效(静止彩带/动态彩带/Canvas Nest)
  • 多种鼠标点击特效(烟花/爱心)
  • 内置一种 Preloader 加载动画
  • Fancybox大图模式
  • 照片墙
  • 图片懒加载
  • Snackbar弹窗
  • PWA

详情看:

博客说明

请作者喝瓶快乐水

微信支付宝

typecho-butterfly's People

Contributors

5ibug avatar hi-mrzefr avatar nuoyis avatar wangyijin209 avatar wehaox avatar wyj5211 avatar xenwayne avatar yzl3014 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

typecho-butterfly's Issues

[Bug]: 文章页公告无法关闭

是否从release页下的主题? | Is the theme download from Release Page?

是 (Yes)

使用的 Butterfly 版本? | What version of Butterfly are you use?

1.7.3

是否修改过主题文件? | Has the theme files been modified?

不是 (No)

使用的浏览器? | What browse are you using?

Chrome

博客的运行环境? | What the running environment of the blog?

linux|php8.0+|typecho1.2|sqlite|nginx

问题描述 | Describe the bug

typecho用的是1.2 开发版
在后台已关闭侧边栏显示公告,文章页的侧边栏显示也全部关闭,可在文章页还是能看见公告,但在主页就没有
这是我的文章页 这是主页
另附后台设置截图
27-1-2023-11483-blog-wyj5211-me.jpg
文章页截图
27-1-2023-114624-blog-wyj5211-me.jpg

在打开的网站内点击首页,会报错“Uncaught ReferenceError: runtimeshow is not defined”

如题,打开的网站中,点击关于后,再点首页后会在控制台一直疯狂报错。(站点地址:yanjiuseng.top)暂时打开pjax方便您在线查看错误、调试。
image
image

VM464:12 Uncaught ReferenceError: runtimeshow is not defined
    at show_date_time (<anonymous>:12:1)
    at <anonymous>:1:1

排查后是打开网站Pjax后才会报错,关闭后就正常了。经过搜索没有找到问题的原因。

如果是Pjax的原因,我去过作者您的网站,点击关于后再点击首页就没有此问题。不知道是不是我自己电脑的问题,麻烦您有空可以按照操作试一下,是否有同样的问题存在。

首页文章列表中 文章摘要 内包含的 样式文本 不被转换

如标题所述。如果我在一篇文章的开头使用了主题所给出的附加样式(即Typecho自带文本编辑器没有的),那么这些文本将不会被解析。如下图所示。
样式文本不解析
希望可以在显示文章概要部分发现这些文本时自动删除它们,以便正常内容不会被干扰。

[Bug]: 手机侧边栏标签、分类点进去404

是否从release页下的主题? | Is the theme download from Release Page?

是 (Yes)

使用的 Butterfly 版本? | What version of Butterfly are you use?

1.7.3

是否修改过主题文件? | Has the theme files been modified?

不是 (No)

使用的浏览器? | What browse are you using?

Chrome

博客的运行环境? | What the running environment of the blog?

linux|php7.2+|typecho1.2|mysql5.6+|nginx

问题描述 | Describe the bug

Screenshot_2023_0218_023213
Screenshot_2023_0218_023223

[Bug]:

是否从release页下的主题? | Is the theme download from Release Page?

是 (Yes)

使用的 Butterfly 版本? | What version of Butterfly are you use?

1.7.3

是否修改过主题文件? | Has the theme files been modified?

不是 (No)

使用的浏览器? | What browse are you using?

Chrome

博客的运行环境? | What the running environment of the blog?

linux|php8.0+|typecho1.2|mysql5.6+|nginx

问题描述 | Describe the bug

PHP8.1出现以下内容
Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /www/wwwroot/lovablewyh-webside/blog/var/Widget/Archive.php on line 1032
链接:https://blog.nuoyis.com

水平分割线组件上的小剪刀图标不时抽风

如题所述。在网站中的水平分割线上(<hr>标签)会显示一个剪刀图标,正常情况下,鼠标悬浮于虚线上,剪刀从左侧的初始位置移到右侧,鼠标离开就返回。
问题出现在,当鼠标直接放在剪刀图标上的某个位置(位置不固定)时,有一定几率(可能是虚线越短几率越大)出现如下方GIF图(共13秒)所示的“抽风”情况。
GIF动图演示
本站主题版本为两天前(即2022年11月22日)发布的1.7.1版本,通过Release覆盖更新。但该问题在之前的版本也出现过。

[Bug]Typecho 1.2 Support

Typecho 1.2 rc.2
默认主题没有问题
切换到butterfly后报错Error establishing a database connection
开启debug后报错如下

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'views' in 'field list'
Typecho\Db\Adapter\SQLException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'views' in 'field list' in /www/wwwroot/beta.xenwayne.top/var/Typecho/Db/Adapter/Pdo.php:111
Stack trace:
#0 /www/wwwroot/beta.xenwayne.top/var/Typecho/Db.php(391): Typecho\Db\Adapter\Pdo-&gt;query()
#1 /www/wwwroot/beta.xenwayne.top/var/Typecho/Db.php(424): Typecho\Db-&gt;query()
#2 /www/wwwroot/beta.xenwayne.top/usr/themes/butterfly/functions.php(1320): Typecho\Db-&gt;fetchAll()
#3 /www/wwwroot/beta.xenwayne.top/usr/themes/butterfly/sidebar.php(210): theAllViews()
#4 /www/wwwroot/beta.xenwayne.top/var/Widget/Archive.php(1333): require('/www/wwwroot/be...')
#5 /www/wwwroot/beta.xenwayne.top/usr/themes/butterfly/index.php(104): Widget\Archive-&gt;need()
#6 /www/wwwroot/beta.xenwayne.top/var/Widget/Archive.php(1415): require_once('/www/wwwroot/be...')
#7 /www/wwwroot/beta.xenwayne.top/var/Typecho/Router.php(99): Widget\Archive-&gt;render()
#8 /www/wwwroot/beta.xenwayne.top/index.php(23): Typecho\Router::dispatch()
#9 {main}

sample: https://beta.xenwayne.top
在得到reply前我会保留此站点。

已发现的问题汇总

主题高大尚,为您点赞。使用中有以下问题,请查证:

1.置顶文章出错:Database Query Error
情况:Typecho 版本 1.1 (17.10.30)/SQLite,主题版本: 1.7.0;输入置顶文章的 cid,首页出错:Database Query Error,其它页面(分类页内容页)均正常显示。

2."是否显示文章内相关推荐"功能无效。即关闭情况下,内容页还显示(测试环境如上)。

3.内容页不显示标题,发表日期等信息
情况:在美化选项->是否显示文章示顶图,关闭情况下,不显示标题、发表日期等内容;
建议:优化为:在文章示顶图时,显示标题、发表日期等标题信息。

4.显示最新文章,开启情况下:侧栏“最新文章”,好像没有数量限制。
建议:在后台可以输入具体数量,对应在前端侧栏显示。

控制台输出错误

控制台会输出GET http://******.***/index.php/archives/3/0 net::ERR_ABORTED 404 (Not Found)
请求的是<script src="0" type="text/javascript"></script>
尝试找了一下似乎和footer.php的96行
<?php $this->header('commentReply=1&description=0&keywords=0&generator=0&template=0&pingback=0&xmlrpc=0&wlw=0&rss2=0&rss1=0&antiSpam=0&atom'); ?>
有关,注释掉就没了,本人半吊子,不太明白发生了啥,求解,谢谢

文章缩略图全都不显示了

Typecho版本 1.2.0。文章缩略图和作者头像全都不显示了。主页顶图(banner image)可以正常显示。打开文章顶图又可以正常显示。请教一下怎么回事呀

希望能加上 友链下方备注 功能

如建议所述。大多数博客申请友链都有要求,但限于主题没有此功能且Typecho最新版尚不支持评论置顶。希望能添加友链下方备注功能(就是在友情链接下方附上一些要求,如https://yuanzj.top/Links.html 所示,亦可看附图2)以解决此问题。
经本人简单开发测试(代码页面如图1)并使用了一段时间后,发现码html代码不如写Markdown方便,最佳解决方式即单独添加一个Typecho页面模板,以此作为备注功能的“编辑器”。
图1-友链申请备注功能设置
图二-本人简单开发的“友链下方备注”功能

希望能加上 文章点赞 功能

如建议所述。要让访客无需任何要求就可以参与互动,那点赞功能是很不错的选择。访客只需点击一下屏幕或鼠标,就可以完成此操作。
但是,据了解Typecho并没有内置相关接口。为了程序编写方便,我找到来了一些有代码的文字教程,如果博主同意就可以很快实现该功能(注意:代码均未测试过)。
https://www.misterma.com/archives/880/
http://www.yunzuji.cn/index.php/archives/26/

希望有大佬指导

是否从release页下的主题? | Is the theme download from Release Page?

是 (Yes)

使用的 Butterfly 版本? | What version of Butterfly are you use?

用过

是否修改过主题文件? | Has the theme files been modified?

不是 (No)

使用的浏览器? | What browse are you using?

Chrome

博客的运行环境? | What the running environment of the blog?

linux|php7.2+|typecho1.2|mysql5.6+|nginx

问题描述 | Describe the bug

请问大佬,如果我想实现网页文字和图片不被选中,应把

  -webkit-user-select: none;
  -ms-user-select: none;
  -khtml-user-select: none;
  user-select: none;

这些加到哪个css 的标签下呢

[issue]关于站点标题获取

header.php line9
主标题为什么获取的是description?

<h1 id="site-title"><?php $this->options->description() ?></h1>

获取的不应该是标题么= =
$this->options->title();

表示疑惑.jpg

在分类、标签、搜索页面中首页轮播图仍然显示

如标题所述。在博客域名下的“/search/”、“/category/”、“/tag/”页面里,主页轮播图仍然会在背景图(会在上层会显示“标签 Blog 下的文章”之类字样的头图)的下方显示。
希望能加入轮播图 在非首页显示 的开关,以便减少视觉干扰;觉得必要时,站长还可以再次打开以吸引访客点击。

404页面的header菜单疏漏

CT@622I)9C69@ XRLT7S
404页的header菜单仍然采用自动生成的菜单 且fontawesome图标有问题

小改了一下404.php

<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<html data-theme="light">
<?php $this->need('page_header.php'); ?>
<body _c_t_common="1">
<div id="web_bg"></div>
<div class="error404" id="body-wrap">
    <div id="error-wrap"><div class="error-content">
        <div class="error-img">
            <img src="https://i.loli.net/2020/05/19/aKOcLiyPl2JQdFD.png" alt="Page not found" class="entered">
        </div><div class="error-info"><h1 class="error_title">404</h1><div class="error_subtitle">页面没有找到</div></div></div></div></div>
</div>
</body>
</html>

总访问量报错

网站咨讯不显示数字 显示的是:
Notice: Undefined index: SUM(views) in ……themes/Typecho-Butterfly-main/functions.php on line 1487

同时,在 设置外观 显示的是:
Notice: Trying to access array offset on value of type null in ……/themes/Typecho-Butterfly-main/functions.php on line 499

[Bug]:

是否从release页下的主题? | Is the theme download from Release Page?

是 (Yes)

使用的 Butterfly 版本? | What version of Butterfly are you use?

1.7.5

是否修改过主题文件? | Has the theme files been modified?

不是 (No)

使用的浏览器? | What browse are you using?

Chrome

博客的运行环境? | What the running environment of the blog?

linux|php7.2+|typecho1.2|mysql5.6+|nginx

问题描述 | Describe the bug

不清楚该怎么描述,只好上截图了。
1.博客文章浏览有问题。
image
image
2.代码块这里不清楚是主题还是插件引起的
image
3.编辑页里预览主题报错(Argument 1 passed to Utils\AutoP::parse() must be of the type string, null given, called in /www/wwwroot/typecho.mgcl2.ml/var/Widget/Base/Contents.php on line 938)
image
目前就这些问题。。。

[Bug]: md渲染问题

是否从release页下的主题? | Is the theme download from Release Page?

是 (Yes)

使用的 Butterfly 版本? | What version of Butterfly are you use?

1.7.5

是否修改过主题文件? | Has the theme files been modified?

不是 (No)

使用的浏览器? | What browse are you using?

Chrome

博客的运行环境? | What the running environment of the blog?

linux|php7.2+|typecho1.2|mysql5.6+|nginx

问题描述 | Describe the bug

开发者您好,感谢您的辛勤付出使得typecho能拥有如此精美的主题,在使用过程中我也发现了一些问题,经过一番排查基本确定是该主题的存在的bug,即当使用md的图片链接功能(![test.png](https://www.example.com/test.png)) 的同时,在下方同时使用标题语法(如###)会出现渲染错误,图片无法渲染并且图片之后的文字被渲染成标题。由于目前自己仅有一台设备,暂时无法在其它设备复现,希望开发者您能在百忙之中抽空检查一下,万分感谢您的付出!以下是问题截图:
下方无标题语法时:
no#.png
no#2.png
下方有标题语法时:
#.png
#2.png
有标题语法时的默认主题下显示正常:
default.png

[Bug]: 1.7.3文章略缩图和头像无法显示

是否从release页下的主题? | Is the theme download from Release Page?

是 (Yes)

使用的 Butterfly 版本? | What version of Butterfly are you use?

1.7.3

是否修改过主题文件? | Has the theme files been modified?

不是 (No)

使用的浏览器? | What browse are you using?

Chrome

博客的运行环境? | What the running environment of the blog?

linux|php7.2+|typecho1.2|mysql5.6+|nginx

问题描述 | Describe the bug

如图,1.7.2版本无此问题,另:祝新年快乐
image

关于自定义修改的问题

1.请问左上角的Hello world 和顶图的Your Description here 在哪里改?
image

  1. 可以添加图片做博客的背景吗?

[Bug]: html无法正常显示

是否从release页下的主题? | Is the theme download from Release Page?

是 (Yes)

使用的 Butterfly 版本? | What version of Butterfly are you use?

1.7.3

是否修改过主题文件? | Has the theme files been modified?

不是 (No)

使用的浏览器? | What browse are you using?

Chrome

博客的运行环境? | What the running environment of the blog?

linux|php7.2+|typecho1.2|mysql5.6+|nginx

问题描述 | Describe the bug

使用!!!html代码!!!
html代码多起来无法正常显示

评论报错

Argument 1 passed to Widget\Base\Comments::insert() must be of the type array, null given, called in /www/wwwroot/blog/var/Widget/Feedback.php on line 265

[Bug]评论区图片超出容器

1
2
3
如图三,在img.entered.loading类限制宽高均为100%后恢复正常

2022/02/11 Update:
意识到直接设置width100%不妥
通过max-width避免拉伸小图片

div.comment-content p > img {
     max-width: 65%;
}

文章页面和独立页面的头图在后台没有设置项

博客安装以后,文章页面头部背景图是一个蓝底的图片,后台好像没有地方可以设置 background-image: 这个参数,我直接改了 /page_header.php 里面的url图片链接才改成功,这个功能应该和首页背景图一样加个自定义图片链接的设置项。

导航栏图标显示异常

image
此处标签页展示图标显示异常,排查了一下问题,好像是$this->title获取到的字符含有空格,换行等字符。造成匹配不上。
image
此图是我的博客显示问题,希望指点一下,暂时没有找到解决方案。

博客地址:yanjiuseng.top

[Bug]: 首页第一篇文章无法正常进入,如果进入就变成500报错

是否从release页下的主题? | Is the theme download from Release Page?

是 (Yes)

使用的 Butterfly 版本? | What version of Butterfly are you use?

1.7.3

是否修改过主题文件? | Has the theme files been modified?

不是 (No)

使用的浏览器? | What browse are you using?

Chrome

博客的运行环境? | What the running environment of the blog?

linux|php7.2+|typecho1.2|mysql5.6+|nginx

问题描述 | Describe the bug

Screenshot_20230218_022855

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.