Skip to content

Commit

Permalink
Merge pull request #111 from youranreus/feat/v3.4.1
Browse files Browse the repository at this point in the history
version 3.4.1
  • Loading branch information
youranreus authored Sep 21, 2024
2 parents d2d2026 + f4e36a9 commit d0caa71
Show file tree
Hide file tree
Showing 9 changed files with 467 additions and 439 deletions.
8 changes: 6 additions & 2 deletions components/comments.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__'))
exit;

if (G::$config["commentType"] != '1')
return;

$GLOBALS['theme_url'] = $this->options->themeUrl;
$header = G::Comment_hash_fix($this);
echo $header;
Expand Down Expand Up @@ -72,8 +76,8 @@ function threadedComments($comments, $options)
<?php else: ?>
<!-- 要求输入名字、邮箱、网址 -->
<div class="comments-Input">
<input type="text" name="author" class="text" size="35" value="<?php $this->remember('author'); ?>" placeholder="🙌用户名"/>
<input type="text" name="mail" class="text" size="35" value="<?php $this->remember('mail'); ?>" placeholder="📫邮箱"/>
<input type="text" name="author" class="text" size="35" value="<?php $this->remember('author'); ?>" placeholder="🙌用户名*"/>
<input type="text" name="mail" class="text" size="35" value="<?php $this->remember('mail'); ?>" placeholder="📫邮箱*"/>
<input type="text" name="url" class="text" size="35" value="<?php $this->remember('url'); ?>" placeholder="🔗博客链接"/>
<input type="hidden" name="receiveMail" id="receiveMail" value="yes"/>
</div>
Expand Down
6 changes: 6 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,12 @@ function themeConfig($form)
$autoNightSpan = new Typecho_Widget_Helper_Form_Element_Text('autoNightSpan', null, '23-6', _t('自动夜间模式时间段'), _t('24小时制,当前晚上x点到第二天早上y点视为夜间,需要自动开启夜间模式,例: 23-6'));
$form->addInput($autoNightSpan);

$commentType = new Typecho_Widget_Helper_Form_Element_Radio('commentType', array(
'1' => _t('开启'),
'0' => _t('关闭')
), '1', _t('评论展示开关'), _t('默认开启'));
$form->addInput($commentType);

$autoNightMode = new Typecho_Widget_Helper_Form_Element_Radio('autoNightMode', array(
'3' => _t('跟随系统'),
'2' => _t('自定义时间段'),
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @package G
* @author 季悠然
* @version 3.4.0
* @version 3.4.1
* @link https://mitsuha.space
*/

Expand Down
3 changes: 2 additions & 1 deletion libs/G.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class G
*
* @var string
*/
public static $version = "3.4.0";
public static $version = "3.4.1";

/**
* 主题配置
Expand All @@ -37,6 +37,7 @@ class G
'enableDefaultTOC' => '',
'autoNightSpan' => '',
'autoNightMode' => '',
'commentType' => '',
];

public static $advanceConfig = [];
Expand Down
2 changes: 1 addition & 1 deletion static/css/G.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/css/G.css.map

Large diffs are not rendered by default.

13 changes: 12 additions & 1 deletion static/css/G.less
Original file line number Diff line number Diff line change
Expand Up @@ -1403,6 +1403,7 @@ pre[class*='language-'] {
min-width: 40%;
max-width: 85%;
box-shadow: var(--theme-shadow);
word-wrap: break-word;

p {
color: @color_3;
Expand Down Expand Up @@ -2124,13 +2125,23 @@ span#toggleOwO {
}

#sliderbar-cover {
display: none;
position: fixed;
top: 0;
left: 0;
z-index: 998;
width: 100%;
height: 100%;
background: rgba(75, 85, 99, 0.5);
-webkit-backdrop-filter: blur(4px);
backdrop-filter: blur(4px);
opacity: 0;
visibility: hidden;
transition: opacity 0.5s ease;

&.sliderbar-cover__show {
opacity: 1;
visibility: visible;
}
}

.sliderbar-content {
Expand Down
Loading

0 comments on commit d0caa71

Please sign in to comment.