update theme classic-22 (#1682)

* Add feed widget

* add feed render

* Add CommentPage widget

* New theme (#1390)

* 调整忽略目录

* add theme

* fix theme scss build

Co-authored-by: fen <f3nb0x@gmail.com>

* s/is_writeable/is_writable/g

* New upgrade method

* merge new fixes from master

* add pgsql ssl mode support (ref #1600) (#1623)

* Feat/code refactor (#1626)

* remove all magic methods, add type for class properties

* refactor codes

* fix all

* refactor code

* fix type

* fix all

* fix request is method

* fix all

* fix router

* fix get page

* fix 1.3.0 upgrade

* [feat] support high resolution avatar

* fix types in i18n component

* Implement Ctrl+S or Command+S for save draft (#1628)

* Implement Ctrl+S or Command+S for save draft

* rename

* add Typecho.savePost

* fix upload file size

* add new uploader

* replace new uploader

* fix textarea change

* fix preview

* refactor post edit

* fix issue

* fix page edit

---------

Co-authored-by: joyqi <joyqi@segmentfault.com>
Co-authored-by: joyqi <magike.net@gmail.com>

* fix #1632

* Add svg to image types

* Feat/tree pages (#1646)

* add tree trait

* finish category tree trait

* support select fields

* fix select fields

* refactor admin trait

* fix draft status

* Add new contents type "revision"

* minor refactor

* add more tree view abstracts

* add tree trait to pages

* get ready for tree view pages

* improve page edit

* fix revision

* fix slug

* add router params delegate

* fix params delegate

* fix

* fix

* fix all

* fix all

* fix tree

* fix page link

* fix feed

* fix page

* fix permalink

* fix permalink input

* fix offset query

* Support IDN (#1629)

* Support IDN

* use js

* Optimize code

* Optimize code

* fix URL script

* remove unnecessary use

---------

Co-authored-by: joyqi <joyqi@segmentfault.com>

* fix input element

* fix #1651, close #1653

* Use json instead of serialize (#1624)

* Use json instead of serialize

* Fix Upgrade code

* add tree trait

* finish category tree trait

* support select fields

* fix select fields

* refactor admin trait

* fix draft status

* Add new contents type "revision"

* minor refactor

* add more tree view abstracts

* add tree trait to pages

* get ready for tree view pages

* improve page edit

* fix revision

* fix slug

* add router params delegate

* fix params delegate

* fix

* fix

* fix all

* fix all

* fix tree

* fix page link

* fix feed

* fix page

* fix permalink

* fix permalink input

* fix offset query

* Fix typo

* remove proxy methods

* remove unnecessary useage

---------

Co-authored-by: joyqi <joyqi@segmentfault.com>
Co-authored-by: joyqi <magike.net@gmail.com>

* Fix Prevent XSS vulnerability in default theme (#1654)

* Fix Prevent XSS vulnerability in default theme

* Update var/Typecho/Db/Adapter/Pdo.php

* fix the getter

---------

Co-authored-by: joyqi <joyqi@segmentfault.com>

* add throwCallback to widget response

* fix: cut down fields when selecting recent posts

* fix typo errors

* fix typo errors

* fix http client cookie

* add throw finish

* fix theme lang

* fix default theme

* fix query

* add open graph and twitter card support
add canonical link

* fix canonical link meta

* fix theme classic-22

* remove unnecessary scss file when packaging

* init plugin signal

* improve: remove feather-icon js file

* fix: typo

* improve: post detail layout

* fix tags saving

* improve: nav search

* fix: theme screenshot

* fix: theme page layout

* remove php 7.2/7.3 env

* feat: pull request auto merge

* fix permission

* improve: comment style

* fix: search result

* improve: show site description in homepage title

---------

Co-authored-by: joyqi <magike.net@gmail.com>
Co-authored-by: joyqi <joyqi@users.noreply.github.com>
Co-authored-by: joyqi <joyqi@segmentfault.com>
Co-authored-by: Lu Fei <52o@qq52o.cn>
This commit is contained in:
Fen 2024-01-05 00:11:38 +08:00 committed by GitHub
parent f23e825b95
commit cec6b9c62b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 81 additions and 55 deletions

View File

@ -12,7 +12,7 @@
<li>Доступ к текущей странице невозможен, возможно, у нее нет разрешения или она была удалена.</li>
<li>現在のページにアクセスできない、権限がない、または削除された可能性があります。</li>
</ul>
<p class="text-center"><a href="<?php $this->options->siteUrl(); ?>" role="button" class="secondary"><?php _e('回首页'); ?></a></p>
<p class="text-center"><a href="<?php $this->options->siteUrl(); ?>" role="button" class="outline"><?php _e('回首页'); ?></a></p>
</div>
</main>

View File

@ -6,8 +6,8 @@
<?php $comments->listComments(array(
'commentStatus' => _t('你的评论正等待审核'),
'avatarSize' => 120,
'defaultAvatar' => 'monsterid'
'avatarSize' => 64,
'defaultAvatar' => 'identicon'
)); ?>
<?php $comments->pageNav('&laquo; 前一页', '后一页 &raquo;'); ?>

View File

@ -3,6 +3,16 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit;
function themeConfig($form)
{
$logoUrl = new \Typecho\Widget\Helper\Form\Element\Text(
'logoUrl',
null,
null,
_t('网站 Logo'),
_t('在这里填写图片 URL网站将显示 Logo')
);
$form->addInput($logoUrl->addRule('url', _t('请填写正确的 URL 地址')));
$themeStyle = new \Typecho\Widget\Helper\Form\Element\Radio(
'themeStyle',
array(

View File

@ -5,7 +5,7 @@
<head>
<meta charset="<?php $this->options->charset(); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?php $this->archiveTitle('', '', ' - '); ?><?php $this->options->title(); ?></title>
<title><?php $this->archiveTitle('', '', ' | '); ?><?php $this->options->title(); ?><?php if ($this->is('index')): ?> | <?php $this->options->description() ?><?php endif; ?></title>
<link rel="stylesheet" href="<?php $this->options->themeUrl('static/css/style.css'); ?>">

View File

@ -13,32 +13,29 @@
<div class="text-center">
<?php \Widget\Metas\Category\Rows::alloc()->listCategories('wrapClass=list-inline'); ?>
</div>
<?php while ($this->next()): ?>
<hr class="post-separator">
<?php if ($this->have()): ?>
<?php while ($this->next()): ?>
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
<header class="entry-header text-center">
<h1 class="entry-title" itemprop="name headline"><a href="<?php $this->permalink() ?>" itemprop="url"><?php $this->title() ?></a></h1>
<ul class="entry-meta list-inline text-muted">
<li><i data-feather="calendar" class="is-sm me-2"></i><time datetime="<?php $this->date('c'); ?>" itemprop="datePublished"><?php $this->date(); ?></time></li>
<li><i data-feather="folder" class="is-sm me-2"></i><?php $this->category(', '); ?></li>
<li><i data-feather="message-circle" class="is-sm me-2"></i><a href="<?php $this->permalink() ?>#comments" itemprop="discussionUrl"><?php $this->commentsNum('暂无评论', '1 条评论', '%d 条评论'); ?></a></li>
</ul>
</header>
<?php postMeta($this); ?>
<div class="entry-content fmt" itemprop="articleBody">
<?php $this->content('阅读剩余部分'); ?>
<?php $this->content('阅读全文'); ?>
</div>
</article>
<hr class="post-separator">
<?php endwhile; ?>
<?php endwhile; ?>
<?php else: ?>
<article class="post">
<div class="entry-content fmt text-center" itemprop="articleBody">
<p><?php _e('没有找到内容'); ?></p>
</div>
</article>
<?php endif; ?>
</div>
<!-- <div class="text-center">
<a href="#">&laquo; Older Posts</a>
<span class="mx-2 text-muted">&middot;</span>
<a href="#">Newer Posts &raquo;</a>
</div> -->
<?php $this->pageNav('&laquo; 前一页', '后一页 &raquo;'); ?>
</main>

File diff suppressed because one or more lines are too long

View File

@ -2,7 +2,7 @@
// Global Set
:root {
--border-radius: 0.5rem;
--border-radius: .5rem;
}
body {
@ -25,6 +25,10 @@ body {
.site-navbar {
background-color: #{$primary-600};
}
.comment-level-odd {
background-color: #{$grey-900};
}
}
// Content
@ -89,21 +93,18 @@ h1, h2, h3, h4, h5 { line-height: 1.25; }
// Layout
.container-inner {
margin-left: auto;
margin-right: auto;
max-width: 84rem;
@if map-get($breakpoints, "lg") {
@media (min-width: map-get($breakpoints, "lg")) {
padding-left: calc(var(--spacing) * 1.5);
padding-right: calc(var(--spacing) * 1.5);
padding-left: calc(var(--spacing) / 2);
padding-right: calc(var(--spacing) / 2);
}
}
}
.container-thin {
margin: 0 auto;
max-width: 46rem;
margin-left: auto;
margin-right: auto;
max-width: 40rem;
}
.d-flex {
@ -128,12 +129,13 @@ h1, h2, h3, h4, h5 { line-height: 1.25; }
// Header & Navbar
.site-navbar {
padding-top: calc(var(--spacing) / 2);
padding-bottom: calc(var(--spacing) / 2);
padding-top: .25rem;
padding-bottom: .25rem;
background-color: var(--primary);
a {
color: rgba(255, 255, 255, 1.0);
color: var(--primary-inverse);
// color: rgba(255, 255, 255);
// &:hover { text-decoration: underline; }
}
@ -147,7 +149,7 @@ h1, h2, h3, h4, h5 { line-height: 1.25; }
}
.desc {
color: rgba(255, 255, 255, .75);
color: rgba(255, 255, 255, .5);
display: none;
@if map-get($breakpoints, "sm") {
@media (min-width: map-get($breakpoints, "sm")) {
@ -178,11 +180,6 @@ h1, h2, h3, h4, h5 { line-height: 1.25; }
padding: calc(var(--spacing) * .5);
}
a {
margin: calc(var(--spacing) * -.5);
padding: calc(var(--spacing) * .5);
}
form {
margin-bottom: 0;
@ -190,10 +187,11 @@ h1, h2, h3, h4, h5 { line-height: 1.25; }
height: 50px;
background-image: url("../img/search.svg");
background-size: auto;
color: rgb(255,255,255);
background-color: inherit;
color: var(--primary-inverse);
&:focus {
--form-element-focus-color: rgba(255,255,255,0.5);
--form-element-focus-color: rgba(255, 255, 255, .5);
}
&:not(:focus) {
@ -202,6 +200,7 @@ h1, h2, h3, h4, h5 { line-height: 1.25; }
width: 30px;
padding-inline-start: 0;
background-position: center center;
cursor: pointer;
}
}
}
@ -282,7 +281,7 @@ h1, h2, h3, h4, h5 { line-height: 1.25; }
.post-next {
border-top: 1px solid var(--muted-border-color);
padding: calc(var(--spacing) * 1.5) 0;
padding-top: calc(var(--spacing) * 1.5);
margin: var(--block-spacing-vertical) 0;
a {
@ -307,11 +306,22 @@ h1, h2, h3, h4, h5 { line-height: 1.25; }
// Comments
.comment-list {
list-style: none;
padding-left: calc(var(--spacing) * 4);
padding: 0;
// padding-left: calc(var(--spacing) * 4);
}
.comment-level-odd {
background-color: #{$grey-50};
}
.comment-level-even {
background-color: var(--background-color);
}
.comment-body {
margin: calc(var(--spacing) * 1.5) 0;
padding: var(--spacing);
border: 1px solid var(--muted-border-color);
border-radius: var(--border-radius);
}
.comment-by-author > .comment-author::after {
@ -325,23 +335,18 @@ h1, h2, h3, h4, h5 { line-height: 1.25; }
}
.comment-author {
position: relative;
display: inline-block;
.avatar {
position: absolute;
width: calc(var(--spacing) * 3);
left: calc(var(--spacing) * -4);
border-radius: var(--border-radius);
margin-right: .25rem;
width: calc(var(--spacing) * 2);
border-radius: 48px;
}
cite {
font-style: normal;
font-weight: 700;
}
a {
color: var(--h5-color);
}
}
.comment-meta a,
@ -353,7 +358,17 @@ h1, h2, h3, h4, h5 { line-height: 1.25; }
}
.comment-meta {
margin-bottom: calc(var(--spacing) / 2);
display: inline-block;
color: var(--muted-color);
margin-left: calc(var(--spacing) / 4);
&::before {
content: "·";
margin-right: calc(var(--spacing) / 4);
}
}
.comment-content {
margin-top: var(--spacing);
}
.comment-reply:blank {
@ -367,7 +382,11 @@ h1, h2, h3, h4, h5 { line-height: 1.25; }
}
.comment-children {
margin: calc(var(--spacing) * 1.5) 0;
margin-bottom: calc(var(--spacing) * -1);
}
.comment-by-author {
// background-color: var(--mark-background-color);
}
#response {