Feat/improve styles (#1868)
* improve css * fix table * fix write page * improve header nav * fix menu * fix menu * fix menu * add flex grid system * fix * fix flex * fix draft version * using main html element to replace div * improve css * add input type number * fix custom-fields * fix screen
This commit is contained in:
@@ -10,7 +10,7 @@ $actionUrl = $security->getTokenUrl(
|
||||
$backupFiles = \Widget\Backup::alloc()->listFiles();
|
||||
?>
|
||||
|
||||
<div class="main">
|
||||
<main class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main" role="main">
|
||||
@@ -31,7 +31,7 @@ $backupFiles = \Widget\Backup::alloc()->listFiles();
|
||||
|
||||
<div id="backup-secondary" class="col-mb-12 col-tb-4" role="form">
|
||||
<h3><?php _e('恢复数据'); ?></h3>
|
||||
<ul class="typecho-option-tabs clearfix">
|
||||
<ul class="typecho-option-tabs">
|
||||
<li class="active w-50"><a href="#from-upload"><?php _e('上传'); ?></a></li>
|
||||
<li class="w-50"><a href="#from-server"><?php _e('从服务器'); ?></a></li>
|
||||
</ul>
|
||||
@@ -79,7 +79,7 @@ $backupFiles = \Widget\Backup::alloc()->listFiles();
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
include 'copyright.php';
|
||||
|
||||
@@ -4,7 +4,7 @@ include 'header.php';
|
||||
include 'menu.php';
|
||||
?>
|
||||
|
||||
<div class="main">
|
||||
<main class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main" role="form">
|
||||
@@ -13,7 +13,7 @@ include 'menu.php';
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
include 'copyright.php';
|
||||
|
||||
@@ -25,31 +25,10 @@
|
||||
|
||||
if (head.length > 0) {
|
||||
p.insertAfter(head);
|
||||
offset = head.outerHeight();
|
||||
} else {
|
||||
p.prependTo(document.body);
|
||||
}
|
||||
|
||||
function checkScroll () {
|
||||
if ($(window).scrollTop() >= offset) {
|
||||
p.css({
|
||||
'position' : 'fixed',
|
||||
'top' : 0
|
||||
});
|
||||
} else {
|
||||
p.css({
|
||||
'position' : 'absolute',
|
||||
'top' : offset
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$(window).scroll(function () {
|
||||
checkScroll();
|
||||
});
|
||||
|
||||
checkScroll();
|
||||
|
||||
p.slideDown(function () {
|
||||
var t = $(this), color = '#C6D880';
|
||||
|
||||
@@ -75,50 +54,6 @@
|
||||
}
|
||||
})();
|
||||
|
||||
|
||||
// 导航菜单 tab 聚焦时展开下拉菜单
|
||||
const menuBar = $('.menu-bar').click(function () {
|
||||
const nav = $(this).next('#typecho-nav-list');
|
||||
if (!$(this).toggleClass('focus').hasClass('focus')) {
|
||||
nav.removeClass('expanded noexpanded');
|
||||
}
|
||||
});
|
||||
|
||||
$('.main, .typecho-foot').on('click touchstart', function () {
|
||||
if (menuBar.hasClass('focus')) {
|
||||
menuBar.trigger('click');
|
||||
}
|
||||
});
|
||||
|
||||
$('#typecho-nav-list ul.root').each(function () {
|
||||
const ul = $(this), nav = ul.parent();
|
||||
let focused = false;
|
||||
|
||||
ul.on('click touchend', '.parent a', function (e) {
|
||||
nav.removeClass('noexpanded').addClass('expanded');
|
||||
if ($(window).width() < 576 && e.type == 'click') {
|
||||
return false;
|
||||
}
|
||||
}).find('.child')
|
||||
.append($('<li class="return"><a><?php _e('返回'); ?></a></li>').click(function () {
|
||||
nav.removeClass('expanded').addClass('noexpanded');
|
||||
return false;
|
||||
}));
|
||||
|
||||
$('a', ul).focus(function () {
|
||||
ul.addClass('expanded');
|
||||
focused = true;
|
||||
}).blur(function () {
|
||||
focused = false;
|
||||
|
||||
setTimeout(function () {
|
||||
if (!focused) {
|
||||
ul.removeClass('expanded');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
if ($('.typecho-login').length == 0) {
|
||||
$('a').each(function () {
|
||||
var t = $(this), href = t.attr('href');
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php if(!defined('__TYPECHO_ADMIN__')) exit; ?>
|
||||
<div class="typecho-foot" role="contentinfo">
|
||||
<footer class="typecho-foot" role="contentinfo">
|
||||
<div class="copyright">
|
||||
<a href="https://typecho.org" class="i-logo-s">Typecho</a>
|
||||
<p><?php _e('由 <a href="https://typecho.org">%s</a> 强力驱动, 版本 %s', $options->software, $options->version); ?></p>
|
||||
@@ -10,4 +10,4 @@
|
||||
<a href="https://github.com/typecho/typecho/issues"><?php _e('报告错误'); ?></a> •
|
||||
<a href="https://typecho.org/download"><?php _e('资源下载'); ?></a>
|
||||
</nav>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
File diff suppressed because one or more lines are too long
1
admin/css/normalize.css
vendored
1
admin/css/normalize.css
vendored
@@ -11,6 +11,7 @@
|
||||
html {
|
||||
line-height: 1.15; /* 1 */
|
||||
-webkit-text-size-adjust: 100%; /* 2 */
|
||||
-moz-text-size-adjust: 100%; /* 2 */
|
||||
}
|
||||
|
||||
/* Sections
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -2,21 +2,10 @@
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
// 自定义字段
|
||||
$('#custom-field-expand').click(function() {
|
||||
var btn = $('i', this);
|
||||
if (btn.hasClass('i-caret-right')) {
|
||||
btn.removeClass('i-caret-right').addClass('i-caret-down');
|
||||
} else {
|
||||
btn.removeClass('i-caret-down').addClass('i-caret-right');
|
||||
}
|
||||
$(this).parent().toggleClass('fold');
|
||||
return false;
|
||||
});
|
||||
|
||||
function attachDeleteEvent (el) {
|
||||
$('button.btn-xs', el).click(function () {
|
||||
if (confirm('<?php _e('确认要删除此字段吗?'); ?>')) {
|
||||
$(this).parents('tr').fadeOut(function () {
|
||||
$(this).parents('li').fadeOut(function () {
|
||||
$(this).remove();
|
||||
});
|
||||
|
||||
@@ -25,20 +14,21 @@ $(document).ready(function () {
|
||||
});
|
||||
}
|
||||
|
||||
$('#custom-field table tbody tr').each(function () {
|
||||
$('#custom-field .fields .field').each(function () {
|
||||
attachDeleteEvent(this);
|
||||
});
|
||||
|
||||
$('#custom-field button.operate-add').click(function () {
|
||||
var html = '<tr><td><input type="text" name="fieldNames[]" placeholder="<?php _e('字段名称'); ?>" pattern="^[_a-zA-Z][_a-zA-Z0-9]*$" oninput="this.reportValidity()" class="text-s w-100"></td>'
|
||||
+ '<td><select name="fieldTypes[]" id="">'
|
||||
var html = '<li class="field"><div class="field-name"><input type="text" name="fieldNames[]" placeholder="<?php _e('字段名称'); ?>" pattern="^[_a-zA-Z][_a-zA-Z0-9]*$" oninput="this.reportValidity()" class="text-s w-100">'
|
||||
+ '<select name="fieldTypes[]" id="">'
|
||||
+ '<option value="str"><?php _e('字符'); ?></option>'
|
||||
+ '<option value="int"><?php _e('整数'); ?></option>'
|
||||
+ '<option value="float"><?php _e('小数'); ?></option>'
|
||||
+ '</select></td>'
|
||||
+ '<td><textarea name="fieldValues[]" placeholder="<?php _e('字段值'); ?>" class="text-s w-100" rows="2"></textarea></td>'
|
||||
+ '<td><button type="button" class="btn btn-xs"><?php _e('删除'); ?></button></td></tr>',
|
||||
el = $(html).hide().appendTo('#custom-field table tbody').fadeIn();
|
||||
+ '<option value="json"><?php _e('JSON 结构'); ?></option>'
|
||||
+ '</select></div>'
|
||||
+ '<div class="field-value"><textarea name="fieldValues[]" placeholder="<?php _e('字段值'); ?>" class="text-s w-100" rows="2"></textarea>'
|
||||
+ '<button type="button" class="btn btn-xs"><?php _e('删除'); ?></button></div></li>',
|
||||
el = $(html).hide().appendTo('#custom-field .fields').fadeIn();
|
||||
|
||||
attachDeleteEvent(el);
|
||||
});
|
||||
|
||||
@@ -3,32 +3,23 @@
|
||||
$fields = isset($post) ? $post->getFieldItems() : $page->getFieldItems();
|
||||
$defaultFields = isset($post) ? $post->getDefaultFieldItems() : $page->getDefaultFieldItems();
|
||||
?>
|
||||
<section id="custom-field"
|
||||
class="typecho-post-option<?php if (empty($defaultFields) && empty($fields)): ?> fold<?php endif; ?>">
|
||||
<label id="custom-field-expand" class="typecho-label"><a href="##"><i
|
||||
class="i-caret-right"></i> <?php _e('自定义字段'); ?></a></label>
|
||||
<table class="typecho-list-table mono">
|
||||
<colgroup>
|
||||
<col width="20%"/>
|
||||
<col width="15%"/>
|
||||
<col width="55%"/>
|
||||
<col width="10%"/>
|
||||
</colgroup>
|
||||
<details id="custom-field"
|
||||
class="typecho-post-option" <?php if (!empty($defaultFields) || !empty($fields)): ?>open<?php endif; ?>>
|
||||
<summary><?php _e('自定义字段'); ?></summary>
|
||||
<ul class="fields mono">
|
||||
<?php foreach ($defaultFields as $field): ?>
|
||||
<?php [$label, $input] = $field; ?>
|
||||
<tr>
|
||||
<td><?php $label->render(); ?></td>
|
||||
<td colspan="3"><?php $input->render(); ?></td>
|
||||
</tr>
|
||||
<li class="field">
|
||||
<div class="field-name"><?php $label->render(); ?></div>
|
||||
<div class="field-value"><?php $input->render(); ?></div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php foreach ($fields as $field): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<li class="field">
|
||||
<div class="field-name">
|
||||
<label for="fieldname" class="sr-only"><?php _e('字段名称'); ?></label>
|
||||
<input type="text" name="fieldNames[]" value="<?php echo htmlspecialchars($field['name']); ?>"
|
||||
id="fieldname" pattern="^[_a-zA-Z][_a-zA-Z0-9]*$" oninput="this.reportValidity()" class="text-s w-100">
|
||||
</td>
|
||||
<td>
|
||||
<label for="fieldtype" class="sr-only"><?php _e('字段类型'); ?></label>
|
||||
<select name="fieldTypes[]" id="fieldtype">
|
||||
<option
|
||||
@@ -40,45 +31,42 @@ $defaultFields = isset($post) ? $post->getDefaultFieldItems() : $page->getDefaul
|
||||
<option
|
||||
value="json"<?php if ('json' == $field['type']): ?> selected<?php endif; ?>><?php _e('JSON 结构'); ?></option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
</div>
|
||||
<div class="field-value">
|
||||
<label for="fieldvalue" class="sr-only"><?php _e('字段值'); ?></label>
|
||||
<textarea name="fieldValues[]" id="fieldvalue" class="text-s w-100"
|
||||
rows="2"><?php echo htmlspecialchars($field[($field['type'] == 'json' ? 'str' : $field['type']) . '_value']); ?></textarea>
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-xs"><?php _e('删除'); ?></button>
|
||||
</td>
|
||||
</tr>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php if (empty($defaultFields) && empty($fields)): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<li class="field">
|
||||
<div class="field-name">
|
||||
<label for="fieldname" class="sr-only"><?php _e('字段名称'); ?></label>
|
||||
<input type="text" name="fieldNames[]" placeholder="<?php _e('字段名称'); ?>" id="fieldname"
|
||||
class="text-s w-100" pattern="^[_a-zA-Z][_a-zA-Z0-9]*$" oninput="this.reportValidity()">
|
||||
</td>
|
||||
<td>
|
||||
<label for="fieldtype" class="sr-only"><?php _e('字段类型'); ?></label>
|
||||
<select name="fieldTypes[]" id="fieldtype">
|
||||
<option value="str"><?php _e('字符'); ?></option>
|
||||
<option value="int"><?php _e('整数'); ?></option>
|
||||
<option value="float"><?php _e('小数'); ?></option>
|
||||
<option value="json"><?php _e('JSON 结构'); ?></option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
</div>
|
||||
<div class="field-value">
|
||||
<label for="fieldvalue" class="sr-only"><?php _e('字段值'); ?></label>
|
||||
<textarea name="fieldValues[]" placeholder="<?php _e('字段值'); ?>" id="fieldvalue"
|
||||
class="text-s w-100" rows="2"></textarea>
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-xs"><?php _e('删除'); ?></button>
|
||||
</td>
|
||||
</tr>
|
||||
</div>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="description clearfix">
|
||||
</ul>
|
||||
<div class="add">
|
||||
<button type="button" class="btn btn-xs operate-add"><?php _e('+添加字段'); ?></button>
|
||||
<?php _e('自定义字段可以扩展你的模板功能, 使用方法参见 <a href="https://docs.typecho.org/help/custom-fields">帮助文档</a>'); ?>
|
||||
<div class="description kit-hidden-mb">
|
||||
<?php _e('自定义字段可以扩展你的模板功能, 使用方法参见 <a href="https://docs.typecho.org/help/custom-fields">帮助文档</a>'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</details>
|
||||
|
||||
@@ -214,7 +214,7 @@ $(document).ready(function () {
|
||||
};
|
||||
|
||||
// 编辑预览切换
|
||||
const edittab = $('.editor').prepend('<div class="wmd-edittab"><a href="#wmd-editarea" class="active"><?php _e('撰写'); ?></a><a href="#wmd-preview"><?php _e('预览'); ?></a></div>'),
|
||||
const edittab = $('.editor').append('<div class="wmd-edittab"><a href="#wmd-editarea" class="active"><?php _e('撰写'); ?></a><a href="#wmd-preview"><?php _e('预览'); ?></a></div>'),
|
||||
editarea = $(textarea.parent()).attr("id", "wmd-editarea");
|
||||
|
||||
$(".wmd-edittab a").click(function() {
|
||||
|
||||
@@ -5,7 +5,7 @@ include 'menu.php';
|
||||
|
||||
$stat = \Widget\Stat::alloc();
|
||||
?>
|
||||
<div class="main">
|
||||
<main class="main">
|
||||
<div class="container typecho-dashboard">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main">
|
||||
@@ -14,7 +14,7 @@ $stat = \Widget\Stat::alloc();
|
||||
$stat->myPublishedPostsNum, $stat->myPublishedCommentsNum, $stat->categoriesNum); ?>
|
||||
<br><?php _e('点击下面的链接快速开始:'); ?></p>
|
||||
|
||||
<ul id="start-link" class="clearfix">
|
||||
<ul id="start-link">
|
||||
<?php if ($user->pass('contributor', true)): ?>
|
||||
<li><a href="<?php $options->adminUrl('write-post.php'); ?>"><?php _e('撰写新文章'); ?></a></li>
|
||||
<?php if ($user->pass('editor', true) && 'on' == $request->get('__typecho_all_comments') && $stat->waitingCommentsNum > 0): ?>
|
||||
@@ -102,7 +102,7 @@ $stat = \Widget\Stat::alloc();
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
include 'copyright.php';
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -6,7 +6,7 @@ include 'menu.php';
|
||||
\Widget\Metas\Category\Admin::alloc()->to($categories);
|
||||
?>
|
||||
|
||||
<div class="main">
|
||||
<main class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main manage-metas">
|
||||
@@ -14,7 +14,7 @@ include 'menu.php';
|
||||
<div class="col-mb-12" role="main">
|
||||
|
||||
<form method="post" name="manage_categories" class="operate-form">
|
||||
<div class="typecho-list-operate clearfix">
|
||||
<div class="typecho-list-operate">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox"
|
||||
class="typecho-table-select-all"/></label>
|
||||
@@ -44,77 +44,74 @@ include 'menu.php';
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="typecho-table-wrap">
|
||||
<table class="typecho-list-table">
|
||||
<colgroup>
|
||||
<col width="20" class="kit-hidden-mb"/>
|
||||
<col width=""/>
|
||||
<col width="15%" class="kit-hidden-mb"/>
|
||||
<col width="25%"/>
|
||||
<col width="15%"/>
|
||||
<col width="10%" class="kit-hidden-mb"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr class="nodrag">
|
||||
<th class="kit-hidden-mb"></th>
|
||||
<th><?php _e('名称'); ?></th>
|
||||
<th><?php _e('子分类'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('缩略名'); ?></th>
|
||||
<th></th>
|
||||
<th class="kit-hidden-mb"><?php _e('文章数'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if ($categories->have()): ?>
|
||||
<?php while ($categories->next()): ?>
|
||||
<tr id="mid-<?php $categories->theId(); ?>">
|
||||
<td class="kit-hidden-mb"><input type="checkbox"
|
||||
value="<?php $categories->mid(); ?>"
|
||||
name="mid[]"/></td>
|
||||
<td>
|
||||
<a href="<?php $options->adminUrl('category.php?mid=' . $categories->mid); ?>"><?php $categories->name(); ?></a>
|
||||
<a href="<?php $categories->permalink(); ?>"
|
||||
title="<?php _e('浏览 %s', $categories->name); ?>"><i class="i-exlink"></i></a>
|
||||
</td>
|
||||
<td>
|
||||
<table class="typecho-list-table">
|
||||
<colgroup>
|
||||
<col width="3%" class="kit-hidden-mb"/>
|
||||
<col width=""/>
|
||||
<col width="15%" class="kit-hidden-mb"/>
|
||||
<col width="20%"/>
|
||||
<col width="15%"/>
|
||||
<col width="15%" class="kit-hidden-mb"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr class="nodrag">
|
||||
<th class="kit-hidden-mb"></th>
|
||||
<th><?php _e('名称'); ?></th>
|
||||
<th><?php _e('子分类'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('缩略名'); ?></th>
|
||||
<th></th>
|
||||
<th class="kit-hidden-mb"><?php _e('文章数'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if ($categories->have()): ?>
|
||||
<?php while ($categories->next()): ?>
|
||||
<tr id="mid-<?php $categories->theId(); ?>">
|
||||
<td class="kit-hidden-mb"><input type="checkbox"
|
||||
value="<?php $categories->mid(); ?>"
|
||||
name="mid[]"/></td>
|
||||
<td>
|
||||
<a href="<?php $options->adminUrl('category.php?mid=' . $categories->mid); ?>"><?php $categories->name(); ?></a>
|
||||
<a href="<?php $categories->permalink(); ?>"
|
||||
title="<?php _e('浏览 %s', $categories->name); ?>"><i class="i-exlink"></i></a>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<?php if (count($categories->children) > 0): ?>
|
||||
<a href="<?php $options->adminUrl('manage-categories.php?parent=' . $categories->mid); ?>"><?php echo _n('一个分类', '%d个分类', count($categories->children)); ?></a>
|
||||
<?php else: ?>
|
||||
<a href="<?php $options->adminUrl('category.php?parent=' . $categories->mid); ?>"><?php echo _e('新增'); ?></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="kit-hidden-mb"><?php $categories->slug(); ?></td>
|
||||
<td>
|
||||
<?php if ($options->defaultCategory == $categories->mid): ?>
|
||||
<?php _e('默认'); ?>
|
||||
<?php else: ?>
|
||||
<a class="hidden-by-mouse"
|
||||
href="<?php $security->index('/action/metas-category-edit?do=default&mid=' . $categories->mid); ?>"
|
||||
title="<?php _e('设为默认'); ?>"><?php _e('默认'); ?></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="kit-hidden-mb"><a
|
||||
class="balloon-button left size-<?php echo \Typecho\Common::splitByCount($categories->count, 1, 10, 20, 50, 100); ?>"
|
||||
href="<?php $options->adminUrl('manage-posts.php?category=' . $categories->mid); ?>"><?php $categories->count(); ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td colspan="6"><h6 class="typecho-list-table-title"><?php _e('没有任何分类'); ?></h6>
|
||||
<?php if (count($categories->children) > 0): ?>
|
||||
<a href="<?php $options->adminUrl('manage-categories.php?parent=' . $categories->mid); ?>"><?php echo _n('一个分类', '%d个分类', count($categories->children)); ?></a>
|
||||
<?php else: ?>
|
||||
<a href="<?php $options->adminUrl('category.php?parent=' . $categories->mid); ?>"><?php echo _e('新增'); ?></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="kit-hidden-mb"><?php $categories->slug(); ?></td>
|
||||
<td>
|
||||
<?php if ($options->defaultCategory == $categories->mid): ?>
|
||||
<?php _e('默认'); ?>
|
||||
<?php else: ?>
|
||||
<a class="hidden-by-mouse"
|
||||
href="<?php $security->index('/action/metas-category-edit?do=default&mid=' . $categories->mid); ?>"
|
||||
title="<?php _e('设为默认'); ?>"><?php _e('默认'); ?></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="kit-hidden-mb"><a
|
||||
class="balloon-button left size-<?php echo \Typecho\Common::splitByCount($categories->count, 1, 10, 20, 50, 100); ?>"
|
||||
href="<?php $options->adminUrl('manage-posts.php?category=' . $categories->mid); ?>"><?php $categories->count(); ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td colspan="6" class="none"><?php _e('没有任何分类'); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
include 'copyright.php';
|
||||
|
||||
@@ -7,18 +7,12 @@ $stat = \Widget\Stat::alloc();
|
||||
$comments = \Widget\Comments\Admin::alloc();
|
||||
$isAllComments = ('on' == $request->get('__typecho_all_comments') || 'on' == \Typecho\Cookie::get('__typecho_all_comments'));
|
||||
?>
|
||||
<div class="main">
|
||||
<main class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main" role="main">
|
||||
<div class="col-mb-12 typecho-list">
|
||||
<div class="clearfix">
|
||||
<ul class="typecho-option-tabs right">
|
||||
<?php if($user->pass('editor', true) && !isset($request->cid)): ?>
|
||||
<li class="<?php if($isAllComments): ?> current<?php endif; ?>"><a href="<?php echo $request->makeUriByRequest('__typecho_all_comments=on'); ?>"><?php _e('所有'); ?></a></li>
|
||||
<li class="<?php if(!$isAllComments): ?> current<?php endif; ?>"><a href="<?php echo $request->makeUriByRequest('__typecho_all_comments=off'); ?>"><?php _e('我的'); ?></a></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
<div class="typecho-list-operate">
|
||||
<ul class="typecho-option-tabs">
|
||||
<li<?php if(!isset($request->status) || 'approved' == $request->get('status')): ?> class="current"<?php endif; ?>><a href="<?php $options->adminUrl('manage-comments.php'
|
||||
. (isset($request->cid) ? '?cid=' . $request->filter('encode')->cid : '')); ?>"><?php _e('已通过'); ?></a></li>
|
||||
@@ -43,50 +37,54 @@ $isAllComments = ('on' == $request->get('__typecho_all_comments') || 'on' == \Ty
|
||||
<?php endif; ?>
|
||||
</a></li>
|
||||
</ul>
|
||||
|
||||
<?php if($user->pass('editor', true) && !isset($request->cid)): ?>
|
||||
<ul class="typecho-option-tabs">
|
||||
<li class="<?php if($isAllComments): ?> current<?php endif; ?>"><a href="<?php echo $request->makeUriByRequest('__typecho_all_comments=on'); ?>"><?php _e('所有'); ?></a></li>
|
||||
<li class="<?php if(!$isAllComments): ?> current<?php endif; ?>"><a href="<?php echo $request->makeUriByRequest('__typecho_all_comments=off'); ?>"><?php _e('我的'); ?></a></li>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="typecho-list-operate clearfix">
|
||||
<form method="get">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox" class="typecho-table-select-all" /></label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="<?php $security->index('/action/comments-edit?do=approved'); ?>"><?php _e('通过'); ?></a></li>
|
||||
<li><a href="<?php $security->index('/action/comments-edit?do=waiting'); ?>"><?php _e('待审核'); ?></a></li>
|
||||
<li><a href="<?php $security->index('/action/comments-edit?do=spam'); ?>"><?php _e('标记垃圾'); ?></a></li>
|
||||
<li><a lang="<?php _e('你确认要删除这些评论吗?'); ?>" href="<?php $security->index('/action/comments-edit?do=delete'); ?>"><?php _e('删除'); ?></a></li>
|
||||
</ul>
|
||||
<?php if('spam' == $request->get('status')): ?>
|
||||
<button lang="<?php _e('你确认要删除所有垃圾评论吗?'); ?>" class="btn btn-s btn-warn btn-operate" href="<?php $security->index('/action/comments-edit?do=delete-spam'); ?>"><?php _e('删除所有垃圾评论'); ?></button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<form method="get" class="typecho-list-operate">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox" class="typecho-table-select-all" /></label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="<?php $security->index('/action/comments-edit?do=approved'); ?>"><?php _e('通过'); ?></a></li>
|
||||
<li><a href="<?php $security->index('/action/comments-edit?do=waiting'); ?>"><?php _e('待审核'); ?></a></li>
|
||||
<li><a href="<?php $security->index('/action/comments-edit?do=spam'); ?>"><?php _e('标记垃圾'); ?></a></li>
|
||||
<li><a lang="<?php _e('你确认要删除这些评论吗?'); ?>" href="<?php $security->index('/action/comments-edit?do=delete'); ?>"><?php _e('删除'); ?></a></li>
|
||||
</ul>
|
||||
<?php if('spam' == $request->get('status')): ?>
|
||||
<button lang="<?php _e('你确认要删除所有垃圾评论吗?'); ?>" class="btn btn-s btn-warn btn-operate" href="<?php $security->index('/action/comments-edit?do=delete-spam'); ?>"><?php _e('删除所有垃圾评论'); ?></button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="search" role="search">
|
||||
<?php if ('' != $request->keywords || '' != $request->category): ?>
|
||||
<a href="<?php $options->adminUrl('manage-comments.php'
|
||||
. (isset($request->status) || isset($request->cid) ? '?' .
|
||||
(isset($request->status) ? 'status=' . $request->filter('encode')->status : '') .
|
||||
(isset($request->cid) ? (isset($request->status) ? '&' : '') . 'cid=' . $request->filter('encode')->cid : '') : '')); ?>"><?php _e('« 取消筛选'); ?></a>
|
||||
<?php endif; ?>
|
||||
<input type="text" class="text-s" placeholder="<?php _e('请输入关键字'); ?>" value="<?php echo $request->filter('html')->keywords; ?>"<?php if ('' == $request->keywords): ?> onclick="value='';name='keywords';" <?php else: ?> name="keywords"<?php endif; ?>/>
|
||||
<?php if(isset($request->status)): ?>
|
||||
<input type="hidden" value="<?php echo $request->filter('html')->status; ?>" name="status" />
|
||||
<?php endif; ?>
|
||||
<?php if(isset($request->cid)): ?>
|
||||
<input type="hidden" value="<?php echo $request->filter('html')->cid; ?>" name="cid" />
|
||||
<?php endif; ?>
|
||||
<button type="submit" class="btn btn-s"><?php _e('筛选'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- end .typecho-list-operate -->
|
||||
|
||||
</div>
|
||||
<div class="search" role="search">
|
||||
<?php if ('' != $request->keywords || '' != $request->category): ?>
|
||||
<a href="<?php $options->adminUrl('manage-comments.php'
|
||||
. (isset($request->status) || isset($request->cid) ? '?' .
|
||||
(isset($request->status) ? 'status=' . $request->filter('encode')->status : '') .
|
||||
(isset($request->cid) ? (isset($request->status) ? '&' : '') . 'cid=' . $request->filter('encode')->cid : '') : '')); ?>"><?php _e('« 取消筛选'); ?></a>
|
||||
<?php endif; ?>
|
||||
<input type="text" class="text-s" placeholder="<?php _e('请输入关键字'); ?>" value="<?php echo $request->filter('html')->keywords; ?>"<?php if ('' == $request->keywords): ?> onclick="value='';name='keywords';" <?php else: ?> name="keywords"<?php endif; ?>/>
|
||||
<?php if(isset($request->status)): ?>
|
||||
<input type="hidden" value="<?php echo $request->filter('html')->status; ?>" name="status" />
|
||||
<?php endif; ?>
|
||||
<?php if(isset($request->cid)): ?>
|
||||
<input type="hidden" value="<?php echo $request->filter('html')->cid; ?>" name="cid" />
|
||||
<?php endif; ?>
|
||||
<button type="submit" class="btn btn-s"><?php _e('筛选'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form method="post" name="manage_comments" class="operate-form">
|
||||
<div class="typecho-table-wrap">
|
||||
<table class="typecho-list-table">
|
||||
<colgroup>
|
||||
<col width="3%" class="kit-hidden-mb"/>
|
||||
<col width="6%" class="kit-hidden-mb" />
|
||||
<col width="6%" class="kit-hidden" />
|
||||
<col width="20%"/>
|
||||
<col width="71%"/>
|
||||
</colgroup>
|
||||
@@ -117,7 +115,7 @@ $isAllComments = ('on' == $request->get('__typecho_all_comments') || 'on' == \Ty
|
||||
<td valign="top" class="kit-hidden-mb">
|
||||
<input type="checkbox" value="<?php $comments->coid(); ?>" name="coid[]"/>
|
||||
</td>
|
||||
<td valign="top" class="kit-hidden-mb">
|
||||
<td valign="top" class="kit-hidden">
|
||||
<div class="comment-avatar">
|
||||
<?php if ('comment' == $comments->type): ?>
|
||||
<?php $comments->gravatar(40, null, true); ?>
|
||||
@@ -175,46 +173,43 @@ $isAllComments = ('on' == $request->get('__typecho_all_comments') || 'on' == \Ty
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td colspan="4"><h6 class="typecho-list-table-title"><?php _e('没有评论') ?></h6></td>
|
||||
<td colspan="4" class="none"><?php _e('没有评论') ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table><!-- end .typecho-list-table -->
|
||||
</div><!-- end .typecho-table-wrap -->
|
||||
|
||||
<?php if(isset($request->cid)): ?>
|
||||
<input type="hidden" value="<?php echo $request->filter('html')->cid; ?>" name="cid" />
|
||||
<?php endif; ?>
|
||||
</form><!-- end .operate-form -->
|
||||
|
||||
<div class="typecho-list-operate clearfix">
|
||||
<form method="get">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox" class="typecho-table-select-all" /></label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="<?php $security->index('/action/comments-edit?do=approved'); ?>"><?php _e('通过'); ?></a></li>
|
||||
<li><a href="<?php $security->index('/action/comments-edit?do=waiting'); ?>"><?php _e('待审核'); ?></a></li>
|
||||
<li><a href="<?php $security->index('/action/comments-edit?do=spam'); ?>"><?php _e('标记垃圾'); ?></a></li>
|
||||
<li><a lang="<?php _e('你确认要删除这些评论吗?'); ?>" href="<?php $security->index('/action/comments-edit?do=delete'); ?>"><?php _e('删除'); ?></a></li>
|
||||
</ul>
|
||||
<?php if('spam' == $request->get('status')): ?>
|
||||
<button lang="<?php _e('你确认要删除所有垃圾评论吗?'); ?>" class="btn btn-s btn-warn btn-operate" href="<?php $security->index('/action/comments-edit?do=delete-spam'); ?>"><?php _e('删除所有垃圾评论'); ?></button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($comments->have()): ?>
|
||||
<ul class="typecho-pager">
|
||||
<?php $comments->pageNav(); ?>
|
||||
<form method="get" class="typecho-list-operate">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox" class="typecho-table-select-all" /></label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="<?php $security->index('/action/comments-edit?do=approved'); ?>"><?php _e('通过'); ?></a></li>
|
||||
<li><a href="<?php $security->index('/action/comments-edit?do=waiting'); ?>"><?php _e('待审核'); ?></a></li>
|
||||
<li><a href="<?php $security->index('/action/comments-edit?do=spam'); ?>"><?php _e('标记垃圾'); ?></a></li>
|
||||
<li><a lang="<?php _e('你确认要删除这些评论吗?'); ?>" href="<?php $security->index('/action/comments-edit?do=delete'); ?>"><?php _e('删除'); ?></a></li>
|
||||
</ul>
|
||||
<?php if('spam' == $request->get('status')): ?>
|
||||
<button lang="<?php _e('你确认要删除所有垃圾评论吗?'); ?>" class="btn btn-s btn-warn btn-operate" href="<?php $security->index('/action/comments-edit?do=delete-spam'); ?>"><?php _e('删除所有垃圾评论'); ?></button>
|
||||
<?php endif; ?>
|
||||
</form>
|
||||
</div><!-- end .typecho-list-operate -->
|
||||
</div>
|
||||
</div>
|
||||
<?php if($comments->have()): ?>
|
||||
<ul class="typecho-pager">
|
||||
<?php $comments->pageNav(); ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</form>
|
||||
</div><!-- end .typecho-list -->
|
||||
</div><!-- end .typecho-page-main -->
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<?php
|
||||
include 'copyright.php';
|
||||
include 'common-js.php';
|
||||
|
||||
@@ -6,135 +6,128 @@ include 'menu.php';
|
||||
$stat = \Widget\Stat::alloc();
|
||||
$attachments = \Widget\Contents\Attachment\Admin::alloc();
|
||||
?>
|
||||
<div class="main">
|
||||
<main class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main" role="main">
|
||||
<div class="col-mb-12">
|
||||
|
||||
<div class="typecho-list-operate clearfix">
|
||||
<form method="get">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox"
|
||||
class="typecho-table-select-all"/></label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i
|
||||
class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i
|
||||
class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="<?php _e('你确认要删除这些文件吗?'); ?>"
|
||||
href="<?php $security->index('/action/contents-attachment-edit?do=delete'); ?>"><?php _e('删除'); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
<button class="btn btn-s btn-warn btn-operate"
|
||||
href="<?php $security->index('/action/contents-attachment-edit?do=clear'); ?>"
|
||||
lang="<?php _e('您确认要清理未归档的文件吗?'); ?>"><?php _e('清理未归档文件'); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search" role="search">
|
||||
<?php if ('' != $request->keywords): ?>
|
||||
<a href="<?php $options->adminUrl('manage-medias.php'); ?>"><?php _e('« 取消筛选'); ?></a>
|
||||
<?php endif; ?>
|
||||
<input type="text" class="text-s" placeholder="<?php _e('请输入关键字'); ?>"
|
||||
value="<?php echo $request->filter('html')->keywords; ?>"<?php if ('' == $request->keywords): ?> onclick="value='';name='keywords';" <?php else: ?> name="keywords"<?php endif; ?>/>
|
||||
<button type="submit" class="btn btn-s"><?php _e('筛选'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- end .typecho-list-operate -->
|
||||
|
||||
<form method="post" name="manage_medias" class="operate-form">
|
||||
<div class="typecho-table-wrap">
|
||||
<table class="typecho-list-table draggable">
|
||||
<colgroup>
|
||||
<col width="20" class="kit-hidden-mb"/>
|
||||
<col width="6%" class="kit-hidden-mb"/>
|
||||
<col width="30%"/>
|
||||
<col width="" class="kit-hidden-mb"/>
|
||||
<col width="30%" class="kit-hidden-mb"/>
|
||||
<col width="16%"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="kit-hidden-mb"></th>
|
||||
<th class="kit-hidden-mb"></th>
|
||||
<th><?php _e('文件名'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('上传者'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('所属文章'); ?></th>
|
||||
<th><?php _e('发布日期'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if ($attachments->have()): ?>
|
||||
<?php while ($attachments->next()): ?>
|
||||
<?php $mime = \Typecho\Common::mimeIconType($attachments->attachment->mime); ?>
|
||||
<tr id="<?php $attachments->theId(); ?>">
|
||||
<td class="kit-hidden-mb"><input type="checkbox"
|
||||
value="<?php $attachments->cid(); ?>"
|
||||
name="cid[]"/></td>
|
||||
<td class="kit-hidden-mb"><a
|
||||
href="<?php $options->adminUrl('manage-comments.php?cid=' . $attachments->cid); ?>"
|
||||
class="balloon-button size-<?php echo \Typecho\Common::splitByCount($attachments->commentsNum, 1, 10, 20, 50, 100); ?>"><?php $attachments->commentsNum(); ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<i class="mime-<?php echo $mime; ?>"></i>
|
||||
<a href="<?php $options->adminUrl('media.php?cid=' . $attachments->cid); ?>"><?php $attachments->title(); ?></a>
|
||||
<a href="<?php $attachments->permalink(); ?>"
|
||||
title="<?php _e('浏览 %s', $attachments->title); ?>"><i
|
||||
class="i-exlink"></i></a>
|
||||
</td>
|
||||
<td class="kit-hidden-mb"><?php $attachments->author(); ?></td>
|
||||
<td class="kit-hidden-mb">
|
||||
<?php if ($attachments->parentPost->cid): ?>
|
||||
<a href="<?php $options->adminUrl('write-' . (0 === strpos($attachments->parentPost->type, 'post') ? 'post' : 'page') . '.php?cid=' . $attachments->parentPost->cid); ?>"><?php $attachments->parentPost->title(); ?></a>
|
||||
<?php else: ?>
|
||||
<span class="description"><?php _e('未归档'); ?></span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?php $attachments->dateWord(); ?></td>
|
||||
</tr>
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td colspan="6"><h6 class="typecho-list-table-title"><?php _e('没有任何文件'); ?></h6>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table><!-- end .typecho-list-table -->
|
||||
</div><!-- end .typecho-table-wrap -->
|
||||
</form><!-- end .operate-form -->
|
||||
|
||||
<div class="typecho-list-operate clearfix">
|
||||
<form method="get">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox"
|
||||
class="typecho-table-select-all"/></label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i
|
||||
class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i
|
||||
class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="<?php _e('你确认要删除这些文件吗?'); ?>"
|
||||
href="<?php $security->index('/action/contents-attachment-edit?do=delete'); ?>"><?php _e('删除'); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<form method="get" class="typecho-list-operate">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox"
|
||||
class="typecho-table-select-all"/></label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i
|
||||
class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i
|
||||
class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="<?php _e('你确认要删除这些文件吗?'); ?>"
|
||||
href="<?php $security->index('/action/contents-attachment-edit?do=delete'); ?>"><?php _e('删除'); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
<button class="btn btn-s btn-warn btn-operate"
|
||||
href="<?php $security->index('/action/contents-attachment-edit?do=clear'); ?>"
|
||||
lang="<?php _e('您确认要清理未归档的文件吗?'); ?>"><?php _e('清理未归档文件'); ?></button>
|
||||
</div>
|
||||
<?php if ($attachments->have()): ?>
|
||||
<ul class="typecho-pager">
|
||||
<?php $attachments->pageNav(); ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="search" role="search">
|
||||
<?php if ('' != $request->keywords): ?>
|
||||
<a href="<?php $options->adminUrl('manage-medias.php'); ?>"><?php _e('« 取消筛选'); ?></a>
|
||||
<?php endif; ?>
|
||||
</form>
|
||||
</div><!-- end .typecho-list-operate -->
|
||||
<input type="text" class="text-s" placeholder="<?php _e('请输入关键字'); ?>"
|
||||
value="<?php echo $request->filter('html')->keywords; ?>"<?php if ('' == $request->keywords): ?> onclick="value='';name='keywords';" <?php else: ?> name="keywords"<?php endif; ?>/>
|
||||
<button type="submit" class="btn btn-s"><?php _e('筛选'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form method="post" name="manage_medias" class="operate-form">
|
||||
<table class="typecho-list-table draggable">
|
||||
<colgroup>
|
||||
<col width="3%" class="kit-hidden-mb"/>
|
||||
<col width="6%" class="kit-hidden-mb"/>
|
||||
<col width="30%"/>
|
||||
<col width="" class="kit-hidden-mb"/>
|
||||
<col width="30%" class="kit-hidden-mb"/>
|
||||
<col width="16%"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="kit-hidden-mb"></th>
|
||||
<th class="kit-hidden-mb"></th>
|
||||
<th><?php _e('文件名'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('上传者'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('所属文章'); ?></th>
|
||||
<th><?php _e('发布日期'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if ($attachments->have()): ?>
|
||||
<?php while ($attachments->next()): ?>
|
||||
<?php $mime = \Typecho\Common::mimeIconType($attachments->attachment->mime); ?>
|
||||
<tr id="<?php $attachments->theId(); ?>">
|
||||
<td class="kit-hidden-mb"><input type="checkbox"
|
||||
value="<?php $attachments->cid(); ?>"
|
||||
name="cid[]"/></td>
|
||||
<td class="kit-hidden-mb"><a
|
||||
href="<?php $options->adminUrl('manage-comments.php?cid=' . $attachments->cid); ?>"
|
||||
class="balloon-button size-<?php echo \Typecho\Common::splitByCount($attachments->commentsNum, 1, 10, 20, 50, 100); ?>"><?php $attachments->commentsNum(); ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<i class="mime-<?php echo $mime; ?>"></i>
|
||||
<a href="<?php $options->adminUrl('media.php?cid=' . $attachments->cid); ?>"><?php $attachments->title(); ?></a>
|
||||
<a href="<?php $attachments->permalink(); ?>"
|
||||
title="<?php _e('浏览 %s', $attachments->title); ?>"><i
|
||||
class="i-exlink"></i></a>
|
||||
</td>
|
||||
<td class="kit-hidden-mb"><?php $attachments->author(); ?></td>
|
||||
<td class="kit-hidden-mb">
|
||||
<?php if ($attachments->parentPost->cid): ?>
|
||||
<a href="<?php $options->adminUrl('write-' . (0 === strpos($attachments->parentPost->type, 'post') ? 'post' : 'page') . '.php?cid=' . $attachments->parentPost->cid); ?>"><?php $attachments->parentPost->title(); ?></a>
|
||||
<?php else: ?>
|
||||
<span class="description"><?php _e('未归档'); ?></span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?php $attachments->dateWord(); ?></td>
|
||||
</tr>
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td colspan="6" class="none"><?php _e('没有任何文件'); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table><!-- end .typecho-list-table -->
|
||||
</form><!-- end .operate-form -->
|
||||
|
||||
<form method="get" class="typecho-list-operate">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox"
|
||||
class="typecho-table-select-all"/></label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i
|
||||
class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i
|
||||
class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="<?php _e('你确认要删除这些文件吗?'); ?>"
|
||||
href="<?php $security->index('/action/contents-attachment-edit?do=delete'); ?>"><?php _e('删除'); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<button class="btn btn-s btn-warn btn-operate"
|
||||
href="<?php $security->index('/action/contents-attachment-edit?do=clear'); ?>"
|
||||
lang="<?php _e('您确认要清理未归档的文件吗?'); ?>"><?php _e('清理未归档文件'); ?></button>
|
||||
</div>
|
||||
<?php if ($attachments->have()): ?>
|
||||
<ul class="typecho-pager">
|
||||
<?php $attachments->pageNav(); ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div><!-- end .typecho-page-main -->
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
include 'copyright.php';
|
||||
|
||||
@@ -6,134 +6,129 @@ include 'menu.php';
|
||||
$stat = \Widget\Stat::alloc();
|
||||
$pages = \Widget\Contents\Page\Admin::alloc();
|
||||
?>
|
||||
<div class="main">
|
||||
<main class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main" role="main">
|
||||
<div class="col-mb-12 typecho-list">
|
||||
<div class="typecho-list-operate clearfix">
|
||||
<form method="get">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox"
|
||||
class="typecho-table-select-all"/></label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i
|
||||
class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i
|
||||
class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="<?php _e('你确认要删除这些页面吗?'); ?>"
|
||||
href="<?php $security->index('/action/contents-page-edit?do=delete'); ?>"><?php _e('删除'); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-page-edit?do=mark&status=publish'); ?>"><?php _e('标记为<strong>%s</strong>', _t('公开')); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-page-edit?do=mark&status=hidden'); ?>"><?php _e('标记为<strong>%s</strong>', _t('隐藏')); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<form method="get" class="typecho-list-operate">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox"
|
||||
class="typecho-table-select-all"/></label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i
|
||||
class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i
|
||||
class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="<?php _e('你确认要删除这些页面吗?'); ?>"
|
||||
href="<?php $security->index('/action/contents-page-edit?do=delete'); ?>"><?php _e('删除'); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-page-edit?do=mark&status=publish'); ?>"><?php _e('标记为<strong>%s</strong>', _t('公开')); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-page-edit?do=mark&status=hidden'); ?>"><?php _e('标记为<strong>%s</strong>', _t('隐藏')); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search" role="search">
|
||||
<?php $pages->backLink(); ?>
|
||||
<?php if ('' != $request->keywords): ?>
|
||||
<a href="<?php $options->adminUrl('manage-pages.php'); ?>"><?php _e('« 取消筛选'); ?></a>
|
||||
<?php endif; ?>
|
||||
<input type="text" class="text-s" placeholder="<?php _e('请输入关键字'); ?>"
|
||||
value="<?php echo $request->filter('html')->keywords; ?>" name="keywords"/>
|
||||
<button type="submit" class="btn btn-s"><?php _e('筛选'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- end .typecho-list-operate -->
|
||||
<div class="search" role="search">
|
||||
<?php $pages->backLink(); ?>
|
||||
<?php if ('' != $request->keywords): ?>
|
||||
<a href="<?php $options->adminUrl('manage-pages.php'); ?>"><?php _e('« 取消筛选'); ?></a>
|
||||
<?php endif; ?>
|
||||
<input type="text" class="text-s" placeholder="<?php _e('请输入关键字'); ?>"
|
||||
value="<?php echo $request->filter('html')->keywords; ?>" name="keywords"/>
|
||||
<button type="submit" class="btn btn-s"><?php _e('筛选'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form method="post" name="manage_pages" class="operate-form">
|
||||
<div class="typecho-table-wrap">
|
||||
<table class="typecho-list-table">
|
||||
<colgroup>
|
||||
<col width="20" class="kit-hidden-mb"/>
|
||||
<col width="6%" class="kit-hidden-mb"/>
|
||||
<col width="30%"/>
|
||||
<col width="30%"/>
|
||||
<col width="" class="kit-hidden-mb"/>
|
||||
<col width="16%"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr class="nodrag">
|
||||
<th class="kit-hidden-mb"></th>
|
||||
<th class="kit-hidden-mb"></th>
|
||||
<th><?php _e('标题'); ?></th>
|
||||
<th><?php _e('子页面'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('作者'); ?></th>
|
||||
<th><?php _e('日期'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if ($pages->have()): ?>
|
||||
<?php while ($pages->next()): ?>
|
||||
<tr id="<?php $pages->theId(); ?>">
|
||||
<td class="kit-hidden-mb"><input type="checkbox" value="<?php $pages->cid(); ?>"
|
||||
name="cid[]"/></td>
|
||||
<td class="kit-hidden-mb"><a
|
||||
href="<?php $options->adminUrl('manage-comments.php?cid=' . $pages->cid); ?>"
|
||||
class="balloon-button size-<?php echo \Typecho\Common::splitByCount($pages->commentsNum, 1, 10, 20, 50, 100); ?>"
|
||||
title="<?php $pages->commentsNum(); ?> <?php _e('评论'); ?>"><?php $pages->commentsNum(); ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php $options->adminUrl('write-page.php?cid=' . $pages->cid); ?>"><?php $pages->title(); ?></a>
|
||||
<?php
|
||||
if ('page_draft' == $pages->type) {
|
||||
echo '<em class="status">' . _t('草稿') . '</em>';
|
||||
} elseif ($pages->revision) {
|
||||
echo '<em class="status">' . _t('有修订版') . '</em>';
|
||||
}
|
||||
<table class="typecho-list-table">
|
||||
<colgroup>
|
||||
<col width="3%" class="kit-hidden-mb"/>
|
||||
<col width="6%" class="kit-hidden-mb"/>
|
||||
<col width="42%"/>
|
||||
<col width="18%"/>
|
||||
<col width="" class="kit-hidden-mb"/>
|
||||
<col width="16%"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr class="nodrag">
|
||||
<th class="kit-hidden-mb"></th>
|
||||
<th class="kit-hidden-mb"></th>
|
||||
<th><?php _e('标题'); ?></th>
|
||||
<th><?php _e('子页面'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('作者'); ?></th>
|
||||
<th><?php _e('日期'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if ($pages->have()): ?>
|
||||
<?php while ($pages->next()): ?>
|
||||
<tr id="<?php $pages->theId(); ?>">
|
||||
<td class="kit-hidden-mb"><input type="checkbox" value="<?php $pages->cid(); ?>"
|
||||
name="cid[]"/></td>
|
||||
<td class="kit-hidden-mb"><a
|
||||
href="<?php $options->adminUrl('manage-comments.php?cid=' . $pages->cid); ?>"
|
||||
class="balloon-button size-<?php echo \Typecho\Common::splitByCount($pages->commentsNum, 1, 10, 20, 50, 100); ?>"
|
||||
title="<?php $pages->commentsNum(); ?> <?php _e('评论'); ?>"><?php $pages->commentsNum(); ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php $options->adminUrl('write-page.php?cid=' . $pages->cid); ?>"><?php $pages->title(); ?></a>
|
||||
<?php
|
||||
if ('page_draft' == $pages->type) {
|
||||
echo '<em class="status">' . _t('草稿') . '</em>';
|
||||
} elseif ($pages->revision) {
|
||||
echo '<em class="status">' . _t('有修订版') . '</em>';
|
||||
}
|
||||
|
||||
if ('hidden' == $pages->status) {
|
||||
echo '<em class="status">' . _t('隐藏') . '</em>';
|
||||
}
|
||||
?>
|
||||
<a href="<?php $options->adminUrl('write-page.php?cid=' . $pages->cid); ?>"
|
||||
title="<?php _e('编辑 %s', htmlspecialchars($pages->title)); ?>"><i
|
||||
class="i-edit"></i></a>
|
||||
<?php if ('page_draft' != $pages->type): ?>
|
||||
<a href="<?php $pages->permalink(); ?>"
|
||||
title="<?php _e('浏览 %s', htmlspecialchars($pages->title)); ?>"><i
|
||||
class="i-exlink"></i></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if (count($pages->children) > 0): ?>
|
||||
<a href="<?php $options->adminUrl('manage-pages.php?parent=' . $pages->cid); ?>"><?php echo _n('一个页面', '%d个页面', count($pages->children)); ?></a>
|
||||
<?php else: ?>
|
||||
<a href="<?php $options->adminUrl('write-page.php?parent=' . $pages->cid); ?>"><?php echo _e('新增'); ?></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="kit-hidden-mb"><?php $pages->author(); ?></td>
|
||||
<td>
|
||||
<?php if ('page_draft' == $pages->type || $pages->revision): ?>
|
||||
<span class="description">
|
||||
<?php $modifyDate = new \Typecho\Date($pages->revision ? $pages->revision['modified'] : $pages->modified); ?>
|
||||
<?php _e('保存于 %s', $modifyDate->word()); ?>
|
||||
</span>
|
||||
<?php else: ?>
|
||||
<?php $pages->dateWord(); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td colspan="6"><h6 class="typecho-list-table-title"><?php _e('没有任何页面'); ?></h6>
|
||||
if ('hidden' == $pages->status) {
|
||||
echo '<em class="status">' . _t('隐藏') . '</em>';
|
||||
}
|
||||
?>
|
||||
<a href="<?php $options->adminUrl('write-page.php?cid=' . $pages->cid); ?>"
|
||||
title="<?php _e('编辑 %s', htmlspecialchars($pages->title)); ?>"><i
|
||||
class="i-edit"></i></a>
|
||||
<?php if ('page_draft' != $pages->type): ?>
|
||||
<a href="<?php $pages->permalink(); ?>"
|
||||
title="<?php _e('浏览 %s', htmlspecialchars($pages->title)); ?>"><i
|
||||
class="i-exlink"></i></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if (count($pages->children) > 0): ?>
|
||||
<a href="<?php $options->adminUrl('manage-pages.php?parent=' . $pages->cid); ?>"><?php echo _n('一个页面', '%d个页面', count($pages->children)); ?></a>
|
||||
<?php else: ?>
|
||||
<a href="<?php $options->adminUrl('write-page.php?parent=' . $pages->cid); ?>"><?php echo _e('新增'); ?></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="kit-hidden-mb"><?php $pages->author(); ?></td>
|
||||
<td>
|
||||
<?php if ('page_draft' == $pages->type || $pages->revision): ?>
|
||||
<span class="description">
|
||||
<?php $modifyDate = new \Typecho\Date($pages->revision ? $pages->revision['modified'] : $pages->modified); ?>
|
||||
<?php _e('保存于 %s', $modifyDate->word()); ?>
|
||||
</span>
|
||||
<?php else: ?>
|
||||
<?php $pages->dateWord(); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- end .typecho-table-wrap -->
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td colspan="6" class="none"><?php _e('没有任何页面'); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</form><!-- end .operate-form -->
|
||||
</div><!-- end .typecho-list -->
|
||||
</div><!-- end .typecho-page-main -->
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
include 'copyright.php';
|
||||
|
||||
@@ -7,22 +7,12 @@ $stat = \Widget\Stat::alloc();
|
||||
$posts = \Widget\Contents\Post\Admin::alloc();
|
||||
$isAllPosts = ('on' == $request->get('__typecho_all_posts') || 'on' == \Typecho\Cookie::get('__typecho_all_posts'));
|
||||
?>
|
||||
<div class="main">
|
||||
<main class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main" role="main">
|
||||
<div class="col-mb-12 typecho-list">
|
||||
<div class="clearfix">
|
||||
<ul class="typecho-option-tabs right">
|
||||
<?php if ($user->pass('editor', true) && !isset($request->uid)): ?>
|
||||
<li class="<?php if ($isAllPosts): ?> current<?php endif; ?>"><a
|
||||
href="<?php echo $request->makeUriByRequest('__typecho_all_posts=on&page=1'); ?>"><?php _e('所有'); ?></a>
|
||||
</li>
|
||||
<li class="<?php if (!$isAllPosts): ?> current<?php endif; ?>"><a
|
||||
href="<?php echo $request->makeUriByRequest('__typecho_all_posts=off&page=1'); ?>"><?php _e('我的'); ?></a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
<div class="typecho-list-operate">
|
||||
<ul class="typecho-option-tabs">
|
||||
<li<?php if (!isset($request->status) || 'all' == $request->get('status')): ?> class="current"<?php endif; ?>>
|
||||
<a href="<?php $options->adminUrl('manage-posts.php'
|
||||
@@ -51,204 +41,208 @@ $isAllPosts = ('on' == $request->get('__typecho_all_posts') || 'on' == \Typecho\
|
||||
<?php endif; ?>
|
||||
</a></li>
|
||||
</ul>
|
||||
|
||||
<?php if ($user->pass('editor', true) && !isset($request->uid)): ?>
|
||||
<ul class="typecho-option-tabs">
|
||||
<li class="<?php if ($isAllPosts): ?> current<?php endif; ?>"><a
|
||||
href="<?php echo $request->makeUriByRequest('__typecho_all_posts=on&page=1'); ?>"><?php _e('所有'); ?></a>
|
||||
</li>
|
||||
<li class="<?php if (!$isAllPosts): ?> current<?php endif; ?>"><a
|
||||
href="<?php echo $request->makeUriByRequest('__typecho_all_posts=off&page=1'); ?>"><?php _e('我的'); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="typecho-list-operate clearfix">
|
||||
<form method="get">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox"
|
||||
class="typecho-table-select-all"/></label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i
|
||||
class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i
|
||||
class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="<?php _e('你确认要删除这些文章吗?'); ?>"
|
||||
href="<?php $security->index('/action/contents-post-edit?do=delete'); ?>"><?php _e('删除'); ?></a>
|
||||
<form method="get" class="typecho-list-operate">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox"
|
||||
class="typecho-table-select-all"/></label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i
|
||||
class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i
|
||||
class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="<?php _e('你确认要删除这些文章吗?'); ?>"
|
||||
href="<?php $security->index('/action/contents-post-edit?do=delete'); ?>"><?php _e('删除'); ?></a>
|
||||
</li>
|
||||
<?php if ($user->pass('editor', true)): ?>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-post-edit?do=mark&status=publish'); ?>"><?php _e('标记为<strong>%s</strong>', _t('公开')); ?></a>
|
||||
</li>
|
||||
<?php if ($user->pass('editor', true)): ?>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-post-edit?do=mark&status=publish'); ?>"><?php _e('标记为<strong>%s</strong>', _t('公开')); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-post-edit?do=mark&status=waiting'); ?>"><?php _e('标记为<strong>%s</strong>', _t('待审核')); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-post-edit?do=mark&status=hidden'); ?>"><?php _e('标记为<strong>%s</strong>', _t('隐藏')); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-post-edit?do=mark&status=private'); ?>"><?php _e('标记为<strong>%s</strong>', _t('私密')); ?></a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-post-edit?do=mark&status=waiting'); ?>"><?php _e('标记为<strong>%s</strong>', _t('待审核')); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-post-edit?do=mark&status=hidden'); ?>"><?php _e('标记为<strong>%s</strong>', _t('隐藏')); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-post-edit?do=mark&status=private'); ?>"><?php _e('标记为<strong>%s</strong>', _t('私密')); ?></a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="search" role="search">
|
||||
<?php if ('' != $request->keywords || '' != $request->category): ?>
|
||||
<a href="<?php $options->adminUrl('manage-posts.php'
|
||||
. (isset($request->status) || isset($request->uid) ? '?' .
|
||||
(isset($request->status) ? 'status=' . $request->filter('encode')->status : '') .
|
||||
(isset($request->uid) ? (isset($request->status) ? '&' : '') . 'uid=' . $request->filter('encode')->uid : '') : '')); ?>"><?php _e('« 取消筛选'); ?></a>
|
||||
<?php endif; ?>
|
||||
<input type="text" class="text-s" placeholder="<?php _e('请输入关键字'); ?>"
|
||||
value="<?php echo $request->filter('html')->keywords; ?>" name="keywords"/>
|
||||
<select name="category">
|
||||
<option value=""><?php _e('所有分类'); ?></option>
|
||||
<?php \Widget\Metas\Category\Rows::alloc()->to($category); ?>
|
||||
<?php while ($category->next()): ?>
|
||||
<option
|
||||
value="<?php $category->mid(); ?>"<?php if ($request->get('category') == $category->mid): ?> selected="true"<?php endif; ?>><?php $category->name(); ?></option>
|
||||
<?php endwhile; ?>
|
||||
</select>
|
||||
<button type="submit" class="btn btn-s"><?php _e('筛选'); ?></button>
|
||||
<?php if (isset($request->uid)): ?>
|
||||
<input type="hidden" value="<?php echo $request->filter('html')->uid; ?>"
|
||||
name="uid"/>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($request->status)): ?>
|
||||
<input type="hidden" value="<?php echo $request->filter('html')->status; ?>"
|
||||
name="status"/>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- end .typecho-list-operate -->
|
||||
</div>
|
||||
<div class="search" role="search">
|
||||
<?php if ('' != $request->keywords || '' != $request->category): ?>
|
||||
<a href="<?php $options->adminUrl('manage-posts.php'
|
||||
. (isset($request->status) || isset($request->uid) ? '?' .
|
||||
(isset($request->status) ? 'status=' . $request->filter('encode')->status : '') .
|
||||
(isset($request->uid) ? (isset($request->status) ? '&' : '') . 'uid=' . $request->filter('encode')->uid : '') : '')); ?>"><?php _e('« 取消筛选'); ?></a>
|
||||
<?php endif; ?>
|
||||
<input type="text" class="text-s" placeholder="<?php _e('请输入关键字'); ?>"
|
||||
value="<?php echo $request->filter('html')->keywords; ?>" name="keywords"/>
|
||||
<select name="category">
|
||||
<option value=""><?php _e('所有分类'); ?></option>
|
||||
<?php \Widget\Metas\Category\Rows::alloc()->to($category); ?>
|
||||
<?php while ($category->next()): ?>
|
||||
<option
|
||||
value="<?php $category->mid(); ?>"<?php if ($request->get('category') == $category->mid): ?> selected="true"<?php endif; ?>><?php $category->name(); ?></option>
|
||||
<?php endwhile; ?>
|
||||
</select>
|
||||
<button type="submit" class="btn btn-s"><?php _e('筛选'); ?></button>
|
||||
<?php if (isset($request->uid)): ?>
|
||||
<input type="hidden" value="<?php echo $request->filter('html')->uid; ?>"
|
||||
name="uid"/>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($request->status)): ?>
|
||||
<input type="hidden" value="<?php echo $request->filter('html')->status; ?>"
|
||||
name="status"/>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form method="post" name="manage_posts" class="operate-form">
|
||||
<div class="typecho-table-wrap">
|
||||
<table class="typecho-list-table">
|
||||
<colgroup>
|
||||
<col width="20" class="kit-hidden-mb"/>
|
||||
<col width="6%" class="kit-hidden-mb"/>
|
||||
<col width="45%"/>
|
||||
<col width="" class="kit-hidden-mb"/>
|
||||
<col width="18%" class="kit-hidden-mb"/>
|
||||
<col width="16%"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="kit-hidden-mb"></th>
|
||||
<th class="kit-hidden-mb"></th>
|
||||
<th><?php _e('标题'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('作者'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('分类'); ?></th>
|
||||
<th><?php _e('日期'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if ($posts->have()): ?>
|
||||
<?php while ($posts->next()): ?>
|
||||
<tr id="<?php $posts->theId(); ?>">
|
||||
<td class="kit-hidden-mb"><input type="checkbox" value="<?php $posts->cid(); ?>"
|
||||
name="cid[]"/></td>
|
||||
<td class="kit-hidden-mb"><a
|
||||
href="<?php $options->adminUrl('manage-comments.php?cid=' . ($posts->parentId ? $posts->parentId : $posts->cid)); ?>"
|
||||
class="balloon-button size-<?php echo \Typecho\Common::splitByCount($posts->commentsNum, 1, 10, 20, 50, 100); ?>"
|
||||
title="<?php $posts->commentsNum(); ?> <?php _e('评论'); ?>"><?php $posts->commentsNum(); ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php $options->adminUrl('write-post.php?cid=' . $posts->cid); ?>"><?php $posts->title(); ?></a>
|
||||
<?php
|
||||
if ('post_draft' == $posts->type) {
|
||||
echo '<em class="status">' . _t('草稿') . '</em>';
|
||||
} elseif ($posts->revision) {
|
||||
echo '<em class="status">' . _t('有修订版') . '</em>';
|
||||
}
|
||||
<table class="typecho-list-table">
|
||||
<colgroup>
|
||||
<col width="3%" class="kit-hidden-mb"/>
|
||||
<col width="6%" class="kit-hidden-mb"/>
|
||||
<col width="45%"/>
|
||||
<col width="" class="kit-hidden-mb"/>
|
||||
<col width="18%" class="kit-hidden-mb"/>
|
||||
<col width="16%"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="kit-hidden-mb"></th>
|
||||
<th class="kit-hidden-mb"></th>
|
||||
<th><?php _e('标题'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('作者'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('分类'); ?></th>
|
||||
<th><?php _e('日期'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if ($posts->have()): ?>
|
||||
<?php while ($posts->next()): ?>
|
||||
<tr id="<?php $posts->theId(); ?>">
|
||||
<td class="kit-hidden-mb"><input type="checkbox" value="<?php $posts->cid(); ?>"
|
||||
name="cid[]"/></td>
|
||||
<td class="kit-hidden-mb"><a
|
||||
href="<?php $options->adminUrl('manage-comments.php?cid=' . ($posts->parentId ? $posts->parentId : $posts->cid)); ?>"
|
||||
class="balloon-button size-<?php echo \Typecho\Common::splitByCount($posts->commentsNum, 1, 10, 20, 50, 100); ?>"
|
||||
title="<?php $posts->commentsNum(); ?> <?php _e('评论'); ?>"><?php $posts->commentsNum(); ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php $options->adminUrl('write-post.php?cid=' . $posts->cid); ?>"><?php $posts->title(); ?></a>
|
||||
<?php
|
||||
if ('post_draft' == $posts->type) {
|
||||
echo '<em class="status">' . _t('草稿') . '</em>';
|
||||
} elseif ($posts->revision) {
|
||||
echo '<em class="status">' . _t('有修订版') . '</em>';
|
||||
}
|
||||
|
||||
if ('hidden' == $posts->status) {
|
||||
echo '<em class="status">' . _t('隐藏') . '</em>';
|
||||
} elseif ('waiting' == $posts->status) {
|
||||
echo '<em class="status">' . _t('待审核') . '</em>';
|
||||
} elseif ('private' == $posts->status) {
|
||||
echo '<em class="status">' . _t('私密') . '</em>';
|
||||
} elseif ($posts->password) {
|
||||
echo '<em class="status">' . _t('密码保护') . '</em>';
|
||||
}
|
||||
?>
|
||||
<a href="<?php $options->adminUrl('write-post.php?cid=' . $posts->cid); ?>"
|
||||
title="<?php _e('编辑 %s', htmlspecialchars($posts->title)); ?>"><i
|
||||
class="i-edit"></i></a>
|
||||
<?php if ('post_draft' != $posts->type): ?>
|
||||
<a href="<?php $posts->permalink(); ?>"
|
||||
title="<?php _e('浏览 %s', htmlspecialchars($posts->title)); ?>"><i
|
||||
class="i-exlink"></i></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="kit-hidden-mb"><a
|
||||
href="<?php $options->adminUrl('manage-posts.php?__typecho_all_posts=off&uid=' . $posts->author->uid); ?>"><?php $posts->author(); ?></a>
|
||||
</td>
|
||||
<td class="kit-hidden-mb"><?php foreach($posts->categories as $index => $category): ?><!--
|
||||
--><?php echo ($index > 0 ? ', ' : '') . '<a href="';
|
||||
$options->adminUrl('manage-posts.php?category=' . $category['mid']
|
||||
. (isset($request->uid) ? '&uid=' . $request->filter('encode')->uid : '')
|
||||
. (isset($request->status) ? '&status=' . $request->filter('encode')->status : ''));
|
||||
echo '">' . $category['name'] . '</a>'; ?><!--
|
||||
--><?php endforeach; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ('post_draft' == $posts->type || $posts->revision): ?>
|
||||
<span class="description">
|
||||
<?php $modifyDate = new \Typecho\Date($posts->revision ? $posts->revision['modified'] : $posts->modified); ?>
|
||||
<?php _e('保存于 %s', $modifyDate->word()); ?>
|
||||
</span>
|
||||
<?php else: ?>
|
||||
<?php $posts->dateWord(); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td colspan="6"><h6 class="typecho-list-table-title"><?php _e('没有任何文章'); ?></h6>
|
||||
if ('hidden' == $posts->status) {
|
||||
echo '<em class="status">' . _t('隐藏') . '</em>';
|
||||
} elseif ('waiting' == $posts->status) {
|
||||
echo '<em class="status">' . _t('待审核') . '</em>';
|
||||
} elseif ('private' == $posts->status) {
|
||||
echo '<em class="status">' . _t('私密') . '</em>';
|
||||
} elseif ($posts->password) {
|
||||
echo '<em class="status">' . _t('密码保护') . '</em>';
|
||||
}
|
||||
?>
|
||||
<a href="<?php $options->adminUrl('write-post.php?cid=' . $posts->cid); ?>"
|
||||
title="<?php _e('编辑 %s', htmlspecialchars($posts->title)); ?>"><i
|
||||
class="i-edit"></i></a>
|
||||
<?php if ('post_draft' != $posts->type): ?>
|
||||
<a href="<?php $posts->permalink(); ?>"
|
||||
title="<?php _e('浏览 %s', htmlspecialchars($posts->title)); ?>"><i
|
||||
class="i-exlink"></i></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="kit-hidden-mb"><a
|
||||
href="<?php $options->adminUrl('manage-posts.php?__typecho_all_posts=off&uid=' . $posts->author->uid); ?>"><?php $posts->author(); ?></a>
|
||||
</td>
|
||||
<td class="kit-hidden-mb"><?php foreach($posts->categories as $index => $category): ?><!--
|
||||
--><?php echo ($index > 0 ? ', ' : '') . '<a href="';
|
||||
$options->adminUrl('manage-posts.php?category=' . $category['mid']
|
||||
. (isset($request->uid) ? '&uid=' . $request->filter('encode')->uid : '')
|
||||
. (isset($request->status) ? '&status=' . $request->filter('encode')->status : ''));
|
||||
echo '">' . $category['name'] . '</a>'; ?><!--
|
||||
--><?php endforeach; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ('post_draft' == $posts->type || $posts->revision): ?>
|
||||
<span class="description">
|
||||
<?php $modifyDate = new \Typecho\Date($posts->revision ? $posts->revision['modified'] : $posts->modified); ?>
|
||||
<?php _e('保存于 %s', $modifyDate->word()); ?>
|
||||
</span>
|
||||
<?php else: ?>
|
||||
<?php $posts->dateWord(); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td colspan="6" class="none"><?php _e('没有任何文章'); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</form><!-- end .operate-form -->
|
||||
|
||||
<div class="typecho-list-operate clearfix">
|
||||
<form method="get">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox"
|
||||
class="typecho-table-select-all"/></label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i
|
||||
class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i
|
||||
class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="<?php _e('你确认要删除这些文章吗?'); ?>"
|
||||
href="<?php $security->index('/action/contents-post-edit?do=delete'); ?>"><?php _e('删除'); ?></a>
|
||||
<form method="get" class="typecho-list-operate">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox"
|
||||
class="typecho-table-select-all"/></label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i
|
||||
class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i
|
||||
class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="<?php _e('你确认要删除这些文章吗?'); ?>"
|
||||
href="<?php $security->index('/action/contents-post-edit?do=delete'); ?>"><?php _e('删除'); ?></a>
|
||||
</li>
|
||||
<?php if ($user->pass('editor', true)): ?>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-post-edit?do=mark&status=publish'); ?>"><?php _e('标记为<strong>%s</strong>', _t('公开')); ?></a>
|
||||
</li>
|
||||
<?php if ($user->pass('editor', true)): ?>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-post-edit?do=mark&status=publish'); ?>"><?php _e('标记为<strong>%s</strong>', _t('公开')); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-post-edit?do=mark&status=waiting'); ?>"><?php _e('标记为<strong>%s</strong>', _t('待审核')); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-post-edit?do=mark&status=hidden'); ?>"><?php _e('标记为<strong>%s</strong>', _t('隐藏')); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-post-edit?do=mark&status=private'); ?>"><?php _e('标记为<strong>%s</strong>', _t('私密')); ?></a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($posts->have()): ?>
|
||||
<ul class="typecho-pager">
|
||||
<?php $posts->pageNav(); ?>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-post-edit?do=mark&status=waiting'); ?>"><?php _e('标记为<strong>%s</strong>', _t('待审核')); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-post-edit?do=mark&status=hidden'); ?>"><?php _e('标记为<strong>%s</strong>', _t('隐藏')); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-post-edit?do=mark&status=private'); ?>"><?php _e('标记为<strong>%s</strong>', _t('私密')); ?></a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</form>
|
||||
</div><!-- end .typecho-list-operate -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($posts->have()): ?>
|
||||
<ul class="typecho-pager">
|
||||
<?php $posts->pageNav(); ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</form>
|
||||
</div><!-- end .typecho-list -->
|
||||
</div><!-- end .typecho-page-main -->
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
include 'copyright.php';
|
||||
|
||||
@@ -6,7 +6,7 @@ include 'menu.php';
|
||||
\Widget\Metas\Tag\Admin::alloc()->to($tags);
|
||||
?>
|
||||
|
||||
<div class="main">
|
||||
<main class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main manage-metas">
|
||||
@@ -14,7 +14,7 @@ include 'menu.php';
|
||||
<div class="col-mb-12 col-tb-8" role="main">
|
||||
|
||||
<form method="post" name="manage_tags" class="operate-form">
|
||||
<div class="typecho-list-operate clearfix">
|
||||
<div class="typecho-list-operate">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox"
|
||||
class="typecho-table-select-all"/></label>
|
||||
@@ -39,8 +39,8 @@ include 'menu.php';
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="typecho-list-notable tag-list clearfix">
|
||||
<?php if ($tags->have()): ?>
|
||||
<?php if ($tags->have()): ?>
|
||||
<ul class="typecho-list-notable tag-list">
|
||||
<?php while ($tags->next()): ?>
|
||||
<li class="size-<?php $tags->split(5, 10, 20, 30); ?>" id="<?php $tags->theId(); ?>">
|
||||
<input type="checkbox" value="<?php $tags->mid(); ?>" name="mid[]"/>
|
||||
@@ -51,10 +51,12 @@ include 'menu.php';
|
||||
class="i-edit"></i></a>
|
||||
</li>
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<h6 class="typecho-list-table-title"><?php _e('没有任何标签'); ?></h6>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</ul>
|
||||
<?php else: ?>
|
||||
<ul class="tag-list">
|
||||
<li class="none"><?php _e('没有任何标签'); ?></li>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="do" value="delete"/>
|
||||
</form>
|
||||
|
||||
@@ -64,7 +66,7 @@ include 'menu.php';
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
include 'copyright.php';
|
||||
|
||||
@@ -5,131 +5,125 @@ include 'menu.php';
|
||||
|
||||
$users = \Widget\Users\Admin::alloc();
|
||||
?>
|
||||
<div class="main">
|
||||
<main class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main" role="main">
|
||||
<div class="col-mb-12 typecho-list">
|
||||
<div class="typecho-list-operate clearfix">
|
||||
<form method="get">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox"
|
||||
class="typecho-table-select-all"/></label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i
|
||||
class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i
|
||||
class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="<?php _e('你确认要删除这些用户吗?'); ?>"
|
||||
href="<?php $security->index('/action/users-edit?do=delete'); ?>"><?php _e('删除'); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<form method="get" class="typecho-list-operate">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox"
|
||||
class="typecho-table-select-all"/></label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i
|
||||
class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i
|
||||
class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="<?php _e('你确认要删除这些用户吗?'); ?>"
|
||||
href="<?php $security->index('/action/users-edit?do=delete'); ?>"><?php _e('删除'); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="search" role="search">
|
||||
<?php if ('' != $request->keywords): ?>
|
||||
<a href="<?php $options->adminUrl('manage-users.php'); ?>"><?php _e('« 取消筛选'); ?></a>
|
||||
<?php endif; ?>
|
||||
<input type="text" class="text-s" placeholder="<?php _e('请输入关键字'); ?>"
|
||||
value="<?php echo $request->filter('html')->keywords; ?>" name="keywords"/>
|
||||
<button type="submit" class="btn btn-s"><?php _e('筛选'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- end .typecho-list-operate -->
|
||||
</div>
|
||||
<div class="search" role="search">
|
||||
<?php if ('' != $request->keywords): ?>
|
||||
<a href="<?php $options->adminUrl('manage-users.php'); ?>"><?php _e('« 取消筛选'); ?></a>
|
||||
<?php endif; ?>
|
||||
<input type="text" class="text-s" placeholder="<?php _e('请输入关键字'); ?>"
|
||||
value="<?php echo $request->filter('html')->keywords; ?>" name="keywords"/>
|
||||
<button type="submit" class="btn btn-s"><?php _e('筛选'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form method="post" name="manage_users" class="operate-form">
|
||||
<div class="typecho-table-wrap">
|
||||
<table class="typecho-list-table">
|
||||
<colgroup>
|
||||
<col width="20" class="kit-hidden-mb"/>
|
||||
<col width="6%" class="kit-hidden-mb"/>
|
||||
<col width="30%"/>
|
||||
<col width="" class="kit-hidden-mb"/>
|
||||
<col width="25%" class="kit-hidden-mb"/>
|
||||
<col width="15%"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="kit-hidden-mb"></th>
|
||||
<th class="kit-hidden-mb"></th>
|
||||
<th><?php _e('用户名'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('昵称'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('电子邮件'); ?></th>
|
||||
<th><?php _e('用户组'); ?></th>
|
||||
<table class="typecho-list-table">
|
||||
<colgroup>
|
||||
<col width="3%" class="kit-hidden-mb"/>
|
||||
<col width="6%" class="kit-hidden-mb"/>
|
||||
<col width="30%"/>
|
||||
<col width="" class="kit-hidden-mb"/>
|
||||
<col width="25%" class="kit-hidden-mb"/>
|
||||
<col width="15%"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="kit-hidden-mb"></th>
|
||||
<th class="kit-hidden-mb"></th>
|
||||
<th><?php _e('用户名'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('昵称'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('电子邮件'); ?></th>
|
||||
<th><?php _e('用户组'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php while ($users->next()): ?>
|
||||
<tr id="user-<?php $users->uid(); ?>">
|
||||
<td class="kit-hidden-mb"><input type="checkbox" value="<?php $users->uid(); ?>"
|
||||
name="uid[]"/></td>
|
||||
<td class="kit-hidden-mb"><a
|
||||
href="<?php $options->adminUrl('manage-posts.php?__typecho_all_posts=off&uid=' . $users->uid); ?>"
|
||||
class="balloon-button left size-<?php echo \Typecho\Common::splitByCount($users->postsNum, 1, 10, 20, 50, 100); ?>"><?php $users->postsNum(); ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php $options->adminUrl('user.php?uid=' . $users->uid); ?>"><?php $users->name(); ?></a>
|
||||
<a href="<?php $users->permalink(); ?>"
|
||||
title="<?php _e('浏览 %s', $users->screenName); ?>"><i
|
||||
class="i-exlink"></i></a>
|
||||
</td>
|
||||
<td class="kit-hidden-mb"><?php $users->screenName(); ?></td>
|
||||
<td class="kit-hidden-mb"><?php if ($users->mail): ?><a
|
||||
href="mailto:<?php $users->mail(); ?>"><?php $users->mail(); ?></a><?php else: _e('暂无'); endif; ?>
|
||||
</td>
|
||||
<td><?php switch ($users->group) {
|
||||
case 'administrator':
|
||||
_e('管理员');
|
||||
break;
|
||||
case 'editor':
|
||||
_e('编辑');
|
||||
break;
|
||||
case 'contributor':
|
||||
_e('贡献者');
|
||||
break;
|
||||
case 'subscriber':
|
||||
_e('关注者');
|
||||
break;
|
||||
case 'visitor':
|
||||
_e('访问者');
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
} ?></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php while ($users->next()): ?>
|
||||
<tr id="user-<?php $users->uid(); ?>">
|
||||
<td class="kit-hidden-mb"><input type="checkbox" value="<?php $users->uid(); ?>"
|
||||
name="uid[]"/></td>
|
||||
<td class="kit-hidden-mb"><a
|
||||
href="<?php $options->adminUrl('manage-posts.php?__typecho_all_posts=off&uid=' . $users->uid); ?>"
|
||||
class="balloon-button left size-<?php echo \Typecho\Common::splitByCount($users->postsNum, 1, 10, 20, 50, 100); ?>"><?php $users->postsNum(); ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php $options->adminUrl('user.php?uid=' . $users->uid); ?>"><?php $users->name(); ?></a>
|
||||
<a href="<?php $users->permalink(); ?>"
|
||||
title="<?php _e('浏览 %s', $users->screenName); ?>"><i
|
||||
class="i-exlink"></i></a>
|
||||
</td>
|
||||
<td class="kit-hidden-mb"><?php $users->screenName(); ?></td>
|
||||
<td class="kit-hidden-mb"><?php if ($users->mail): ?><a
|
||||
href="mailto:<?php $users->mail(); ?>"><?php $users->mail(); ?></a><?php else: _e('暂无'); endif; ?>
|
||||
</td>
|
||||
<td><?php switch ($users->group) {
|
||||
case 'administrator':
|
||||
_e('管理员');
|
||||
break;
|
||||
case 'editor':
|
||||
_e('编辑');
|
||||
break;
|
||||
case 'contributor':
|
||||
_e('贡献者');
|
||||
break;
|
||||
case 'subscriber':
|
||||
_e('关注者');
|
||||
break;
|
||||
case 'visitor':
|
||||
_e('访问者');
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
} ?></td>
|
||||
</tr>
|
||||
<?php endwhile; ?>
|
||||
</tbody>
|
||||
</table><!-- end .typecho-list-table -->
|
||||
</div><!-- end .typecho-table-wrap -->
|
||||
<?php endwhile; ?>
|
||||
</tbody>
|
||||
</table><!-- end .typecho-list-table -->
|
||||
</form><!-- end .operate-form -->
|
||||
|
||||
<div class="typecho-list-operate clearfix">
|
||||
<form method="get">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox"
|
||||
class="typecho-table-select-all"/></label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i
|
||||
class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i
|
||||
class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="<?php _e('你确认要删除这些用户吗?'); ?>"
|
||||
href="<?php $security->index('/action/users-edit?do=delete'); ?>"><?php _e('删除'); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($users->have()): ?>
|
||||
<ul class="typecho-pager">
|
||||
<?php $users->pageNav(); ?>
|
||||
<form method="get" class="typecho-list-operate">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox"
|
||||
class="typecho-table-select-all"/></label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i
|
||||
class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i
|
||||
class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="<?php _e('你确认要删除这些用户吗?'); ?>"
|
||||
href="<?php $security->index('/action/users-edit?do=delete'); ?>"><?php _e('删除'); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</form>
|
||||
</div><!-- end .typecho-list-operate -->
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($users->have()): ?>
|
||||
<ul class="typecho-pager">
|
||||
<?php $users->pageNav(); ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</form>
|
||||
</div><!-- end .typecho-list -->
|
||||
</div><!-- end .typecho-page-main -->
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
include 'copyright.php';
|
||||
|
||||
@@ -6,7 +6,7 @@ include 'menu.php';
|
||||
\Widget\Contents\Attachment\Edit::alloc()->prepare()->to($attachment);
|
||||
?>
|
||||
|
||||
<div class="main">
|
||||
<main class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main">
|
||||
@@ -40,7 +40,7 @@ include 'menu.php';
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
include 'copyright.php';
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
<?php if (!defined('__TYPECHO_ADMIN__')) exit; ?>
|
||||
<div class="typecho-head-nav clearfix" role="navigation">
|
||||
<button class="menu-bar"><?php _e('菜单'); ?></button>
|
||||
<nav id="typecho-nav-list">
|
||||
<?php $menu->output(); ?>
|
||||
<header class="typecho-head-nav" role="navigation">
|
||||
<nav>
|
||||
<details class="menu-bar">
|
||||
<summary><?php _e('菜单'); ?></summary>
|
||||
</details>
|
||||
<menu>
|
||||
<?php $menu->output(); ?>
|
||||
<li class="operate">
|
||||
<?php \Typecho\Plugin::factory('admin/menu.php')->call('navBar'); ?><a title="<?php
|
||||
if ($user->logged > 0) {
|
||||
$logged = new \Typecho\Date($user->logged);
|
||||
_e('最后登录: %s', $logged->word());
|
||||
}
|
||||
?>" href="<?php $options->adminUrl('profile.php'); ?>" class="author"><?php $user->screenName(); ?></a><a
|
||||
class="exit" href="<?php $options->logoutUrl(); ?>"><?php _e('登出'); ?></a><a
|
||||
href="<?php $options->siteUrl(); ?>"><?php _e('网站'); ?></a>
|
||||
</li>
|
||||
</menu>
|
||||
</nav>
|
||||
<div class="operate">
|
||||
<?php \Typecho\Plugin::factory('admin/menu.php')->call('navBar'); ?><a title="<?php
|
||||
if ($user->logged > 0) {
|
||||
$logged = new \Typecho\Date($user->logged);
|
||||
_e('最后登录: %s', $logged->word());
|
||||
}
|
||||
?>" href="<?php $options->adminUrl('profile.php'); ?>" class="author"><?php $user->screenName(); ?></a><a
|
||||
class="exit" href="<?php $options->logoutUrl(); ?>"><?php _e('登出'); ?></a><a
|
||||
href="<?php $options->siteUrl(); ?>"><?php _e('网站'); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ include 'header.php';
|
||||
include 'menu.php';
|
||||
?>
|
||||
|
||||
<div class="main">
|
||||
<main class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main" role="form">
|
||||
@@ -13,7 +13,7 @@ include 'menu.php';
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
include 'copyright.php';
|
||||
|
||||
@@ -4,7 +4,7 @@ include 'header.php';
|
||||
include 'menu.php';
|
||||
?>
|
||||
|
||||
<div class="main">
|
||||
<main class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main" role="form">
|
||||
@@ -13,7 +13,7 @@ include 'menu.php';
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
include 'copyright.php';
|
||||
|
||||
@@ -4,7 +4,7 @@ include 'header.php';
|
||||
include 'menu.php';
|
||||
?>
|
||||
|
||||
<div class="main">
|
||||
<main class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main" role="form">
|
||||
@@ -13,7 +13,7 @@ include 'menu.php';
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
include 'copyright.php';
|
||||
|
||||
@@ -4,7 +4,7 @@ include 'header.php';
|
||||
include 'menu.php';
|
||||
?>
|
||||
|
||||
<div class="main">
|
||||
<main class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main" role="form">
|
||||
@@ -13,7 +13,7 @@ include 'menu.php';
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
include 'copyright.php';
|
||||
|
||||
@@ -4,7 +4,7 @@ include 'header.php';
|
||||
include 'menu.php';
|
||||
?>
|
||||
|
||||
<div class="main">
|
||||
<main class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main" role="form">
|
||||
@@ -13,7 +13,7 @@ include 'menu.php';
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
include 'copyright.php';
|
||||
|
||||
@@ -4,26 +4,17 @@ include 'header.php';
|
||||
include 'menu.php';
|
||||
?>
|
||||
|
||||
<div class="main">
|
||||
<main class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<?php include 'theme-tabs.php'; ?>
|
||||
<div class="row typecho-page-main" role="main">
|
||||
<div class="col-mb-12">
|
||||
<ul class="typecho-option-tabs fix-tabs clearfix">
|
||||
<li><a href="<?php $options->adminUrl('themes.php'); ?>"><?php _e('可以使用的外观'); ?></a></li>
|
||||
<?php if (!defined('__TYPECHO_THEME_WRITEABLE__') || __TYPECHO_THEME_WRITEABLE__): ?>
|
||||
<li><a href="<?php $options->adminUrl('theme-editor.php'); ?>"><?php _e('编辑当前外观'); ?></a></li>
|
||||
<?php endif; ?>
|
||||
<li class="current"><a
|
||||
href="<?php $options->adminUrl('options-theme.php'); ?>"><?php _e('设置外观'); ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-mb-12 col-tb-8 col-tb-offset-2" role="form">
|
||||
<?php \Widget\Themes\Config::alloc()->config()->render(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
include 'copyright.php';
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<?php if(!defined('__TYPECHO_ADMIN__')) exit; ?>
|
||||
<?php if (!defined('__TYPECHO_ADMIN__')) exit; ?>
|
||||
<div class="typecho-page-title">
|
||||
<h2><?php echo $menu->title; ?><?php
|
||||
<h2><?php echo $menu->title; ?></h2>
|
||||
<?php
|
||||
if (!empty($menu->addLink)) {
|
||||
echo "<a href=\"{$menu->addLink}\">" . _t("新增") . "</a>";
|
||||
}
|
||||
?></h2>
|
||||
?>
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,7 @@ include 'common.php';
|
||||
include 'header.php';
|
||||
include 'menu.php';
|
||||
?>
|
||||
<div class="main">
|
||||
<main class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main" role="main">
|
||||
@@ -11,120 +11,116 @@ include 'menu.php';
|
||||
<?php \Widget\Plugins\Rows::allocWithAlias('activated', 'activated=1')->to($activatedPlugins); ?>
|
||||
<?php if ($activatedPlugins->have() || !empty($activatedPlugins->activatedPlugins)): ?>
|
||||
<h4 class="typecho-list-table-title"><?php _e('启用的插件'); ?></h4>
|
||||
<div class="typecho-table-wrap">
|
||||
<table class="typecho-list-table">
|
||||
<colgroup>
|
||||
<col width="25%"/>
|
||||
<col width="45%"/>
|
||||
<col width="8%" class="kit-hidden-mb"/>
|
||||
<col width="10%" class="kit-hidden-mb"/>
|
||||
<col width=""/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php _e('名称'); ?></th>
|
||||
<th><?php _e('描述'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('版本'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('作者'); ?></th>
|
||||
<th><?php _e('操作'); ?></th>
|
||||
<table class="typecho-list-table">
|
||||
<colgroup>
|
||||
<col width="25%"/>
|
||||
<col width="45%"/>
|
||||
<col width="8%" class="kit-hidden-mb"/>
|
||||
<col width="10%" class="kit-hidden-mb"/>
|
||||
<col width=""/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php _e('名称'); ?></th>
|
||||
<th><?php _e('描述'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('版本'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('作者'); ?></th>
|
||||
<th><?php _e('操作'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php while ($activatedPlugins->next()): ?>
|
||||
<tr id="plugin-<?php $activatedPlugins->name(); ?>">
|
||||
<td><?php $activatedPlugins->title(); ?>
|
||||
<?php if (!$activatedPlugins->dependence): ?>
|
||||
<i class="i-delete"
|
||||
title="<?php _e('%s 无法在此版本的typecho下正常工作', $activatedPlugins->title); ?>"></i>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?php $activatedPlugins->description(); ?></td>
|
||||
<td class="kit-hidden-mb"><?php $activatedPlugins->version(); ?></td>
|
||||
<td class="kit-hidden-mb"><?php echo empty($activatedPlugins->homepage) ? $activatedPlugins->author : '<a href="' . $activatedPlugins->homepage
|
||||
. '">' . $activatedPlugins->author . '</a>'; ?></td>
|
||||
<td>
|
||||
<?php if ($activatedPlugins->activate || $activatedPlugins->deactivate || $activatedPlugins->config || $activatedPlugins->personalConfig): ?>
|
||||
<?php if ($activatedPlugins->config): ?>
|
||||
<a href="<?php $options->adminUrl('options-plugin.php?config=' . $activatedPlugins->name); ?>"><?php _e('设置'); ?></a>
|
||||
•
|
||||
<?php endif; ?>
|
||||
<a lang="<?php _e('你确认要禁用插件 %s 吗?', $activatedPlugins->name); ?>"
|
||||
href="<?php $security->index('/action/plugins-edit?deactivate=' . $activatedPlugins->name); ?>"><?php _e('禁用'); ?></a>
|
||||
<?php else: ?>
|
||||
<span class="important"><?php _e('即插即用'); ?></span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php while ($activatedPlugins->next()): ?>
|
||||
<tr id="plugin-<?php $activatedPlugins->name(); ?>">
|
||||
<td><?php $activatedPlugins->title(); ?>
|
||||
<?php if (!$activatedPlugins->dependence): ?>
|
||||
<i class="i-delete"
|
||||
title="<?php _e('%s 无法在此版本的typecho下正常工作', $activatedPlugins->title); ?>"></i>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?php $activatedPlugins->description(); ?></td>
|
||||
<td class="kit-hidden-mb"><?php $activatedPlugins->version(); ?></td>
|
||||
<td class="kit-hidden-mb"><?php echo empty($activatedPlugins->homepage) ? $activatedPlugins->author : '<a href="' . $activatedPlugins->homepage
|
||||
. '">' . $activatedPlugins->author . '</a>'; ?></td>
|
||||
<td>
|
||||
<?php if ($activatedPlugins->activate || $activatedPlugins->deactivate || $activatedPlugins->config || $activatedPlugins->personalConfig): ?>
|
||||
<?php if ($activatedPlugins->config): ?>
|
||||
<a href="<?php $options->adminUrl('options-plugin.php?config=' . $activatedPlugins->name); ?>"><?php _e('设置'); ?></a>
|
||||
•
|
||||
<?php endif; ?>
|
||||
<a lang="<?php _e('你确认要禁用插件 %s 吗?', $activatedPlugins->name); ?>"
|
||||
href="<?php $security->index('/action/plugins-edit?deactivate=' . $activatedPlugins->name); ?>"><?php _e('禁用'); ?></a>
|
||||
<?php else: ?>
|
||||
<span class="important"><?php _e('即插即用'); ?></span>
|
||||
<?php endif; ?>
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php if (!empty($activatedPlugins->activatedPlugins)): ?>
|
||||
<?php foreach ($activatedPlugins->activatedPlugins as $key => $val): ?>
|
||||
<tr>
|
||||
<td><?php echo $key; ?></td>
|
||||
<td colspan="3"><span
|
||||
class="warning"><?php _e('此插件文件已经损坏或者被不安全移除, 强烈建议你禁用它'); ?></span></td>
|
||||
<td><a lang="<?php _e('你确认要禁用插件 %s 吗?', $key); ?>"
|
||||
href="<?php $security->index('/action/plugins-edit?deactivate=' . $key); ?>"><?php _e('禁用'); ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endwhile; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($activatedPlugins->activatedPlugins)): ?>
|
||||
<?php foreach ($activatedPlugins->activatedPlugins as $key => $val): ?>
|
||||
<tr>
|
||||
<td><?php echo $key; ?></td>
|
||||
<td colspan="3"><span
|
||||
class="warning"><?php _e('此插件文件已经损坏或者被不安全移除, 强烈建议你禁用它'); ?></span></td>
|
||||
<td><a lang="<?php _e('你确认要禁用插件 %s 吗?', $key); ?>"
|
||||
href="<?php $security->index('/action/plugins-edit?deactivate=' . $key); ?>"><?php _e('禁用'); ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php \Widget\Plugins\Rows::allocWithAlias('unactivated', 'activated=0')->to($deactivatedPlugins); ?>
|
||||
<?php if ($deactivatedPlugins->have() || !$activatedPlugins->have()): ?>
|
||||
<h4 class="typecho-list-table-title"><?php _e('禁用的插件'); ?></h4>
|
||||
<div class="typecho-table-wrap">
|
||||
<table class="typecho-list-table deactivate">
|
||||
<colgroup>
|
||||
<col width="25%"/>
|
||||
<col width="45%"/>
|
||||
<col width="8%" class="kit-hidden-mb"/>
|
||||
<col width="10%" class="kit-hidden-mb"/>
|
||||
<col width=""/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php _e('名称'); ?></th>
|
||||
<th><?php _e('描述'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('版本'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('作者'); ?></th>
|
||||
<th class="typecho-radius-topright"><?php _e('操作'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if ($deactivatedPlugins->have()): ?>
|
||||
<?php while ($deactivatedPlugins->next()): ?>
|
||||
<tr id="plugin-<?php $deactivatedPlugins->name(); ?>">
|
||||
<td><?php $deactivatedPlugins->title(); ?></td>
|
||||
<td><?php $deactivatedPlugins->description(); ?></td>
|
||||
<td class="kit-hidden-mb"><?php $deactivatedPlugins->version(); ?></td>
|
||||
<td class="kit-hidden-mb"><?php echo empty($deactivatedPlugins->homepage) ? $deactivatedPlugins->author : '<a href="' . $deactivatedPlugins->homepage
|
||||
. '">' . $deactivatedPlugins->author . '</a>'; ?></td>
|
||||
<td>
|
||||
<a href="<?php $security->index('/action/plugins-edit?activate=' . $deactivatedPlugins->name); ?>"><?php _e('启用'); ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td colspan="5"><h6 class="typecho-list-table-title"><?php _e('没有安装插件'); ?></h6>
|
||||
<table class="typecho-list-table deactivate">
|
||||
<colgroup>
|
||||
<col width="25%"/>
|
||||
<col width="45%"/>
|
||||
<col width="8%" class="kit-hidden-mb"/>
|
||||
<col width="10%" class="kit-hidden-mb"/>
|
||||
<col width=""/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php _e('名称'); ?></th>
|
||||
<th><?php _e('描述'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('版本'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('作者'); ?></th>
|
||||
<th class="typecho-radius-topright"><?php _e('操作'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if ($deactivatedPlugins->have()): ?>
|
||||
<?php while ($deactivatedPlugins->next()): ?>
|
||||
<tr id="plugin-<?php $deactivatedPlugins->name(); ?>">
|
||||
<td><?php $deactivatedPlugins->title(); ?></td>
|
||||
<td><?php $deactivatedPlugins->description(); ?></td>
|
||||
<td class="kit-hidden-mb"><?php $deactivatedPlugins->version(); ?></td>
|
||||
<td class="kit-hidden-mb"><?php echo empty($deactivatedPlugins->homepage) ? $deactivatedPlugins->author : '<a href="' . $deactivatedPlugins->homepage
|
||||
. '">' . $deactivatedPlugins->author . '</a>'; ?></td>
|
||||
<td>
|
||||
<a href="<?php $security->index('/action/plugins-edit?activate=' . $deactivatedPlugins->name); ?>"><?php _e('启用'); ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td colspan="5"><h6 class="typecho-list-table-title"><?php _e('没有安装插件'); ?></h6>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
include 'copyright.php';
|
||||
|
||||
@@ -6,7 +6,7 @@ include 'menu.php';
|
||||
$stat = \Widget\Stat::alloc();
|
||||
?>
|
||||
|
||||
<div class="main">
|
||||
<main class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main">
|
||||
@@ -51,7 +51,7 @@ $stat = \Widget\Stat::alloc();
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
include 'copyright.php';
|
||||
|
||||
@@ -378,7 +378,7 @@ function scrollableEditor(el, preview) {
|
||||
|
||||
// 表格选择插件
|
||||
$.fn.tableSelectable = function (options) {
|
||||
var table = this, s = $.extend({
|
||||
const table = this, s = $.extend({
|
||||
checkEl : null,
|
||||
rowEl : null,
|
||||
selectAllEl : null,
|
||||
@@ -386,19 +386,13 @@ function scrollableEditor(el, preview) {
|
||||
}, options);
|
||||
|
||||
function clickRow (t) {
|
||||
var t = $(t), check = $(s.checkEl, t), checked = check.prop('checked');
|
||||
const check = $(s.checkEl, t), checked = check.prop('checked');
|
||||
|
||||
if (!check.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
check.prop('checked', !checked);
|
||||
|
||||
if (checked) {
|
||||
t.removeClass('checked');
|
||||
} else {
|
||||
t.addClass('checked');
|
||||
}
|
||||
}
|
||||
|
||||
$(s.rowEl, this).each(function () {
|
||||
@@ -406,9 +400,9 @@ function scrollableEditor(el, preview) {
|
||||
clickRow($(this).parents(s.rowEl));
|
||||
});
|
||||
}).click(function (e) {
|
||||
var target = $(e.toElement ? e.toElement : e.target),
|
||||
const target = $(e.toElement ? e.toElement : e.target),
|
||||
tagName = target.prop('tagName').toLowerCase();
|
||||
|
||||
|
||||
if ($.inArray(tagName, ['input', 'textarea', 'a', 'button', 'i']) >= 0
|
||||
&& 'checkbox' != target.attr('type')) {
|
||||
e.stopPropagation();
|
||||
@@ -418,27 +412,15 @@ function scrollableEditor(el, preview) {
|
||||
});
|
||||
|
||||
$(s.selectAllEl).click(function () {
|
||||
var t = $(this), checked = t.prop('checked');
|
||||
|
||||
if (checked) {
|
||||
$(s.rowEl, table).each(function () {
|
||||
var t = $(this), el = $(s.checkEl, this).prop('checked', true);
|
||||
if (el.length > 0) {
|
||||
t.addClass('checked');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$(s.rowEl, table).each(function () {
|
||||
var t = $(this), el = $(s.checkEl, this).prop('checked', false);
|
||||
if (el.length > 0) {
|
||||
t.removeClass('checked');
|
||||
}
|
||||
});
|
||||
}
|
||||
const t = $(this), checked = t.prop('checked');
|
||||
|
||||
$(s.rowEl, table).each(function () {
|
||||
$(s.checkEl, this).prop('checked', !!checked);
|
||||
});
|
||||
});
|
||||
|
||||
$(s.actionEl).click(function () {
|
||||
var t = $(this), lang = t.attr('lang');
|
||||
const t = $(this), lang = t.attr('lang');
|
||||
|
||||
if (!lang || confirm(lang)) {
|
||||
table.parents('form').attr('action', t.attr('href')).submit();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Forms
|
||||
*/
|
||||
|
||||
input[type=text], input[type=url], input[type=password], input[type=email],
|
||||
input[type=text], input[type=url], input[type=password], input[type=email], input[type=number],
|
||||
textarea {
|
||||
background: #FFF;
|
||||
border: 1px solid #D9D9D6;
|
||||
|
||||
@@ -13,9 +13,12 @@ $color-nav-child-focus: #6DA1BB;
|
||||
.typecho-head-nav {
|
||||
padding: 0 10px;
|
||||
background: $color-nav-bg;
|
||||
position: relative;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
display: flex;
|
||||
z-index: 100;
|
||||
|
||||
a, button.menu-bar {
|
||||
a, .menu-bar summary {
|
||||
padding: 0 20px;
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
@@ -28,192 +31,213 @@ $color-nav-child-focus: #6DA1BB;
|
||||
}
|
||||
}
|
||||
|
||||
button.menu-bar {
|
||||
.menu-bar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#typecho-nav-list {
|
||||
float: left;
|
||||
menu {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
background: $color-nav-bg;
|
||||
}
|
||||
|
||||
& > ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
nav {
|
||||
width: 100%;
|
||||
|
||||
& > menu {
|
||||
display: flex;
|
||||
position: relative;
|
||||
float: left;
|
||||
width: 100%;
|
||||
|
||||
&:first-child {
|
||||
border-left: $border-nav;
|
||||
}
|
||||
& > li {
|
||||
|
||||
.parent {
|
||||
a {
|
||||
display: inline-block;
|
||||
border-right: $border-nav;
|
||||
background: $color-nav-bg;
|
||||
&:first-child {
|
||||
border-left: $border-nav;
|
||||
}
|
||||
}
|
||||
|
||||
.child {
|
||||
position: absolute;
|
||||
list-style: none;
|
||||
top: 36px;
|
||||
display: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
min-width: 160px;
|
||||
max-width: 240px;
|
||||
background: $color-nav-btn-hover;
|
||||
z-index: 250;
|
||||
> a {
|
||||
display: block;
|
||||
border-right: $border-nav;
|
||||
|
||||
li {
|
||||
&.return {
|
||||
display: none;
|
||||
}
|
||||
&:hover, &:focus {
|
||||
background: $color-nav-btn-hover;
|
||||
|
||||
a {
|
||||
overflow: hidden;
|
||||
text-overflow : ellipsis;
|
||||
white-space: nowrap;
|
||||
display: block;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
background: $color-nav-bg;
|
||||
& + menu {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.focus a {
|
||||
color: $color-nav-child-focus;
|
||||
&:not(.operate) {
|
||||
&.focus > a {
|
||||
background: $color-nav-btn-hover;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
&:hover > a {
|
||||
background: $color-nav-btn-hover;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.parent a:hover,
|
||||
&.focus .parent a,
|
||||
&.root:hover .parent a {
|
||||
background: $color-nav-btn-hover;
|
||||
}
|
||||
&:hover, &:focus-within, &:focus {
|
||||
menu {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
&.focus .parent a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
&.root:hover .child, &.root.expanded .child {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.operate {
|
||||
float: right;
|
||||
a {
|
||||
display: inline-block;
|
||||
margin-left: -1px;
|
||||
border: $border-nav;
|
||||
border-width: 0 1px;
|
||||
|
||||
&:hover {
|
||||
background-color: $color-nav-btn-hover;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: $screen-phone - 1px) {
|
||||
@keyframes out {
|
||||
from {left: 0%;}
|
||||
to {left: -100%;}
|
||||
}
|
||||
|
||||
@keyframes in {
|
||||
from {left: -100%;}
|
||||
to {left: 0%;}
|
||||
}
|
||||
|
||||
.typecho-head-nav {
|
||||
padding: 0;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
z-index: 10;
|
||||
|
||||
#typecho-nav-list {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.operate {
|
||||
a:last-child {
|
||||
border-right-width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
button.menu-bar {
|
||||
display: inline-block;
|
||||
border: none;
|
||||
background: $color-nav-bg;
|
||||
border-right: $border-nav;
|
||||
|
||||
&.focus {
|
||||
color: $color-nav-text-hover;
|
||||
|
||||
& + #typecho-nav-list {
|
||||
display: block;
|
||||
float: none;
|
||||
menu {
|
||||
position: absolute;
|
||||
bottom: 36px;
|
||||
width: 100%;
|
||||
|
||||
& > ul {
|
||||
float: none;
|
||||
border-bottom: $border-nav;
|
||||
position: static;
|
||||
top: 36px;
|
||||
display: none;
|
||||
flex-flow: column;
|
||||
min-width: 160px;
|
||||
max-width: 240px;
|
||||
background: $color-nav-btn-hover;
|
||||
z-index: 250;
|
||||
|
||||
& > li {
|
||||
a {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
display: block;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
background: $color-nav-bg;
|
||||
}
|
||||
}
|
||||
|
||||
&.focus a {
|
||||
color: $color-nav-child-focus;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.operate {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
a {
|
||||
&:hover {
|
||||
background-color: $color-nav-btn-hover;
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
border-left: none;
|
||||
border-left: $border-nav;
|
||||
}
|
||||
.parent {
|
||||
a {
|
||||
display: block;
|
||||
border: none;
|
||||
background: $color-nav-btn-hover;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include screen(phone, max) {
|
||||
padding: 0;
|
||||
flex-flow: column;
|
||||
|
||||
.menu-bar {
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background: $color-nav-bg;
|
||||
z-index: 10;
|
||||
|
||||
summary {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&[open] {
|
||||
summary {
|
||||
border-bottom: $border-nav;
|
||||
}
|
||||
|
||||
& ~ menu {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nav {
|
||||
overflow-y: auto;
|
||||
width: 100vw;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
background: $color-nav-btn-hover;
|
||||
|
||||
&:has(.menu-bar[open]) {
|
||||
width: 70vw;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
& > menu {
|
||||
display: none;
|
||||
flex-flow: column;
|
||||
|
||||
& > li {
|
||||
&:first-child {
|
||||
border: none;
|
||||
}
|
||||
|
||||
> a {
|
||||
border: none !important;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&:not(.operate) {
|
||||
&.focus > a {
|
||||
background: $color-nav-bg;
|
||||
}
|
||||
.child {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 100%;
|
||||
top: auto;
|
||||
z-index: 20;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
min-width: auto;
|
||||
|
||||
li {
|
||||
border-bottom: $border-nav;
|
||||
&.return {
|
||||
display: block;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
&:hover > a {
|
||||
background: $color-nav-bg;
|
||||
}
|
||||
|
||||
a {
|
||||
color: $color-nav-text-mute;
|
||||
}
|
||||
}
|
||||
}
|
||||
& > a {
|
||||
pointer-events: auto;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
&.expanded {
|
||||
animation: out .15s ease-out forwards;
|
||||
menu {
|
||||
position: static;
|
||||
border: $border-nav;
|
||||
border-width: 1px 0;
|
||||
display: flex;
|
||||
min-width: auto;
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
&.noexpanded {
|
||||
animation: in .15s ease-out forwards;
|
||||
&.operate {
|
||||
flex-flow: column;
|
||||
justify-content: flex-start;
|
||||
|
||||
a {
|
||||
background: $color-nav-btn-hover;
|
||||
|
||||
&:hover {
|
||||
background: $color-nav-bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include screen(phone, max) {
|
||||
body {
|
||||
padding-top: 36px;
|
||||
|
||||
&:has(.menu-bar[open]) {
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,10 @@
|
||||
}
|
||||
.success a { color: #264409; }
|
||||
|
||||
.warning {
|
||||
color: #B94A48;
|
||||
}
|
||||
|
||||
|
||||
// 气泡
|
||||
.balloon {
|
||||
@@ -47,3 +51,28 @@
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
/** 顶部消息样式 by 70 */
|
||||
.popup {
|
||||
display: none;
|
||||
position: sticky;
|
||||
margin: 0;
|
||||
padding: 8px 0;
|
||||
border: none;
|
||||
width: 100%;
|
||||
z-index: 10;
|
||||
text-align: center;
|
||||
|
||||
border-radius: 0;
|
||||
|
||||
ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
|
||||
li {
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
61
admin/src/scss/_options.scss
Normal file
61
admin/src/scss/_options.scss
Normal file
@@ -0,0 +1,61 @@
|
||||
/**
|
||||
* 典型配置选项
|
||||
*/
|
||||
.typecho-option {
|
||||
list-style: none;
|
||||
margin: 1em 0;
|
||||
padding: 0;
|
||||
|
||||
&-submit li {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
label {
|
||||
&.typecho-label {
|
||||
display: block;
|
||||
margin-bottom: .5em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
&.required:after {
|
||||
content: " *";
|
||||
color: #B94A48;
|
||||
}
|
||||
}
|
||||
|
||||
span {
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.description {
|
||||
margin: .5em 0 0;
|
||||
color: #999;
|
||||
font-size: .92857em;
|
||||
}
|
||||
|
||||
input.file {
|
||||
width: 100%;
|
||||
margin: .7em 0;
|
||||
}
|
||||
|
||||
input.text {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
input.num {
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
textarea {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.multiline {
|
||||
display: block;
|
||||
margin: .3em 0;
|
||||
&.hidden {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,34 +3,35 @@
|
||||
*/
|
||||
|
||||
.typecho-pager {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
list-style: none;
|
||||
float: right;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
line-height: 1;
|
||||
text-align: center;
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
.typecho-pager li {
|
||||
display: inline-block;
|
||||
margin: 0 3px;
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
}
|
||||
li {
|
||||
margin: 0 3px;
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
|
||||
.typecho-pager a {
|
||||
display: block;
|
||||
padding: 0 10px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
a {
|
||||
display: block;
|
||||
padding: 0 10px;
|
||||
border-radius: 2px;
|
||||
|
||||
.typecho-pager a:hover {
|
||||
text-decoration: none;
|
||||
background: #E9E9E6;
|
||||
}
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
background: #E9E9E6;
|
||||
}
|
||||
}
|
||||
|
||||
.typecho-pager li.current a {
|
||||
background: #E9E9E6;
|
||||
color: #444;
|
||||
&.current a {
|
||||
background: #E9E9E6;
|
||||
color: #444;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
175
admin/src/scss/_table.scss
Normal file
175
admin/src/scss/_table.scss
Normal file
@@ -0,0 +1,175 @@
|
||||
/**
|
||||
* 表格列表页
|
||||
*/
|
||||
|
||||
/**
|
||||
* 列表页选项
|
||||
*/
|
||||
.typecho-list .typecho-pager {
|
||||
}
|
||||
|
||||
.typecho-list-operate {
|
||||
display: flex;
|
||||
margin: 1em 0;
|
||||
|
||||
& + .typecho-list-operate {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
input, button, select {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
input[type="checkbox"] {
|
||||
vertical-align: text-top;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
> *:nth-child(2) {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.operate, .search {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.operate {
|
||||
label {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
> * {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
> *:nth-child(2) {
|
||||
justify-content: flex-end;
|
||||
|
||||
&.search > * {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
@include screen(phone, max) {
|
||||
& {
|
||||
flex-flow: column;
|
||||
|
||||
> *:nth-child(2) {
|
||||
margin-top: 10px;
|
||||
justify-content: flex-start;
|
||||
|
||||
> *:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.operate-delete, .operate-button-delete {
|
||||
color: #B94A48;
|
||||
}
|
||||
|
||||
.operate-edit {
|
||||
color: #007700;
|
||||
}
|
||||
|
||||
.operate-reply {
|
||||
color: #545c30;
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表表格
|
||||
*/
|
||||
/** 增加表格标题 by 70 */
|
||||
.typecho-list-table-title {
|
||||
margin: 1em 0;
|
||||
color: #999;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.typecho-list-table {
|
||||
width: 100%;
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
background: #FFF;
|
||||
table-layout: fixed;
|
||||
border: 30px solid #FFF;
|
||||
|
||||
&.deactivate {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
th {
|
||||
padding: 0 10px 10px;
|
||||
border-bottom: 1px solid #F0F0EC;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 10px;
|
||||
border-top: 1px solid #F0F0EC;
|
||||
word-break: break-all;
|
||||
|
||||
pre {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
&.none {
|
||||
color: #999;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.status {
|
||||
margin-left: 5px;
|
||||
color: #999;
|
||||
font-size: .92857em;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
tbody tr {
|
||||
&:hover {
|
||||
background-color: #F6F6F3;
|
||||
}
|
||||
|
||||
&:has(input[type="checkbox"]:checked) {
|
||||
background-color: #FFF9E8;
|
||||
}
|
||||
}
|
||||
|
||||
tr td .hidden-by-mouse {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
tr:hover td .hidden-by-mouse {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
tr td:first-child input[type="checkbox"] {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@include screen(phone, max) {
|
||||
& {
|
||||
border-width: 10px;
|
||||
|
||||
th {
|
||||
padding: 0 5px 5px;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
50
admin/src/scss/_tabs.scss
Normal file
50
admin/src/scss/_tabs.scss
Normal file
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* 标签页
|
||||
*/
|
||||
.typecho-option-tabs {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 13px;
|
||||
display: flex;
|
||||
|
||||
&.fix-tabs {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
li {
|
||||
&:first-child a {
|
||||
border-radius: 2px 0 0 2px;
|
||||
}
|
||||
|
||||
&:last-child a {
|
||||
border-radius: 0 2px 2px 0;
|
||||
}
|
||||
|
||||
&.current a, &.active a {
|
||||
background-color: #E9E9E6;
|
||||
}
|
||||
|
||||
a {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-right: -1px;
|
||||
border: 1px solid #D9D9D6;
|
||||
padding: 0 15px;
|
||||
height: 26px;
|
||||
color: #666;
|
||||
box-sizing: border-box;
|
||||
|
||||
> * {
|
||||
margin: 0 3px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: #E9E9E6;
|
||||
color: #666;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
70
admin/src/scss/_tags.scss
Normal file
70
admin/src/scss/_tags.scss
Normal file
@@ -0,0 +1,70 @@
|
||||
/**
|
||||
* 标签列表
|
||||
*/
|
||||
|
||||
.tag-list {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 20px;
|
||||
background-color: #FFF;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.none {
|
||||
color: #999;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&.typecho-list-notable li {
|
||||
margin: 0 5px 5px 0;
|
||||
padding: 5px 5px 5px 10px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.tag-edit-link {
|
||||
margin-left: 3px;
|
||||
visibility: hidden;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: #E9E9E6;
|
||||
|
||||
.tag-edit-link {
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
|
||||
&:has(input[type="checkbox"]:checked) {
|
||||
background-color: #FFFBCC;
|
||||
}
|
||||
|
||||
&.size-5 {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
&.size-10 {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
&.size-20 {
|
||||
font-size: 1.4em;
|
||||
}
|
||||
|
||||
&.size-30 {
|
||||
font-size: 1.6em;
|
||||
}
|
||||
|
||||
&.size-0 {
|
||||
font-size: 1.8em;
|
||||
}
|
||||
|
||||
input {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,3 +11,29 @@ $screen-phone: 576px;
|
||||
$screen-tablet: 768px;
|
||||
$screen-desktop: 992px;
|
||||
$screen-wide: 1200px;
|
||||
|
||||
@function breakpoint($breakpoint) {
|
||||
@if $breakpoint == 'phone' {
|
||||
@return $screen-phone;
|
||||
} @else if $breakpoint == 'tablet' {
|
||||
@return $screen-tablet;
|
||||
} @else if $breakpoint == 'desktop' {
|
||||
@return $screen-desktop;
|
||||
} @else if $breakpoint == 'wide' {
|
||||
@return $screen-wide;
|
||||
} @else {
|
||||
@return $breakpoint;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin screen($breakpoint, $type: min) {
|
||||
@if $type == min {
|
||||
@media (min-width: breakpoint($breakpoint)) {
|
||||
@content;
|
||||
}
|
||||
} @else {
|
||||
@media (max-width: breakpoint($breakpoint) - 1) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
}
|
||||
212
admin/src/scss/_write.scss
Normal file
212
admin/src/scss/_write.scss
Normal file
@@ -0,0 +1,212 @@
|
||||
/**
|
||||
* 编写页面
|
||||
*/
|
||||
|
||||
.typecho-post-area {
|
||||
.edit-draft-notice {
|
||||
color: #999;
|
||||
font-size: .92857em;
|
||||
|
||||
a {
|
||||
color: #B94A48;
|
||||
}
|
||||
}
|
||||
|
||||
.typecho-label {
|
||||
display: block;
|
||||
margin: 1em 0 -0.5em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.submit {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
#auto-save-message {
|
||||
color: #999;
|
||||
font-size: .92857em;
|
||||
}
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
> * {
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
|
||||
> * {
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
input.title {
|
||||
font-size: 1.17em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.url-slug {
|
||||
margin-top: -0.5em;
|
||||
color: #AAA;
|
||||
font-size: .92857em;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
#slug {
|
||||
padding: 2px;
|
||||
border: none;
|
||||
background: #FFFBCC;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
#text {
|
||||
resize: none;
|
||||
}
|
||||
|
||||
.description {
|
||||
margin-top: -0.5em;
|
||||
color: #999;
|
||||
font-size: .92857em;
|
||||
}
|
||||
|
||||
/**
|
||||
* 自定义字段
|
||||
*/
|
||||
#custom-field {
|
||||
margin: 1em 0;
|
||||
padding: 10px 15px;
|
||||
background: #FFF;
|
||||
|
||||
summary {
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: #467B96;
|
||||
}
|
||||
|
||||
&::marker {
|
||||
color: #BBB;
|
||||
}
|
||||
}
|
||||
|
||||
.add {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 10px;
|
||||
|
||||
.description {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
p.description {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.typecho-label {
|
||||
margin: 0;
|
||||
|
||||
a {
|
||||
display: block;
|
||||
color: #444;
|
||||
|
||||
&:hover {
|
||||
color: #467B96;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fields {
|
||||
list-style: none;
|
||||
margin: 10px 0 0 0;
|
||||
padding: 0;
|
||||
|
||||
.field {
|
||||
display: flex;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #F0F0EC;
|
||||
margin-bottom: 10px;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.field-name {
|
||||
display: flex;
|
||||
|
||||
input[name="fieldNames[]"] {
|
||||
height: 27px;
|
||||
width: 150px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.field-value {
|
||||
margin-left: 10px;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
|
||||
textarea[name="fieldValues[]"] {
|
||||
flex: 1;
|
||||
margin-right: 10px;
|
||||
resize: none;
|
||||
}
|
||||
}
|
||||
|
||||
@include screen(phone, max) {
|
||||
flex-flow: column;
|
||||
|
||||
.field-value {
|
||||
margin-left: 0;
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
select { height: 27px; }
|
||||
}
|
||||
|
||||
/**
|
||||
* 侧边栏
|
||||
*/
|
||||
#edit-secondary {
|
||||
margin-top: 1em;
|
||||
|
||||
.category-option ul {
|
||||
list-style: none;
|
||||
border: 1px solid #D9D9D6;
|
||||
padding: 6px 12px;
|
||||
max-height: 240px;
|
||||
overflow: auto;
|
||||
background-color: #FFF;
|
||||
border-radius: 2px;
|
||||
|
||||
li {
|
||||
margin: 3px 0;
|
||||
}
|
||||
}
|
||||
|
||||
#advance-panel {
|
||||
summary {
|
||||
line-height: 25px;
|
||||
}
|
||||
|
||||
.visibility-option ul,
|
||||
.allow-option ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,111 +14,121 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media
|
||||
(-webkit-min-device-pixel-ratio: 2),
|
||||
(min-resolution: 192dpi) {
|
||||
@import "editor/*@2x.png";
|
||||
@include all-editor-sprites();
|
||||
#wmd-button-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@mixin editor-button-2x($name) {
|
||||
&#wmd-#{$name}-button span {
|
||||
@include editor-sprite(editor-#{$name})
|
||||
@media
|
||||
(-webkit-min-device-pixel-ratio: 2),
|
||||
(min-resolution: 192dpi) {
|
||||
@import "editor/*@2x.png";
|
||||
@include all-editor-sprites();
|
||||
|
||||
@mixin editor-button-2x($name) {
|
||||
&#wmd-#{$name}-button span {
|
||||
@include editor-sprite(editor-#{$name})
|
||||
}
|
||||
}
|
||||
|
||||
.wmd-button-row {
|
||||
li {
|
||||
@include editor-button-2x(bold);
|
||||
@include editor-button-2x(italic);
|
||||
@include editor-button-2x(link);
|
||||
@include editor-button-2x(quote);
|
||||
@include editor-button-2x(code);
|
||||
@include editor-button-2x(image);
|
||||
@include editor-button-2x(olist);
|
||||
@include editor-button-2x(ulist);
|
||||
@include editor-button-2x(heading);
|
||||
@include editor-button-2x(hr);
|
||||
@include editor-button-2x(more);
|
||||
@include editor-button-2x(undo);
|
||||
@include editor-button-2x(redo);
|
||||
@include editor-button-2x(fullscreen);
|
||||
@include editor-button-2x(exit-fullscreen);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.wmd-button-row {
|
||||
flex: 1;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 26px;
|
||||
line-height: 1;
|
||||
|
||||
li {
|
||||
@include editor-button-2x(bold);
|
||||
@include editor-button-2x(italic);
|
||||
@include editor-button-2x(link);
|
||||
@include editor-button-2x(quote);
|
||||
@include editor-button-2x(code);
|
||||
@include editor-button-2x(image);
|
||||
@include editor-button-2x(olist);
|
||||
@include editor-button-2x(ulist);
|
||||
@include editor-button-2x(heading);
|
||||
@include editor-button-2x(hr);
|
||||
@include editor-button-2x(more);
|
||||
@include editor-button-2x(undo);
|
||||
@include editor-button-2x(redo);
|
||||
@include editor-button-2x(fullscreen);
|
||||
@include editor-button-2x(exit-fullscreen);
|
||||
display: inline-block;
|
||||
margin-right: 4px;
|
||||
padding: 3px;
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
border-radius: 2px;
|
||||
|
||||
&:hover {
|
||||
background-color: #E9E9E6;
|
||||
}
|
||||
|
||||
&.wmd-spacer {
|
||||
height: 20px;
|
||||
margin: 0 10px 0 6px;
|
||||
padding: 0;
|
||||
width: 1px;
|
||||
background: #E9E9E6;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
span {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
@include editor-button(bold);
|
||||
@include editor-button(italic);
|
||||
@include editor-button(link);
|
||||
@include editor-button(quote);
|
||||
@include editor-button(code);
|
||||
@include editor-button(image);
|
||||
@include editor-button(olist);
|
||||
@include editor-button(ulist);
|
||||
@include editor-button(heading);
|
||||
@include editor-button(hr);
|
||||
@include editor-button(more);
|
||||
@include editor-button(undo);
|
||||
@include editor-button(redo);
|
||||
@include editor-button(fullscreen);
|
||||
@include editor-button(exit-fullscreen);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wmd-button-row {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 26px;
|
||||
line-height: 1;
|
||||
// 撰写预览切换 tab
|
||||
.wmd-edittab {
|
||||
font-size: .92857em;
|
||||
|
||||
li {
|
||||
display: inline-block;
|
||||
margin-right: 4px;
|
||||
padding: 3px;
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
border-radius: 2px;
|
||||
&:hover {
|
||||
background-color: #E9E9E6;
|
||||
}
|
||||
&.wmd-spacer {
|
||||
a {
|
||||
display: inline-block;
|
||||
padding: 0 8px;
|
||||
margin-left: 5px;
|
||||
height: 20px;
|
||||
margin: 0 10px 0 6px;
|
||||
padding: 0;
|
||||
width: 1px;
|
||||
background: #E9E9E6;
|
||||
cursor: default;
|
||||
}
|
||||
span {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
line-height: 20px;
|
||||
|
||||
@include editor-button(bold);
|
||||
@include editor-button(italic);
|
||||
@include editor-button(link);
|
||||
@include editor-button(quote);
|
||||
@include editor-button(code);
|
||||
@include editor-button(image);
|
||||
@include editor-button(olist);
|
||||
@include editor-button(ulist);
|
||||
@include editor-button(heading);
|
||||
@include editor-button(hr);
|
||||
@include editor-button(more);
|
||||
@include editor-button(undo);
|
||||
@include editor-button(redo);
|
||||
@include editor-button(fullscreen);
|
||||
@include editor-button(exit-fullscreen);
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background: #E9E9E6;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#btn-cancel-preview { display: none }
|
||||
|
||||
// 撰写预览切换 tab
|
||||
.wmd-edittab {
|
||||
float: right;
|
||||
margin-top: 3px;
|
||||
font-size: .92857em;
|
||||
a {
|
||||
display: inline-block;
|
||||
padding: 0 8px;
|
||||
margin-left: 5px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
&.active {
|
||||
background: #E9E9E6;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 控制被隐藏的 tab,全屏时显示
|
||||
.wmd-hidetab {
|
||||
display: none;
|
||||
@@ -152,6 +162,24 @@
|
||||
button { margin-right: 10px; }
|
||||
}
|
||||
|
||||
#wmd-editarea {
|
||||
/* 拖动调整 textarea 大小 */
|
||||
.resize {
|
||||
display: block;
|
||||
margin: 2px auto 0;
|
||||
padding: 2px 0;
|
||||
border: 1px solid #D9D9D6;
|
||||
border-width: 1px 0;
|
||||
width: 60px;
|
||||
cursor: row-resize;
|
||||
i {
|
||||
display: block;
|
||||
height: 1px;
|
||||
background-color: #D9D9D6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 预览 */
|
||||
#wmd-preview {
|
||||
background: #FFF;
|
||||
@@ -318,7 +346,7 @@
|
||||
#btn-cancel-preview { display: inline-block }
|
||||
}
|
||||
|
||||
@media (max-width: $screen-phone - 1px) {
|
||||
@include screen(phone, max) {
|
||||
#wmd-spacer2,
|
||||
#wmd-olist-button,
|
||||
#wmd-ulist-button,
|
||||
|
||||
@@ -1,20 +1,17 @@
|
||||
/*
|
||||
* Bento Grid System
|
||||
* Bento Grid System (Flexbox Version)
|
||||
* Source: https://github.com/fenbox/bento
|
||||
* Version: 1.2.8
|
||||
* Update: 2013.11.25
|
||||
* Version: 2.0.0
|
||||
* Update: 2024.10.23
|
||||
*/
|
||||
|
||||
|
||||
@import "vars";
|
||||
|
||||
|
||||
// Mixins
|
||||
%box-sizing {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
||||
// Container
|
||||
.container {
|
||||
margin-left: auto;
|
||||
@@ -22,189 +19,161 @@
|
||||
padding-left: $gutter-width / 2;
|
||||
padding-right: $gutter-width / 2;
|
||||
@extend %box-sizing;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
// Column group
|
||||
.row {
|
||||
margin-right: $gutter-width / -2;
|
||||
margin-left: $gutter-width / -2;
|
||||
@extend .clearfix;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.row [class*="col-"] {
|
||||
float: left;
|
||||
min-height: 1px;
|
||||
padding-right: $gutter-width / 2;
|
||||
padding-left: $gutter-width / 2;
|
||||
min-height: 1px;
|
||||
flex-grow: 1;
|
||||
@extend %box-sizing;
|
||||
}
|
||||
|
||||
// Flex order replaces push and pull functionality
|
||||
.row [class*="-push-"],
|
||||
.row [class*="-pull-"] {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Mobile and up
|
||||
*/
|
||||
|
||||
// Use flex-grow to simulate columns in mobile
|
||||
@for $index from 1 through $columns {
|
||||
.col-mb-#{$index} {
|
||||
width: $column-width * $index;
|
||||
flex: 0 0 $column-width * $index;
|
||||
max-width: $column-width * $index;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Tablet and up
|
||||
*/
|
||||
|
||||
@media (min-width: $screen-tablet) {
|
||||
// Tablet and up
|
||||
@include screen(tablet) {
|
||||
.container {
|
||||
max-width: $screen-tablet - ($gutter-width * 2);
|
||||
}
|
||||
|
||||
// Colunms
|
||||
@for $index from 1 through $columns {
|
||||
.col-tb-#{$index} {
|
||||
width: $column-width * $index;
|
||||
flex: 0 0 $column-width * $index;
|
||||
max-width: $column-width * $index;
|
||||
}
|
||||
}
|
||||
|
||||
// Offset
|
||||
@for $index from 0 through $columns {
|
||||
.col-tb-offset-#{$index} {
|
||||
margin-left: $column-width * $index;
|
||||
}
|
||||
}
|
||||
|
||||
// Pull
|
||||
@for $index from 0 through $columns {
|
||||
.col-tb-pull-#{$index} {
|
||||
right: $column-width * $index;
|
||||
order: -$index;
|
||||
}
|
||||
}
|
||||
|
||||
// Push
|
||||
@for $index from 0 through $columns {
|
||||
.col-tb-push-#{$index} {
|
||||
left: $column-width * $index;
|
||||
order: $index;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Desktop and up
|
||||
*/
|
||||
|
||||
@media (min-width: $screen-desktop) {
|
||||
// Desktop and up
|
||||
@include screen(desktop) {
|
||||
.container {
|
||||
max-width: $screen-desktop - ($gutter-width * 2);
|
||||
}
|
||||
|
||||
// Colunms
|
||||
@for $index from 1 through $columns {
|
||||
.col-#{$index} {
|
||||
width: $column-width * $index;
|
||||
flex: 0 0 $column-width * $index;
|
||||
max-width: $column-width * $index;
|
||||
}
|
||||
}
|
||||
|
||||
// Offset
|
||||
@for $index from 0 through $columns {
|
||||
.col-offset-#{$index} {
|
||||
margin-left: $column-width * $index;
|
||||
}
|
||||
}
|
||||
|
||||
// Pull
|
||||
@for $index from 0 through $columns {
|
||||
.col-pull-#{$index} {
|
||||
right: $column-width * $index;
|
||||
order: -$index;
|
||||
}
|
||||
}
|
||||
|
||||
// Push
|
||||
@for $index from 0 through $columns {
|
||||
.col-push-#{$index} {
|
||||
left: $column-width * $index;
|
||||
order: $index;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Widescreen and up
|
||||
*/
|
||||
|
||||
@media (min-width: $screen-wide) {
|
||||
// Widescreen and up
|
||||
@include screen(wide) {
|
||||
.container {
|
||||
max-width: $screen-wide - ($gutter-width * 2);
|
||||
}
|
||||
|
||||
// Colunms
|
||||
@for $index from 1 through $columns {
|
||||
.col-wd-#{$index} {
|
||||
width: $column-width * $index;
|
||||
flex: 0 0 $column-width * $index;
|
||||
max-width: $column-width * $index;
|
||||
}
|
||||
}
|
||||
|
||||
// Offset
|
||||
@for $index from 0 through $columns {
|
||||
.col-wd-offset-#{$index} {
|
||||
margin-left: $column-width * $index;
|
||||
}
|
||||
}
|
||||
|
||||
// Pull
|
||||
@for $index from 0 through $columns {
|
||||
.col-wd-pull-#{$index} {
|
||||
right: $column-width * $index;
|
||||
order: -$index;
|
||||
}
|
||||
}
|
||||
|
||||
// Push
|
||||
@for $index from 0 through $columns {
|
||||
.col-wd-push-#{$index} {
|
||||
left: $column-width * $index;
|
||||
order: $index;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Responsive kit
|
||||
*/
|
||||
|
||||
// Hidden in mobile and down
|
||||
@media (max-width: $screen-phone - 1px) {
|
||||
// Responsive kit
|
||||
@include screen(phone, max) {
|
||||
.kit-hidden-mb {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
// Hidden in tablet and down
|
||||
@media (max-width: $screen-tablet - 1px) {
|
||||
@include screen(tablet, max) {
|
||||
.kit-hidden-tb {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
// Hidden in descktop and down
|
||||
@media (max-width: $screen-desktop - 1px) {
|
||||
@include screen(desktop, max) {
|
||||
.kit-hidden {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Clearfix
|
||||
*/
|
||||
// Clearfix
|
||||
.clearfix {
|
||||
zoom: 1;
|
||||
&:before, &:after {
|
||||
&:before,
|
||||
&:after {
|
||||
content: " ";
|
||||
display: table;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ html {
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;
|
||||
background: #F6F6F3;
|
||||
color: #444;
|
||||
font-size: 87.5%;
|
||||
@@ -74,38 +74,15 @@ a.button:hover, a.balloon-button:hover {
|
||||
@import "buttons";
|
||||
@import "messages";
|
||||
@import "pagenavi";
|
||||
@import "table";
|
||||
@import "tabs";
|
||||
@import "tags";
|
||||
@import "write";
|
||||
@import "options";
|
||||
|
||||
@import "header";
|
||||
@import "footer";
|
||||
|
||||
/** 顶部消息样式 by 70 */
|
||||
.popup {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
margin: 0;
|
||||
padding: 8px 0;
|
||||
border: none;
|
||||
width: 100%;
|
||||
z-index: 10;
|
||||
text-align: center;
|
||||
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.popup ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.popup ul li {
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
/**
|
||||
* logo 的样式
|
||||
*/
|
||||
@@ -120,48 +97,6 @@ a.button:hover, a.balloon-button:hover {
|
||||
background: transparent url(../img/ajax-loader.gif) no-repeat left center;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 典型配置选项
|
||||
*/
|
||||
.typecho-option {
|
||||
list-style: none;
|
||||
margin: 1em 0;
|
||||
padding: 0;
|
||||
|
||||
&-submit li {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
label {
|
||||
&.typecho-label {
|
||||
display: block;
|
||||
margin-bottom: .5em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
&.required:after {
|
||||
content: " *";
|
||||
color: #B94A48;
|
||||
}
|
||||
}
|
||||
|
||||
span {
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.description {
|
||||
margin: .5em 0 0;
|
||||
color: #999;
|
||||
font-size: .92857em;
|
||||
}
|
||||
|
||||
input.file {
|
||||
width: 100%;
|
||||
margin: .7em 0;
|
||||
}
|
||||
}
|
||||
|
||||
.front-archive {
|
||||
padding-left: 1.5em;
|
||||
}
|
||||
@@ -200,12 +135,17 @@ a.button:hover, a.balloon-button:hover {
|
||||
margin-bottom: 25px;
|
||||
padding: 0 0 35px;
|
||||
border-bottom: 1px solid #ECECEC;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
li {
|
||||
float: left;
|
||||
margin-right: 1.5em;
|
||||
}
|
||||
.balloon {
|
||||
margin-top: 2px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.balloon {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -237,43 +177,55 @@ a.button:hover, a.balloon-button:hover {
|
||||
display: table;
|
||||
margin: 0 auto;
|
||||
height: 100%;
|
||||
}
|
||||
.typecho-login {
|
||||
display: table-cell;
|
||||
padding: 30px 0 100px;
|
||||
width: 280px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
h1 {
|
||||
margin: 0 0 1em;
|
||||
|
||||
.typecho-login {
|
||||
display: table-cell;
|
||||
padding: 30px 0 100px;
|
||||
width: 280px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
|
||||
h1 {
|
||||
margin: 0 0 1em;
|
||||
}
|
||||
|
||||
.more-link {
|
||||
margin-top: 2em;
|
||||
color: #CCC;
|
||||
|
||||
a {
|
||||
margin: 0 3px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.typecho-login .more-link {
|
||||
margin-top: 2em;
|
||||
color: #CCC;
|
||||
}
|
||||
.typecho-login .more-link a { margin: 0 3px; }
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
.typecho-page-title {
|
||||
}
|
||||
.typecho-page-title h2 {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 25px 0 10px;
|
||||
font-size: 1.28571em;
|
||||
}
|
||||
.typecho-page-title h2 a {
|
||||
margin-left: 10px;
|
||||
padding: 3px 8px;
|
||||
background: #E9E9E6;
|
||||
font-size: .8em;
|
||||
|
||||
border-radius: 2px;
|
||||
}
|
||||
.typecho-page-title h2 a:hover {
|
||||
text-decoration: none;
|
||||
h2 {
|
||||
margin: 0;
|
||||
font-size: 1.28571em;
|
||||
}
|
||||
|
||||
a {
|
||||
padding: 3px 8px;
|
||||
margin-left: 8px;
|
||||
background: #E9E9E6;
|
||||
font-size: .8em;
|
||||
font-weight: bold;
|
||||
border-radius: 2px;
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -285,190 +237,16 @@ a.button:hover, a.balloon-button:hover {
|
||||
* 主页主体
|
||||
*/
|
||||
.typecho-dashboard {
|
||||
}
|
||||
.typecho-dashboard ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
.typecho-dashboard li {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
|
||||
|
||||
/**
|
||||
* 标签页
|
||||
*/
|
||||
.typecho-option-tabs {
|
||||
list-style: none;
|
||||
margin: 1em 0 0;
|
||||
padding: 0;
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
&.fix-tabs {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
.typecho-option-tabs a {
|
||||
display: block;
|
||||
margin-right: -1px;
|
||||
border: 1px solid #D9D9D6;
|
||||
padding: 0 15px;
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
color: #666;
|
||||
box-sizing: border-box;
|
||||
|
||||
}
|
||||
.typecho-option-tabs a:hover {
|
||||
background-color: #E9E9E6;
|
||||
color: #666;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.typecho-option-tabs li {
|
||||
float: left;
|
||||
&:first-child a {
|
||||
border-radius: 2px 0 0 2px;
|
||||
}
|
||||
&:last-child a {
|
||||
border-radius: 0 2px 2px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.typecho-option-tabs.right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.typecho-option-tabs li.current a,
|
||||
.typecho-option-tabs li.active a {
|
||||
background-color: #E9E9E6;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 表格列表页
|
||||
*/
|
||||
|
||||
/**
|
||||
* 列表页选项
|
||||
*/
|
||||
.typecho-list .typecho-pager {
|
||||
}
|
||||
|
||||
.typecho-list-operate {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.typecho-list-operate input,
|
||||
.typecho-list-operate button,
|
||||
.typecho-list-operate select {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
.typecho-list-operate input[type="checkbox"] {
|
||||
vertical-align: text-top;
|
||||
}
|
||||
|
||||
@media (min-width: $screen-phone) {
|
||||
.typecho-list-operate {
|
||||
.operate {
|
||||
float: left;
|
||||
}
|
||||
.search {
|
||||
float: right;
|
||||
li {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.typecho-list-operate span.operate-delete, a.operate-delete,
|
||||
.typecho-list-operate span.operate-button-delete, a.operate-button-delete {
|
||||
color: #B94A48;
|
||||
}
|
||||
|
||||
a.operate-edit {
|
||||
color: #007700;
|
||||
}
|
||||
|
||||
a.operate-reply {
|
||||
color: #545c30;
|
||||
}
|
||||
|
||||
.typecho-list-operate a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表表格
|
||||
*/
|
||||
/** 增加表格标题 by 70 */
|
||||
.typecho-list-table-title {
|
||||
margin: 1em 0;
|
||||
color: #999;
|
||||
text-align: center;
|
||||
}
|
||||
.typecho-table-wrap {
|
||||
padding: 30px;
|
||||
background: #FFF;
|
||||
}
|
||||
.typecho-list-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
table-layout: fixed;
|
||||
|
||||
&.deactivate {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
th {
|
||||
padding: 0 10px 10px;
|
||||
border-bottom: 2px solid #F0F0EC;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 10px;
|
||||
border-top: 1px solid #F0F0EC;
|
||||
word-break: break-all;
|
||||
|
||||
pre {
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.status {
|
||||
margin-left: 5px;
|
||||
color: #999;
|
||||
font-size: .92857em;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
tbody tr:hover td {
|
||||
background-color: #F6F6F3;
|
||||
}
|
||||
|
||||
tbody tr.checked td {
|
||||
background-color: #FFF9E8;
|
||||
}
|
||||
|
||||
tr td .hidden-by-mouse {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
tr:hover td .hidden-by-mouse {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.warning {
|
||||
color: #B94A48;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 评论管理
|
||||
*/
|
||||
@@ -504,12 +282,13 @@ a.operate-reply {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
@media (max-width: $screen-phone - 1px) {
|
||||
@include screen(phone, max) {
|
||||
.comment-edit {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 90vw;
|
||||
}
|
||||
|
||||
.comment-edit td:first-child { display: none; }
|
||||
}
|
||||
|
||||
@@ -521,295 +300,57 @@ a.operate-reply {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 模板列表
|
||||
*/
|
||||
.typecho-theme-list {
|
||||
}
|
||||
img {
|
||||
margin: 1em 0;
|
||||
max-width: 100%;
|
||||
max-height: 240px;
|
||||
}
|
||||
|
||||
.typecho-theme-list .theme-item {
|
||||
}
|
||||
cite {
|
||||
font-style: normal;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.typecho-theme-list td {
|
||||
}
|
||||
|
||||
.typecho-theme-list img {
|
||||
margin: 1em 0;
|
||||
max-width: 100%;
|
||||
max-height: 240px;
|
||||
}
|
||||
|
||||
.typecho-theme-list cite {
|
||||
font-style: normal;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.typecho-theme-list tbody tr.current td {
|
||||
background-color: #FFF9E8;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 后台配置项
|
||||
*/
|
||||
|
||||
.typecho-page-main .typecho-option input.text {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.typecho-page-main .typecho-option input.num {
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
.typecho-page-main .typecho-option textarea {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.typecho-page-main .typecho-option .multiline {
|
||||
display: block;
|
||||
margin: .3em 0;
|
||||
&.hidden {
|
||||
display: none;
|
||||
tbody tr.current td {
|
||||
background-color: #FFF9E8;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 编辑模板
|
||||
*/
|
||||
.typecho-select-theme {
|
||||
height: 25px;
|
||||
line-height: 25px;
|
||||
margin: 15px 0px;
|
||||
}
|
||||
|
||||
.typecho-select-theme h5 {
|
||||
color: #E47E00;
|
||||
font-weight: bold;
|
||||
float: left;
|
||||
font-size: 14px;
|
||||
width: 120px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.typecho-select-theme select {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑模板(编辑详情)
|
||||
*/
|
||||
|
||||
.typecho-edit-theme ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.typecho-edit-theme li {
|
||||
padding: 3px 10px;
|
||||
}
|
||||
|
||||
.typecho-edit-theme .current {
|
||||
background-color: #E6E6E3;
|
||||
}
|
||||
.typecho-edit-theme .current a {
|
||||
color: #444;
|
||||
}
|
||||
|
||||
.typecho-edit-theme textarea {
|
||||
font-size: .92857em;
|
||||
line-height: 1.2;
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
/**
|
||||
* 编写页面
|
||||
*/
|
||||
|
||||
.typecho-post-area .edit-draft-notice {
|
||||
color: #999;
|
||||
font-size: .92857em;
|
||||
}
|
||||
.typecho-post-area .edit-draft-notice a { color: #B94A48; }
|
||||
|
||||
.typecho-post-area .typecho-label {
|
||||
display: block;
|
||||
margin: 1em 0 -0.5em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.typecho-post-area #auto-save-message {
|
||||
display: block;
|
||||
margin-top: 0.5em;
|
||||
color: #999;
|
||||
font-size: .92857em;
|
||||
}
|
||||
|
||||
.typecho-post-area .submit .right button {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.typecho-post-area .right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.typecho-post-area .left {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.typecho-post-area input.text {
|
||||
}
|
||||
|
||||
.typecho-post-area .out-date {
|
||||
border: 1px solid #D3DBB3;
|
||||
padding: 3px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.typecho-post-area input.title {
|
||||
font-size: 1.17em;
|
||||
font-weight: bold;
|
||||
}
|
||||
.typecho-post-area .url-slug {
|
||||
margin-top: -0.5em;
|
||||
color: #AAA;
|
||||
font-size: .92857em;
|
||||
word-break: break-word;
|
||||
}
|
||||
.typecho-post-area #slug {
|
||||
padding: 2px;
|
||||
border: none;
|
||||
background: #FFFBCC;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.typecho-post-area #text {
|
||||
resize: none;
|
||||
}
|
||||
|
||||
#advance-panel {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#custom-field {
|
||||
margin: 1em 0;
|
||||
padding: 10px 15px;
|
||||
background: #FFF;
|
||||
&.fold {
|
||||
table, .description { display: none; }
|
||||
}
|
||||
|
||||
.description {
|
||||
margin-top: 10px;
|
||||
text-align: right;
|
||||
button {
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
|
||||
p.description {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.typecho-label {
|
||||
.typecho-edit-theme {
|
||||
ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
li {
|
||||
padding: 3px 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.current {
|
||||
background-color: #E6E6E3;
|
||||
|
||||
a {
|
||||
display: block;
|
||||
color: #444;
|
||||
&:hover {
|
||||
color: #467B96;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
table {
|
||||
margin-top: 10px;
|
||||
}
|
||||
td {
|
||||
padding: 10px 5px;
|
||||
|
||||
textarea {
|
||||
font-size: .92857em;
|
||||
border-bottom: 1px solid #F0F0EC;
|
||||
vertical-align: top;
|
||||
label {
|
||||
font-size: 1em;
|
||||
font-weight: normal;
|
||||
}
|
||||
line-height: 1.2;
|
||||
height: 500px;
|
||||
}
|
||||
select { height: 27px; }
|
||||
}
|
||||
|
||||
.typecho-post-area .is-draft {
|
||||
background: #FFF1A8;
|
||||
}
|
||||
|
||||
.typecho-post-option .description {
|
||||
margin-top: -0.5em;
|
||||
color: #999;
|
||||
font-size: .92857em;
|
||||
}
|
||||
|
||||
.category-option ul {
|
||||
list-style: none;
|
||||
border: 1px solid #D9D9D6;
|
||||
padding: 6px 12px;
|
||||
max-height: 240px;
|
||||
overflow: auto;
|
||||
background-color: #FFF;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.category-option li {
|
||||
margin: 3px 0;
|
||||
}
|
||||
|
||||
.visibility-option ul,
|
||||
.allow-option ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 标签列表
|
||||
*/
|
||||
|
||||
.typecho-page-main ul.tag-list {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 20px;
|
||||
background-color: #FFF;
|
||||
}
|
||||
|
||||
.typecho-page-main ul.tag-list li {
|
||||
display: inline-block;
|
||||
margin: 0 0 5px 0;
|
||||
padding: 5px 5px 5px 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.typecho-page-main ul.tag-list li:hover {
|
||||
background-color: #E9E9E6;
|
||||
}
|
||||
|
||||
.typecho-page-main ul.tag-list li input {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
.typecho-page-main ul.tag-list li.checked {
|
||||
background-color: #FFFBCC;
|
||||
}
|
||||
|
||||
.typecho-page-main ul.tag-list li.size-5 { font-size: 1em; }
|
||||
.typecho-page-main ul.tag-list li.size-10 { font-size: 1.2em; }
|
||||
.typecho-page-main ul.tag-list li.size-20 { font-size: 1.4em; }
|
||||
.typecho-page-main ul.tag-list li.size-30 { font-size: 1.6em; }
|
||||
.typecho-page-main ul.tag-list li.size-0 { font-size: 1.8em; }
|
||||
|
||||
.typecho-page-main .tag-edit-link { visibility: hidden; }
|
||||
.typecho-page-main li:hover .tag-edit-link { visibility: visible; }
|
||||
|
||||
.typecho-attachment-photo {
|
||||
border: 1px solid #E6E6E3;
|
||||
max-width: 100%;
|
||||
@@ -873,39 +414,12 @@ background: #FFF1A8;
|
||||
*/
|
||||
.edit-media button { margin-right: 6px; }
|
||||
|
||||
/* 拖动调整 textarea 大小 */
|
||||
.resize {
|
||||
display: block;
|
||||
margin: 2px auto 0;
|
||||
padding: 2px 0;
|
||||
border: 1px solid #D9D9D6;
|
||||
border-width: 1px 0;
|
||||
width: 60px;
|
||||
cursor: row-resize;
|
||||
i {
|
||||
display: block;
|
||||
height: 1px;
|
||||
background-color: #D9D9D6;
|
||||
}
|
||||
}
|
||||
|
||||
/* 拖动排序 */
|
||||
.tDnD_whileDrag {
|
||||
background-color: #FFFBCC;
|
||||
}
|
||||
|
||||
@media (max-width: $screen-phone - 1px) {
|
||||
.typecho-list-operate {
|
||||
.search {
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.typecho-table-wrap {
|
||||
padding: 10px;
|
||||
margin: 0 -10px;
|
||||
}
|
||||
|
||||
@include screen(phone, max) {
|
||||
.typecho-option-submit {
|
||||
button[type="submit"] {
|
||||
width: 100%;
|
||||
|
||||
@@ -6,56 +6,39 @@ include 'menu.php';
|
||||
\Widget\Themes\Files::alloc()->to($files);
|
||||
?>
|
||||
|
||||
<div class="main">
|
||||
<main class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main" role="main">
|
||||
<div class="col-mb-12">
|
||||
<ul class="typecho-option-tabs fix-tabs clearfix">
|
||||
<li><a href="<?php $options->adminUrl('themes.php'); ?>"><?php _e('可以使用的外观'); ?></a></li>
|
||||
<li class="current"><a href="<?php $options->adminUrl('theme-editor.php'); ?>">
|
||||
<?php if ($options->theme == $files->theme): ?>
|
||||
<?php _e('编辑当前外观'); ?>
|
||||
<?php else: ?>
|
||||
<?php _e('编辑%s外观', ' <cite>' . $files->theme . '</cite> '); ?>
|
||||
<?php endif; ?>
|
||||
</a></li>
|
||||
<?php if (\Widget\Themes\Config::isExists()): ?>
|
||||
<li><a href="<?php $options->adminUrl('options-theme.php'); ?>"><?php _e('设置外观'); ?></a></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="typecho-edit-theme">
|
||||
<div class="col-mb-12 col-tb-8 col-9 content">
|
||||
<form method="post" name="theme" id="theme"
|
||||
action="<?php $security->index('/action/themes-edit'); ?>">
|
||||
<label for="content" class="sr-only"><?php _e('编辑源码'); ?></label>
|
||||
<textarea name="content" id="content" class="w-100 mono"
|
||||
<?php if (!$files->currentIsWriteable()): ?>readonly<?php endif; ?>><?php echo $files->currentContent(); ?></textarea>
|
||||
<p class="typecho-option typecho-option-submit">
|
||||
<?php if ($files->currentIsWriteable()): ?>
|
||||
<input type="hidden" name="theme" value="<?php echo $files->currentTheme(); ?>"/>
|
||||
<input type="hidden" name="edit" value="<?php echo $files->currentFile(); ?>"/>
|
||||
<button type="submit" class="btn primary"><?php _e('保存文件'); ?></button>
|
||||
<?php else: ?>
|
||||
<em><?php _e('此文件无法写入'); ?></em>
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<ul class="col-mb-12 col-tb-4 col-3">
|
||||
<li><strong>模板文件</strong></li>
|
||||
<?php while ($files->next()): ?>
|
||||
<li<?php if ($files->current): ?> class="current"<?php endif; ?>>
|
||||
<a href="<?php $options->adminUrl('theme-editor.php?theme=' . $files->currentTheme() . '&file=' . $files->file); ?>"><?php $files->file(); ?></a>
|
||||
</li>
|
||||
<?php endwhile; ?>
|
||||
</ul>
|
||||
<?php include 'theme-tabs.php'; ?>
|
||||
<div class="row typecho-page-main typecho-edit-theme" role="main">
|
||||
<div class="col-mb-12 col-tb-8 col-9 content">
|
||||
<form method="post" name="theme" id="theme"
|
||||
action="<?php $security->index('/action/themes-edit'); ?>">
|
||||
<label for="content" class="sr-only"><?php _e('编辑源码'); ?></label>
|
||||
<textarea name="content" id="content" class="w-100 mono"
|
||||
<?php if (!$files->currentIsWriteable()): ?>readonly<?php endif; ?>><?php echo $files->currentContent(); ?></textarea>
|
||||
<p class="typecho-option typecho-option-submit">
|
||||
<?php if ($files->currentIsWriteable()): ?>
|
||||
<input type="hidden" name="theme" value="<?php echo $files->currentTheme(); ?>"/>
|
||||
<input type="hidden" name="edit" value="<?php echo $files->currentFile(); ?>"/>
|
||||
<button type="submit" class="btn primary"><?php _e('保存文件'); ?></button>
|
||||
<?php else: ?>
|
||||
<em><?php _e('此文件无法写入'); ?></em>
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<ul class="col-mb-12 col-tb-4 col-3">
|
||||
<li><strong>模板文件</strong></li>
|
||||
<?php while ($files->next()): ?>
|
||||
<li<?php if ($files->current): ?> class="current"<?php endif; ?>>
|
||||
<a href="<?php $options->adminUrl('theme-editor.php?theme=' . $files->currentTheme() . '&file=' . $files->file); ?>"><?php $files->file(); ?></a>
|
||||
</li>
|
||||
<?php endwhile; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
include 'copyright.php';
|
||||
|
||||
16
admin/theme-tabs.php
Normal file
16
admin/theme-tabs.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php if (!defined('__TYPECHO_ADMIN__')) exit; ?>
|
||||
<ul class="typecho-option-tabs fix-tabs">
|
||||
<li<?php if ($menu->getCurrentMenuUrl() === 'themes.php'): ?> class="current"<?php endif; ?>><a href="<?php $options->adminUrl('themes.php'); ?>"><?php _e('可以使用的外观'); ?></a></li>
|
||||
<?php if (\Widget\Themes\Files::isWriteable()): ?>
|
||||
<li<?php if ($menu->getCurrentMenuUrl() === 'theme-editor.php'): ?> class="current"<?php endif; ?>><a href="<?php $options->adminUrl('theme-editor.php'); ?>">
|
||||
<?php if (!isset($files) || $options->theme == $files->theme): ?>
|
||||
<?php _e('编辑当前外观'); ?>
|
||||
<?php else: ?>
|
||||
<?php _e('编辑%s外观', ' <cite>' . $files->theme . '</cite> '); ?>
|
||||
<?php endif; ?>
|
||||
</a></li>
|
||||
<?php endif; ?>
|
||||
<?php if (\Widget\Themes\Config::isExists()): ?>
|
||||
<li<?php if ($menu->getCurrentMenuUrl() === 'options-theme.php'): ?> class="current"<?php endif; ?>><a href="<?php $options->adminUrl('options-theme.php'); ?>"><?php _e('设置外观'); ?></a></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
118
admin/themes.php
118
admin/themes.php
@@ -4,79 +4,67 @@ include 'header.php';
|
||||
include 'menu.php';
|
||||
?>
|
||||
|
||||
<div class="main">
|
||||
<main class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<?php include 'theme-tabs.php'; ?>
|
||||
<div class="row typecho-page-main" role="main">
|
||||
<div class="col-mb-12">
|
||||
<ul class="typecho-option-tabs fix-tabs clearfix">
|
||||
<li class="current"><a href="<?php $options->adminUrl('themes.php'); ?>"><?php _e('可以使用的外观'); ?></a>
|
||||
</li>
|
||||
<?php if (\Widget\Themes\Files::isWriteable()): ?>
|
||||
<li><a href="<?php $options->adminUrl('theme-editor.php'); ?>"><?php _e('编辑当前外观'); ?></a></li>
|
||||
<table class="typecho-list-table typecho-theme-list">
|
||||
<colgroup>
|
||||
<col width="35%"/>
|
||||
<col/>
|
||||
</colgroup>
|
||||
|
||||
<thead>
|
||||
<th><?php _e('截图'); ?></th>
|
||||
<th><?php _e('详情'); ?></th>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php if ($options->missingTheme): ?>
|
||||
<tr id="theme-<?php $options->missingTheme; ?>" class="current">
|
||||
<td colspan="2" class="warning">
|
||||
<p><strong><?php _e('检测到您之前使用的 "%s" 外观文件不存在,您可以重新上传此外观或者启用其他外观。', $options->missingTheme); ?></strong></p>
|
||||
<ul>
|
||||
<li><?php _e('重新上传此外观后刷新当前页面,此提示将会消失。'); ?></li>
|
||||
<li><?php _e('启用新外观后,当前外观的设置数据将被删除。'); ?></li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php if (\Widget\Themes\Config::isExists()): ?>
|
||||
<li><a href="<?php $options->adminUrl('options-theme.php'); ?>"><?php _e('设置外观'); ?></a></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
|
||||
<div class="typecho-table-wrap">
|
||||
<table class="typecho-list-table typecho-theme-list">
|
||||
<colgroup>
|
||||
<col width="35%"/>
|
||||
<col/>
|
||||
</colgroup>
|
||||
|
||||
<thead>
|
||||
<th><?php _e('截图'); ?></th>
|
||||
<th><?php _e('详情'); ?></th>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php if ($options->missingTheme): ?>
|
||||
<tr id="theme-<?php $options->missingTheme; ?>" class="current">
|
||||
<td colspan="2" class="warning">
|
||||
<p><strong><?php _e('检测到您之前使用的 "%s" 外观文件不存在,您可以重新上传此外观或者启用其他外观。', $options->missingTheme); ?></strong></p>
|
||||
<ul>
|
||||
<li><?php _e('重新上传此外观后刷新当前页面,此提示将会消失。'); ?></li>
|
||||
<li><?php _e('启用新外观后,当前外观的设置数据将被删除。'); ?></li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php \Widget\Themes\Rows::alloc()->to($themes); ?>
|
||||
<?php while ($themes->next()): ?>
|
||||
<tr id="theme-<?php $themes->name(); ?>"
|
||||
class="<?php if ($themes->activated && !$options->missingTheme): ?>current<?php endif; ?>">
|
||||
<td valign="top"><img src="<?php $themes->screen(); ?>"
|
||||
alt="<?php $themes->name(); ?>"/></td>
|
||||
<td valign="top">
|
||||
<h3><?php '' != $themes->title ? $themes->title() : $themes->name(); ?></h3>
|
||||
<cite>
|
||||
<?php if ($themes->author): ?><?php _e('作者'); ?>: <?php if ($themes->homepage): ?><a href="<?php $themes->homepage() ?>"><?php endif; ?><?php $themes->author(); ?><?php if ($themes->homepage): ?></a><?php endif; ?> <?php endif; ?>
|
||||
<?php if ($themes->version): ?><?php _e('版本'); ?>: <?php $themes->version() ?><?php endif; ?>
|
||||
</cite>
|
||||
<p><?php echo nl2br($themes->description); ?></p>
|
||||
<?php if ($options->theme != $themes->name || $options->missingTheme): ?>
|
||||
<p>
|
||||
<?php if (\Widget\Themes\Files::isWriteable()): ?>
|
||||
<a class="edit"
|
||||
href="<?php $options->adminUrl('theme-editor.php?theme=' . $themes->name); ?>"><?php _e('编辑'); ?></a>
|
||||
<?php endif; ?>
|
||||
<a class="activate"
|
||||
href="<?php $security->index('/action/themes-edit?change=' . $themes->name); ?>"><?php _e('启用'); ?></a>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endwhile; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php \Widget\Themes\Rows::alloc()->to($themes); ?>
|
||||
<?php while ($themes->next()): ?>
|
||||
<tr id="theme-<?php $themes->name(); ?>"
|
||||
class="<?php if ($themes->activated && !$options->missingTheme): ?>current<?php endif; ?>">
|
||||
<td valign="top"><img src="<?php $themes->screen(); ?>"
|
||||
alt="<?php $themes->name(); ?>"/></td>
|
||||
<td valign="top">
|
||||
<h3><?php '' != $themes->title ? $themes->title() : $themes->name(); ?></h3>
|
||||
<cite>
|
||||
<?php if ($themes->author): ?><?php _e('作者'); ?>: <?php if ($themes->homepage): ?><a href="<?php $themes->homepage() ?>"><?php endif; ?><?php $themes->author(); ?><?php if ($themes->homepage): ?></a><?php endif; ?> <?php endif; ?>
|
||||
<?php if ($themes->version): ?><?php _e('版本'); ?>: <?php $themes->version() ?><?php endif; ?>
|
||||
</cite>
|
||||
<p><?php echo nl2br($themes->description); ?></p>
|
||||
<?php if ($options->theme != $themes->name || $options->missingTheme): ?>
|
||||
<p>
|
||||
<?php if (\Widget\Themes\Files::isWriteable()): ?>
|
||||
<a class="edit"
|
||||
href="<?php $options->adminUrl('theme-editor.php?theme=' . $themes->name); ?>"><?php _e('编辑'); ?></a>
|
||||
<?php endif; ?>
|
||||
<a class="activate"
|
||||
href="<?php $security->index('/action/themes-edit?change=' . $themes->name); ?>"><?php _e('启用'); ?></a>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endwhile; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
include 'copyright.php';
|
||||
|
||||
@@ -4,7 +4,7 @@ include 'header.php';
|
||||
include 'menu.php';
|
||||
?>
|
||||
|
||||
<div class="main">
|
||||
<main class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main" role="main">
|
||||
@@ -29,7 +29,7 @@ include 'menu.php';
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
include 'copyright.php';
|
||||
|
||||
@@ -4,7 +4,7 @@ include 'header.php';
|
||||
include 'menu.php';
|
||||
?>
|
||||
|
||||
<div class="main">
|
||||
<main class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main" role="form">
|
||||
@@ -13,7 +13,7 @@ include 'menu.php';
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
include 'copyright.php';
|
||||
|
||||
@@ -4,7 +4,7 @@ include 'header.php';
|
||||
include 'menu.php';
|
||||
?>
|
||||
|
||||
<div class="main">
|
||||
<main class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main" role="main">
|
||||
@@ -27,7 +27,7 @@ include 'menu.php';
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
include 'copyright.php';
|
||||
|
||||
@@ -145,7 +145,7 @@ $(document).ready(function() {
|
||||
idInput = $('input[name=cid]'),
|
||||
draft = $('input[name=draft]'),
|
||||
btnPreview = $('#btn-preview'),
|
||||
autoSave = $('<span id="auto-save-message" class="left"></span>').prependTo('.submit');
|
||||
autoSave = $('<span id="auto-save-message"></span>').prependTo('.left');
|
||||
|
||||
let cid = idInput.val(),
|
||||
draftId = draft.length > 0 ? draft.val() : 0,
|
||||
@@ -320,12 +320,6 @@ $(document).ready(function() {
|
||||
return false;
|
||||
});
|
||||
|
||||
// 高级选项控制
|
||||
$('#advance-panel-btn').click(function() {
|
||||
$('#advance-panel').toggle();
|
||||
return false;
|
||||
});
|
||||
|
||||
// 自动隐藏密码框
|
||||
$('#visibility').change(function () {
|
||||
const val = $(this).val(), password = $('#post-password');
|
||||
|
||||
@@ -16,189 +16,187 @@ while ($parents->next()) {
|
||||
$parentPages[$parents->cid] = str_repeat(' ', $parents->levels) . $parents->title;
|
||||
}
|
||||
?>
|
||||
<div class="main">
|
||||
<main class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main typecho-post-area" role="form">
|
||||
<form action="<?php $security->index('/action/contents-page-edit'); ?>" method="post" name="write_page">
|
||||
<div class="col-mb-12 col-tb-9" role="main">
|
||||
<?php if ($page->draft): ?>
|
||||
<?php if ($page->draft['cid'] != $page->cid): ?>
|
||||
<?php $pageModifyDate = new \Typecho\Date($page->draft['modified']); ?>
|
||||
<cite
|
||||
class="edit-draft-notice"><?php _e('你正在编辑的是保存于 %s 的修订版, 你也可以 <a href="%s">删除它</a>', $pageModifyDate->word(),
|
||||
$security->getIndex('/action/contents-page-edit?do=deleteDraft&cid=' . $page->cid)); ?></cite>
|
||||
<?php else: ?>
|
||||
<cite class="edit-draft-notice"><?php _e('当前正在编辑的是未发布的草稿'); ?></cite>
|
||||
<?php endif; ?>
|
||||
<input name="draft" type="hidden" value="<?php echo $page->draft['cid'] ?>"/>
|
||||
<form class="row typecho-page-main typecho-post-area" action="<?php $security->index('/action/contents-page-edit'); ?>" method="post" name="write_page">
|
||||
<div class="col-mb-12 col-tb-9" role="main">
|
||||
<?php if ($page->draft): ?>
|
||||
<?php if ($page->draft['cid'] != $page->cid): ?>
|
||||
<?php $pageModifyDate = new \Typecho\Date($page->draft['modified']); ?>
|
||||
<cite
|
||||
class="edit-draft-notice"><?php _e('你正在编辑的是保存于 %s 的修订版, 你也可以 <a href="%s">删除它</a>', $pageModifyDate->word(),
|
||||
$security->getIndex('/action/contents-page-edit?do=deleteDraft&cid=' . $page->cid)); ?></cite>
|
||||
<?php else: ?>
|
||||
<cite class="edit-draft-notice"><?php _e('当前正在编辑的是未发布的草稿'); ?></cite>
|
||||
<?php endif; ?>
|
||||
<input name="draft" type="hidden" value="<?php echo $page->draft['cid'] ?>"/>
|
||||
<?php endif; ?>
|
||||
|
||||
<p class="title">
|
||||
<label for="title" class="sr-only"><?php _e('标题'); ?></label>
|
||||
<input type="text" id="title" name="title" autocomplete="off" value="<?php $page->title(); ?>"
|
||||
placeholder="<?php _e('标题'); ?>" class="w-100 text title"/>
|
||||
</p>
|
||||
<?php $permalink = \Typecho\Common::url($options->routingTable['page']['url'], $options->index);
|
||||
[$scheme, $permalink] = explode(':', $permalink, 2);
|
||||
$permalink = ltrim($permalink, '/');
|
||||
$permalink = preg_replace("/\[([_a-z0-9-]+)[^\]]*\]/i", "{\\1}", $permalink);
|
||||
if ($page->have()) {
|
||||
$permalink = preg_replace_callback(
|
||||
"/\{(cid)\}/i",
|
||||
function ($matches) use ($page) {
|
||||
$key = $matches[1];
|
||||
return $page->getRouterParam($key);
|
||||
},
|
||||
$permalink
|
||||
);
|
||||
}
|
||||
$input = '<input type="text" id="slug" name="slug" autocomplete="off" value="' . htmlspecialchars($page->slug ?? '') . '" class="mono" />';
|
||||
?>
|
||||
<p class="mono url-slug">
|
||||
<label for="slug" class="sr-only"><?php _e('网址缩略名'); ?></label>
|
||||
<?php echo preg_replace_callback("/\{(slug|directory)\}/i", function ($matches) use ($input) {
|
||||
if ($matches[1] == 'slug') {
|
||||
return $input;
|
||||
} else {
|
||||
return '{directory/' . $input . '}';
|
||||
}
|
||||
}, $permalink); ?>
|
||||
</p>
|
||||
<p>
|
||||
<label for="text" class="sr-only"><?php _e('页面内容'); ?></label>
|
||||
<textarea style="height: <?php $options->editorSize(); ?>px" autocomplete="off" id="text"
|
||||
name="text" class="w-100 mono"><?php echo htmlspecialchars($page->text); ?></textarea>
|
||||
</p>
|
||||
<p class="title">
|
||||
<label for="title" class="sr-only"><?php _e('标题'); ?></label>
|
||||
<input type="text" id="title" name="title" autocomplete="off" value="<?php $page->title(); ?>"
|
||||
placeholder="<?php _e('标题'); ?>" class="w-100 text title"/>
|
||||
</p>
|
||||
<?php $permalink = \Typecho\Common::url($options->routingTable['page']['url'], $options->index);
|
||||
[$scheme, $permalink] = explode(':', $permalink, 2);
|
||||
$permalink = ltrim($permalink, '/');
|
||||
$permalink = preg_replace("/\[([_a-z0-9-]+)[^\]]*\]/i", "{\\1}", $permalink);
|
||||
if ($page->have()) {
|
||||
$permalink = preg_replace_callback(
|
||||
"/\{(cid)\}/i",
|
||||
function ($matches) use ($page) {
|
||||
$key = $matches[1];
|
||||
return $page->getRouterParam($key);
|
||||
},
|
||||
$permalink
|
||||
);
|
||||
}
|
||||
$input = '<input type="text" id="slug" name="slug" autocomplete="off" value="' . htmlspecialchars($page->slug ?? '') . '" class="mono" />';
|
||||
?>
|
||||
<p class="mono url-slug">
|
||||
<label for="slug" class="sr-only"><?php _e('网址缩略名'); ?></label>
|
||||
<?php echo preg_replace_callback("/\{(slug|directory)\}/i", function ($matches) use ($input) {
|
||||
if ($matches[1] == 'slug') {
|
||||
return $input;
|
||||
} else {
|
||||
return '{directory/' . $input . '}';
|
||||
}
|
||||
}, $permalink); ?>
|
||||
</p>
|
||||
<p>
|
||||
<label for="text" class="sr-only"><?php _e('页面内容'); ?></label>
|
||||
<textarea style="height: <?php $options->editorSize(); ?>px" autocomplete="off" id="text"
|
||||
name="text" class="w-100 mono"><?php echo htmlspecialchars($page->text); ?></textarea>
|
||||
</p>
|
||||
|
||||
<?php include 'custom-fields.php'; ?>
|
||||
<p class="submit clearfix">
|
||||
<span class="left">
|
||||
<button type="button" id="btn-cancel-preview" class="btn"><i
|
||||
class="i-caret-left"></i> <?php _e('取消预览'); ?></button>
|
||||
</span>
|
||||
<span class="right">
|
||||
<input type="hidden" name="do" value="publish" />
|
||||
<input type="hidden" name="cid" value="<?php $page->cid(); ?>"/>
|
||||
<button type="button" id="btn-preview" class="btn"><i
|
||||
class="i-exlink"></i> <?php _e('预览页面'); ?></button>
|
||||
<button type="submit" name="do" value="save" id="btn-save"
|
||||
class="btn"><?php _e('保存草稿'); ?></button>
|
||||
<button type="submit" name="do" value="publish" class="btn primary"
|
||||
id="btn-submit"><?php _e('发布页面'); ?></button>
|
||||
<?php if ($options->markdown && (!$page->have() || $page->isMarkdown)): ?>
|
||||
<input type="hidden" name="markdown" value="1"/>
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<?php \Typecho\Plugin::factory('admin/write-page.php')->call('content', $page); ?>
|
||||
</div>
|
||||
<div id="edit-secondary" class="col-mb-12 col-tb-3" role="complementary">
|
||||
<ul class="typecho-option-tabs clearfix">
|
||||
<li class="active w-50"><a href="#tab-advance"><?php _e('选项'); ?></a></li>
|
||||
<li class="w-50"><a href="#tab-files" id="tab-files-btn"><?php _e('附件'); ?></a></li>
|
||||
</ul>
|
||||
|
||||
<div id="tab-advance" class="tab-content">
|
||||
<section class="typecho-post-option" role="application">
|
||||
<label for="date" class="typecho-label"><?php _e('发布日期'); ?></label>
|
||||
<p><input class="typecho-date w-100" type="text" name="date" id="date" autocomplete="off"
|
||||
value="<?php $page->have() && $page->created > 0 ? $page->date('Y-m-d H:i') : ''; ?>"/>
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="typecho-post-option">
|
||||
<label for="order" class="typecho-label"><?php _e('页面顺序'); ?></label>
|
||||
<p><input type="text" id="order" name="order" value="<?php $page->order(); ?>"
|
||||
class="w-100"/></p>
|
||||
<p class="description"><?php _e('为你的自定义页面设定一个序列值以后, 能够使得它们按此值从小到大排列'); ?></p>
|
||||
</section>
|
||||
|
||||
<section class="typecho-post-option">
|
||||
<label for="template" class="typecho-label"><?php _e('自定义模板'); ?></label>
|
||||
<p>
|
||||
<select name="template" id="template">
|
||||
<option value=""><?php _e('不选择'); ?></option>
|
||||
<?php $templates = $page->getTemplates();
|
||||
foreach ($templates as $template => $name): ?>
|
||||
<option
|
||||
value="<?php echo $template; ?>"<?php if ($template == $page->template): ?> selected="true"<?php endif; ?>><?php echo $name; ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</p>
|
||||
<p class="description"><?php _e('如果你为此页面选择了一个自定义模板, 系统将按照你选择的模板文件展现它'); ?></p>
|
||||
</section>
|
||||
|
||||
<section class="typecho-post-option">
|
||||
<label for="parent" class="typecho-label"><?php _e('父级页面'); ?></label>
|
||||
<p>
|
||||
<select name="parent" id="parent">
|
||||
<?php foreach ($parentPages as $pageId => $pageTitle): ?>
|
||||
<option
|
||||
value="<?php echo $pageId; ?>"<?php if ($pageId == ($page->parent ?? $parentPageId)): ?> selected="true"<?php endif; ?>><?php echo $pageTitle; ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</p>
|
||||
<p class="description"><?php _e('如果你设定了父级页面, 此页面将作为子页面呈现'); ?></p>
|
||||
</section>
|
||||
|
||||
<?php \Typecho\Plugin::factory('admin/write-page.php')->call('option', $page); ?>
|
||||
|
||||
<button type="button" id="advance-panel-btn" class="btn btn-xs"><?php _e('高级选项'); ?> <i
|
||||
class="i-caret-down"></i></button>
|
||||
<div id="advance-panel">
|
||||
<section class="typecho-post-option visibility-option">
|
||||
<label for="visibility" class="typecho-label"><?php _e('公开度'); ?></label>
|
||||
<p>
|
||||
<select id="visibility" name="visibility">
|
||||
<option
|
||||
value="publish"<?php if ($page->status == 'publish' || !$page->status): ?> selected<?php endif; ?>><?php _e('公开'); ?></option>
|
||||
<option
|
||||
value="hidden"<?php if ($page->status == 'hidden'): ?> selected<?php endif; ?>><?php _e('隐藏'); ?></option>
|
||||
</select>
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="typecho-post-option allow-option">
|
||||
<label class="typecho-label"><?php _e('权限控制'); ?></label>
|
||||
<ul>
|
||||
<li><input id="allowComment" name="allowComment" type="checkbox" value="1"
|
||||
<?php if ($page->allow('comment')): ?>checked="true"<?php endif; ?> />
|
||||
<label for="allowComment"><?php _e('允许评论'); ?></label></li>
|
||||
<li><input id="allowPing" name="allowPing" type="checkbox" value="1"
|
||||
<?php if ($page->allow('ping')): ?>checked="true"<?php endif; ?> />
|
||||
<label for="allowPing"><?php _e('允许被引用'); ?></label></li>
|
||||
<li><input id="allowFeed" name="allowFeed" type="checkbox" value="1"
|
||||
<?php if ($page->allow('feed')): ?>checked="true"<?php endif; ?> />
|
||||
<label for="allowFeed"><?php _e('允许在聚合中出现'); ?></label></li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<?php \Typecho\Plugin::factory('admin/write-page.php')->call('advanceOption', $page); ?>
|
||||
</div>
|
||||
<?php if ($page->have()): ?>
|
||||
<?php $modified = new \Typecho\Date($page->modified); ?>
|
||||
<section class="typecho-post-option">
|
||||
<p class="description">
|
||||
<br>—<br>
|
||||
<?php _e('本页面由 <a href="%s">%s</a> 创建',
|
||||
\Typecho\Common::url('manage-pages.php?uid=' . $page->author->uid, $options->adminUrl), $page->author->screenName); ?>
|
||||
<br>
|
||||
<?php _e('最后更新于 %s', $modified->word()); ?>
|
||||
</p>
|
||||
</section>
|
||||
<?php include 'custom-fields.php'; ?>
|
||||
<p class="submit">
|
||||
<span class="left">
|
||||
<button type="button" id="btn-cancel-preview" class="btn"><i
|
||||
class="i-caret-left"></i> <?php _e('取消预览'); ?></button>
|
||||
</span>
|
||||
<span class="right">
|
||||
<input type="hidden" name="do" value="publish" />
|
||||
<input type="hidden" name="cid" value="<?php $page->cid(); ?>"/>
|
||||
<button type="button" id="btn-preview" class="btn"><i
|
||||
class="i-exlink"></i> <?php _e('预览页面'); ?></button>
|
||||
<button type="submit" name="do" value="save" id="btn-save"
|
||||
class="btn"><?php _e('保存草稿'); ?></button>
|
||||
<button type="submit" name="do" value="publish" class="btn primary"
|
||||
id="btn-submit"><?php _e('发布页面'); ?></button>
|
||||
<?php if ($options->markdown && (!$page->have() || $page->isMarkdown)): ?>
|
||||
<input type="hidden" name="markdown" value="1"/>
|
||||
<?php endif; ?>
|
||||
</div><!-- end #tab-advance -->
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<div id="tab-files" class="tab-content hidden">
|
||||
<?php include 'file-upload.php'; ?>
|
||||
</div><!-- end #tab-files -->
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php \Typecho\Plugin::factory('admin/write-page.php')->call('content', $page); ?>
|
||||
</div>
|
||||
<div id="edit-secondary" class="col-mb-12 col-tb-3" role="complementary">
|
||||
<ul class="typecho-option-tabs">
|
||||
<li class="active w-50"><a href="#tab-advance"><?php _e('选项'); ?></a></li>
|
||||
<li class="w-50"><a href="#tab-files" id="tab-files-btn"><?php _e('附件'); ?></a></li>
|
||||
</ul>
|
||||
|
||||
<div id="tab-advance" class="tab-content">
|
||||
<section class="typecho-post-option" role="application">
|
||||
<label for="date" class="typecho-label"><?php _e('发布日期'); ?></label>
|
||||
<p><input class="typecho-date w-100" type="text" name="date" id="date" autocomplete="off"
|
||||
value="<?php $page->have() && $page->created > 0 ? $page->date('Y-m-d H:i') : ''; ?>"/>
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="typecho-post-option">
|
||||
<label for="order" class="typecho-label"><?php _e('页面顺序'); ?></label>
|
||||
<p><input type="number" id="order" name="order" value="<?php $page->order(); ?>"
|
||||
class="w-100"/></p>
|
||||
<p class="description"><?php _e('为你的自定义页面设定一个序列值以后, 能够使得它们按此值从小到大排列'); ?></p>
|
||||
</section>
|
||||
|
||||
<section class="typecho-post-option">
|
||||
<label for="template" class="typecho-label"><?php _e('自定义模板'); ?></label>
|
||||
<p>
|
||||
<select name="template" id="template">
|
||||
<option value=""><?php _e('不选择'); ?></option>
|
||||
<?php $templates = $page->getTemplates();
|
||||
foreach ($templates as $template => $name): ?>
|
||||
<option
|
||||
value="<?php echo $template; ?>"<?php if ($template == $page->template): ?> selected="true"<?php endif; ?>><?php echo $name; ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</p>
|
||||
<p class="description"><?php _e('如果你为此页面选择了一个自定义模板, 系统将按照你选择的模板文件展现它'); ?></p>
|
||||
</section>
|
||||
|
||||
<section class="typecho-post-option">
|
||||
<label for="parent" class="typecho-label"><?php _e('父级页面'); ?></label>
|
||||
<p>
|
||||
<select name="parent" id="parent">
|
||||
<?php foreach ($parentPages as $pageId => $pageTitle): ?>
|
||||
<option
|
||||
value="<?php echo $pageId; ?>"<?php if ($pageId == ($page->parent ?? $parentPageId)): ?> selected="true"<?php endif; ?>><?php echo $pageTitle; ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</p>
|
||||
<p class="description"><?php _e('如果你设定了父级页面, 此页面将作为子页面呈现'); ?></p>
|
||||
</section>
|
||||
|
||||
<?php \Typecho\Plugin::factory('admin/write-page.php')->call('option', $page); ?>
|
||||
|
||||
<details id="advance-panel">
|
||||
<summary class="btn btn-xs"><?php _e('高级选项'); ?> <i class="i-caret-down"></i></summary>
|
||||
|
||||
<section class="typecho-post-option visibility-option">
|
||||
<label for="visibility" class="typecho-label"><?php _e('公开度'); ?></label>
|
||||
<p>
|
||||
<select id="visibility" name="visibility">
|
||||
<option
|
||||
value="publish"<?php if ($page->status == 'publish' || !$page->status): ?> selected<?php endif; ?>><?php _e('公开'); ?></option>
|
||||
<option
|
||||
value="hidden"<?php if ($page->status == 'hidden'): ?> selected<?php endif; ?>><?php _e('隐藏'); ?></option>
|
||||
</select>
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="typecho-post-option allow-option">
|
||||
<label class="typecho-label"><?php _e('权限控制'); ?></label>
|
||||
<ul>
|
||||
<li><input id="allowComment" name="allowComment" type="checkbox" value="1"
|
||||
<?php if ($page->allow('comment')): ?>checked="true"<?php endif; ?> />
|
||||
<label for="allowComment"><?php _e('允许评论'); ?></label></li>
|
||||
<li><input id="allowPing" name="allowPing" type="checkbox" value="1"
|
||||
<?php if ($page->allow('ping')): ?>checked="true"<?php endif; ?> />
|
||||
<label for="allowPing"><?php _e('允许被引用'); ?></label></li>
|
||||
<li><input id="allowFeed" name="allowFeed" type="checkbox" value="1"
|
||||
<?php if ($page->allow('feed')): ?>checked="true"<?php endif; ?> />
|
||||
<label for="allowFeed"><?php _e('允许在聚合中出现'); ?></label></li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<?php \Typecho\Plugin::factory('admin/write-page.php')->call('advanceOption', $page); ?>
|
||||
</details>
|
||||
<?php if ($page->have()): ?>
|
||||
<?php $modified = new \Typecho\Date($page->modified); ?>
|
||||
<section class="typecho-post-option">
|
||||
<p class="description">
|
||||
<br>—<br>
|
||||
<?php _e('本页面由 <a href="%s">%s</a> 创建',
|
||||
\Typecho\Common::url('manage-pages.php?uid=' . $page->author->uid, $options->adminUrl), $page->author->screenName); ?>
|
||||
<br>
|
||||
<?php _e('最后更新于 %s', $modified->word()); ?>
|
||||
</p>
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
</div><!-- end #tab-advance -->
|
||||
|
||||
<div id="tab-files" class="tab-content hidden">
|
||||
<?php include 'file-upload.php'; ?>
|
||||
</div><!-- end #tab-files -->
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
include 'copyright.php';
|
||||
|
||||
@@ -5,197 +5,195 @@ include 'menu.php';
|
||||
|
||||
$post = \Widget\Contents\Post\Edit::alloc()->prepare();
|
||||
?>
|
||||
<div class="main">
|
||||
<main class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main typecho-post-area" role="form">
|
||||
<form action="<?php $security->index('/action/contents-post-edit'); ?>" method="post" name="write_post">
|
||||
<div class="col-mb-12 col-tb-9" role="main">
|
||||
<?php if ($post->draft): ?>
|
||||
<?php if ($post->draft['cid'] != $post->cid): ?>
|
||||
<?php $postModifyDate = new \Typecho\Date($post->draft['modified']); ?>
|
||||
<cite
|
||||
class="edit-draft-notice"><?php _e('你正在编辑的是保存于 %s 的修订版, 你也可以 <a href="%s">删除它</a>', $postModifyDate->word(),
|
||||
$security->getIndex('/action/contents-post-edit?do=deleteDraft&cid=' . $post->cid)); ?></cite>
|
||||
<?php else: ?>
|
||||
<cite class="edit-draft-notice"><?php _e('当前正在编辑的是未发布的草稿'); ?></cite>
|
||||
<?php endif; ?>
|
||||
<input name="draft" type="hidden" value="<?php echo $post->draft['cid'] ?>"/>
|
||||
<form class="row typecho-page-main typecho-post-area" action="<?php $security->index('/action/contents-post-edit'); ?>" method="post" name="write_post">
|
||||
<div class="col-mb-12 col-tb-9" role="main">
|
||||
<?php if ($post->draft): ?>
|
||||
<?php if ($post->draft['cid'] != $post->cid): ?>
|
||||
<?php $postModifyDate = new \Typecho\Date($post->draft['modified']); ?>
|
||||
<cite
|
||||
class="edit-draft-notice"><?php _e('你正在编辑的是保存于 %s 的修订版, 你也可以 <a href="%s">删除它</a>', $postModifyDate->word(),
|
||||
$security->getIndex('/action/contents-post-edit?do=deleteDraft&cid=' . $post->cid)); ?></cite>
|
||||
<?php else: ?>
|
||||
<cite class="edit-draft-notice"><?php _e('当前正在编辑的是未发布的草稿'); ?></cite>
|
||||
<?php endif; ?>
|
||||
<input name="draft" type="hidden" value="<?php echo $post->draft['cid'] ?>"/>
|
||||
<?php endif; ?>
|
||||
|
||||
<p class="title">
|
||||
<label for="title" class="sr-only"><?php _e('标题'); ?></label>
|
||||
<input type="text" id="title" name="title" autocomplete="off" value="<?php $post->title(); ?>"
|
||||
placeholder="<?php _e('标题'); ?>" class="w-100 text title"/>
|
||||
</p>
|
||||
<?php $permalink = \Typecho\Common::url($options->routingTable['post']['url'], $options->index);
|
||||
[$scheme, $permalink] = explode(':', $permalink, 2);
|
||||
$permalink = ltrim($permalink, '/');
|
||||
$permalink = preg_replace("/\[([_a-z0-9-]+)[^\]]*\]/i", "{\\1}", $permalink);
|
||||
if ($post->have()) {
|
||||
$permalink = preg_replace_callback(
|
||||
"/\{(cid|category|year|month|day)\}/i",
|
||||
function ($matches) use ($post) {
|
||||
$key = $matches[1];
|
||||
return $post->getRouterParam($key);
|
||||
},
|
||||
$permalink
|
||||
);
|
||||
}
|
||||
$input = '<input type="text" id="slug" name="slug" autocomplete="off" value="' . htmlspecialchars($post->slug ?? '') . '" class="mono" />';
|
||||
?>
|
||||
<p class="mono url-slug">
|
||||
<label for="slug" class="sr-only"><?php _e('网址缩略名'); ?></label>
|
||||
<?php echo preg_replace("/\{slug\}/i", $input, $permalink); ?>
|
||||
</p>
|
||||
<p>
|
||||
<label for="text" class="sr-only"><?php _e('文章内容'); ?></label>
|
||||
<textarea style="height: <?php $options->editorSize(); ?>px" autocomplete="off" id="text"
|
||||
name="text" class="w-100 mono"><?php echo htmlspecialchars($post->text); ?></textarea>
|
||||
</p>
|
||||
<p class="title">
|
||||
<label for="title" class="sr-only"><?php _e('标题'); ?></label>
|
||||
<input type="text" id="title" name="title" autocomplete="off" value="<?php $post->title(); ?>"
|
||||
placeholder="<?php _e('标题'); ?>" class="w-100 text title"/>
|
||||
</p>
|
||||
<?php $permalink = \Typecho\Common::url($options->routingTable['post']['url'], $options->index);
|
||||
[$scheme, $permalink] = explode(':', $permalink, 2);
|
||||
$permalink = ltrim($permalink, '/');
|
||||
$permalink = preg_replace("/\[([_a-z0-9-]+)[^\]]*\]/i", "{\\1}", $permalink);
|
||||
if ($post->have()) {
|
||||
$permalink = preg_replace_callback(
|
||||
"/\{(cid|category|year|month|day)\}/i",
|
||||
function ($matches) use ($post) {
|
||||
$key = $matches[1];
|
||||
return $post->getRouterParam($key);
|
||||
},
|
||||
$permalink
|
||||
);
|
||||
}
|
||||
$input = '<input type="text" id="slug" name="slug" autocomplete="off" value="' . htmlspecialchars($post->slug ?? '') . '" class="mono" />';
|
||||
?>
|
||||
<p class="mono url-slug">
|
||||
<label for="slug" class="sr-only"><?php _e('网址缩略名'); ?></label>
|
||||
<?php echo preg_replace("/\{slug\}/i", $input, $permalink); ?>
|
||||
</p>
|
||||
<p>
|
||||
<label for="text" class="sr-only"><?php _e('文章内容'); ?></label>
|
||||
<textarea style="height: <?php $options->editorSize(); ?>px" autocomplete="off" id="text"
|
||||
name="text" class="w-100 mono"><?php echo htmlspecialchars($post->text); ?></textarea>
|
||||
</p>
|
||||
|
||||
<?php include 'custom-fields.php'; ?>
|
||||
<?php include 'custom-fields.php'; ?>
|
||||
|
||||
<p class="submit clearfix">
|
||||
<span class="left">
|
||||
<button type="button" id="btn-cancel-preview" class="btn"><i
|
||||
class="i-caret-left"></i> <?php _e('取消预览'); ?></button>
|
||||
</span>
|
||||
<span class="right">
|
||||
<input type="hidden" name="do" value="publish" />
|
||||
<input type="hidden" name="cid" value="<?php $post->cid(); ?>"/>
|
||||
<button type="button" id="btn-preview" class="btn"><i
|
||||
class="i-exlink"></i> <?php _e('预览文章'); ?></button>
|
||||
<button type="submit" name="do" value="save" id="btn-save"
|
||||
class="btn"><?php _e('保存草稿'); ?></button>
|
||||
<button type="submit" name="do" value="publish" class="btn primary"
|
||||
id="btn-submit"><?php _e('发布文章'); ?></button>
|
||||
<?php if ($options->markdown && (!$post->have() || $post->isMarkdown)): ?>
|
||||
<input type="hidden" name="markdown" value="1"/>
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
</p>
|
||||
<p class="submit">
|
||||
<span class="left">
|
||||
<button type="button" id="btn-cancel-preview" class="btn"><i
|
||||
class="i-caret-left"></i> <?php _e('取消预览'); ?></button>
|
||||
</span>
|
||||
<span class="right">
|
||||
<input type="hidden" name="do" value="publish" />
|
||||
<input type="hidden" name="cid" value="<?php $post->cid(); ?>"/>
|
||||
<button type="button" id="btn-preview" class="btn"><i
|
||||
class="i-exlink"></i> <?php _e('预览文章'); ?></button>
|
||||
<button type="submit" name="do" value="save" id="btn-save"
|
||||
class="btn"><?php _e('保存草稿'); ?></button>
|
||||
<button type="submit" name="do" value="publish" class="btn primary"
|
||||
id="btn-submit"><?php _e('发布文章'); ?></button>
|
||||
<?php if ($options->markdown && (!$post->have() || $post->isMarkdown)): ?>
|
||||
<input type="hidden" name="markdown" value="1"/>
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<?php \Typecho\Plugin::factory('admin/write-post.php')->call('content', $post); ?>
|
||||
</div>
|
||||
<?php \Typecho\Plugin::factory('admin/write-post.php')->call('content', $post); ?>
|
||||
</div>
|
||||
|
||||
<div id="edit-secondary" class="col-mb-12 col-tb-3" role="complementary">
|
||||
<ul class="typecho-option-tabs clearfix">
|
||||
<li class="active w-50"><a href="#tab-advance"><?php _e('选项'); ?></a></li>
|
||||
<li class="w-50"><a href="#tab-files" id="tab-files-btn"><?php _e('附件'); ?></a></li>
|
||||
</ul>
|
||||
<div id="edit-secondary" class="col-mb-12 col-tb-3" role="complementary">
|
||||
<ul class="typecho-option-tabs">
|
||||
<li class="active w-50"><a href="#tab-advance"><?php _e('选项'); ?></a></li>
|
||||
<li class="w-50"><a href="#tab-files" id="tab-files-btn"><?php _e('附件'); ?></a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<div id="tab-advance" class="tab-content">
|
||||
<section class="typecho-post-option" role="application">
|
||||
<label for="date" class="typecho-label"><?php _e('发布日期'); ?></label>
|
||||
<p><input class="typecho-date w-100" type="text" name="date" id="date" autocomplete="off"
|
||||
value="<?php $post->have() && $post->created > 0 ? $post->date('Y-m-d H:i') : ''; ?>"/>
|
||||
</p>
|
||||
</section>
|
||||
<div id="tab-advance" class="tab-content">
|
||||
<section class="typecho-post-option" role="application">
|
||||
<label for="date" class="typecho-label"><?php _e('发布日期'); ?></label>
|
||||
<p><input class="typecho-date w-100" type="text" name="date" id="date" autocomplete="off"
|
||||
value="<?php $post->have() && $post->created > 0 ? $post->date('Y-m-d H:i') : ''; ?>"/>
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="typecho-post-option category-option">
|
||||
<label class="typecho-label"><?php _e('分类'); ?></label>
|
||||
<?php \Widget\Metas\Category\Rows::alloc()->to($category); ?>
|
||||
<section class="typecho-post-option category-option">
|
||||
<label class="typecho-label"><?php _e('分类'); ?></label>
|
||||
<?php \Widget\Metas\Category\Rows::alloc()->to($category); ?>
|
||||
<ul>
|
||||
<?php $categories = array_column($post->categories, 'mid'); ?>
|
||||
<?php while ($category->next()): ?>
|
||||
<li><?php echo str_repeat(' ', $category->levels); ?><input
|
||||
type="checkbox" id="category-<?php $category->mid(); ?>"
|
||||
value="<?php $category->mid(); ?>" name="category[]"
|
||||
<?php if (in_array($category->mid, $categories)): ?>checked="true"<?php endif; ?>/>
|
||||
<label
|
||||
for="category-<?php $category->mid(); ?>"><?php $category->name(); ?></label>
|
||||
</li>
|
||||
<?php endwhile; ?>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section class="typecho-post-option">
|
||||
<label for="token-input-tags" class="typecho-label"><?php _e('标签'); ?></label>
|
||||
<p><input id="tags" name="tags" type="text" value="<?php $post->have() ? $post->tags(',', false) : ''; ?>"
|
||||
class="w-100 text"/></p>
|
||||
</section>
|
||||
|
||||
<?php \Typecho\Plugin::factory('admin/write-post.php')->call('option', $post); ?>
|
||||
|
||||
<details id="advance-panel">
|
||||
<summary class="btn btn-xs"><?php _e('高级选项'); ?> <i class="i-caret-down"></i></summary>
|
||||
|
||||
<?php if ($user->pass('editor', true)): ?>
|
||||
<section class="typecho-post-option visibility-option">
|
||||
<label for="visibility" class="typecho-label"><?php _e('公开度'); ?></label>
|
||||
<p>
|
||||
<select id="visibility" name="visibility">
|
||||
<?php if ($user->pass('editor', true)): ?>
|
||||
<option
|
||||
value="publish"<?php if (($post->status == 'publish' && !$post->password) || !$post->status): ?> selected<?php endif; ?>><?php _e('公开'); ?></option>
|
||||
<option
|
||||
value="hidden"<?php if ($post->status == 'hidden'): ?> selected<?php endif; ?>><?php _e('隐藏'); ?></option>
|
||||
<option
|
||||
value="password"<?php if (strlen($post->password ?? '') > 0): ?> selected<?php endif; ?>><?php _e('密码保护'); ?></option>
|
||||
<option
|
||||
value="private"<?php if ($post->status == 'private'): ?> selected<?php endif; ?>><?php _e('私密'); ?></option>
|
||||
<?php endif; ?>
|
||||
<option
|
||||
value="waiting"<?php if (!$user->pass('editor', true) || $post->status == 'waiting'): ?> selected<?php endif; ?>><?php _e('待审核'); ?></option>
|
||||
</select>
|
||||
</p>
|
||||
<p id="post-password"<?php if (strlen($post->password ?? '') == 0): ?> class="hidden"<?php endif; ?>>
|
||||
<label for="protect-pwd" class="sr-only">内容密码</label>
|
||||
<input type="text" name="password" id="protect-pwd" class="text-s"
|
||||
value="<?php $post->password(); ?>" size="16"
|
||||
placeholder="<?php _e('内容密码'); ?>" autocomplete="off"/>
|
||||
</p>
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
|
||||
<section class="typecho-post-option allow-option">
|
||||
<label class="typecho-label"><?php _e('权限控制'); ?></label>
|
||||
<ul>
|
||||
<?php $categories = array_column($post->categories, 'mid'); ?>
|
||||
<?php while ($category->next()): ?>
|
||||
<li><?php echo str_repeat(' ', $category->levels); ?><input
|
||||
type="checkbox" id="category-<?php $category->mid(); ?>"
|
||||
value="<?php $category->mid(); ?>" name="category[]"
|
||||
<?php if (in_array($category->mid, $categories)): ?>checked="true"<?php endif; ?>/>
|
||||
<label
|
||||
for="category-<?php $category->mid(); ?>"><?php $category->name(); ?></label>
|
||||
</li>
|
||||
<?php endwhile; ?>
|
||||
<li><input id="allowComment" name="allowComment" type="checkbox" value="1"
|
||||
<?php if ($post->allow('comment')): ?>checked="true"<?php endif; ?> />
|
||||
<label for="allowComment"><?php _e('允许评论'); ?></label></li>
|
||||
<li><input id="allowPing" name="allowPing" type="checkbox" value="1"
|
||||
<?php if ($post->allow('ping')): ?>checked="true"<?php endif; ?> />
|
||||
<label for="allowPing"><?php _e('允许被引用'); ?></label></li>
|
||||
<li><input id="allowFeed" name="allowFeed" type="checkbox" value="1"
|
||||
<?php if ($post->allow('feed')): ?>checked="true"<?php endif; ?> />
|
||||
<label for="allowFeed"><?php _e('允许在聚合中出现'); ?></label></li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section class="typecho-post-option">
|
||||
<label for="token-input-tags" class="typecho-label"><?php _e('标签'); ?></label>
|
||||
<p><input id="tags" name="tags" type="text" value="<?php $post->have() ? $post->tags(',', false) : ''; ?>"
|
||||
class="w-100 text"/></p>
|
||||
<label for="trackback" class="typecho-label"><?php _e('引用通告'); ?></label>
|
||||
<p><textarea id="trackback" class="w-100 mono" name="trackback" rows="2"></textarea></p>
|
||||
<p class="description"><?php _e('每一行一个引用地址, 用回车隔开'); ?></p>
|
||||
</section>
|
||||
|
||||
<?php \Typecho\Plugin::factory('admin/write-post.php')->call('option', $post); ?>
|
||||
<?php \Typecho\Plugin::factory('admin/write-post.php')->call('advanceOption', $post); ?>
|
||||
</details><!-- end #advance-panel -->
|
||||
|
||||
<button type="button" id="advance-panel-btn" class="btn btn-xs"><?php _e('高级选项'); ?> <i
|
||||
class="i-caret-down"></i></button>
|
||||
<div id="advance-panel">
|
||||
<?php if ($user->pass('editor', true)): ?>
|
||||
<section class="typecho-post-option visibility-option">
|
||||
<label for="visibility" class="typecho-label"><?php _e('公开度'); ?></label>
|
||||
<p>
|
||||
<select id="visibility" name="visibility">
|
||||
<?php if ($user->pass('editor', true)): ?>
|
||||
<option
|
||||
value="publish"<?php if (($post->status == 'publish' && !$post->password) || !$post->status): ?> selected<?php endif; ?>><?php _e('公开'); ?></option>
|
||||
<option
|
||||
value="hidden"<?php if ($post->status == 'hidden'): ?> selected<?php endif; ?>><?php _e('隐藏'); ?></option>
|
||||
<option
|
||||
value="password"<?php if (strlen($post->password ?? '') > 0): ?> selected<?php endif; ?>><?php _e('密码保护'); ?></option>
|
||||
<option
|
||||
value="private"<?php if ($post->status == 'private'): ?> selected<?php endif; ?>><?php _e('私密'); ?></option>
|
||||
<?php endif; ?>
|
||||
<option
|
||||
value="waiting"<?php if (!$user->pass('editor', true) || $post->status == 'waiting'): ?> selected<?php endif; ?>><?php _e('待审核'); ?></option>
|
||||
</select>
|
||||
</p>
|
||||
<p id="post-password"<?php if (strlen($post->password ?? '') == 0): ?> class="hidden"<?php endif; ?>>
|
||||
<label for="protect-pwd" class="sr-only">内容密码</label>
|
||||
<input type="text" name="password" id="protect-pwd" class="text-s"
|
||||
value="<?php $post->password(); ?>" size="16"
|
||||
placeholder="<?php _e('内容密码'); ?>" autocomplete="off"/>
|
||||
</p>
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
<?php if ($post->have()): ?>
|
||||
<?php $modified = new \Typecho\Date($post->modified); ?>
|
||||
<section class="typecho-post-option">
|
||||
<p class="description">
|
||||
<br>—<br>
|
||||
<?php _e('本文由 <a href="%s">%s</a> 撰写',
|
||||
\Typecho\Common::url('manage-posts.php?uid=' . $post->author->uid, $options->adminUrl), $post->author->screenName); ?>
|
||||
<br>
|
||||
<?php _e('最后更新于 %s', $modified->word()); ?>
|
||||
</p>
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
</div><!-- end #tab-advance -->
|
||||
|
||||
<section class="typecho-post-option allow-option">
|
||||
<label class="typecho-label"><?php _e('权限控制'); ?></label>
|
||||
<ul>
|
||||
<li><input id="allowComment" name="allowComment" type="checkbox" value="1"
|
||||
<?php if ($post->allow('comment')): ?>checked="true"<?php endif; ?> />
|
||||
<label for="allowComment"><?php _e('允许评论'); ?></label></li>
|
||||
<li><input id="allowPing" name="allowPing" type="checkbox" value="1"
|
||||
<?php if ($post->allow('ping')): ?>checked="true"<?php endif; ?> />
|
||||
<label for="allowPing"><?php _e('允许被引用'); ?></label></li>
|
||||
<li><input id="allowFeed" name="allowFeed" type="checkbox" value="1"
|
||||
<?php if ($post->allow('feed')): ?>checked="true"<?php endif; ?> />
|
||||
<label for="allowFeed"><?php _e('允许在聚合中出现'); ?></label></li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section class="typecho-post-option">
|
||||
<label for="trackback" class="typecho-label"><?php _e('引用通告'); ?></label>
|
||||
<p><textarea id="trackback" class="w-100 mono" name="trackback" rows="2"></textarea></p>
|
||||
<p class="description"><?php _e('每一行一个引用地址, 用回车隔开'); ?></p>
|
||||
</section>
|
||||
|
||||
<?php \Typecho\Plugin::factory('admin/write-post.php')->call('advanceOption', $post); ?>
|
||||
</div><!-- end #advance-panel -->
|
||||
|
||||
<?php if ($post->have()): ?>
|
||||
<?php $modified = new \Typecho\Date($post->modified); ?>
|
||||
<section class="typecho-post-option">
|
||||
<p class="description">
|
||||
<br>—<br>
|
||||
<?php _e('本文由 <a href="%s">%s</a> 撰写',
|
||||
\Typecho\Common::url('manage-posts.php?uid=' . $post->author->uid, $options->adminUrl), $post->author->screenName); ?>
|
||||
<br>
|
||||
<?php _e('最后更新于 %s', $modified->word()); ?>
|
||||
</p>
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
</div><!-- end #tab-advance -->
|
||||
|
||||
<div id="tab-files" class="tab-content hidden">
|
||||
<?php include 'file-upload.php'; ?>
|
||||
</div><!-- end #tab-files -->
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="tab-files" class="tab-content hidden">
|
||||
<?php include 'file-upload.php'; ?>
|
||||
</div><!-- end #tab-files -->
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
include 'copyright.php';
|
||||
|
||||
18
var/Typecho/Widget/Helper/Form/Element/Number.php
Normal file
18
var/Typecho/Widget/Helper/Form/Element/Number.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Typecho\Widget\Helper\Form\Element;
|
||||
|
||||
if (!defined('__TYPECHO_ROOT_DIR__')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class Number extends Text
|
||||
{
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
protected function getType(): string
|
||||
{
|
||||
return 'number';
|
||||
}
|
||||
}
|
||||
@@ -193,7 +193,7 @@ class Contents extends Base implements QueryInterface, RowFilterInterface, Prima
|
||||
$draft = $this->db->fetchObject($this->db->select('type', 'parent')
|
||||
->from('table.contents')->where('cid = ?', $cid));
|
||||
|
||||
if (preg_match("/_draft$/", $draft->type) && $draft->parent) {
|
||||
if ('revision' === $draft->type && $draft->parent) {
|
||||
$result = '@' . $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -67,6 +67,13 @@ class Menu extends Base
|
||||
*/
|
||||
private string $currentUrl;
|
||||
|
||||
/**
|
||||
* 当前菜单URL
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private string $currentMenuUrl;
|
||||
|
||||
/**
|
||||
* 执行函数,初始化菜单
|
||||
*/
|
||||
@@ -171,6 +178,7 @@ class Menu extends Base
|
||||
$orgHidden = $hidden;
|
||||
|
||||
// parse url
|
||||
$menuUrl = $url;
|
||||
$url = Common::url($url, $adminUrl);
|
||||
|
||||
// compare url
|
||||
@@ -241,6 +249,7 @@ class Menu extends Base
|
||||
$this->currentChild = $inKey;
|
||||
$this->title = $title;
|
||||
$this->addLink = $addLink ? Common::url($addLink, $adminUrl) : null;
|
||||
$this->currentMenuUrl = $menuUrl;
|
||||
}
|
||||
|
||||
$children[$inKey] = [
|
||||
@@ -271,6 +280,16 @@ class Menu extends Base
|
||||
return $this->currentParent > 0 ? $this->menu[$this->currentParent][3][$this->currentChild] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前菜单URL
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCurrentMenuUrl(): string
|
||||
{
|
||||
return $this->currentMenuUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* 输出父级菜单
|
||||
*/
|
||||
@@ -281,39 +300,28 @@ class Menu extends Base
|
||||
continue;
|
||||
}
|
||||
|
||||
echo "<ul class=\"root" . ($key == $this->currentParent ? ' ' . $class : null)
|
||||
. "\"><li class=\"parent\"><a href=\"{$node[2]}\">{$node[0]}</a>"
|
||||
. "</li><ul class=\"child\">";
|
||||
|
||||
$last = 0;
|
||||
foreach ($node[3] as $inKey => $inNode) {
|
||||
if (!$inNode[4]) {
|
||||
$last = $inKey;
|
||||
}
|
||||
}
|
||||
echo "<li" . ($key == $this->currentParent ? " class=\"{$class}\"" : '')
|
||||
. "><a href=\"{$node[2]}\">{$node[0]}</a>"
|
||||
. "<menu>";
|
||||
|
||||
foreach ($node[3] as $inKey => $inNode) {
|
||||
if ($inNode[4]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$classes = [];
|
||||
$focus = false;
|
||||
if ($key == $this->currentParent && $inKey == $this->currentChild) {
|
||||
$classes[] = $childClass;
|
||||
$focus = true;
|
||||
} elseif ($inNode[6]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($inKey == $last) {
|
||||
$classes[] = 'last';
|
||||
}
|
||||
|
||||
echo "<li" . (!empty($classes) ? ' class="' . implode(' ', $classes) . '"' : null) . "><a href=\""
|
||||
echo "<li" . ($focus ? " class=\"{$childClass}\"" : '') . "><a href=\""
|
||||
. ($key == $this->currentParent && $inKey == $this->currentChild ? $this->currentUrl : $inNode[2])
|
||||
. "\">{$inNode[0]}</a></li>";
|
||||
}
|
||||
|
||||
echo "</ul></ul>";
|
||||
echo '</menu></li>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ class Discussion extends Options implements ActionInterface
|
||||
$form->addInput($commentDateFormat);
|
||||
|
||||
/** 评论列表数目 */
|
||||
$commentsListSize = new Form\Element\Text(
|
||||
$commentsListSize = new Form\Element\Number(
|
||||
'commentsListSize',
|
||||
null,
|
||||
$this->options->commentsListSize,
|
||||
@@ -158,14 +158,14 @@ class Discussion extends Options implements ActionInterface
|
||||
<option value="X"' . ('X' == $this->options->commentsAvatarRating ? ' selected="true"' : '') . '>' . _t('X - 限制级') . '</option></select>
|
||||
<label for="commentsShow-commentsAvatarRating">'),
|
||||
'commentsPageBreak' => _t('启用分页, 并且每页显示 %s 篇评论, 在列出时将 %s 作为默认显示',
|
||||
'</label><input type="text" value="' . $this->options->commentsPageSize
|
||||
'</label><input type="number" value="' . $this->options->commentsPageSize
|
||||
. '" class="text num text-s" id="commentsShow-commentsPageSize" name="commentsPageSize" /><label for="commentsShow-commentsPageSize">',
|
||||
'</label><select id="commentsShow-commentsPageDisplay" name="commentsPageDisplay">
|
||||
<option value="first"' . ('first' == $this->options->commentsPageDisplay ? ' selected="true"' : '') . '>' . _t('第一页') . '</option>
|
||||
<option value="last"' . ('last' == $this->options->commentsPageDisplay ? ' selected="true"' : '') . '>' . _t('最后一页') . '</option></select>'
|
||||
. '<label for="commentsShow-commentsPageDisplay">'),
|
||||
'commentsThreaded' => _t('启用评论回复, 以 %s 层作为每个评论最多的回复层数',
|
||||
'</label><input name="commentsMaxNestingLevels" type="text" class="text num text-s" value="' . $this->options->commentsMaxNestingLevels . '" id="commentsShow-commentsMaxNestingLevels" />
|
||||
'</label><input name="commentsMaxNestingLevels" type="number" class="text num text-s" value="' . $this->options->commentsMaxNestingLevels . '" id="commentsShow-commentsMaxNestingLevels" />
|
||||
<label for="commentsShow-commentsMaxNestingLevels">') . '</label></span><span class="multiline">'
|
||||
. _t('将 %s 的评论显示在前面', '<select id="commentsShow-commentsOrder" name="commentsOrder">
|
||||
<option value="DESC"' . ('DESC' == $this->options->commentsOrder ? ' selected="true"' : '') . '>' . _t('较新的') . '</option>
|
||||
@@ -218,10 +218,10 @@ class Discussion extends Options implements ActionInterface
|
||||
'commentsCheckReferer' => _t('检查评论来源页 URL 是否与文章链接一致'),
|
||||
'commentsAntiSpam' => _t('开启反垃圾保护'),
|
||||
'commentsAutoClose' => _t('在文章发布 %s 天以后自动关闭评论',
|
||||
'</label><input name="commentsPostTimeout" type="text" class="text num text-s" value="' . intval($this->options->commentsPostTimeout / (24 * 3600)) . '" id="commentsPost-commentsPostTimeout" />
|
||||
'</label><input name="commentsPostTimeout" type="number" class="text num text-s" value="' . intval($this->options->commentsPostTimeout / (24 * 3600)) . '" id="commentsPost-commentsPostTimeout" />
|
||||
<label for="commentsPost-commentsPostTimeout">'),
|
||||
'commentsPostIntervalEnable' => _t('同一 IP 发布评论的时间间隔限制为 %s 分钟',
|
||||
'</label><input name="commentsPostInterval" type="text" class="text num text-s" value="' . round($this->options->commentsPostInterval / (60), 1) . '" id="commentsPost-commentsPostInterval" />
|
||||
'</label><input name="commentsPostInterval" type="number" class="text num text-s" value="' . round($this->options->commentsPostInterval / (60), 1) . '" id="commentsPost-commentsPostInterval" />
|
||||
<label for="commentsPost-commentsPostInterval">')
|
||||
];
|
||||
|
||||
|
||||
@@ -195,7 +195,7 @@ class Reading extends Permalink
|
||||
$form->addInput($frontPage->multiMode());
|
||||
|
||||
/** 文章列表数目 */
|
||||
$postsListSize = new Form\Element\Text(
|
||||
$postsListSize = new Form\Element\Number(
|
||||
'postsListSize',
|
||||
null,
|
||||
$this->options->postsListSize,
|
||||
@@ -206,7 +206,7 @@ class Reading extends Permalink
|
||||
$form->addInput($postsListSize->addRule('isInteger', _t('请填入一个数字')));
|
||||
|
||||
/** 每页文章数目 */
|
||||
$pageSize = new Form\Element\Text(
|
||||
$pageSize = new Form\Element\Number(
|
||||
'pageSize',
|
||||
null,
|
||||
$this->options->pageSize,
|
||||
|
||||
Reference in New Issue
Block a user