取消友链 Avatar 的选项

This commit is contained in:
Skywt2003 2021-11-16 23:38:59 +08:00
parent 14ddb2fb5c
commit f0544a42b7
2 changed files with 1 additions and 11 deletions

View File

@ -6,9 +6,6 @@
*/ */
if (!defined('__TYPECHO_ROOT_DIR__')) exit; if (!defined('__TYPECHO_ROOT_DIR__')) exit;
$this->need('header.php'); $this->need('header.php');
if ($this->options->friendAvatar == 'icon') $avatarUrl = 'https://www.google.cn/s2/favicons?domain={url}';
else $avatarUrl = '{image}';
?> ?>
<div class="col mt-5" id="main" role="main"> <div class="col mt-5" id="main" role="main">
@ -21,7 +18,7 @@ else $avatarUrl = '{image}';
Links_Plugin::output($pattern=' Links_Plugin::output($pattern='
<div class="col-12 col-sm-6 col-md-4 pt-2 pb-2"> <div class="col-12 col-sm-6 col-md-4 pt-2 pb-2">
<a class="friend btn btn-secondary btn-lg text-left w-100" role="button" href="{url}" target="_blank"> <a class="friend btn btn-secondary btn-lg text-left w-100" role="button" href="{url}" target="_blank">
<img class="avatar position-absolute" src="'.$avatarUrl.'" alt="{name}""> <img class="avatar position-absolute" src="{image}" alt="{name}"">
<div class="position-relative text-capitalize text-truncate ml-6"> <div class="position-relative text-capitalize text-truncate ml-6">
<span class="font-weight-900">{name}</span> <br> <span class="font-weight-900">{name}</span> <br>
<span class="text-gray">{description}</span> <span class="text-gray">{description}</span>

View File

@ -33,13 +33,6 @@ function themeConfig($form) {
), ),
'disable', _t('是否显示旧文提示'), _t('启用则会在一年前发布的文章页面显示“这是一篇旧文”')); 'disable', _t('是否显示旧文提示'), _t('启用则会在一年前发布的文章页面显示“这是一篇旧文”'));
$form->addInput($oldPosts); $form->addInput($oldPosts);
$friendAvatar = new Typecho_Widget_Helper_Form_Element_Radio('friendAvatar',
array('icon' => _t('网站 icon'),
'img' => _t('自定义图片'),
),
'icon', _t('友链页面的头像来源'), _t('前者自动使用对方网站 icon 作为头像,后者需要在 links 插件中自行设置图片作为头像'));
$form->addInput($friendAvatar);
} }
function themeFields($layout) { function themeFields($layout) {