This commit is contained in:
杜恒 2021-03-02 20:31:37 +08:00
parent a46bbde7a9
commit 486a3ee2c6
5 changed files with 3052 additions and 3014 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
/* 获取主题当前版本号 */
function _getVersion()
{
return "5.5.1";
return "5.5.2";
};
/* 判断是否是手机 */

View File

@ -338,7 +338,7 @@ function themeConfig($form)
$JCustomFont->setAttribute('class', 'joe_content joe_global');
$form->addInput($JCustomFont);
$JAside_Author_Nick = new Typecho_Widget_Helper_Form_Element_Text(
'JAside_Author_Nick',
NULL,
@ -594,6 +594,19 @@ function themeConfig($form)
);
$JAside_Weather_Style->setAttribute('class', 'joe_content joe_aside');
$form->addInput($JAside_Weather_Style->multiMode());
/* --------------------------------------- */
$JADContent = new Typecho_Widget_Helper_Form_Element_Textarea(
'JADContent',
NULL,
NULL,
'侧边栏广告(非必填)',
'介绍:用于设置侧边栏广告<br />
格式:广告图片 || 跳转链接 (中间使用两个竖杠分隔)<br />
例如https://cdn.jsdelivr.net/gh/HaoOuBa/Joe@master/assets/thumb/1.jpg || https://as.js.cn <br />
注意:如果您只想显示图片不想跳转,可填写:广告图片 || javascript:void(0)'
);
$JADContent->setAttribute('class', 'joe_content joe_aside');
$form->addInput($JADContent);

View File

@ -132,4 +132,10 @@
</div>
</section>
<?php endif; ?>
<?php if ($this->options->JADContent) : ?>
<a class="joe_aside__item advert" target="_blank" rel="noopener noreferrer nofollow" href="<?php echo explode("||", $this->options->JADContent)[1]; ?>" title="广告">
<img class="lazyload" width="100%" src="<?php _getLazyload() ?>" data-src="<?php echo explode("||", $this->options->JADContent)[0]; ?>" onerror="javascript: this.src='<?php _getLazyload() ?>';" alt="广告" />
<span class="icon">广告</span>
</a>
<?php endif; ?>
</aside>