[IMP] website_blog: change blog cover title to h1

SEO issue: blog post doesn't have <h1> for post title.

The goal of this commit is to change the main cover title to <h1>.

task-2454130

closes odoo/odoo#66844

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
xO-Tx
2021-11-26 15:10:02 +00:00
committed by qsm-odoo
parent 80fec8b5ff
commit 7a74418b42
2 changed files with 5 additions and 5 deletions
@@ -21,14 +21,14 @@ odoo.define("website_blog.tour", function (require) {
extra_trigger: "form[id=\"editor_new_blog\"]",
content: _t("Select the blog you want to add the post to."),
}, {
trigger: "div[data-oe-expression=\"blog_post.name\"]",
trigger: "h1[data-oe-expression=\"blog_post.name\"]",
extra_trigger: "#oe_snippets.o_loaded",
content: _t("Write a title, the subtitle is optional."),
position: "top",
run: "text",
}, {
trigger: "we-button[data-background]:nth(1)",
extra_trigger: "#wrap div[data-oe-expression=\"blog_post.name\"]:not(:containsExact(\"\"))",
extra_trigger: "#wrap h1[data-oe-expression=\"blog_post.name\"]:not(:containsExact(\"\"))",
content: Markup(_t("Set a blog post <b>cover</b>.")),
position: "right",
}, {
@@ -221,7 +221,7 @@ list of filtered posts (by date or tag).
<div class="container text-center position-relative h-100 d-flex flex-column flex-grow-1 justify-content-around">
<div t-attf-class="o_wblog_post_title #{opt_blog_post_select_to_tweet and 'js_tweet'} #{opt_blog_post_select_to_comment and 'js_comment'}">
<div t-field="blog_post.name" id="o_wblog_post_name" class="o_editable_no_shadow" data-oe-expression="blog_post.name" t-att-data-blog-id="blog_post.id" placeholder="Blog Post Title"/>
<h1 t-field="blog_post.name" id="o_wblog_post_name" class="o_editable_no_shadow" data-oe-expression="blog_post.name" t-att-data-blog-id="blog_post.id" placeholder="Blog Post Title"/>
<div t-field="blog_post.subtitle" id="o_wblog_post_subtitle" class="o_editable_no_shadow" placeholder="Subtitle"/>
</div>
<t t-set="resize_classes" t-value="set(json.loads(_record.cover_properties).get('resize_class', '').split(' '))"/>
@@ -309,7 +309,7 @@ list of filtered posts (by date or tag).
<div t-att-class="not opt_blog_post_breadcrumb and 'pt-4'">
<div t-attf-class="o_wblog_post_title mb-3 #{'js_tweet' if opt_blog_post_select_to_tweet else ''} #{'js_comment' if opt_blog_post_select_to_comment else ''}" t-ignore="False">
<div t-field="blog_post.name" id="o_wblog_post_name" data-oe-expression="blog_post.name" t-att-data-blog-id="blog_post.id" placeholder="Title"/>
<h1 t-field="blog_post.name" id="o_wblog_post_name" data-oe-expression="blog_post.name" t-att-data-blog-id="blog_post.id" placeholder="Title"/>
<div t-field="blog_post.subtitle" id="o_wblog_post_subtitle" placeholder="Subtitle"/>
</div>
<div class="text-muted mb-2">
@@ -429,7 +429,7 @@ list of filtered posts (by date or tag).
<div class="container text-center position-relative h-100 d-flex flex-column flex-grow-1 justify-content-around">
<div t-attf-class="o_wblog_post_title">
<div t-field="next_post.name" id="o_wblog_post_name" t-att-data-blog-id="next_post.id" placeholder="Blog Post Title"/>
<div t-field="next_post.name" id="o_wblog_post_name" t-att-data-blog-id="next_post.id" placeholder="Blog Post Title" class="h1"/>
<div t-field="next_post.subtitle" id="o_wblog_post_subtitle" placeholder="Subtitle"/>
</div>