diff --git a/404.php b/404.php index 9a23950..981362a 100644 --- a/404.php +++ b/404.php @@ -9,7 +9,7 @@ * [Romanticism] * 404.php 错误页 - * @version 2.1 + * @version 2.0 **/ ?> diff --git a/README.md b/README.md index 563a295..7eb4124 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -![主题图](https://mono.imakashi.eu.org/opensource/github-Romanticism2.1Screenshot.webp.webp) +![主题图](https://mono.imakashi.eu.org/opensource/github-Romanticism2theme.webp) # Romanticism(浪漫主义) 一款简洁的 typecho 主题 -当前版本:V2.1 +当前版本:V2.2 **“在明石的简洁设计中捕捉来自日常生活中的浪漫主义。”** @@ -12,23 +12,22 @@ Demo: [明石博客](https://imakashi.eu.org/blog/) ## 特性 -- 高度统一的明石设计风格,简洁明快、赏心悦目; - -- 全局思源宋体,适合文字阅读; - -- 无插件文章置顶样式; - -- 代码高亮,为你的代码锦上添花; - -- 原生自带图片灯箱,快让朋友们来欣赏你发的照片吧; - -- 评论原生数字验证码,拒绝麦片哥评论; - -- 评论原生可发送表情,为对话赋予灵魂; - -- 手动深色模式,夜间阅读保护视力; - -- 还有文章归档页、“短讯” 、Gravatar 头像、自带无插件友链页面、评论UA等等功能。 +> - 高度统一的明石设计风格,简洁明快、赏心悦目; +> +> - 全局思源宋体,适合文字阅读; +> +> - 完全响应式,什么设备访问都合适; +> +> - 代码高亮,为你的代码锦上添花; +> - 原生自带图片灯箱,快让朋友们来欣赏你发的照片吧; +> +> - 评论原生数字验证码,拒绝麦片哥评论; +> +> - 评论原生可发送表情,为对话赋予“灵魂”; +> +> - 手动深色模式,夜间阅读保护视力; +> +> - 还有文章归档页、“短讯” 、Gravatar 头像、自带无插件友链页面、评论UA等等功能。 ## 使用方法 @@ -85,21 +84,21 @@ Demo: [明石博客](https://imakashi.eu.org/blog/) 3. 代码高亮格式:使用 ` ``` ` 包裹一段代码,并指定一种语言; 4. 快速登录:点击侧边栏上你的头像以进入博客后台管理页面。 + 5. 文章内Github卡片:`[github link=""]` 在引号内输入 作者/项目名,例如“akashiwest/Romanticism” ## 其他问题 - - “首页加载动画”功能由于是所有数据加载完成后才会消失,在某些复杂环境中如果你觉得加载时间太长,请尝试关闭此功能; - 受限于本人的技术,即使我已经进行检查与测试,也仍然会有存在 bug 的可能。如你发现了此主题存在的 bug 请给我留言,谢谢! + - 暂时不支持使用 sqlite 数据库的 typecho 站点使用。 ## 鼓励 喜欢此主题的话请**Star本项目**哦!这是对我最大的认可! ## 版权与声明 + **禁止将本主题用于非法网站搭建。由此产生一切后果皆由使用者承担。** **It is prohibited to use this theme for building illegal websites. Any consequences arising from such use shall be borne solely by the user.** -Romanticism Version 2.1 +Romanticism Version 2.2 -![GitHub](https://mono.imakashi.eu.org/opensource/GPL3.svg) - -Copyright©2021-2025 [Akashi](https://imakashi.eu.org), under GPL-3.0 License \ No newline at end of file +Copyright©2022-2025 [Akashi](https://imakashi.eu.org), under GPL-3.0 License diff --git a/archivesbox.php b/archivesbox.php index 8d51f83..9de3490 100644 --- a/archivesbox.php +++ b/archivesbox.php @@ -34,11 +34,7 @@ fields->AKAROMarticleimg != null): ?> background-image: url('fields->AKAROMarticleimg(); ?>'); - - background-image: url('options->themeUrl("config/style/img/default/cover/{$randomNum}.webp"); ?>'); + background-image: url('options->themeUrl("config/style/img/default/cover/{$randomNum}.webp"); ?>'); "> @@ -68,10 +64,11 @@ $output .= '

'. $year .' 年

'; } if (!empty($archives->title)) { - $output .= '

'.date('m月d日', $archives->created).' '. $archives->title .'

'; + $output .= '

'.date('n月d日',$archives->created).' '. $archives->title .'

'; } endwhile; - echo '

当前共有 '.$count.' 篇文章



'; + $WordCount = getTotalWordCount(); + echo '

'.$WordCount.' 个字符环绕在 '.$count.' 篇文章周围



'; echo $output; ?>
diff --git a/config/OwO.php b/config/OwO.php index ba0cbe9..065f3de 100644 --- a/config/OwO.php +++ b/config/OwO.php @@ -9,7 +9,7 @@ * [Romanticism] * OwO.php 评论区表情文件 - * @version 2.1 + * @version 2.0 **/ ?> diff --git a/config/comments.php b/config/comments.php index 98b35aa..5ef7ca4 100644 --- a/config/comments.php +++ b/config/comments.php @@ -1,6 +1,6 @@ @@ -20,72 +20,75 @@ -authorId) { if ($comments->authorId == $comments->ownerId) { - $commentClass = ' 作者 '; //如果是文章作者的评论添加样式 - }else{ + $commentClass = ' 作者 '; } - } - $commentLevelClass = $comments->_levels > 0 ? ' comment-child' : ' comment-parent'; //评论层数大于0为子级,否则是父级 + } + // 如果评论状态是审核中 + if ($comments->status != 'approved') { + $comments->content = ' 当前评论将在审核后展示 ' . $comments->content; + } + $commentLevelClass = $comments->_levels > 0 ? ' comment-child' : ' comment-parent'; ?> -
  • -
    -
    - - mail; - $mail=md5($mail); - $headicon='https://cravatar.cn/avatar/'.$mail.'.png'; - echo ''; - ?> - -

    author(); ?>agent); ?> agent); ?>

    -
    - -
    date('y-m-d H:i'); ?> · reply('回复'); ?>
    +
    +
    + + mail); + $headicon = 'https://cravatar.cn/avatar/'.$mail.'.png'; + echo ''; + ?> + +

    + author(); ?> + + agent); ?> agent); ?> + +

    +
    +
    + date('y-m-d H:i'); ?> · reply('回复'); ?> +
    '; - }, - $comments->content - ); - echo '
    ' . $parsedComment . '
    '; + // 解析带表情的评论内容 + $parsedComment = preg_replace_callback( + '#\@OwO(b)?\((.*?)\)#', + function ($matches) { + $width = $matches[1] ? '50' : '30'; + $emoticon = $matches[2]; + $themeUrl = htmlspecialchars($GLOBALS['theme_url'], ENT_QUOTES, 'UTF-8'); + return '' . $emoticon . ''; + }, + $comments->content + ); + echo '
    ' . $parsedComment . '
    '; ?> - -
    -
    -
    -
    -children) { ?> -
    - threadedComments($options); ?> -
    - +
    +
    +
    +
    + children) { ?> +
    + threadedComments($options); ?> +
    +
  • - - +
    @@ -95,65 +98,68 @@ $comments->alt(' comment-odd', ' comment-even'); allow('comment')): ?>
    - cancelReply(); ?> -
    + cancelReply(); ?> +

    user->hasLogin()): ?> 当前登录身份:author->screenName(); ?>

    - + + + face表情 + +

    need('config/OwO.php'); ?>
    - textsms - -
    内容不能为空
    -
    - - - -

    - need('config/OwO.php'); ?> -
    - textsms - -
    内容不能为空
    -
    - -
    -
    -
    - account_circle - -
    昵称不能为空
    -
    + textsms + +
    内容不能为空
    -
    -
    - email - -
    邮件地址格式错误
    -
    -
    -
    - -
    -
    -
    - web - -
    -
    -
    + + + + face表情 + + +

    + need('config/OwO.php'); ?> +
    + textsms + +
    内容不能为空
    +
    + +
    +
    +
    + + +
    昵称不能为空
    +
    +
    +
    +
    + email + +
    邮件地址格式错误
    +
    +
    +
    + +
    +
    +
    + web + +
    +
    +
    + +
    -
    - @@ -163,14 +169,14 @@ $comments->alt(' comment-odd', ' comment-even'); - - - - + + + + @@ -63,80 +63,9 @@ options->AKAROMfucset) && in_array('AKAROMindexloading', $this->options->AKAROMfucset)): ?> - + - - - + + + options->AKAROMcustomJs)): ?> + options->AKAROMcustomCss)): ?> @@ -88,8 +61,8 @@ error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERRO - @@ -111,7 +84,7 @@ error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERRO
    -