diff options
| author | BigCoke233 <hi@guhub.cn> | 2020-05-30 15:53:31 +0800 |
|---|---|---|
| committer | BigCoke233 <hi@guhub.cn> | 2020-05-30 15:53:31 +0800 |
| commit | b8b739c9e2084238370ae3b688a4f0112da5fa8b (patch) | |
| tree | f2bed1e0d886729fbffb1e6a6da5f02c9b202b97 /includes | |
| parent | 244832eddf5cfa451c0526843a0acb8e463e8785 (diff) | |
:zap: Perf: 在 php 层检测 faviconDark,避免前台出现 404 报错
Diffstat (limited to 'includes')
| -rw-r--r-- | includes/footer.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/includes/footer.php b/includes/footer.php index 1698bc2..64f8c7c 100644 --- a/includes/footer.php +++ b/includes/footer.php @@ -32,7 +32,9 @@ var allowNavAero = <?php if($this->options->navAero==1):?>false<?php else:?>true<?php endif;?>; var siteurl = '<?php $this->options->SiteUrl() ;?>'; var owoJson = '<?php Utils::indexTheme('assets/OwO.json'); ?>'; - var faviconUrl = '<?php $this->options->favicon() ;?>'; + var faviconUrl = '<?php if($this->options->favicon):$this->options->favicon();else:echo Utils::indexTheme('favicon.ico');endif; ?>'; + var faviconDark = <?php $faviconDarkExist = file_exists('/faviconDark.ico'); + if($faviconDarkExist=true): echo 'true'; else: echo 'false'; endif; ?>; <?php if($this->options->pjax && $this->options->pjax!=0) :?>var loadPjax = true; beforePjax = function() {NProgress.start();}; afterPjax = function() {owoLoad();<?php $this->options->pjax_complete(); ?>};<?php endif; ?></script> |
