Minor update (#1451)

* Update

- 更新 Windows 和 Linux 系统中文本编辑器样式问题(为代码块中添加中文后备字体修正样式)

* Update

- 缩略图支持识别 avif 图片(具体可参考https://en.wikipedia.org/wiki/AVIF
This commit is contained in:
Kane 2022-06-07 18:08:24 +08:00 committed by GitHub
parent 1d0e253281
commit 7f7b24d28f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -4,13 +4,13 @@
/** Typecho 全局样式 */
html { height: 100%; }
body { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; background: #F6F6F3; color: #444; font-size: 87.5%; line-height: 1.5; }
body { font-family: 'Helvetica Neue', Helvetica, Arial, -apple-system, system-ui, sans-serif; background: #F6F6F3; color: #444; font-size: 87.5%; line-height: 1.5; }
a { color: #467B96; text-decoration: none; }
a:hover { color: #499BC3; text-decoration: underline; }
code, pre, .mono { font-family: Menlo, Monaco, Consolas, "Courier New", monospace; }
code, pre, .mono { font-family: 'SF Mono', Menlo, Monaco, Consolas, 'Courier New', -apple-system, system-ui, monospace; }
.p { margin: 1em 0; }

View File

@ -554,7 +554,7 @@ class Contents extends Base implements QueryInterface
//增加数据信息
$value['attachment'] = new Config($content);
$value['attachment']->isImage = in_array($content['type'], ['jpg', 'jpeg', 'gif', 'png', 'tiff', 'bmp', 'webp']);
$value['attachment']->isImage = in_array($content['type'], ['jpg', 'jpeg', 'gif', 'png', 'tiff', 'bmp', 'webp', 'avif']);
$value['attachment']->url = Upload::attachmentHandle($value);
if ($value['attachment']->isImage) {

View File

@ -45,7 +45,7 @@ class Rows extends Widget
}
$screen = array_filter(glob($theme . '/*'), function ($path) {
return preg_match("/screenshot\.(jpg|png|gif|bmp|jpeg|webp)$/i", $path);
return preg_match("/screenshot\.(jpg|png|gif|bmp|jpeg|webp|avif)$/i", $path);
});
if ($screen) {