Skip to content

Commit

Permalink
可访问性优化
Browse files Browse the repository at this point in the history
  • Loading branch information
changbin1997 committed Sep 28, 2021
1 parent 14fe878 commit 0a5a3be
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions components/comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function threadedComments($comments, $options) {
$comments->gravatar('50', '');
}
if ($comments->type == 'pingback') {
echo '<div class="pingback avatar">引用</div>';
echo '<div class="pingback avatar" role="img" aria-label="引用">引用</div>';
}
?>
<div class="comment-info float-left">
Expand All @@ -53,7 +53,7 @@ function threadedComments($comments, $options) {
</div>
<span class="comment-reply float-right">
<span data-id="<?php $comments->theId(); ?>">
<i class="icon-undo2 mr-1"></i>
<i class="icon-undo2 mr-1" aria-hidden="true"></i>
<?php $comments->reply(); ?>
</span>
</span>
Expand Down
4 changes: 2 additions & 2 deletions components/post-list.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
</h2>
<div class="post-info mt-2">
<span class="ml-1" title="发布日期" data-toggle="tooltip" data-placement="top">
<i class="icon-calendar mr-1"></i>
<i class="icon-calendar mr-1" aria-hidden="true"></i>
<?php $this->date('Y年m月d日'); ?>
</span>
<span class="ml-2" title="作者" data-toggle="tooltip" data-placement="top">
<i class="icon-user mr-1"></i>
<i class="icon-user mr-1" aria-hidden="true"></i>
<a href="<?php $this->author->permalink(); ?>" class="mr-2" title="作者:<?php $this->author(); ?>">
<?php $this->author(); ?>
</a>
Expand Down
2 changes: 1 addition & 1 deletion components/sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
$comments->gravatar('50', '');
}
if ($comments->type == 'pingback') {
echo '<div class="pingback avatar">引用</div>';
echo '<div class="pingback avatar" role="img" aria-label="引用">引用</div>';
}
?>
<div class="media-body">
Expand Down
6 changes: 3 additions & 3 deletions page-data.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@
<?php endif; ?>
<div class="post-info mt-2">
<span class="ml-1" title="发布日期" data-toggle="tooltip" data-placement="top">
<i class="icon-calendar mr-1"></i>
<i class="icon-calendar mr-1" aria-hidden="true"></i>
<?php $this->date('Y年m月d日'); ?>
</span>
<span class="ml-2" title="作者" data-toggle="tooltip" data-placement="top">
<i class="icon-user mr-1"></i>
<i class="icon-user mr-1" aria-hidden="true"></i>
<a href="<?php $this->author->permalink(); ?>" class="mr-2" title="作者:<?php $this->author(); ?>">
<?php $this->author(); ?>
</a>
</span>
<span class="ml-2" title="阅读量" data-toggle="tooltip" data-placement="top">
<?php $views = getPostViews($this); ?>
<i class="icon-eye mr-1"></i>
<i class="icon-eye mr-1" aria-hidden="true"></i>
<?php echo $views; ?>
</span>
</div>
Expand Down
6 changes: 3 additions & 3 deletions page-links.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,18 @@
<?php endif; ?>
<div class="post-info mt-2">
<span class="ml-1" title="发布日期" data-toggle="tooltip" data-placement="top">
<i class="icon-calendar mr-1"></i>
<i class="icon-calendar mr-1" aria-hidden="true"></i>
<?php $this->date('Y年m月d日'); ?>
</span>
<span class="ml-2" title="作者" data-toggle="tooltip" data-placement="top">
<i class="icon-user mr-1"></i>
<i class="icon-user mr-1" aria-hidden="true"></i>
<a href="<?php $this->author->permalink(); ?>" class="mr-2" title="作者:<?php $this->author(); ?>">
<?php $this->author(); ?>
</a>
</span>
<span class="ml-2" title="阅读量" data-toggle="tooltip" data-placement="top">
<?php $views = getPostViews($this); ?>
<i class="icon-eye mr-1"></i>
<i class="icon-eye mr-1" aria-hidden="true"></i>
<?php echo $views; ?>
</span>
</div>
Expand Down
6 changes: 3 additions & 3 deletions page.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@
<?php endif; ?>
<div class="post-info mt-2">
<span class="ml-1" title="发布日期" data-toggle="tooltip" data-placement="top">
<i class="icon-calendar mr-1"></i>
<i class="icon-calendar mr-1" aria-hidden="true"></i>
<?php $this->date('Y年m月d日'); ?>
</span>
<span class="ml-2" title="作者" data-toggle="tooltip" data-placement="top">
<i class="icon-user mr-1"></i>
<i class="icon-user mr-1" aria-hidden="true"></i>
<a href="<?php $this->author->permalink(); ?>" class="mr-2" title="作者:<?php $this->author(); ?>">
<?php $this->author(); ?>
</a>
</span>
<span class="ml-2" title="阅读量" data-toggle="tooltip" data-placement="top">
<?php $views = getPostViews($this); ?>
<i class="icon-eye mr-1"></i>
<i class="icon-eye mr-1" aria-hidden="true"></i>
<?php echo $views; ?>
</span>
</div>
Expand Down
18 changes: 9 additions & 9 deletions post.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,31 +32,31 @@
<?php endif; ?>
<div class="post-info mt-2">
<span class="ml-1" title="发布日期" data-toggle="tooltip" data-placement="top">
<i class="icon-calendar mr-1"></i>
<i class="icon-calendar mr-1" aria-hidden="true"></i>
<?php $this->date('Y年m月d日'); ?>
</span>
<span class="ml-2" title="作者" data-toggle="tooltip" data-placement="top">
<i class="icon-user mr-1"></i>
<i class="icon-user mr-1" aria-hidden="true"></i>
<a href="<?php $this->author->permalink(); ?>" class="mr-2" title="作者:<?php $this->author(); ?>">
<?php $this->author(); ?>
</a>
</span>
<span class="ml-2" title="阅读量" data-toggle="tooltip" data-placement="top">
<?php $views = getPostViews($this); ?>
<i class="icon-eye mr-1"></i>
<i class="icon-eye mr-1" aria-hidden="true"></i>
<?php echo $views; ?>
</span>
</div>
<div class="post-content mt-4">
<?php $this->content(); ?>
</div>
<div class="category-tag clearfix my-4">
<div class="post-category float-left">
<i class="icon-folder-open mr-1"></i>
<div class="post-category float-left" role="group" aria-label="文章分类">
<i class="icon-folder-open mr-1" aria-hidden="true"></i>
<?php $this->category(' '); ?>
</div>
<div class="post-tag float-right" role="group" aria-label="标签">
<i class="icon-price-tag mr-1"></i>
<i class="icon-price-tag mr-1" aria-hidden="true"></i>
<?php $this->tags(' ', true, '暂无标签'); ?>
</div>
</div>
Expand All @@ -80,15 +80,15 @@
<div class="clearfix">
<canvas id="qr" class="float-left"></canvas>
<div class="link-box float-left p-2">
<a href="https://service.weibo.com/share/share.php?url=<?php $this->permalink(); ?>&title=<?php $this->title(); ?>" class="btn btn-primary d-block mb-2" target="_blank">
<a href="https://service.weibo.com/share/share.php?url=<?php $this->permalink(); ?>&title=<?php $this->title(); ?>" class="btn btn-primary d-block mb-2" target="_blank" rel="external nofollow">
<i class="icon-sina-weibo mr-1"></i>
<span>分享到新浪微博</span>
</a>
<a href="https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=<?php $this->permalink(); ?>&title=<?php $this->title(); ?>&site=<?php $this->options->siteUrl(); ?>&summary=<?php $this->fields->summaryContent?$this->fields->summaryContent():$this->excerpt($this->options->summary, '...'); ?>" class="btn btn-info d-block mb-2" target="_blank">
<a href="https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=<?php $this->permalink(); ?>&title=<?php $this->title(); ?>&site=<?php $this->options->siteUrl(); ?>&summary=<?php $this->fields->summaryContent?$this->fields->summaryContent():$this->excerpt($this->options->summary, '...'); ?>" class="btn btn-info d-block mb-2" target="_blank" rel="external nofollow">
<i class="icon-qzone-logo mr-1"></i>
<span>分享到QQ空间</span>
</a>
<a href="https://twitter.com/intent/tweet?url=<?php $this->permalink(); ?>&text=<?php $this->title(); ?>" class="btn btn-info d-block" target="_blank">
<a href="https://twitter.com/intent/tweet?url=<?php $this->permalink(); ?>&text=<?php $this->title(); ?>" class="btn btn-info d-block" target="_blank" rel="external nofollow">
<i class="icon-twitter mr-1"></i>
<span>分享到Twitter</span>
</a>
Expand Down

0 comments on commit 0a5a3be

Please sign in to comment.