diff options
| -rw-r--r-- | includes/header.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/includes/header.php b/includes/header.php index 8530ddf..8ec824f 100644 --- a/includes/header.php +++ b/includes/header.php @@ -95,13 +95,15 @@ <?php endif; ?> <div id="pjax-container"><!-- 开始 pjax-container --> <header> + <!-- Banner --> <?php if($this->is('post') || $this->is('page')): ?> - <div class="index-banner" style="background-position:center!important;<?php if($this->fields->banner && $this->fields->banner=!''): ?>background:url('<?php $this->fields->banner(); ?>') no-repeat;<?php endif; ?>height:<?php $this->options->bannerHeight(); ?>vh;background-size:cover;"> + <div class="index-banner" style="background-position:center!important;<?php if($this->fields->banner && $this->fields->banner=!''): ?>background-image:url('<?php $this->fields->banner(); ?>') no-repeat;<?php endif; ?>height:<?php $this->options->bannerHeight(); ?>vh;background-size:cover;"> <?php elseif($this->is('archive')): ?> - <div class="index-banner" style="height:<?php $this->options->bannerHeight(); ?>vh;background-position:center!important;<?php if($this->options->bannerUrl!=''): echo $this->options->bannerUrl(); endif; ?>"> + <div class="index-banner" style="height:<?php $this->options->bannerHeight(); ?>vh;background-position:center!important;background-image:url<?php if($this->options->bannerUrl!=''): echo $this->options->bannerUrl(); endif; ?>"> <?php else: ?> - <div class="index-banner" style="background-position:center;background:url('<?php $this->options->bannerUrl(); ?>') no-repeat;height:<?php $this->options->bannerHeight(); ?>vh;background-size:cover;"> + <div class="index-banner" style="background-position:center;background-image:url('<?php $this->options->bannerUrl(); ?>') no-repeat;height:<?php $this->options->bannerHeight(); ?>vh;background-size:cover;"> <?php endif; ?> + <!-- 遮罩 --> <div class="banner-mask"<?php if($this->is('post') || $this->is('page')):?><?php if($this->fields->banner==''):?> style="background:rgba(0,0,0,0)!important"<?php endif;?><?php endif; ?><?php if($this->is('index')):?><?php if($this->options->bannerUrl && $this->options->bannerUrl=!''): ?><?php else:?> style="background:rgba(0,0,0,0)!important"<?php endif;?><?php endif;?>> <div class="main-container container"> <div class="banner-content<?php if($this->is('index') && $this->options->bannerFont==1): ?> banner-font-black<?php endif; ?><?php if($this->is('page') || $this->is('post')): if($this->fields->banner==''): ?> banner-font-black<?php endif; endif; ?>" id="banner-content"> |
