fix(footer): align template_1 shell with Zibll 1:1
Rewrite footer markup to zib_footer_con contract: single adaptive logo (white-src/dark-src), fcode-links HTML primary, float third column, hidden-xs, toggle-radius contacts, miniimg structure, customize-first footer-conter. Restyle zibll-shell CSS and drop conflicting site-footer BEM padding so filled footer data matches Zibll layout.
This commit is contained in:
1 parent
fabff49d11
commit
1e37da60c9
11 files changed
+466
-597
No files matched your search
@@ -448,7 +448,7 @@ class AKSRT_Admin_Global_Controller extends AKSRT_Admin_Controller_Base {
|
||||
'more_links' => [],
|
||||
'hot_categories' => 5,
|
||||
'copyright_text' => '',
|
||||
'layout_template' => 'default',
|
||||
'layout_template' => 'template_1',
|
||||
'footer_t1_m_s' => ['pc', 'mobile'],
|
||||
'footer_t1_img' => '',
|
||||
'footer_t1_img_dark' => '',
|
||||
@@ -477,8 +477,7 @@ class AKSRT_Admin_Global_Controller extends AKSRT_Admin_Controller_Base {
|
||||
'more_links' => isset($params['more_links']) ? $this->sanitize_link_list($params['more_links']) : [],
|
||||
'hot_categories' => (int) ($params['hot_categories'] ?? 5),
|
||||
'copyright_text' => sanitize_textarea_field($params['copyright_text'] ?? ''),
|
||||
'layout_template' => in_array($params['layout_template'] ?? '', ['default', 'compact', 'centered'], true)
|
||||
? $params['layout_template'] : 'default',
|
||||
'layout_template' => 'template_1',
|
||||
'footer_t1_m_s' => $this->sanitize_device_visibility($params['footer_t1_m_s'] ?? ['pc', 'mobile']),
|
||||
'footer_t1_img' => esc_url_raw($params['footer_t1_img'] ?? ''),
|
||||
'footer_t1_img_dark' => esc_url_raw($params['footer_t1_img_dark'] ?? ''),
|
||||
|
||||
@@ -450,8 +450,8 @@ class AKSRT_Admin_Schema_Page_Display {
|
||||
['label' => '移动端', 'value' => 'mobile'],
|
||||
]],
|
||||
['key' => 'footer_contact_more', 'label' => '更多联系项', 'type' => 'textarea', 'default' => '', 'help' => 'JSON 数组,每项含 desc/icon/link/img'],
|
||||
['key' => 'fcode_t2_code_1', 'label' => '联系区上方自定义代码', 'type' => 'textarea', 'default' => ''],
|
||||
['key' => 'fcode_t2_code_2', 'label' => '联系区下方自定义代码(备案等)', 'type' => 'textarea', 'default' => ''],
|
||||
['key' => 'fcode_t2_code_1', 'label' => '链接 HTML(fcode_t2_code_1)', 'type' => 'textarea', 'default' => '', 'help' => '直接写 <a> 链接 HTML;为空时回退快速链接/友链/热门分类'],
|
||||
['key' => 'fcode_t2_code_2', 'label' => '链接下方自定义代码', 'type' => 'textarea', 'default' => '', 'help' => '备案号等 HTML'],
|
||||
]],
|
||||
['key' => 'mini_qr', 'title' => '二维码图片组(第三列)', 'fields' => [
|
||||
['key' => 'footer_mini_img_m_s', 'label' => '显示设备', 'type' => 'checkbox', 'default' => ['pc', 'mobile'], 'options' => [
|
||||
|
||||
@@ -65,11 +65,12 @@ trait AKSRT_Settings_Domain_Groups {
|
||||
*/
|
||||
public static function get_footer_layout_template(): string {
|
||||
$footer = self::get_footer_settings();
|
||||
$template = sanitize_key((string) ($footer['layout_template'] ?? 'default'));
|
||||
if (!in_array($template, ['default', 'compact', 'centered'], true)) {
|
||||
$template = 'default';
|
||||
$template = sanitize_key((string) ($footer['layout_template'] ?? 'template_1'));
|
||||
// Legacy aliases map onto Zibll template_1 shell.
|
||||
if (in_array($template, ['default', 'compact', 'centered', 'template_1'], true)) {
|
||||
return 'template_1';
|
||||
}
|
||||
return $template;
|
||||
return 'template_1';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,10 +16,10 @@ class AKSRT_Settings_Home_Cms {
|
||||
'more_links' => [],
|
||||
'hot_categories' => 5,
|
||||
'copyright_text' => '',
|
||||
'layout_template' => 'default',
|
||||
'layout_template' => 'template_1',
|
||||
];
|
||||
$footer = get_option('aksrt_footer_settings', []);
|
||||
$merged = array_merge($defaults, $footer);
|
||||
$merged = array_merge($defaults, is_array($footer) ? $footer : []);
|
||||
|
||||
$s = AKSRT_Settings::get_all();
|
||||
$bridge_keys = [
|
||||
@@ -92,9 +92,26 @@ class AKSRT_Settings_Home_Cms {
|
||||
|
||||
public static function get_footer_mini_img_settings(): array {
|
||||
$f = self::get_footer_settings();
|
||||
$raw_items = is_array($f['footer_mini_img'] ?? null) ? $f['footer_mini_img'] : [];
|
||||
$items = [];
|
||||
foreach ($raw_items as $item) {
|
||||
if (!is_array($item)) {
|
||||
continue;
|
||||
}
|
||||
$img = (string) ($item['img'] ?? $item['image'] ?? '');
|
||||
if ($img === '') {
|
||||
continue;
|
||||
}
|
||||
$items[] = [
|
||||
'img' => $img,
|
||||
'image' => $img,
|
||||
'text' => (string) ($item['text'] ?? $item['label'] ?? ''),
|
||||
'label' => (string) ($item['label'] ?? $item['text'] ?? ''),
|
||||
];
|
||||
}
|
||||
return [
|
||||
'm_s' => is_array($f['footer_mini_img_m_s'] ?? null) ? $f['footer_mini_img_m_s'] : ['pc', 'mobile'],
|
||||
'items' => is_array($f['footer_mini_img'] ?? null) ? $f['footer_mini_img'] : [],
|
||||
'items' => $items,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user