mirror of
https://github.com/typecho/typecho.git
synced 2025-03-18 08:59:40 +01:00
改进概要页面
This commit is contained in:
parent
ca155fce44
commit
64ccb85b2e
@ -861,35 +861,18 @@ margin-top: 25px;
|
||||
/**
|
||||
* 主页主体
|
||||
*/
|
||||
.typecho-dashboard-main {
|
||||
|
||||
.typecho-dashboard {
|
||||
}
|
||||
|
||||
.typecho-dashboard-main .section {
|
||||
.typecho-dashboard ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.typecho-dashboard-main .section h4 {
|
||||
.typecho-dashboard span {
|
||||
font-size: .92857em;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.typecho-dashboard-main .section ul {
|
||||
}
|
||||
|
||||
.typecho-dashboard-main .section li {
|
||||
}
|
||||
|
||||
.typecho-dashboard-main .section .tags {
|
||||
}
|
||||
|
||||
.typecho-dashboard-main .section .title {
|
||||
|
||||
}
|
||||
|
||||
.typecho-dashboard-main .section .date {
|
||||
|
||||
}
|
||||
|
||||
.typecho-dashboard-main .section .category {
|
||||
|
||||
.typecho-dashboard li {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
|
||||
|
@ -6,49 +6,44 @@ include 'menu.php';
|
||||
$stat = Typecho_Widget::widget('Widget_Stat');
|
||||
?>
|
||||
<div class="main">
|
||||
<div class="body container">
|
||||
<div class="container typecho-dashboard">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="col-group typecho-page-main">
|
||||
<div class="col-mb-12 col-tb-3 typecho-dashboard-nav">
|
||||
<p class="intro"><?php _e('欢迎使用 Typecho, 您可以使用下面的链接开始您的 Blog 之旅:'); ?></p>
|
||||
|
||||
<div class="intro-link">
|
||||
<ul>
|
||||
<li><a href="<?php $options->adminUrl('profile.php'); ?>"><?php _e('更新我的资料'); ?></a></li>
|
||||
<?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): ?>
|
||||
<li><a href="<?php $options->adminUrl('manage-comments.php?status=waiting'); ?>"><?php _e('等待审核的评论'); ?></a>
|
||||
<span class="balloon"><?php $stat->waitingCommentsNum(); ?></span>
|
||||
</li>
|
||||
<?php elseif($stat->myWaitingCommentsNum > 0): ?>
|
||||
<li><a href="<?php $options->adminUrl('manage-comments.php?status=waiting'); ?>"><?php _e('等待审核的评论'); ?></a>
|
||||
<span class="balloon"><?php $stat->myWaitingCommentsNum(); ?></span>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if($user->pass('editor', true) && 'on' == $request->get('__typecho_all_comments') && $stat->spamCommentsNum > 0): ?>
|
||||
<li><a href="<?php $options->adminUrl('manage-comments.php?status=spam'); ?>"><?php _e('垃圾评论'); ?></a>
|
||||
<span class="balloon"><?php $stat->spamCommentsNum(); ?></span>
|
||||
</li>
|
||||
<?php elseif($stat->mySpamCommentsNum > 0): ?>
|
||||
<li><a href="<?php $options->adminUrl('manage-comments.php?status=spam'); ?>"><?php _e('垃圾评论'); ?></a>
|
||||
<span class="balloon"><?php $stat->mySpamCommentsNum(); ?></span>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if($user->pass('editor', true)): ?>
|
||||
<li><a href="<?php $options->adminUrl('write-page.php'); ?>"><?php _e('创建一个新页面'); ?></a></li>
|
||||
<?php if($user->pass('administrator', true)): ?>
|
||||
<li><a href="<?php $options->adminUrl('themes.php'); ?>"><?php _e('更换我的主题'); ?></a></li>
|
||||
<li><a href="<?php $options->adminUrl('options-general.php'); ?>"><?php _e('修改系统设置'); ?></a></li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="intro-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): ?>
|
||||
<li><a href="<?php $options->adminUrl('manage-comments.php?status=waiting'); ?>"><?php _e('待审核的评论'); ?></a>
|
||||
<span class="balloon"><?php $stat->waitingCommentsNum(); ?></span>
|
||||
</li>
|
||||
<?php elseif($stat->myWaitingCommentsNum > 0): ?>
|
||||
<li><a href="<?php $options->adminUrl('manage-comments.php?status=waiting'); ?>"><?php _e('待审核的评论'); ?></a>
|
||||
<span class="balloon"><?php $stat->myWaitingCommentsNum(); ?></span>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if($user->pass('editor', true) && 'on' == $request->get('__typecho_all_comments') && $stat->spamCommentsNum > 0): ?>
|
||||
<li><a href="<?php $options->adminUrl('manage-comments.php?status=spam'); ?>"><?php _e('垃圾评论'); ?></a>
|
||||
<span class="balloon"><?php $stat->spamCommentsNum(); ?></span>
|
||||
</li>
|
||||
<?php elseif($stat->mySpamCommentsNum > 0): ?>
|
||||
<li><a href="<?php $options->adminUrl('manage-comments.php?status=spam'); ?>"><?php _e('垃圾评论'); ?></a>
|
||||
<span class="balloon"><?php $stat->mySpamCommentsNum(); ?></span>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if($user->pass('administrator', true)): ?>
|
||||
<li><a href="<?php $options->adminUrl('themes.php'); ?>"><?php _e('更换外观模板'); ?></a></li>
|
||||
<li><a href="<?php $options->adminUrl('options-general.php'); ?>"><?php _e('修改系统设置'); ?></a></li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<li><a href="<?php $options->adminUrl('profile.php'); ?>"><?php _e('更新我的资料'); ?></a></li>
|
||||
</ul>
|
||||
|
||||
<h3><?php _e('统计信息'); ?></h3>
|
||||
<div class="status">
|
||||
<p><?php _e('目前有 <em>%s</em> 篇 Blog,并有 <em>%s</em> 条关于你的评论在已设定的 <em>%s</em> 个分类中.',
|
||||
<p><?php _e('目前有 <em>%s</em> 篇 Blog, 并有 <em>%s</em> 条关于你的评论在已设定的 <em>%s</em> 个分类中.',
|
||||
$stat->myPublishedPostsNum, $stat->myPublishedCommentsNum, $stat->categoriesNum); ?></p>
|
||||
|
||||
<p><?php
|
||||
@ -60,36 +55,42 @@ $stat = Typecho_Widget::widget('Widget_Stat');
|
||||
</div>
|
||||
|
||||
<div class="col-mb-12 col-tb-6 typecho-dashboard-main">
|
||||
<div class="section">
|
||||
<section>
|
||||
<h3><?php _e('最近发表的文章'); ?></h3>
|
||||
<?php Typecho_Widget::widget('Widget_Contents_Post_Recent', 'pageSize=5')->to($posts); ?>
|
||||
<?php Typecho_Widget::widget('Widget_Contents_Post_Recent', 'pageSize=7')->to($posts); ?>
|
||||
<ul>
|
||||
<?php if($posts->have()): ?>
|
||||
<?php while($posts->next()): ?>
|
||||
<li><a href="<?php $posts->permalink(); ?>" class="title"><?php $posts->title(); ?></a> <?php _e('发布于'); ?>
|
||||
<?php $posts->category(', '); ?> - <span class="date"><?php $posts->dateWord(); ?></span></li>
|
||||
<li>
|
||||
<a href="<?php $posts->permalink(); ?>" class="title"><?php $posts->title(); ?></a>
|
||||
<span>- <?php $posts->dateWord(); ?></span>
|
||||
</li>
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<li><em><?php _e('暂时没有文章'); ?></em></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section">
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3><?php _e('最新得到的回复'); ?></h3>
|
||||
<ul>
|
||||
<?php Typecho_Widget::widget('Widget_Comments_Recent', 'pageSize=5')->to($comments); ?>
|
||||
<?php Typecho_Widget::widget('Widget_Comments_Recent', 'pageSize=7')->to($comments); ?>
|
||||
<?php if($comments->have()): ?>
|
||||
<?php while($comments->next()): ?>
|
||||
<li><?php $comments->author(true); ?> <?php _e('发布于'); ?> <a href="<?php $comments->permalink(); ?>" class="title"><?php $comments->title(); ?></a> - <span class="date"><?php $comments->dateWord(); ?></span></li>
|
||||
<li>
|
||||
<a href="<?php $comments->permalink(); ?>" class="title"><?php $comments->title(); ?></a>
|
||||
<span>- <?php $comments->dateWord(); ?>, <?php $comments->author(true); ?></span>
|
||||
</li>
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<li><em><?php _e('暂时没有回复'); ?></em></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="col-mb-12 col-tb-3 typecho-dashboard-nav prefix">
|
||||
<div class="col-mb-12 col-tb-3 typecho-dashboard-nav">
|
||||
<?php $version = Typecho_Cookie::get('__typecho_check_version'); ?>
|
||||
<?php if ($version && $version['available']): ?>
|
||||
<div class="update-check typecho-radius-topleft typecho-radius-topright typecho-radius-bottomleft typecho-radius-bottomright">
|
||||
@ -109,7 +110,10 @@ $stat = Typecho_Widget::widget('Widget_Stat');
|
||||
<?php $feed = Typecho_Json::decode($feed);
|
||||
foreach ($feed as $item): ?>
|
||||
<?php $item = (array) $item; ?>
|
||||
<li><a href="<?php echo $item['link']; ?>"><?php echo $item['title']; ?></a> - <span class="date"><?php echo $item['date']; ?></span></li>
|
||||
<li>
|
||||
<a href="<?php echo $item['link']; ?>"><?php echo $item['title']; ?></a>
|
||||
<br><span><?php echo $item['date']; ?></span>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 9.0 KiB |
@ -100,7 +100,7 @@ class Widget_Menu extends Typecho_Widget
|
||||
*/
|
||||
public function execute()
|
||||
{
|
||||
$parentNodes = array(NULL, _t('控制台'), _t('创建'), _t('管理'), _t('设置'));
|
||||
$parentNodes = array(NULL, _t('控制台'), _t('撰写'), _t('管理'), _t('设置'));
|
||||
|
||||
$childNodes = array(
|
||||
array(
|
||||
|
Loading…
x
Reference in New Issue
Block a user