一系列修改

This commit is contained in:
LinRuiqi
2025-08-24 22:31:46 +08:00
parent ee50636d5d
commit f7ccf8ec84
3 changed files with 105 additions and 26 deletions

View File

@@ -9,6 +9,78 @@
</main>
<?php $this->footer(); ?>
<!-- 在 footer.php 的 </body> 标签前添加 -->
<a id="back_to_top" href="#" class="back_to_top" style="display: none;"><span>↑</span></a>
<style>
a.back_to_top {
text-decoration: none;
position: fixed;
bottom: 20px;
right: 20px;
background: var(--accent-color);
height: 43px;
width: 43px;
border-radius: 50%;
line-height: 43px;
font-size: 32px;
text-align: center;
transition: all 0.3s ease;
display: none;
z-index: 1000;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
a.back_to_top:hover {
background: #6667ab;
transform: translateY(-3px);
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
a.back_to_top span {
color: #fff;
display: block;
}
@media (max-width: 768px) {
a.back_to_top {
bottom: 20px;
right: 20px;
height: 40px;
width: 40px;
line-height: 40px;
font-size: 32px;
}
}
@media (max-width: 480px) {
a.back_to_top {
bottom: 15px;
right: 15px;
height: 40px;
width: 40px;
line-height: 40px;
font-size: 32px;
}
}
</style>
<script>
document.addEventListener('DOMContentLoaded', function() {
var backToTopBtn = document.getElementById('back_to_top');
window.addEventListener('scroll', function() {
backToTopBtn.style.display = window.pageYOffset > 30 ? 'block' : 'none';
});
backToTopBtn.addEventListener('click', function(e) {
e.preventDefault();
window.scrollTo({ top: 0, behavior: 'smooth' });
});
});
</script>
</body>
</html>

View File

@@ -5,26 +5,27 @@
<head>
<style>:root { --accent-color: <?php echo $this->options->accent_color ?: '#121212'; ?>; }</style>
<meta http-equiv="content-type" content="text/html; charset=<?php $this->options->charset(); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" >
<meta http-equiv="content-type" content="text/html; charset=<?php $this->options->charset(); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" >
<meta name="description" content="<?php if ($this->options->description): ?><?php $this->options->description(); ?><?php endif; ?>">
<link rel="profile" href="http://gmpg.org/xfn/11">
<title><?php $this->archiveTitle([
'category' => _t('分类 %s 下的文章'),
'search' => _t('包含关键字 %s 的文章'),
'tag' => _t('标签 %s 下的文章'),
'author' => _t('%s 发布的文章')
], '', ' - '); ?><?php $this->options->title(); ?></title>
<link rel="profile" href="http://gmpg.org/xfn/11">
<title><?php $this->archiveTitle([
'category' => _t('分类 %s 下的文章'),
'search' => _t('包含关键字 %s 的文章'),
'tag' => _t('标签 %s 下的文章'),
'author' => _t('%s 发布的文章')
], '', ' - '); ?><?php $this->options->title(); ?><?php if ($this->options->description): ?> - <?php $this->options->description(); ?><?php endif; ?></title>
<?php $this->header(); ?>
<link rel="stylesheet" href="<?php $this->options->themeUrl('style.css'); ?>">
<link rel="stylesheet" href="<?php $this->options->themeUrl('comments.css'); ?>">
<link rel="stylesheet" href="<?php $this->options->themeUrl('css/font-awesome.css'); ?>">
<script src="<?php $this->options->themeUrl('js/jquery.min.js'); ?>"></script>
<script src="<?php $this->options->themeUrl('js/global.js'); ?>"></script>
<?php $this->header(); ?>
<link rel="stylesheet" href="<?php $this->options->themeUrl('style.css'); ?>">
<link rel="stylesheet" href="<?php $this->options->themeUrl('comments.css'); ?>">
<link rel="stylesheet" href="<?php $this->options->themeUrl('css/font-awesome.css'); ?>">
<script src="<?php $this->options->themeUrl('js/jquery.min.js'); ?>"></script>
<script src="<?php $this->options->themeUrl('js/global.js'); ?>"></script>
</head>
</head>
<body class="<?php $this->options->bodyClass(); ?>">
@@ -75,16 +76,16 @@
<li class="social-search-wrapper"><a href="<?php $this->options->siteUrl(); ?>?s=" class="search-toggle"><span class="screen-reader-text"><?php _e('搜索'); ?></span></a></li>
<?php if ($this->options->socialTwitter): ?>
<li><a href="<?php echo $this->options->socialTwitter; ?>" target="_blank"><span class="screen-reader-text">Twitter</span></a></li>
<?php if ($options->socialTwitter): ?>
<li><a href="<?php echo $options->socialTwitter; ?>" target="_blank"><span class="screen-reader-text">Twitter</span></a></li>
<?php endif; ?>
<?php if ($this->options->socialFacebook): ?>
<li><a href="<?php echo $this->options->socialFacebook; ?>" target="_blank"><span class="screen-reader-text">Facebook</span></a></li>
<?php if ($options->socialFacebook): ?>
<li><a href="<?php echo $options->socialFacebook; ?>" target="_blank"><span class="screen-reader-text">Facebook</span></a></li>
<?php endif; ?>
<?php if ($this->options->socialGitHub): ?>
<li><a href="<?php echo $this->options->socialGitHub; ?>" target="_blank"><span class="screen-reader-text">GitHub</span></a></li>
<?php if ($options->socialGitHub): ?>
<li><a href="<?php echo $options->socialGitHub; ?>" target="_blank"><span class="screen-reader-text">GitHub</span></a></li>
<?php endif; ?>

View File

@@ -122,7 +122,7 @@ input[type="search"]::-webkit-search-results-decoration {
body {
background: #fff;
background: #f6f2e8;
border: none;
color: #121212;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Helvetica, Arial, "PingFangSC-Regular", "Hiragino Sans GB", "Lantinghei SC", "Microsoft Yahei", "Source Han Sans CN", "WenQuanYi Micro Hei", SimSun, sans-serif;
@@ -1700,6 +1700,10 @@ body.hide-social .social-menu {
word-break: break-word;
}
.entry-content h1, h2, h3, h4, h5, h6 {
letter-spacing: 1px;
}
.entry-content a {
text-decoration: underline;
color: var(--accent-color);
@@ -1733,7 +1737,9 @@ address {
.entry-content p {
line-height: 2;
text-align: justify;
word-break: break-word;
word-wrap: break-word;
letter-spacing: 0.5px;
}
.entry-content p.has-background {