mirror of
https://github.com/flarum/framework.git
synced 2024-11-22 12:48:28 +08:00
feat(seo): Use h2 header for discussions on discussions list (#3731)
* Use H2 header for discussions on discussions list. * Put `DiscussionListPane` in `aside` tag to indicate that its content should not be treated as part of discussion content. * Update markup for views generated by PHP.
This commit is contained in:
parent
1ee5cf6ba9
commit
37fd218723
|
@ -117,7 +117,7 @@ export default class DiscussionListItem<CustomAttrs extends IDiscussionListItemA
|
|||
<ul className="DiscussionListItem-badges badges">{listItems(discussion.badges().toArray())}</ul>
|
||||
|
||||
<Link href={app.route.discussion(discussion, jumpTo)} className="DiscussionListItem-main">
|
||||
<h3 className="DiscussionListItem-title">{highlight(discussion.title(), this.highlightRegExp)}</h3>
|
||||
<h2 className="DiscussionListItem-title">{highlight(discussion.title(), this.highlightRegExp)}</h2>
|
||||
<ul className="DiscussionListItem-info">{listItems(this.infoItems().toArray())}</ul>
|
||||
</Link>
|
||||
{this.replyCountItem()}
|
||||
|
|
|
@ -22,7 +22,7 @@ export default class DiscussionListPane extends Component {
|
|||
return;
|
||||
}
|
||||
|
||||
return <div className="DiscussionPage-list">{this.enoughSpace() && <DiscussionList state={this.attrs.state} />}</div>;
|
||||
return <aside className="DiscussionPage-list">{this.enoughSpace() && <DiscussionList state={this.attrs.state} />}</aside>;
|
||||
}
|
||||
|
||||
oncreate(vnode) {
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<div class="container">
|
||||
<h2>{{ $apiDocument->data->attributes->title }}</h2>
|
||||
<h1>{{ $apiDocument->data->attributes->title }}</h1>
|
||||
|
||||
<div>
|
||||
@foreach ($posts as $post)
|
||||
<div>
|
||||
<article>
|
||||
@php $user = ! empty($post->relationships->user->data) ? $getResource($post->relationships->user->data) : null; @endphp
|
||||
<h3>{{ $user ? $user->attributes->displayName : $translator->trans('core.lib.username.deleted_text') }}</h3>
|
||||
<div class="Post-body">
|
||||
{!! $post->attributes->contentHtml !!}
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<hr>
|
||||
@endforeach
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@inject('url', 'Flarum\Http\UrlGenerator')
|
||||
|
||||
<div class="container">
|
||||
<h2>{{ $translator->trans('core.views.index.all_discussions_heading') }}</h2>
|
||||
<h1>{{ $translator->trans('core.views.index.all_discussions_heading') }}</h1>
|
||||
|
||||
<ul>
|
||||
@foreach ($apiDocument->data as $discussion)
|
||||
|
|
Loading…
Reference in New Issue
Block a user