56 Commits
master ... dev

Author SHA1 Message Date
fen
6df1b433ee improve: show site description in homepage title 2024-01-04 22:13:41 +08:00
fen
2650bb6654 fix: search result 2024-01-04 16:58:44 +08:00
fen
316cf1da39 improve: comment style 2024-01-04 16:58:44 +08:00
joyqi
be12409358 Merge commit 'f3299ecb8a6d7a4283f81905c4c8b079e85339ee' into dev 2024-01-01 23:47:24 +08:00
joyqi
2a1a692195 fix permission 2023-12-31 17:13:07 +08:00
joyqi
8b4118a2ce Merge commit '746667a8e602aece11bc8e6ec8d0daf20999aff5' into dev 2023-12-31 17:12:55 +08:00
joyqi
f209fd78fe Merge branch 'master' into dev
# Conflicts:
#	var/Widget/Options.php
2023-12-31 17:02:20 +08:00
joyqi
0265a50100 feat: pull request auto merge 2023-12-31 16:57:59 +08:00
joyqi
6e0bbe885d remove php 7.2/7.3 env 2023-12-30 23:01:18 +08:00
fen
fc5ac7969c fix: theme page layout 2023-12-30 22:52:11 +08:00
fen
edc73ccbc8 fix: theme screenshot 2023-12-30 22:50:04 +08:00
fen
752eed6890 improve: nav search 2023-12-30 22:29:12 +08:00
joyqi
90c0a70252 fix tags saving 2023-12-30 21:21:43 +08:00
fen
d7465f1cff improve: post detail layout 2023-12-30 20:34:04 +08:00
fen
fef2ec2377 fix: typo 2023-12-30 00:13:02 +08:00
fen
dde84fe0aa improve: remove feather-icon js file 2023-12-30 00:11:59 +08:00
joyqi
878b2b3d11 init plugin signal 2023-12-29 18:03:45 +08:00
joyqi
dd88938aa1 remove unnecessary scss file when packaging 2023-12-29 16:56:14 +08:00
joyqi
7415b5ba76 fix theme classic-22 2023-12-29 16:49:42 +08:00
joyqi
fd013a7508 fix canonical link meta 2023-12-29 14:34:24 +08:00
joyqi
005951ee4d add open graph and twitter card support
add canonical link
2023-12-29 14:31:39 +08:00
joyqi
7edd3f9659 fix query 2023-12-29 12:59:33 +08:00
joyqi
6b2c5b19e1 fix default theme 2023-12-29 11:50:38 +08:00
joyqi
f1937a3a7c fix theme lang 2023-12-28 18:26:14 +08:00
joyqi
0595d1126e add throw finish 2023-12-27 18:45:42 +08:00
joyqi
4c4b14020d fix http client cookie 2023-12-27 18:10:17 +08:00
joyqi
56d7e7eec8 fix typo errors 2023-12-26 23:33:01 +08:00
joyqi
144bbee912 fix typo errors 2023-12-18 15:50:53 +08:00
joyqi
a41fd2dc7c fix: cut down fields when selecting recent posts 2023-12-18 15:48:00 +08:00
joyqi
06fda5b1a6 add throwCallback to widget response 2023-12-18 15:44:41 +08:00
Lu Fei
9df0256e8c 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>
2023-12-06 18:03:23 +08:00
Lu Fei
fbc7696ae8 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>
2023-12-06 15:52:19 +08:00
joyqi
c9aba55949 fix #1651, close #1653 2023-12-04 17:56:17 +08:00
joyqi
a2c1fbf4a8 fix input element 2023-12-04 17:23:06 +08:00
Lu Fei
a1f62e1bcc Support IDN (#1629)
* Support IDN

* use js

* Optimize code

* Optimize code

* fix URL script

* remove unnecessary use

---------

Co-authored-by: joyqi <joyqi@segmentfault.com>
2023-12-04 14:07:20 +08:00
joyqi
e89b1bbcf6 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
2023-11-27 21:57:18 -08:00
joyqi
4c1c42ad40 Add svg to image types 2023-10-23 18:38:40 +08:00
joyqi
b28d5b7bab fix #1632 2023-10-04 15:58:30 +08:00
joyqi
b00a0ae06f Merge commit '99212ec78743317bf52063fb165b90fceb70de5e' into dev
# Conflicts:
#	admin/login.php
2023-10-03 11:16:04 +08:00
Lu Fei
438ac35487 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>
2023-10-01 16:51:09 +08:00
joyqi
ff1fde5c4b fix types in i18n component 2023-09-24 23:15:55 +08:00
joyqi
3296151409 [feat] support high resolution avatar 2023-09-24 17:31:35 +08:00
joyqi
157de39b54 fix 1.3.0 upgrade 2023-09-24 16:25:01 +08:00
joyqi
4c8c64c79e 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
2023-09-24 16:21:32 +08:00
joyqi
9b107027ed add pgsql ssl mode support (ref #1600) (#1623) 2023-09-22 13:51:35 +08:00
joyqi
b73187f12c merge new fixes from master 2023-09-22 11:09:34 +08:00
joyqi
f206d852bd Merge commit 'e143be0036b91a6ec4bfc5e8d3ad7c19edbfa6e8' into dev 2023-09-22 11:08:55 +08:00
joyqi
38562bab48 Merge commit '9d1b01a8736ab1ce39e9e2e666a2f992eba28b0f' into dev 2023-07-07 16:56:26 +08:00
joyqi
6de71129a4 Merge commit 'daef17d7eb250419ff84f499e87d25ee71daac87' into dev
# Conflicts:
#	var/Utils/Upgrade.php
2023-03-29 16:20:01 +08:00
joyqi
d4a5f765a3 Merge branch 'master' into dev
# Conflicts:
#	admin/css/style.css
#	var/Widget/Archive.php
2023-01-29 14:28:43 +08:00
joyqi
bec905274a New upgrade method 2022-04-08 15:11:09 +08:00
joyqi
53eda2cf75 s/is_writeable/is_writable/g 2022-04-07 17:31:32 +08:00
joyqi
bad3ef651d New theme (#1390)
* 调整忽略目录

* add theme

* fix theme scss build

Co-authored-by: fen <f3nb0x@gmail.com>
2022-04-07 14:20:59 +08:00
joyqi
a74206a89e Add CommentPage widget 2022-04-07 12:55:19 +08:00
joyqi
22a8ad362e add feed render 2022-04-07 01:53:33 +08:00
joyqi
f49564db23 Add feed widget 2022-04-06 18:26:15 +08:00
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 {