更新
This commit is contained in:
parent
a46bbde7a9
commit
486a3ee2c6
File diff suppressed because one or more lines are too long
@ -1043,6 +1043,25 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
&.advert {
|
||||
display: block;
|
||||
img {
|
||||
width: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
.icon {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
font-size: 12px;
|
||||
background: rgba(0, 0, 0, 0.25);
|
||||
padding: 2px 5px;
|
||||
border-radius: 2px;
|
||||
color: #ebebeb;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
/* 获取主题当前版本号 */
|
||||
function _getVersion()
|
||||
{
|
||||
return "5.5.1";
|
||||
return "5.5.2";
|
||||
};
|
||||
|
||||
/* 判断是否是手机 */
|
||||
|
@ -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);
|
||||
|
||||
|
||||
|
||||
|
@ -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>
|
Loading…
Reference in New Issue
Block a user