diff options
| -rw-r--r-- | 404.php | 4 | ||||
| -rw-r--r-- | about.php | 2 | ||||
| -rw-r--r-- | archive.php | 2 | ||||
| -rw-r--r-- | includes/comments.php | 4 | ||||
| -rw-r--r-- | includes/header.php | 12 | ||||
| -rw-r--r-- | index.php | 4 | ||||
| -rw-r--r-- | page.php | 2 | ||||
| -rw-r--r-- | pagefile.php | 2 | ||||
| -rw-r--r-- | post.php | 4 |
9 files changed, 18 insertions, 18 deletions
@@ -2,11 +2,11 @@ $this->need('includes/head.php'); $this->need('includes/header.php'); ?> - <main class="main-container container"> + <main class="main-container container" role="main"> <div class="post-body"> <div class="post-content"> <h1 class="error-title">404</h1> - <p style="text-align:center"> + <p style="text-align:center" role="alert"> <span>肥肠抱歉,你访问的页面被猫吃掉了</span><br /><br /> <a href="<?php $this->options->SiteUrl(); ?>" class="button error-button no-line">返回首页</a> </p> @@ -7,7 +7,7 @@ $this->need('includes/head.php');
$this->need('includes/header.php');
?>
- <main class="main-container container">
+ <main class="main-container container" role="main">
<div class="post-body">
<br><br><br>
<div class="about">
diff --git a/archive.php b/archive.php index df81393..4287178 100644 --- a/archive.php +++ b/archive.php @@ -2,7 +2,7 @@ $this->need('includes/head.php'); $this->need('includes/header.php'); ?> - <main class="main-container container"> + <main class="main-container container" role="main"> <div class="post-list"> <?php if ($this->have()): ?> <?php else: ?> diff --git a/includes/comments.php b/includes/comments.php index c873a04..1b5ace5 100644 --- a/includes/comments.php +++ b/includes/comments.php @@ -9,7 +9,7 @@ }
$commentLevelClass = $comments->_levels > 0 ? ' comment-child' : ' comment-parent'; //评论层数大于0为子级,否则是父级
?>
-<div id="<?php $comments->theId(); ?>" class="comment-body<?php
+<div role="comment" id="<?php $comments->theId(); ?>" class="comment-body<?php
if ($comments->_levels > 0) {
echo ' comment-child';
$comments->levelsAlt(' comment-level-odd', ' comment-level-even');
@@ -57,7 +57,7 @@ echo $commentClass; <div class="comment-container">
<h3 class="comment-title" id="response"><?php $this->commentsNum(_t('暂无评论'), _t('已有 1 条评论'), _t('已有 %d 条评论')); ?></h3>
<?php $comments->listComments(array(
- 'before' => '<div class="comment-list">',
+ 'before' => '<div class="comment-list" role="list">',
'after' => '</div>',
'avatarSize' => 200,
'dateFormat' => 'Y-m-d H:i'
diff --git a/includes/header.php b/includes/header.php index 2d2e9ba..6b910a1 100644 --- a/includes/header.php +++ b/includes/header.php @@ -37,7 +37,7 @@ <div class="mobile-menu ready"> <button class="mobile-menu-close ready" id="toggle-mobile-menu-close"><i class="iconfont icon-x"></i></button> <h2 class="mobile-menu-title">页面导航</h2> - <div class="mobile-menu-pagelist"><div class="container-fluid"><div class="row"> + <div class="mobile-menu-pagelist" role="navigation"><div class="container-fluid"><div class="row"> <?php if($this->options->customNav=='') { $this->widget('Widget_Contents_Page_List') @@ -54,7 +54,7 @@ <!-- -小屏幕导航 --> <nav class="small-screen nav nav-mobile nav-fixed"<?php if($this->options->navStyle==1): ?> style="display:none!important"<?php endif; ?> id="navBarMobile"> - <div class="nav-mobile-content"> + <div class="nav-mobile-content" role="navigation"> <a href="<?php $this->options->SiteUrl(); ?>" style="float:left"><i class="iconfont icon-xuanzhongshangcheng"></i></a> <a id="search-open-mobile" style="float:left"><i class="iconfont icon-chaxun"></i></a> <a id="login-open-mobile" style="float:left"><i class="iconfont icon-user"></i></a> @@ -69,7 +69,7 @@ <!-- -大屏幕导航 --> <nav class="large-screen nav nav-fixed" id="navBar"> <div class="container"> - <p class="nav-content"> + <p class="nav-content" role="navigation"> <a href="<?php $this->options->SiteUrl(); ?>" class="nav-title"><?php $this->options->title(); ?></a> <span class="nav-content-item"> <?php @@ -124,11 +124,11 @@ <header> <!-- Banner --> <?php if($this->is('post') || $this->is('page')): ?> - <div class="index-banner" style="background-position:center;<?php if($this->fields->banner && $this->fields->banner=!''): ?>background:url('<?php $this->fields->banner(); ?>') no-repeat;<?php else: ?>background-color:#f1f1f1;<?php endif; ?>height:<?php $this->options->bannerHeight(); ?>vh;background-size:cover;"> + <div role="banner" class="index-banner" style="background-position:center;<?php if($this->fields->banner && $this->fields->banner=!''): ?>background:url('<?php $this->fields->banner(); ?>') no-repeat;<?php else: ?>background-color:#f1f1f1;<?php endif; ?>height:<?php $this->options->bannerHeight(); ?>vh;background-size:cover;"> <?php elseif($this->is('archive')): ?> - <div class="index-banner" style="height:<?php $this->options->bannerHeight(); ?>vh;background-position:center;<?php if($this->options->bannerUrl!=''): echo $this->options->bannerUrl(); endif; ?>"> + <div role="banner" class="index-banner" style="height:<?php $this->options->bannerHeight(); ?>vh;background-position:center;<?php if($this->options->bannerUrl!=''): echo $this->options->bannerUrl(); endif; ?>"> <?php else: ?> - <div class="index-banner" style="background-position:center;background:url('<?php $this->options->bannerUrl(); ?>') no-repeat;height:<?php $this->options->bannerHeight(); ?>vh;background-size:cover;"> + <div role="banner" class="index-banner" style="background-position:center;background:url('<?php $this->options->bannerUrl(); ?>') no-repeat;height:<?php $this->options->bannerHeight(); ?>vh;background-size:cover;"> <?php endif; ?> <!-- 遮罩 --> <div class="banner-mask"<?php if($this->is('post') || $this->is('page')):?><?php if($this->fields->banner==''):?> style="background:rgba(0,0,0,0)!important"<?php endif;?><?php endif; ?><?php if($this->is('index')):?><?php if($this->options->bannerUrl && $this->options->bannerUrl=!''): ?><?php else:?> style="background:rgba(0,0,0,0)!important"<?php endif;?><?php endif;?>> @@ -12,12 +12,12 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; $this->need('includes/head.php'); $this->need('includes/header.php'); ?> - <main class="main-container container"> + <main class="main-container container" role="main"> <div class="post-list"><!-- 文章循环开始 --> <?php while($this->next()): ?> <br /> <!-- 文章卡片 --> - <div class="post-item "> + <div class="post-item" role="article"> <div class="container-fluid"><div class="row"> <div class="col-md-6 post-banner-box"> <a href="<?php $this->permalink(); ?>" class="post-link"> @@ -2,7 +2,7 @@ $this->need('includes/head.php'); $this->need('includes/header.php'); ?> - <main class="main-container container"> + <main class="main-container container" role="main"> <div class="post-body"><!-- 页面内容 --> <div class="post-content page-content"> <?php $this->content(); ?> diff --git a/pagefile.php b/pagefile.php index 8828ab0..7a9065f 100644 --- a/pagefile.php +++ b/pagefile.php @@ -8,7 +8,7 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; $this->need('includes/head.php');
$this->need('includes/header.php');
?>
- <main class="main-container container">
+ <main class="main-container container" role="main">
<div class="post-body">
<div class="post-content page-content">
<h2>文章标签</h2>
@@ -2,9 +2,9 @@ $this->need('includes/head.php'); $this->need('includes/header.php'); ?> - <main class="main-container container"> + <main class="main-container container" role="main"> <div class="post-body"> - <div class="post-content" id="post-content"><!-- 文章内容 --> + <div class="post-content" role="article" id="post-content"><!-- 文章内容 --> <?php $postCheck = Utils::isOutdated($this); if($postCheck["is"] && $this->is('post')): ?> <div class="tip red" id="out-date-alert"> <div class="container-fluid"><div class="row"> |
