Skip to content

Commit 64b30b2

Browse files
authored
Merge pull request #16437 from canonical/WD-36854-dev-update-u-com-blog-topics
WD-36854 - rebrand /blog/topics/<topic> pages
2 parents 23d4607 + 5c04d45 commit 64b30b2

10 files changed

Lines changed: 2577 additions & 11158 deletions

File tree

‎templates/blog/author.html‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
{% with %}
5858
{% set total_pages = total_pages %}
5959
{% set current_page = current_page %}
60-
{% set hide_horizontal_rule = true %}
6160
{% include "shared/_pagination.html" %}
6261
{% endwith %}
6362
</section>

‎templates/blog/tag.html‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ <h5 class="p-notification__title">Stay secure and supported with Ubuntu Pro.</h5
4646
{% with %}
4747
{% set total_pages = total_pages %}
4848
{% set current_page = current_page %}
49-
{% set hide_horizontal_rule = true %}
5049
{% include "shared/_pagination.html" %}
5150
{% endwith %}
5251
</section>
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{% extends "templates/one-column.html" %}
2+
3+
{% from "_macros/vf_hero.jinja" import vf_hero %}
4+
5+
{% block body_class %}is-paper{% endblock %}
6+
7+
{% block title %}{% block topic_page_title %}{% endblock %}{% endblock %}
8+
9+
{% block meta_description %}{% block topic_meta_description %}{% endblock %}{% endblock %}
10+
11+
{% block head_extra %}<meta name="robots" content="noindex" />{% endblock %}
12+
13+
{% block content %}
14+
{% call(slot) vf_hero(
15+
title_text=self.hero_title_text()|trim,
16+
subtitle_text=self.hero_subtitle_text()|trim,
17+
layout='25/75',
18+
display_blank_signpost_image_space=True,
19+
blocks=[
20+
{
21+
"type": "description",
22+
"padding": "shallow",
23+
"item": {
24+
"type": "text",
25+
"content": self.hero_description_text()|trim
26+
}
27+
},
28+
{
29+
"type": "cta-block",
30+
"item": {
31+
"link": {
32+
"content_html": self.hero_cta_text()|trim,
33+
"attrs": {
34+
"href": self.hero_cta_href()|trim
35+
}
36+
}
37+
}
38+
},
39+
]
40+
) -%}
41+
{%- endcall -%}
42+
43+
<section class="p-strip is-shallow">
44+
<div class="grid-row">
45+
{% for article in articles%}
46+
{% include "blog/blog-card.html" %}
47+
{% endfor %}
48+
</div>
49+
</section>
50+
51+
<section class="p-section--deep">
52+
{% with %}
53+
{% set total_pages = total_pages %}
54+
{% set current_page = current_page %}
55+
{% include "shared/_pagination.html" %}
56+
{% endwith %}
57+
</section>
58+
{% endblock %}
59+
60+
{% block hero_subtitle_text %}{% endblock %}

‎templates/blog/topics/design.html‎

Lines changed: 11 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,17 @@
1-
{% extends "templates/one-column.html" %}
1+
{% extends "blog/topics/_topic-page.html" %}
22

3-
{% block title %}Design{% endblock %}
3+
{% block topic_page_title %}Design{% endblock %}
44

5-
{% block meta_description %}All the latest news on the design and web team at Canonical.{% endblock %}
5+
{% block topic_meta_description %}All the latest news on the design and web team at Canonical.{% endblock %}
66

7-
{% block content %}
7+
{% block hero_title_text %}Web engineering and design team{% endblock %}
88

9-
<section class="p-strip--suru is-dark">
10-
<div class="row">
11-
<div class="col-10">
12-
<h1>Web engineering and design team</h1>
13-
<p class="p-heading--4">Discover the latest news and work from the web and design team</p>
14-
<p>
15-
The Web and design team at Canonical pride themselves on building things properly, not quickly. Always looking for creative ways to push the bounderies of the web.
16-
</p>
17-
<p class="u-no-margin--bottom">
18-
<a class="p-link--inverted" href="https://webteam.canonical.com/">Learn more from the web and design team portal&nbsp;&rsaquo;</a>
19-
</p>
20-
</div>
21-
</div>
22-
</section>
9+
{% block hero_subtitle_text %}Discover the latest news and work from the web and design team{% endblock %}
2310

24-
<section class="p-strip is-shallow">
25-
{% include 'blog/posts.html' %}
26-
</section>
27-
28-
<section class="p-strip is-shallow">
29-
{% with %}
30-
{% set total_pages = total_pages %}
31-
{% set current_page = current_page %}
32-
{% include "shared/_pagination.html" %}
33-
{% endwith %}
34-
</section>
11+
{% block hero_description_text %}
12+
The Web and design team at Canonical pride themselves on building things properly, not quickly. Always looking for creative ways to push the boundaries of the web.
3513
{% endblock %}
14+
15+
{% block hero_cta_text %}Learn more from the web and design team portal ›{% endblock %}
16+
17+
{% block hero_cta_href %}https://webteam.canonical.com/{% endblock %}

