Skip to content

Commit

Permalink
update1.7.7
Browse files Browse the repository at this point in the history
  • Loading branch information
wehaox committed Aug 3, 2023
1 parent 74dd907 commit 96c0514
Show file tree
Hide file tree
Showing 6 changed files with 1,032 additions and 901 deletions.
21 changes: 14 additions & 7 deletions archive_header.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,19 @@
<a id="site-name" href="<?php $this->options->siteUrl(); ?>"><?php $this->options->title() ?></a>
</span>
<div id="menus">
<div id="search-button">
<a class="site-page social-icon search">
<i class="fas fa-search fa-fw"></i>
<span> 搜索</span></a>
</div>
<div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div>
<div id="search-button">
<a class="site-page social-icon search">
<i class="fas fa-search fa-fw"></i>
<?php if (is_array($this->options->beautifyBlock) && in_array('showNoAlertSearch',$this->options->beautifyBlock)): ?>
<form method="post" action="<?php $this->options->siteUrl(); ?>" role="search" id="dSearch">
<input type="text" placeholder="搜索" id="dSearchIn" name="s" required="required">
</form>
<?php else: ?>
<span> 搜索</span>
<?php endif ?>
</a>
</div>
<div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div>
<div class="menus_items">
<div class="menus_item">
<a class="site-page" href="<?php $this->options->siteUrl(); ?>">
Expand Down Expand Up @@ -91,6 +98,6 @@
<?php endwhile; ?>
</div>
</div>
</div>
</div>
</nav>
</header>
15 changes: 15 additions & 0 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,21 @@
</div>
<!--搜索end -->
<div class="js-pjax">
<?php if (is_array($this->options->beautifyBlock) && in_array('showNoAlertSearch',$this->options->beautifyBlock)): ?>
<script>
(function() {
const searchButton = document.getElementById('search-button');
const input = document.getElementById('dSearchIn');
searchButton.addEventListener('click', function() {
input.style.width = '150px';
input.focus();
});
input.addEventListener('blur', function() {
input.style.width = '35px';
});
})()
</script>
<?php endif ?>
<?php if ($this->options->hcaptchaSecretKey !== "" && $this->options->hcaptchaAPIKey !== ""): ?>
<script src="https://hcaptcha.com/1/api.js" async defer></script>
<?php endif ?>
Expand Down
Loading

0 comments on commit 96c0514

Please sign in to comment.