feat: change header img

pull/409/head^2
Seaton Jiang 2021-08-20 17:15:33 +08:00
parent 9539014c2e
commit 543c550a52
No known key found for this signature in database
GPG Key ID: 0E05070D261ACFEA
4 changed files with 2 additions and 8 deletions

BIN
assets/img/background.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 532 KiB

View File

@ -66,13 +66,7 @@
<?php if (kratos_option('top_img_switch', true)) { ?>
<div class="banner">
<div class="overlay"></div>
<div class="content text-center" style="background-image: url(<?php
if (!kratos_option('top_img')) {
$img = ASSET_PATH . '/assets/img/background.png';
} else {
$img = kratos_option('top_img', ASSET_PATH . '/assets/img/background.png');
}
echo $img; ?>);">
<div class="content text-center" style="background-image: url(<?php echo kratos_option('top_img', ASSET_PATH . '/assets/img/background.jpg'); ?>);">
<div class="introduce animate__animated animate__fadeInUp">
<?php
if (is_category() || is_tag()) {

View File

@ -813,7 +813,7 @@ CSF::createSection($prefix, array(
'title' => __('顶部图片', 'kratos'),
'library' => 'image',
'preview' => true,
'default' => get_template_directory_uri() . '/assets/img/background.png',
'default' => get_template_directory_uri() . '/assets/img/background.jpg',
),
array(
'id' => 'top_title',