‎templates/blog/topics/juju.html‎

Lines changed: 9 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,17 @@
1-
{% extends "templates/one-column.html" %}
1+
{% extends "blog/topics/_topic-page.html" %}
22

3-
{% block title %}Juju and JAAS{% endblock %}
3+
{% block topic_page_title %}Juju and JAAS{% endblock %}
44

5-
{% block meta_description %}
5+
{% block topic_meta_description %}
66
Operate big software at scale on any cloud. All the latest news on Juju – the open source application modelling tool for public and private clouds.
77
{% endblock %}
88

9-
{% block content %}
9+
{% block hero_title_text %}Juju{% endblock %}
1010

11-
<section class="p-strip--suru-blog-header is-dark">
12-
<div class="u-fixed-width">
13-
<p>
14-
{{ image(url="https://assets.ubuntu.com/v1/67057b2c-product-page-juju-logo.svg",
15-
alt="",
16-
height="50",
17-
width="140",
18-
hi_def=True,
19-
loading="auto",
20-
attrs={"class": "p-blog-heading__icon", "style": "height: 50px;"}) | safe
21-
}}
22-
</p>
23-
<h2 class="p-heading--4">
24-
All the latest news on Juju &ndash; the open source application
25-
<br class="u-hide u-show--large" />
26-
modelling tool for public and private clouds.
27-
</h2>
28-
<p>
29-
<a class="p-link--inverted" href="https://canonical.com/jaas">Learn more about Juju</a>
30-
</p>
31-
</div>
32-
</section>
11+
{% block hero_description_text %}
12+
All the latest news on Juju – the open source application modelling tool for public and private clouds.
13+
{% endblock %}
3314

34-
<section class="p-strip is-shallow">
35-
{% include 'blog/posts.html' %}
36-
</section>
15+
{% block hero_cta_text %}Learn more about Juju ›{% endblock %}
3716

38-
<section class="p-strip is-shallow">
39-
{% with %}
40-
{% set total_pages = total_pages %}
41-
{% set current_page = current_page %}
42-
{% include "shared/_pagination.html" %}
43-
{% endwith %}
44-
</section>
45-
{% endblock %}
17+
{% block hero_cta_href %}https://canonical.com/jaas{% endblock %}

‎templates/blog/topics/maas.html‎

Lines changed: 9 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,17 @@
1-
{% extends "templates/one-column.html" %}
1+
{% extends "blog/topics/_topic-page.html" %}
22

3-
{% block title %}MAAS{% endblock %}
3+
{% block topic_page_title %}MAAS{% endblock %}
44

5-
{% block meta_description %}
5+
{% block topic_meta_description %}
66
All the latest news on MAAS (Metal as a Service) - the smartest way to manage bare metal.
77
{% endblock %}
88

9-
{% block content %}
9+
{% block hero_title_text %}MAAS{% endblock %}
1010

11-
<section class="p-strip--suru-blog-header is-dark">
12-
<div class="u-fixed-width">
13-
<h1>
14-
{{ image(url="https://assets.ubuntu.com/v1/4fac1d52-MAAS-Logo.svg",
15-
alt="MAAS",
16-
height="50",
17-
width="200",
18-
hi_def=True,
19-
loading="auto") | safe
20-
}}
21-
</h1>
22-
<h2 class="p-heading--4">
23-
All the latest news on MAAS
24-
<br />
25-
&ndash; the smartest way to manage bare metal.
26-
</h2>
27-
<p>
28-
<a class="p-link--inverted" href="https://maas.io">Learn more about MAAS</a>
29-
</p>
30-
</div>
31-
</section>
11+
{% block hero_description_text %}
12+
All the latest news on MAAS – the smartest way to manage bare metal.
13+
{% endblock %}
3214

33-
<section class="p-strip is-shallow" id="posts-list">
34-
{% include 'blog/posts.html' %}
35-
</section>
15+
{% block hero_cta_text %}Learn more about MAAS ›{% endblock %}
3616

37-
<section class="p-strip is-shallow">
38-
{% with %}
39-
{% set total_pages = total_pages %}
40-
{% set current_page = current_page %}
41-
{% include "shared/_pagination.html" %}
42-
{% endwith %}
43-
</section>
44-
{% endblock %}
17+
{% block hero_cta_href %}https://canonical.com/maas{% endblock %}
Lines changed: 9 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,15 @@
1-
{% extends "templates/one-column.html" %}
1+
{% extends "blog/topics/_topic-page.html" %}
22

3-
{% block title %}Robotics{% endblock %}
3+
{% block topic_page_title %}Robotics{% endblock %}
44

