improve: remove feather-icon js file

This commit is contained in:
fen 2023-12-30 00:11:59 +08:00
parent 878b2b3d11
commit dde84fe0aa
13 changed files with 146 additions and 46 deletions

View File

@ -3,7 +3,7 @@
<div class="d-flex justify-content-between container-inner">
<ul class="list-inline text-muted">
<li>&copy; <?php echo date('Y'); ?> <a href="<?php $this->options->siteUrl(); ?>"><?php $this->options->title(); ?></a></li>
<li><a href="<?php $this->options->feedUrl(); ?>" aria-label="<?php _e('Feed'); ?>"><i data-feather="rss" class="is-sm"></i></a></li>
<li><a href="<?php $this->options->feedUrl(); ?>"><?php _e('RSS'); ?></a></li>
</ul>
<ul class="list-inline text-muted">
<li>

View File

@ -29,9 +29,9 @@ function postMeta(
</h1>
<?php if ($metaType != 'page'): ?>
<ul class="entry-meta list-inline text-muted">
<li><i data-feather="calendar" class="is-sm me-2"></i><time datetime="<?php $archive->date('c'); ?>" itemprop="datePublished"><?php $archive->date(); ?></time></li>
<li><i data-feather="folder" class="is-sm me-2"></i><?php $archive->category(', '); ?></li>
<li><i data-feather="message-circle" class="is-sm me-2"></i><a href="<?php $archive->permalink() ?>#comments" itemprop="discussionUrl"><?php $archive->commentsNum(_t('暂无评论'), _t('仅有一条评论'), _t('已有 %d 条评论')); ?></a></li>
<li class="feather-calendar"><time datetime="<?php $archive->date('c'); ?>" itemprop="datePublished"><?php $archive->date(); ?></time></li>
<li class="feather-folder"><?php $archive->category(', '); ?></li>
<li class="feather-message"><a href="<?php $archive->permalink() ?>#comments" itemprop="discussionUrl"><?php $archive->commentsNum(_t('暂无评论'), _t('仅有一条评论'), _t('已有 %d 条评论')); ?></a></li>
</ul>
<?php endif; ?>
</header>

View File

@ -1,7 +1,6 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<!DOCTYPE html>
<!-- <html lang="zh-CN"> -->
<html lang="zh-CN" data-theme="<?php $this->options->themeStyle(); ?>">
<html lang="zh-Hans" data-theme="<?php $this->options->themeStyle(); ?>">
<head>
<meta charset="<?php $this->options->charset(); ?>">
@ -9,7 +8,6 @@
<title><?php $this->archiveTitle('', '', ' - '); ?><?php $this->options->title(); ?></title>
<link rel="stylesheet" href="<?php $this->options->themeUrl('static/css/style.css'); ?>">
<script src="//unpkg.com/feather-icons"></script>
<?php $this->header(); ?>
</head>
@ -23,14 +21,16 @@
<?php if ($this->options->logoUrl): ?>
<li><a href="<?php $this->options->siteUrl(); ?>" class="brand"><img src="<?php $this->options->logoUrl() ?>" alt="<?php $this->options->title() ?>"></a></li>
<?php else: ?>
<li><a href="<?php $this->options->siteUrl(); ?>" class="brand"><?php $this->options->title() ?></a></li>
<li>
<a href="<?php $this->options->siteUrl(); ?>" class="brand"><?php $this->options->title() ?></a>
</li>
<li class="desc"><?php $this->options->description() ?></li>
<?php endif; ?>
</ul>
<ul>
<li>
<label for="nav-toggler" class="nav-toggler-btn"><i data-feather="menu" class="is-sm"></i></label>
<label for="nav-toggler" class="nav-toggler-btn"><img src="<?php $this->options->themeUrl('static/img/menu.svg'); ?>" alt="Menu"></label>
</li>
</ul>
</nav>
@ -51,7 +51,7 @@
<?php endwhile; ?>
<li>
<a href="<?php $this->options->index('search/keywords'); ?>" aria-label="<?php _e('搜索'); ?>"><i data-feather="search" class="is-sm"></i></a>
<a href="<?php $this->options->index('search/keywords'); ?>" aria-label="<?php _e('搜索'); ?>"><img src="<?php $this->options->themeUrl('static/img/search.svg'); ?>" alt="Search"></a>
</li>
</ul>
</nav>

View File

@ -30,7 +30,7 @@ $this->need('header.php');
<?php postMeta($this); ?>
<div class="entry-content fmt" itemprop="articleBody">
<?php $this->content(_t('阅读剩余部分')); ?>
<?php $this->content(_t('阅读全文')); ?>
</div>
</article>
<hr class="post-separator">

View File

@ -19,7 +19,7 @@
<?php $this->thePrev('%s', _t('没有了')); ?>
</div>
<div class="text-end">
<div class="text-muted">&laquo; <?php _e('下一篇'); ?></div>
<div class="text-muted"><?php _e('下一篇'); ?> &raquo;</div>
<?php $this->theNext('%s', _t('没有了')); ?>
</div>
</div>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,16 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="#64748b"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<rect x="3" y="4" width="18" height="18" rx="2" ry="2" />
<line x1="16" y1="2" x2="16" y2="6" />
<line x1="8" y1="2" x2="8" y2="6" />
<line x1="3" y1="10" x2="21" y2="10" />
</svg>

After

Width:  |  Height:  |  Size: 385 B

View File

@ -0,0 +1,13 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="#64748b"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z" />
</svg>

After

Width:  |  Height:  |  Size: 294 B

View File

@ -0,0 +1,15 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="#fff"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<line x1="3" y1="12" x2="21" y2="12" />
<line x1="3" y1="6" x2="21" y2="6" />
<line x1="3" y1="18" x2="21" y2="18" />
</svg>

After

Width:  |  Height:  |  Size: 324 B

View File

@ -0,0 +1,13 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="#64748b"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" />
</svg>

After

Width:  |  Height:  |  Size: 403 B

View File

@ -0,0 +1,14 @@
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="#fff"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<circle cx="11" cy="11" r="8" />
<line x1="21" y1="21" x2="16.65" y2="16.65" />
</svg>

After

Width:  |  Height:  |  Size: 284 B

View File

@ -4,7 +4,7 @@
*/
// Config
$enable-responsive-typography: false;
// $enable-responsive-typography: false;
// Grey
$grey-50: #f8fafc;
@ -19,16 +19,16 @@ $grey-800: #1e293b;
$grey-900: #0f172a;
// Blue
$primary-50: #BBC8FF;
$primary-100: #A6B8FF;
$primary-200: #7D98FF;
$primary-300: #5577FF;
$primary-400: #2C57FF;
$primary-500: #0336FF;
$primary-600: #0029CA;
$primary-700: #001E92;
$primary-800: #00125A;
$primary-900: #000722;
$primary-50: #E9F2FC;
$primary-100: #D1E5FB;
$primary-200: #9BCCFD;
$primary-300: #51B4FF;
$primary-400: #029AE8;
$primary-500: #017FC0;
$primary-600: #02659A;
$primary-700: #014C75;
$primary-800: #033452;
$primary-900: #061E2F;
// Amber
$amber-50: #fffbeb;

View File

@ -17,15 +17,19 @@ body {
--primary: #{$primary-500};
--primary-hover: #{$primary-400};
--muted-border-color: #{$grey-800};
.site-navbar {
background-color: #{$primary-600};
}
}
// Content
h1, h2, h3, h4, h5 { line-height: 1.25; }
h1 { --font-size: 2.5rem; }
h2 { --font-size: 2rem; }
h3 { --font-size: 1.75rem; }
h4 { --font-size: 1.5rem; }
h5 { --font-size: 1.25rem; }
// h1 { --font-size: 2.5rem; }
// h2 { --font-size: 2rem; }
// h3 { --font-size: 1.75rem; }
// h4 { --font-size: 1.5rem; }
// h5 { --font-size: 1.25rem; }
// Icon Size
.is-sm {
@ -95,7 +99,7 @@ h5 { --font-size: 1.25rem; }
.container-thin {
margin: 0 auto;
max-width: 736px;
max-width: 46rem;
}
.d-flex {
@ -126,7 +130,7 @@ h5 { --font-size: 1.25rem; }
a {
color: rgba(255, 255, 255, 1.0);
&:hover { text-decoration: underline; }
// &:hover { text-decoration: underline; }
}
.site-name {
@ -151,7 +155,6 @@ h5 { --font-size: 1.25rem; }
.site-nav {
display: block;
.active { font-weight: 700; }
}
#nav-toggler {
@ -212,8 +215,42 @@ h5 { --font-size: 1.25rem; }
a { color: var(--h1-color); }
}
.more {
.entry-meta {
font-size: .875rem;
}
.feather-calendar::before,
.feather-folder::before,
.feather-message::before {
content: "";
display: inline-block;
margin-right: .25rem;
background: url("../img/calendar.svg") no-repeat center center / contain;
width: 1rem;
height: 1rem;
vertical-align: text-top;
fill: #396;
}
.feather-folder::before {
background-image: url("../img/folder.svg");
}
.feather-message::before {
background-image: url("../img/message-circle.svg");
}
.entry-content .more {
text-align: center;
a {
display: inline-block;
font-size: .875rem;
padding: 6px 16px;
border: 1px solid var(--muted-border-color);
color: var(--muted-color);
border-radius: 100px;
text-decoration: none;
}
}
.post-next {
@ -321,6 +358,10 @@ h5 { --font-size: 1.25rem; }
margin-top: var(--spacing);
}
#comment-form textarea {
resize: vertical;
}
// page nav
.page-navigator {
list-style: none;