refactor: optimized footer config

pull/409/head^2
Seaton Jiang 2021-08-20 15:21:27 +08:00
parent 6f7513c6ff
commit fd21cb73c4
No known key found for this signature in database
GPG Key ID: 0E05070D261ACFEA
2 changed files with 7 additions and 7 deletions

View File

@ -36,10 +36,10 @@
<div class="col-12 text-center">
<p class="social">
<?php
$social = array('s_sina', 's_bilibili', 's_douban', 's_coding', 's_gitee', 's_twitter', 's_telegram', 's_linkedin', 's_youtube', 's_github', 's_stackflow', 's_email');
foreach ($social as $social) {
if (kratos_option($social)) {
echo '<a target="_blank" rel="nofollow" href="' . kratos_option($social . '_url') . '"><i class="kicon i-' . str_replace("s_", "", $social) . '"></i></a>';
$socials = array('s_sina_url', 's_bilibili_url', 's_douban_url', 's_coding_url', 's_gitee_url', 's_twitter_url', 's_telegram_url', 's_linkedin_url', 's_youtube_url', 's_github_url', 's_stackflow_url', 's_email_url');
foreach ($socials as $value) {
if (kratos_option($value, '', 's_social_fieldset')) {
echo '<a target="_blank" rel="nofollow" href="' . kratos_option($value, '', 's_social_fieldset') . '"><i class="kicon i-' . str_replace(array("s_", "_url"), array('', ''), $value) . '"></i></a>';
}
}
?>

View File

@ -847,7 +847,7 @@ CSF::createSection($prefix, array(
'icon' => 'fas fa-arrow-right',
'fields' => array(
array(
'id' => 's_social_domestic_fieldset',
'id' => 's_social_fieldset',
'type' => 'fieldset',
'fields' => array(
array(
@ -887,7 +887,7 @@ CSF::createSection($prefix, array(
),
),
array(
'id' => 's_social_overseas_fieldset',
'id' => 's_social_fieldset',
'type' => 'fieldset',
'fields' => array(
array(
@ -933,7 +933,7 @@ CSF::createSection($prefix, array(
),
),
array(
'id' => 's_social_domestic_fieldset',
'id' => 's_social_fieldset',
'type' => 'fieldset',
'fields' => array(
array(