5-
{% block meta_description %}All the latest news on robotics from Canonical.{% endblock %}
5+
{% block topic_meta_description %}All the latest news on robotics from Canonical.{% endblock %}
66

7-
{% block content %}
7+
{% block hero_title_text %}Robotics{% endblock %}
88

9-
<section class="p-strip--suru-blog-header is-dark">
10-
<div class="row u-equal-height">
11-
<div class="col-7">
12-
<h1>Robotics</h1>
13-
14-
<p class="p-heading--4">
15-
Whether you're starting in the lab or already in production, Canonical can help manage the complexity of the open-source software underpinning your robot's brains and personality.
16-
</p>
17-
18-
<p>
19-
<a class="p-link--inverted" href="/internet-of-things/robotics">Learn more about robotics from Canonical&nbsp;&rsaquo;</a>
20-
</p>
21-
</div>
22-
23-
<div class="col-5 u-align--center u-vertically-center">
24-
{{ image(url="https://assets.ubuntu.com/v1/5ee71af0-Robot+arm+-+white.svg",
25-
alt="",
26-
height="201",
27-
width="200",
28-
hi_def=True,
29-
loading="auto",
30-
attrs={"class": "u-hide--small"}) | safe
31-
}}
32-
</div>
33-
</div>
34-
</section>
35-
36-
<section class="p-strip is-shallow">
37-
{% include 'blog/posts.html' %}
38-
</section>
9+
{% block hero_description_text %}
10+
Whether you’re starting in the lab or already in production, Canonical can help manage the complexity of the open-source software underpinning your robot’s brains and personality.
11+
{% endblock %}
3912

40-
<section class="p-strip is-shallow">
41-
{% with %}
42-
{% set total_pages = total_pages %}
43-
{% set current_page = current_page %}
44-
{% include "shared/_pagination.html" %}
45-
{% endwith %}
46-
</section>
13+
{% block hero_cta_text %}Learn more about robotics from Canonical ›{% endblock %}
4714

48-
{% endblock %}
15+
{% block hero_cta_href %}https://ubuntu.com/robotics{% endblock %}
Lines changed: 9 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,17 @@
1-
{% extends "templates/one-column.html" %}
1+
{% extends "blog/topics/_topic-page.html" %}
22

3-
{% block title %}Snapcraft and Snaps{% endblock %}
3+
{% block topic_page_title %}Snapcraft and Snaps{% endblock %}
44

5-
{% block meta_description %}
5+
{% block topic_meta_description %}
66
Package any app for any Linux and deliver updates directly. All the latest from the Snappy team &mdash; articles on application architecture, prototyping, packaging paradigms and more.
77
{% endblock %}
88

9-
{% block content %}
9+
{% block hero_title_text %}Snapcraft{% endblock %}
1010

11-
<section class="p-strip--suru-blog-header is-dark">
12-
<div class="u-fixed-width">
13-
<p>
14-
{{ image(url="https://assets.ubuntu.com/v1/b46c8d7d-snapcraft-logo-hor-white.svg",
15-
alt="Snapcraft",
16-
height="62",
17-
width="272",
18-
hi_def=True,
19-
loading="auto",
20-
attrs={"class": "p-blog-heading__icon", "style": "height: 62px;"}) | safe
21-
}}
22-
</p>
23-
<h2 class="p-heading--4">
24-
All the latest from the Snappy team &ndash; articles on application
25-
<br class="u-hide u-show--large" />
26-
architecture, prototyping, packaging paradigms and more.
27-
</h2>
28-
<p>
29-
<a class="p-link--inverted" href="https://snapcraft.io">Learn more about Snapcraft</a>
30-
</p>
31-
</div>
32-
</section>
11+
{% block hero_description_text %}
12+
All the latest from the Snappy team – articles on application architecture, prototyping, packaging paradigms and more.
13+
{% endblock %}
3314

34-
<section class="p-strip is-shallow" id="posts-list">
35-
{% include 'blog/posts.html' %}
36-
</section>
15+
{% block hero_cta_text %}Learn more about Snapcraft ›{% endblock %}
3716

38-
<section class="p-strip is-shallow">
39-
{% with %}
40-
{% set total_pages = total_pages %}
41-
{% set current_page = current_page %}
42-
{% include "shared/_pagination.html" %}
43-
{% endwith %}
44-
</section>
45-
{% endblock %}
17+
{% block hero_cta_href %}https://snapcraft.io/{% endblock %}

‎templates/shared/_pagination.html‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<div class="u-fixed-width">
2-
{% if not hide_horizontal_rule %}<hr class="p-rule--muted" />{% endif %}
32
{% if current_page and total_pages and total_pages > 1 %}
43
<ol class="p-pagination {% if align %} {{ align }} {% else %} u-align--center {% endif %}" style="flex-wrap: wrap;">
54
<li class="p-pagination__item">

0 commit comments

Comments
 (0)