From b6c25bf36186ce2b48d872c99a4c29142613c6a4 Mon Sep 17 00:00:00 2001 From: Andrej Velichkovski Date: Wed, 2 Oct 2024 12:33:33 +0200 Subject: [PATCH 1/4] Rebrand search result pages --- templates/certified/desktops.html | 78 ++--- templates/certified/devices.html | 77 +++-- templates/certified/laptops.html | 77 ++--- templates/certified/search-results.html | 280 ++---------------- .../{shared => search}/_category-filters.html | 0 templates/certified/search/_no-results.html | 7 + .../certified/search/_query-search-box.html | 12 + .../search/_result-count-selector.html | 20 ++ .../search/_search-results-main-block.html | 65 ++++ .../search/_search-results-side-filters.html | 111 +++++++ .../search/_search-results-table.html | 32 ++ templates/certified/servers.html | 79 +++-- .../certified/shared/category-image.html | 55 ++++ .../shared/category-search-results.html | 259 ---------------- templates/certified/socs.html | 78 +++-- templates/certified/vendors/vendor.html | 67 +++-- 16 files changed, 564 insertions(+), 733 deletions(-) rename templates/certified/{shared => search}/_category-filters.html (100%) create mode 100644 templates/certified/search/_no-results.html create mode 100644 templates/certified/search/_query-search-box.html create mode 100644 templates/certified/search/_result-count-selector.html create mode 100644 templates/certified/search/_search-results-main-block.html create mode 100644 templates/certified/search/_search-results-side-filters.html create mode 100644 templates/certified/search/_search-results-table.html create mode 100644 templates/certified/shared/category-image.html delete mode 100644 templates/certified/shared/category-search-results.html diff --git a/templates/certified/desktops.html b/templates/certified/desktops.html index ef93f8f577f..1290c2beabc 100644 --- a/templates/certified/desktops.html +++ b/templates/certified/desktops.html @@ -4,45 +4,47 @@ {% block meta_description %}Ubuntu certifies thousands of desktops to guarantee they work well with Ubuntu.{% endblock meta_description %} {% block meta_copydoc %}https://docs.google.com/document/d/1OWoADcvZ-KQX-BzsCS--pvs9_pY3E-Lb8Ba6a-T-AZ8/edit{% endblock %} +{% block body_class %}is-paper{% endblock body_class %} {% block outer_content %} -
- -
-
-
-

Ubuntu certified desktops

-

Many of the world's biggest PC manufacturers certify their desktops for Ubuntu.

+
+
+
+
+ {% with category="Desktop"%} + {% include "certified/shared/category-image.html" %} + {% endwith %} +
+
+
+

+ Ubuntu certified desktops +

+
+
+

+ Many of the world's biggest PC manufacturers certify their desktops for Ubuntu. +

+ {% with query=query, placeholder="Search in certified desktops" %} + {% include "/certified/search/_query-search-box.html" %} + {% endwith %} +
+
-
- {{ image ( - url="https://assets.ubuntu.com/v1/21efb2ec-desktop.svg", - alt="", - width="126", - height="82", - hi_def=True, - loading="auto" - ) | safe - }} -
-
-
- -{% with - title="All certified desktops", - query=query, - placeholder="Search in certified desktops", - total_results=total_results, - total_pages=total_pages, - offset=offset, - limit=limit, - vendor_filters=vendor_filters, - release_filters=release_filters, - results=results -%} - {% include "certified/shared/category-search-results.html" %} -{% endwith %} + +
+ {% with + title="All certified desktops", + total_results=total_results, + total_pages=total_pages, + offset=offset, + limit=limit, + vendor_filters=vendor_filters, + release_filters=release_filters, + results=results + %} + {% include "/certified/search/_search-results-main-block.html" %} + {% endwith %} + -{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/templates/certified/devices.html b/templates/certified/devices.html index 9bc05d4a3bb..6410ac1c6f6 100644 --- a/templates/certified/devices.html +++ b/templates/certified/devices.html @@ -4,45 +4,44 @@ {% block meta_description %}Devices that have been certified for use with Ubuntu.{% endblock %} {% block meta_copydoc %}https://docs.google.com/document/d/1HdOYjjt175MPJz86abLx5XGPaERccQuK8HlyUnVEEIQ/edit{% endblock %} +{% block body_class %}is-paper{% endblock body_class %} {% block outer_content %} - -
- -
-
-
-

Ubuntu certified IoT devices

-

IoT vendors rely on Ubuntu for their devices, from drones and robots to edge gateways and development boards. Ubuntu Core delivers bullet-proof security, reliable updates and access to a rich ecosystem on 32 and 64-bit ARM and X86 platforms.

-
-
- {{ image ( - url="https://assets.ubuntu.com/v1/f9f8ace9-gateway.svg", - alt="", - width="126", - height="150", - hi_def=True, - loading="auto" - ) | safe - }} +
+
+
+
+ {% with category="Ubuntu Core"%} + {% include "certified/shared/category-image.html" %} + {% endwith %} +
+
+
+

+ Ubuntu certified IoT devices +

+
+
+

IoT vendors rely on Ubuntu for their devices, from drones and robots to edge gateways and development boards. Ubuntu Core delivers bullet-proof security, reliable updates and access to a rich ecosystem on 32 and 64-bit ARM and X86 platforms.

+ {% with query=query, placeholder="Search in certified devices" %} + {% include "/certified/search/_query-search-box.html" %} + {% endwith %} +
+
-
-
- -{% with - title="All certified devices", - query=query, - placeholder="Search in certified devices", - total_results=total_results, - total_pages=total_pages, - offset=offset, - limit=limit, - vendor_filters=vendor_filters, - release_filters=release_filters, - results=results -%} - {% include "certified/shared/category-search-results.html" %} -{% endwith %} + +
+ {% with + title="All certified devices", + total_results=total_results, + total_pages=total_pages, + offset=offset, + limit=limit, + vendor_filters=vendor_filters, + release_filters=release_filters, + results=results + %} + {% include "/certified/search/_search-results-main-block.html" %} + {% endwith %} + -{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/templates/certified/laptops.html b/templates/certified/laptops.html index e5262ef00c7..343b09512a8 100644 --- a/templates/certified/laptops.html +++ b/templates/certified/laptops.html @@ -4,45 +4,48 @@ {% block meta_description %}Laptops that have been certified for use with Ubuntu.{% endblock meta_description %} {% block meta_copydoc %}https://docs.google.com/document/d/19pONXVlPLIMVdl9Sy5grJchc-tIQzVnwCen_gC32GQE/edit{% endblock %} +{% block body_class %}is-paper{% endblock body_class %} {% block outer_content %} -
- -
-
-
-

Ubuntu certified laptops

-

Many of the world's biggest PC manufacturers certify their laptops for Ubuntu.

+
+
+
+
+ {% with category="Laptop"%} + {% include "certified/shared/category-image.html" %} + {% endwith %} +
+
+
+

+ Ubuntu certified laptops +

+
+
+

+ Many of the world's biggest PC manufacturers certify their laptops for Ubuntu. +

+ {% with query=query, placeholder="Search in certified laptops" %} + {% include "/certified/search/_query-search-box.html" %} + {% endwith %} +
+
-
- {{ image ( - url="https://assets.ubuntu.com/v1/4b732966-Laptop.svg", - alt="", - width="126", - height="82", - hi_def=True, - loading="auto" - ) | safe - }} -
-
-
+ -{% with - title="All certified laptops", - query=query, - placeholder="Search in certified laptops", - total_results=total_results, - total_pages=total_pages, - offset=offset, - limit=limit, - vendor_filters=vendor_filters, - release_filters=release_filters, - results=results -%} - {% include "certified/shared/category-search-results.html" %} -{% endwith %} +
-{% endblock %} + {% with + title="All certified laptops", + total_results=total_results, + total_pages=total_pages, + offset=offset, + limit=limit, + vendor_filters=vendor_filters, + release_filters=release_filters, + results=results + %} + {% include "certified/search/_search-results-main-block.html" %} + {% endwith %} + +{% endblock %} \ No newline at end of file diff --git a/templates/certified/search-results.html b/templates/certified/search-results.html index 834788176e6..d94714f316c 100644 --- a/templates/certified/search-results.html +++ b/templates/certified/search-results.html @@ -6,263 +6,39 @@ Hardware that have been certified for use with Ubuntu. {% endblock meta_description %} +{% block body_class %}is-paper{% endblock body_class %} {% block outer_content %} - -
-
- -
-
-

Search Ubuntu certified hardware

+ +
+
+
-
- -
-
-
-

Filter

-
-
-

- {% if total_results %} - {% if total_results and total_results > 1 %} - {{ offset + 1 }} - – - {% if offset + limit > total_results %} - {{ total_results }} - {% else %} - {{ offset + limit }} - {% endif %} - of - {% endif %} - {{ total_results }} result{% if total_results != 1 %}s{% endif %} - {% endif %} -

+
+
+

+ Search Ubuntu Certified Hardware +

-
- {% if total_results > 0 %} -

Results per page

- - {% endif %} +
+ {% with query=query, placeholder=placeholder %} + {% include "/certified/search/_query-search-box.html" %} + {% endwith %}
-
-
- Toggle filters -
- -
- {% if total_results > 0 %} -
- - - - - - - - - - {% for result in results %} - - - - - - {% endfor %} - -
VendorModelCategory
- {{ result.make }} - - {{ result.model }} - {{ result.category }}
-
-
- {% with total_results=total_results, total_pages=total_pages, offset=offset, limit=limit, align="u-align--left" %} - {% if offset >= total_results %} - {% set current_page = 1 %} - {% else %} - {% set current_page = ((offset / limit) + 1) | int %} - {% endif %} - {% if total_results > limit %} - {% include "shared/_pagination.html" %} - {% endif %} - {% endwith %} -
-
- {% if total_results > 0 %} -

Results per page

- - {% endif %} -
-
-
- {% else %} -
-

No results - why not try widening your search?

-

You can do this by:

-
    -
  • Adding alternative words or phrases
  • -
  • Using individual words instead of phrases
  • -
  • Trying a different spelling
  • -
-
- {% endif %}
- +
- -{% endblock %} + {% with + total_results=total_results, + total_pages=total_pages, + offset=offset, + limit=limit, + vendor_filters=vendor_filters, + release_filters=release_filters, + results=results + %} + {% include "certified/search/_search-results-main-block.html" %} + {% endwith %} + +{% endblock %} \ No newline at end of file diff --git a/templates/certified/shared/_category-filters.html b/templates/certified/search/_category-filters.html similarity index 100% rename from templates/certified/shared/_category-filters.html rename to templates/certified/search/_category-filters.html diff --git a/templates/certified/search/_no-results.html b/templates/certified/search/_no-results.html new file mode 100644 index 00000000000..fb570b7f3a9 --- /dev/null +++ b/templates/certified/search/_no-results.html @@ -0,0 +1,7 @@ +

Sorry we found no results matching your criteria. Please try and wide your search.

+

You can do this by:

+
    +
  • Adding alternative words or phrases
  • +
  • Using individual words instead of phrases
  • +
  • Trying a different spelling
  • +
\ No newline at end of file diff --git a/templates/certified/search/_query-search-box.html b/templates/certified/search/_query-search-box.html new file mode 100644 index 00000000000..9590af7a913 --- /dev/null +++ b/templates/certified/search/_query-search-box.html @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/templates/certified/search/_result-count-selector.html b/templates/certified/search/_result-count-selector.html new file mode 100644 index 00000000000..74f78caba7b --- /dev/null +++ b/templates/certified/search/_result-count-selector.html @@ -0,0 +1,20 @@ +{% if total_results > 0 %} +

Results per page

+ +{% endif %} \ No newline at end of file diff --git a/templates/certified/search/_search-results-main-block.html b/templates/certified/search/_search-results-main-block.html new file mode 100644 index 00000000000..57a9fa6eae7 --- /dev/null +++ b/templates/certified/search/_search-results-main-block.html @@ -0,0 +1,65 @@ +
+
+ {% include "/certified/search/_search-results-side-filters.html" %} +
+
+ {% if total_results > 0 %} +
+
+

+ + {% if total_results %} + {% if total_results and total_results > 1 %} + {{ offset + 1 }} + – + {% if offset + limit > total_results %} + {{ total_results }} + {% else %} + {{ offset + limit }} + {% endif %} + of + {% endif %} + {{ total_results }} result{% if total_results != 1 %}s{% endif %} + {% endif %} + +

+
+
+ {% with total_results=total_results, limit=limit, page_position="top" %} + {% include "certified/search/_result-count-selector.html" %} + {% endwith %} +
+
+ {% with + results=results, + vendor_page=vendor_page + %} + {% include "/certified/search/_search-results-table.html" %} + {% endwith %} +
+
+ {% with total_results=total_results, total_pages=total_pages, offset=offset, limit=limit, align="u-align--left" %} + {% if offset >= total_results %} + {% set current_page = 1 %} + {% else %} + {% set current_page = ((offset / limit) + 1) | int %} + {% endif %} + {% if total_results > limit %} + {% include "shared/_pagination.html" %} + {% endif %} + {% endwith %} +
+
+ {% with total_results=total_results, limit=limit, page_position="bottom" %} + {% include "certified/search/_result-count-selector.html" %} + {% endwith %} +
+
+ {% else %} + {% include "/certified/search/_no-results.html" %} + {% endif %} +
+
+ + diff --git a/templates/certified/search/_search-results-side-filters.html b/templates/certified/search/_search-results-side-filters.html new file mode 100644 index 00000000000..c34c3e2ba22 --- /dev/null +++ b/templates/certified/search/_search-results-side-filters.html @@ -0,0 +1,111 @@ +

Filters

+Toggle filters +
+ + + \ No newline at end of file diff --git a/templates/certified/search/_search-results-table.html b/templates/certified/search/_search-results-table.html new file mode 100644 index 00000000000..26e74670b76 --- /dev/null +++ b/templates/certified/search/_search-results-table.html @@ -0,0 +1,32 @@ + + + + + + + + + + {% for result in results %} + + + + + + {% endfor %} + +
+ Vendor + + Model + + Category +
+ {% if not vendor_page %} + {{ result.make }} + {% else %} + {{ result.make }} + {% endif %} + + {{ result.model }} + {{ result.category }}
\ No newline at end of file diff --git a/templates/certified/servers.html b/templates/certified/servers.html index 9c616da1eb4..055e55482c5 100644 --- a/templates/certified/servers.html +++ b/templates/certified/servers.html @@ -4,46 +4,45 @@ {% block meta_description %}Servers that have been certified for use with Ubuntu.{% endblock meta_description %} {% block meta_copydoc %}https://docs.google.com/document/d/1TN2UKhUSB6-kXbLyDM4al2ufB4cgx-W6BsIUOBLP8vU/edit{% endblock meta_copydoc %} +{% block body_class %}is-paper{% endblock body_class %} {% block outer_content %} - -
- -
-
-
-

Ubuntu certified servers

-

Using Ubuntu Server speeds up the ability to deploy physical infrastructure on bare metal as it is in the cloud.

-

Deploying on certified servers saves you time in choosing and testing what hardware you will use from a single server instance to the largest scale-out data-center environments.

-
-
- {{ image ( - url="https://assets.ubuntu.com/v1/fdf83d49-Server.svg", - alt="", - width="136", - height="153", - hi_def=True, - loading="auto" - ) | safe - }} +
+
+
+
+ {% with category="Server"%} + {% include "certified/shared/category-image.html" %} + {% endwith %} +
+
+
+

+ Ubuntu certified servers +

+
+
+

Using Ubuntu Server speeds up the ability to deploy physical infrastructure on bare metal as it is in the cloud.

+

Deploying on certified servers saves you time in choosing and testing what hardware you will use from a single server instance to the largest scale-out data-center environments.

+ {% with query=query, placeholder="Search in certified servers" %} + {% include "/certified/search/_query-search-box.html" %} + {% endwith %} +
+
-
-
- -{% with - title="All certified servers", - query=query, - placeholder="Search in certified servers", - total_results=total_results, - total_pages=total_pages, - offset=offset, - limit=limit, - vendor_filters=vendor_filters, - release_filters=release_filters, - results=results -%} - {% include "certified/shared/category-search-results.html" %} -{% endwith %} +
+
+ {% with + title="All certified servers", + total_results=total_results, + total_pages=total_pages, + offset=offset, + limit=limit, + vendor_filters=vendor_filters, + release_filters=release_filters, + results=results + %} + {% include "certified/search/_search-results-main-block.html" %} + {% endwith %} + -{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/templates/certified/shared/category-image.html b/templates/certified/shared/category-image.html new file mode 100644 index 00000000000..2414e895275 --- /dev/null +++ b/templates/certified/shared/category-image.html @@ -0,0 +1,55 @@ +{% if category == "Desktop" %} +{{ image ( + url="https://assets.ubuntu.com/v1/21efb2ec-desktop.svg", + alt="", + width="126", + height="82", + hi_def=True, + loading="auto" + ) | safe +}} +{% endif %} +{% if category == "Laptop" %} +{{ image ( + url="https://assets.ubuntu.com/v1/4b732966-Laptop.svg", + alt="", + width="132", + height="77", + hi_def=True, + loading="auto" + ) | safe +}} +{% endif %} +{% if category == "Server" %} +{{ image ( + url="https://assets.ubuntu.com/v1/fdf83d49-Server.svg", + alt="Server", + width="80", + height="96", + hi_def=True, + loading="auto" + ) | safe +}} +{% endif %} +{% if category == "Ubuntu Core" %} +{{ image ( + url="https://assets.ubuntu.com/v1/f9f8ace9-gateway.svg", + alt="Gateway", + width="96", + height="100", + hi_def=True, + loading="auto" + ) | safe +}} +{% endif %} +{% if category == "Server SoC" %} +{{ image ( + url="https://assets.ubuntu.com/v1/4e0399a1-chip.svg", + alt="Chip", + width="84", + height="100", + hi_def=True, + loading="auto" + ) | safe +}} +{% endif %} \ No newline at end of file diff --git a/templates/certified/shared/category-search-results.html b/templates/certified/shared/category-search-results.html deleted file mode 100644 index f9325a8a2c1..00000000000 --- a/templates/certified/shared/category-search-results.html +++ /dev/null @@ -1,259 +0,0 @@ -
-
-
- -
-
-
-

Filter

-
-
-

- {% if total_results %} - {% if total_results and total_results > 1 %} - {{ offset + 1 }} - – - {% if offset + limit > total_results %} - {{ total_results }} - {% else %} - {{ offset + limit }} - {% endif %} - of - {% endif %} - {{ total_results }} result - {% if total_results != 1 %}s{% endif %} - {% endif %} -

-
-
- {% if total_results > 0 %} -

Results per page

- - {% endif %} -
-
-
-
- Toggle filters -
- -
- {% if total_results > 0 %} -
- - - - - - - - - - {% for result in results %} - - - - - - {% endfor %} - -
- Vendor - - Model - - Category -
- {% if not vendor_page %} - {{ result.make }} - {% else %} - {{ result.make }} - {% endif %} - - {{ result.model }} - {{ result.category }}
-
-
- {% with total_results=total_results, total_pages=total_pages, offset=offset, limit=limit, align="u-align--left" %} - {% if offset >= total_results %} - {% set current_page = 1 %} - {% else %} - {% set current_page = ((offset / limit) + 1) | int %} - {% endif %} - {% if total_results > limit %} - {% include "shared/_pagination.html" %} - {% endif %} - {% endwith %} -
-
- {% if total_results > 0 %} -

Results per page

- - {% endif %} -
-
-
- {% else %} -
-

Sorry we found no results matching your criteria. Please try and wide your search.

-

You can do this by:

-
    -
  • Adding alternative words or phrases
  • -
  • Using individual words instead of phrases
  • -
  • Trying a different spelling
  • -
-
- {% endif %} -
-
-
- - - diff --git a/templates/certified/socs.html b/templates/certified/socs.html index e22262100db..0c65a4d28d9 100644 --- a/templates/certified/socs.html +++ b/templates/certified/socs.html @@ -4,45 +4,43 @@ {% block meta_description %}SoCs that have been certified for use with Ubuntu.{% endblock %} {% block meta_copydoc %}https://docs.google.com/document/d/1mcI6V6hem4PmG1YxQONjJq-U_I6LGaz_6kkpZOnGVU8/edit{% endblock %} +{% block body_class %}is-paper{% endblock body_class %} {% block outer_content %} - -
- -
-
-
-

Ubuntu certified SoCs

-

Low-power small-footprint System on a Chip (SoC) hardware is redefining the future of sustainable data centers.

-
-
- {{ image ( - url="https://assets.ubuntu.com/v1/4e0399a1-chip.svg", - alt="", - width="136", - height="153", - hi_def=True, - loading="auto" - ) | safe - }} +
+
+
+
+ {% with category="Server SoC"%} + {% include "certified/shared/category-image.html" %} + {% endwith %} +
+
+
+

+ Ubuntu certified SoCs +

+
+
+

Low-power small-footprint System on a Chip (SoC) hardware is redefining the future of sustainable data centers.

+ {% with query=query, placeholder="Search in certified SoCs" %} + {% include "/certified/search/_query-search-box.html" %} + {% endwith %} +
+
-
-
- -{% with - title="All certified SoCs", - query=query, - placeholder="Search in certified SoCs", - total_results=total_results, - total_pages=total_pages, - offset=offset, - limit=limit, - vendor_filters=vendor_filters, - release_filters=release_filters, - results=results -%} - {% include "certified/shared/category-search-results.html" %} -{% endwith %} - -{% endblock %} + +
+ {% with + title="All certified SoCs", + total_results=total_results, + total_pages=total_pages, + offset=offset, + limit=limit, + vendor_filters=vendor_filters, + release_filters=release_filters, + results=results + %} + {% include "certified/search/_search-results-main-block.html" %} + {% endwith %} + +{% endblock %} \ No newline at end of file diff --git a/templates/certified/vendors/vendor.html b/templates/certified/vendors/vendor.html index 6f6c2f59c8f..f7611ee82ec 100644 --- a/templates/certified/vendors/vendor.html +++ b/templates/certified/vendors/vendor.html @@ -3,35 +3,46 @@ {% block title %}Certified {{ vendor }} hardware{% endblock %} {% block meta_description %}Hardware by {{ vendor }} that have been certified for use with Ubuntu.{% endblock %} +{% block body_class %}is-paper{% endblock body_class %} + {% block outer_content %} -
- -
-
-

Ubuntu certified {{ vendor }} hardware

-

{{ vendor_data.short_description }}

- Visit {{ vendor }}'s website here -
-
- +
+
+
+
+ +
+
+
+

Ubuntu certified {{ vendor }} hardware

+
+
+

{{ vendor_data.short_description }}

+
+ +
+ {% with query=query, placeholder="Search in all " + vendor + " certified devices" %} + {% include "/certified/search/_query-search-box.html" %} + {% endwith %} +
+
-
-
+ +
-{% with - title="All " + vendor + " certified hardware", - query=query, - placeholder="Search in all " + vendor + " certified devices", - total_results=total_results, - total_pages=total_pages, - offset=offset, - limit=limit, - results=results, - vendor_page="true" -%} - {% include "certified/shared/category-search-results.html" %} -{% endwith %} + {% with + title="All " + vendor + " certified hardware", + total_results=total_results, + total_pages=total_pages, + offset=offset, + limit=limit, + results=results, + vendor_page="true" + %} + {% include "certified/search/_search-results-main-block.html" %} + {% endwith %} + -{% endblock %} +{% endblock %} \ No newline at end of file From f4d0ac474d73ef873928a9dd4193f2f44857bc4c Mon Sep 17 00:00:00 2001 From: Andrej Velichkovski Date: Mon, 4 Nov 2024 14:40:45 +0100 Subject: [PATCH 2/4] Adapt djlint in changes --- templates/certified/desktops.html | 87 ++++++++++++------------ templates/certified/devices.html | 82 ++++++++++++----------- templates/certified/laptops.html | 88 +++++++++++++------------ templates/certified/search-results.html | 63 +++++++++--------- templates/certified/servers.html | 88 ++++++++++++++----------- templates/certified/socs.html | 79 +++++++++++----------- templates/certified/vendors/vendor.html | 78 +++++++++++----------- 7 files changed, 296 insertions(+), 269 deletions(-) diff --git a/templates/certified/desktops.html b/templates/certified/desktops.html index 1290c2beabc..073b7d575b4 100644 --- a/templates/certified/desktops.html +++ b/templates/certified/desktops.html @@ -1,50 +1,53 @@ {% extends "templates/base.html" %} {% block title %}Certified desktops{% endblock %} -{% block meta_description %}Ubuntu certifies thousands of desktops to guarantee they work well with Ubuntu.{% endblock meta_description %} -{% block meta_copydoc %}https://docs.google.com/document/d/1OWoADcvZ-KQX-BzsCS--pvs9_pY3E-Lb8Ba6a-T-AZ8/edit{% endblock %} -{% block body_class %}is-paper{% endblock body_class %} -{% block outer_content %} +{% block meta_description %} + Ubuntu certifies thousands of desktops to guarantee they work well with Ubuntu. +{% endblock meta_description %} -
-
-
-
- {% with category="Desktop"%} - {% include "certified/shared/category-image.html" %} - {% endwith %} -
-
-
-

- Ubuntu certified desktops -

-
-
-

- Many of the world's biggest PC manufacturers certify their desktops for Ubuntu. -

- {% with query=query, placeholder="Search in certified desktops" %} - {% include "/certified/search/_query-search-box.html" %} +{% block meta_copydoc %} + https://docs.google.com/document/d/1OWoADcvZ-KQX-BzsCS--pvs9_pY3E-Lb8Ba6a-T-AZ8/edit +{% endblock %} + +{% block body_class %} + is-paper +{% endblock body_class %} + +{% block outer_content %} + +
+
+
+ {% with category="Desktop" %} + {% include "certified/shared/category-image.html" %} {% endwith %}
+
+
+

Ubuntu certified desktops

+
+
+

Many of the world's biggest PC manufacturers certify their desktops for Ubuntu.

+ {% with query=query, placeholder="Search in certified desktops" %} + {% include "/certified/search/_query-search-box.html" %} + {% endwith %} +
+
-
-
-
- {% with - title="All certified desktops", - total_results=total_results, - total_pages=total_pages, - offset=offset, - limit=limit, - vendor_filters=vendor_filters, - release_filters=release_filters, - results=results - %} - {% include "/certified/search/_search-results-main-block.html" %} - {% endwith %} -
- -{% endblock %} \ No newline at end of file + +
+ {% with + title="All certified desktops", + total_results=total_results, + total_pages=total_pages, + offset=offset, + limit=limit, + vendor_filters=vendor_filters, + release_filters=release_filters, + results=results + %} + {% include "/certified/search/_search-results-main-block.html" %} + {% endwith %} + +{% endblock %} diff --git a/templates/certified/devices.html b/templates/certified/devices.html index 6410ac1c6f6..94f11ed538d 100644 --- a/templates/certified/devices.html +++ b/templates/certified/devices.html @@ -1,47 +1,53 @@ {% extends "templates/base.html" %} {% block title %}Certified devices{% endblock %} + {% block meta_description %}Devices that have been certified for use with Ubuntu.{% endblock %} -{% block meta_copydoc %}https://docs.google.com/document/d/1HdOYjjt175MPJz86abLx5XGPaERccQuK8HlyUnVEEIQ/edit{% endblock %} -{% block body_class %}is-paper{% endblock body_class %} +{% block meta_copydoc %} + https://docs.google.com/document/d/1HdOYjjt175MPJz86abLx5XGPaERccQuK8HlyUnVEEIQ/edit +{% endblock %} + +{% block body_class %} + is-paper +{% endblock body_class %} + {% block outer_content %} -
-
-
-
- {% with category="Ubuntu Core"%} - {% include "certified/shared/category-image.html" %} - {% endwith %} -
-
-
-

- Ubuntu certified IoT devices -

-
-
-

IoT vendors rely on Ubuntu for their devices, from drones and robots to edge gateways and development boards. Ubuntu Core delivers bullet-proof security, reliable updates and access to a rich ecosystem on 32 and 64-bit ARM and X86 platforms.

- {% with query=query, placeholder="Search in certified devices" %} - {% include "/certified/search/_query-search-box.html" %} + +
+
+
+ {% with category="Ubuntu Core" %} + {% include "certified/shared/category-image.html" %} {% endwith %}
+
+
+

Ubuntu certified IoT devices

+
+
+

+ IoT vendors rely on Ubuntu for their devices, from drones and robots to edge gateways and development boards. Ubuntu Core delivers bullet-proof security, reliable updates and access to a rich ecosystem on 32 and 64-bit ARM and X86 platforms. +

+ {% with query=query, placeholder="Search in certified devices" %} + {% include "/certified/search/_query-search-box.html" %} + {% endwith %} +
+
-
-
-
- {% with - title="All certified devices", - total_results=total_results, - total_pages=total_pages, - offset=offset, - limit=limit, - vendor_filters=vendor_filters, - release_filters=release_filters, - results=results - %} - {% include "/certified/search/_search-results-main-block.html" %} - {% endwith %} -
- -{% endblock %} \ No newline at end of file + +
+ {% with + title="All certified devices", + total_results=total_results, + total_pages=total_pages, + offset=offset, + limit=limit, + vendor_filters=vendor_filters, + release_filters=release_filters, + results=results + %} + {% include "/certified/search/_search-results-main-block.html" %} + {% endwith %} + +{% endblock %} diff --git a/templates/certified/laptops.html b/templates/certified/laptops.html index 343b09512a8..77e6952b5e1 100644 --- a/templates/certified/laptops.html +++ b/templates/certified/laptops.html @@ -1,51 +1,53 @@ {% extends "templates/base.html" %} {% block title %}Certified laptops{% endblock %} -{% block meta_description %}Laptops that have been certified for use with Ubuntu.{% endblock meta_description %} -{% block meta_copydoc %}https://docs.google.com/document/d/19pONXVlPLIMVdl9Sy5grJchc-tIQzVnwCen_gC32GQE/edit{% endblock %} -{% block body_class %}is-paper{% endblock body_class %} -{% block outer_content %} +{% block meta_description %} + Laptops that have been certified for use with Ubuntu. +{% endblock meta_description %} -
-
-
-
- {% with category="Laptop"%} - {% include "certified/shared/category-image.html" %} - {% endwith %} -
-
-
-

- Ubuntu certified laptops -

-
-
-

- Many of the world's biggest PC manufacturers certify their laptops for Ubuntu. -

- {% with query=query, placeholder="Search in certified laptops" %} - {% include "/certified/search/_query-search-box.html" %} +{% block meta_copydoc %} + https://docs.google.com/document/d/19pONXVlPLIMVdl9Sy5grJchc-tIQzVnwCen_gC32GQE/edit +{% endblock %} + +{% block body_class %} + is-paper +{% endblock body_class %} + +{% block outer_content %} + +
+
+
+ {% with category="Laptop" %} + {% include "certified/shared/category-image.html" %} {% endwith %}
+
+
+

Ubuntu certified laptops

+
+
+

Many of the world's biggest PC manufacturers certify their laptops for Ubuntu.

+ {% with query=query, placeholder="Search in certified laptops" %} + {% include "/certified/search/_query-search-box.html" %} + {% endwith %} +
+
-
-
- -
- - {% with - title="All certified laptops", - total_results=total_results, - total_pages=total_pages, - offset=offset, - limit=limit, - vendor_filters=vendor_filters, - release_filters=release_filters, - results=results - %} - {% include "certified/search/_search-results-main-block.html" %} - {% endwith %} -
-{% endblock %} \ No newline at end of file + +
+ {% with + title="All certified laptops", + total_results=total_results, + total_pages=total_pages, + offset=offset, + limit=limit, + vendor_filters=vendor_filters, + release_filters=release_filters, + results=results + %} + {% include "certified/search/_search-results-main-block.html" %} + {% endwith %} + +{% endblock %} diff --git a/templates/certified/search-results.html b/templates/certified/search-results.html index d94714f316c..a1eafa73465 100644 --- a/templates/certified/search-results.html +++ b/templates/certified/search-results.html @@ -6,39 +6,38 @@ Hardware that have been certified for use with Ubuntu. {% endblock meta_description %} -{% block body_class %}is-paper{% endblock body_class %} +{% block body_class %} + is-paper +{% endblock body_class %} + {% block outer_content %} -
-
-
-
-
-
-
-

- Search Ubuntu Certified Hardware -

-
-
- {% with query=query, placeholder=placeholder %} - {% include "/certified/search/_query-search-box.html" %} - {% endwith %} + +
+
+
+
+

Search Ubuntu Certified Hardware

+
+
+ {% with query=query, placeholder=placeholder %} + {% include "/certified/search/_query-search-box.html" %} + {% endwith %} +
-
-
-
+ +
- {% with - total_results=total_results, - total_pages=total_pages, - offset=offset, - limit=limit, - vendor_filters=vendor_filters, - release_filters=release_filters, - results=results - %} - {% include "certified/search/_search-results-main-block.html" %} - {% endwith %} -
-{% endblock %} \ No newline at end of file + {% with + total_results=total_results, + total_pages=total_pages, + offset=offset, + limit=limit, + vendor_filters=vendor_filters, + release_filters=release_filters, + results=results + %} + {% include "certified/search/_search-results-main-block.html" %} + {% endwith %} + +{% endblock %} diff --git a/templates/certified/servers.html b/templates/certified/servers.html index 055e55482c5..1c31c156b05 100644 --- a/templates/certified/servers.html +++ b/templates/certified/servers.html @@ -1,48 +1,56 @@ {% extends "templates/base.html" %} {% block title %}Certified servers{% endblock %} -{% block meta_description %}Servers that have been certified for use with Ubuntu.{% endblock meta_description %} -{% block meta_copydoc %}https://docs.google.com/document/d/1TN2UKhUSB6-kXbLyDM4al2ufB4cgx-W6BsIUOBLP8vU/edit{% endblock meta_copydoc %} -{% block body_class %}is-paper{% endblock body_class %} +{% block meta_description %} + Servers that have been certified for use with Ubuntu. +{% endblock meta_description %} + +{% block meta_copydoc %} + https://docs.google.com/document/d/1TN2UKhUSB6-kXbLyDM4al2ufB4cgx-W6BsIUOBLP8vU/edit +{% endblock meta_copydoc %} + +{% block body_class %} + is-paper +{% endblock body_class %} + {% block outer_content %} -
-
-
-
- {% with category="Server"%} - {% include "certified/shared/category-image.html" %} - {% endwith %} -
-
-
-

- Ubuntu certified servers -

-
-
-

Using Ubuntu Server speeds up the ability to deploy physical infrastructure on bare metal as it is in the cloud.

-

Deploying on certified servers saves you time in choosing and testing what hardware you will use from a single server instance to the largest scale-out data-center environments.

- {% with query=query, placeholder="Search in certified servers" %} - {% include "/certified/search/_query-search-box.html" %} + +
+
+
+ {% with category="Server" %} + {% include "certified/shared/category-image.html" %} {% endwith %}
+
+
+

Ubuntu certified servers

+
+
+

Using Ubuntu Server speeds up the ability to deploy physical infrastructure on bare metal as it is in the cloud.

+

+ Deploying on certified servers saves you time in choosing and testing what hardware you will use from a single server instance to the largest scale-out data-center environments. +

+ {% with query=query, placeholder="Search in certified servers" %} + {% include "/certified/search/_query-search-box.html" %} + {% endwith %} +
+
-
-
-
- {% with - title="All certified servers", - total_results=total_results, - total_pages=total_pages, - offset=offset, - limit=limit, - vendor_filters=vendor_filters, - release_filters=release_filters, - results=results - %} - {% include "certified/search/_search-results-main-block.html" %} - {% endwith %} -
- -{% endblock %} \ No newline at end of file + +
+ {% with + title="All certified servers", + total_results=total_results, + total_pages=total_pages, + offset=offset, + limit=limit, + vendor_filters=vendor_filters, + release_filters=release_filters, + results=results + %} + {% include "certified/search/_search-results-main-block.html" %} + {% endwith %} + +{% endblock %} diff --git a/templates/certified/socs.html b/templates/certified/socs.html index 0c65a4d28d9..69875f61947 100644 --- a/templates/certified/socs.html +++ b/templates/certified/socs.html @@ -1,46 +1,51 @@ {% extends "templates/base.html" %} {% block title %}Certified SoCs{% endblock %} + {% block meta_description %}SoCs that have been certified for use with Ubuntu.{% endblock %} -{% block meta_copydoc %}https://docs.google.com/document/d/1mcI6V6hem4PmG1YxQONjJq-U_I6LGaz_6kkpZOnGVU8/edit{% endblock %} -{% block body_class %}is-paper{% endblock body_class %} +{% block meta_copydoc %} + https://docs.google.com/document/d/1mcI6V6hem4PmG1YxQONjJq-U_I6LGaz_6kkpZOnGVU8/edit +{% endblock %} + +{% block body_class %} + is-paper +{% endblock body_class %} + {% block outer_content %} -
-
-
-
- {% with category="Server SoC"%} - {% include "certified/shared/category-image.html" %} - {% endwith %} -
-
-
-

- Ubuntu certified SoCs -

-
-
-

Low-power small-footprint System on a Chip (SoC) hardware is redefining the future of sustainable data centers.

- {% with query=query, placeholder="Search in certified SoCs" %} - {% include "/certified/search/_query-search-box.html" %} + +
+
+
+ {% with category="Server SoC" %} + {% include "certified/shared/category-image.html" %} {% endwith %}
+
+
+

Ubuntu certified SoCs

+
+
+

Low-power small-footprint System on a Chip (SoC) hardware is redefining the future of sustainable data centers.

+ {% with query=query, placeholder="Search in certified SoCs" %} + {% include "/certified/search/_query-search-box.html" %} + {% endwith %} +
+
-
-
-
- {% with - title="All certified SoCs", - total_results=total_results, - total_pages=total_pages, - offset=offset, - limit=limit, - vendor_filters=vendor_filters, - release_filters=release_filters, - results=results - %} - {% include "certified/search/_search-results-main-block.html" %} - {% endwith %} -
-{% endblock %} \ No newline at end of file + +
+ {% with + title="All certified SoCs", + total_results=total_results, + total_pages=total_pages, + offset=offset, + limit=limit, + vendor_filters=vendor_filters, + release_filters=release_filters, + results=results + %} + {% include "certified/search/_search-results-main-block.html" %} + {% endwith %} + +{% endblock %} diff --git a/templates/certified/vendors/vendor.html b/templates/certified/vendors/vendor.html index f7611ee82ec..b38829ca888 100644 --- a/templates/certified/vendors/vendor.html +++ b/templates/certified/vendors/vendor.html @@ -1,48 +1,52 @@ {% extends "templates/base.html" %} {% block title %}Certified {{ vendor }} hardware{% endblock %} + {% block meta_description %}Hardware by {{ vendor }} that have been certified for use with Ubuntu.{% endblock %} -{% block body_class %}is-paper{% endblock body_class %} +{% block body_class %} + is-paper +{% endblock body_class %} {% block outer_content %} -
-
-
-
- -
-
-
-

Ubuntu certified {{ vendor }} hardware

-
-
-

{{ vendor_data.short_description }}

+ +
+
+
+ {{ vendor }}
- -
- {% with query=query, placeholder="Search in all " + vendor + " certified devices" %} - {% include "/certified/search/_query-search-box.html" %} - {% endwith %} +
+
+

Ubuntu certified {{ vendor }} hardware

+
+
+

{{ vendor_data.short_description }}

+
+ +
+ {% with query=query, placeholder="Search in all " + vendor + " certified devices" %} + {% include "/certified/search/_query-search-box.html" %} + {% endwith %} +
-
-
-
- - {% with - title="All " + vendor + " certified hardware", - total_results=total_results, - total_pages=total_pages, - offset=offset, - limit=limit, - results=results, - vendor_page="true" - %} - {% include "certified/search/_search-results-main-block.html" %} - {% endwith %} - +
+
-{% endblock %} \ No newline at end of file + {% with + title="All " + vendor + " certified hardware", + total_results=total_results, + total_pages=total_pages, + offset=offset, + limit=limit, + results=results, + vendor_page="true" + %} + {% include "certified/search/_search-results-main-block.html" %} + {% endwith %} + +{% endblock %} From f000d215c3d32ebaae8d69e25e70fdcf797c15c2 Mon Sep 17 00:00:00 2001 From: Andrej Velichkovski Date: Mon, 4 Nov 2024 15:28:08 +0100 Subject: [PATCH 3/4] Break down sections --- templates/certified/search-results.html | 2 +- .../search/_search-results-bottom-block.html | 19 +++++++ .../search/_search-results-main-block.html | 53 +++---------------- .../search/_search-results-top-block.html | 27 ++++++++++ 4 files changed, 55 insertions(+), 46 deletions(-) create mode 100644 templates/certified/search/_search-results-bottom-block.html create mode 100644 templates/certified/search/_search-results-top-block.html diff --git a/templates/certified/search-results.html b/templates/certified/search-results.html index a1eafa73465..67aee4c9e5d 100644 --- a/templates/certified/search-results.html +++ b/templates/certified/search-results.html @@ -16,7 +16,7 @@
-

Search Ubuntu Certified Hardware

+

Search Ubuntu certified hardware

{% with query=query, placeholder=placeholder %} diff --git a/templates/certified/search/_search-results-bottom-block.html b/templates/certified/search/_search-results-bottom-block.html new file mode 100644 index 00000000000..72217a2c8dd --- /dev/null +++ b/templates/certified/search/_search-results-bottom-block.html @@ -0,0 +1,19 @@ +
+
+ {% with total_results=total_results, total_pages=total_pages, offset=offset, limit=limit, align="u-align--left" %} + {% if offset >= total_results %} + {% set current_page = 1 %} + {% else %} + {% set current_page = ((offset / limit) + 1) | int %} + {% endif %} + {% if total_results > limit %} + {% include "shared/_pagination.html" %} + {% endif %} + {% endwith %} +
+
+ {% with total_results=total_results, limit=limit, page_position="bottom" %} + {% include "certified/search/_result-count-selector.html" %} + {% endwith %} +
+
diff --git a/templates/certified/search/_search-results-main-block.html b/templates/certified/search/_search-results-main-block.html index 57a9fa6eae7..206415388e3 100644 --- a/templates/certified/search/_search-results-main-block.html +++ b/templates/certified/search/_search-results-main-block.html @@ -4,57 +4,20 @@
{% if total_results > 0 %} -
-
-

- - {% if total_results %} - {% if total_results and total_results > 1 %} - {{ offset + 1 }} - – - {% if offset + limit > total_results %} - {{ total_results }} - {% else %} - {{ offset + limit }} - {% endif %} - of - {% endif %} - {{ total_results }} result{% if total_results != 1 %}s{% endif %} - {% endif %} - -

-
-
- {% with total_results=total_results, limit=limit, page_position="top" %} - {% include "certified/search/_result-count-selector.html" %} - {% endwith %} -
-
+ {% with total_results=total_results, limit=limit %} + {% include "certified/search/_search-results-top-block.html" %} + {% endwith %} + {% with results=results, vendor_page=vendor_page %} {% include "/certified/search/_search-results-table.html" %} {% endwith %} -
-
- {% with total_results=total_results, total_pages=total_pages, offset=offset, limit=limit, align="u-align--left" %} - {% if offset >= total_results %} - {% set current_page = 1 %} - {% else %} - {% set current_page = ((offset / limit) + 1) | int %} - {% endif %} - {% if total_results > limit %} - {% include "shared/_pagination.html" %} - {% endif %} - {% endwith %} -
-
- {% with total_results=total_results, limit=limit, page_position="bottom" %} - {% include "certified/search/_result-count-selector.html" %} - {% endwith %} -
-
+ + {% with total_results=total_results, limit=limit %} + {% include "certified/search/_search-results-bottom-block.html" %} + {% endwith %} {% else %} {% include "/certified/search/_no-results.html" %} {% endif %} diff --git a/templates/certified/search/_search-results-top-block.html b/templates/certified/search/_search-results-top-block.html new file mode 100644 index 00000000000..d149da41d03 --- /dev/null +++ b/templates/certified/search/_search-results-top-block.html @@ -0,0 +1,27 @@ +
+
+

+ + {% if total_results %} + {% if total_results and total_results > 1 %} + {{ offset + 1 }} + – + {% if offset + limit > total_results %} + {{ total_results }} + {% else %} + {{ offset + limit }} + {% endif %} + of + {% endif %} + {{ total_results }} result + {%- if total_results != 1 -%}s{% endif %} + {% endif %} + +

+
+
+ {% with total_results=total_results, limit=limit, page_position="top" %} + {% include "certified/search/_result-count-selector.html" %} + {% endwith %} +
+
From d1337519bbb9688906a9af09c8bdb343f5a1f99d Mon Sep 17 00:00:00 2001 From: Andrej Velichkovski Date: Mon, 4 Nov 2024 15:32:46 +0100 Subject: [PATCH 4/4] Fix jinja issues --- templates/certified/search/_category-filters.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/certified/search/_category-filters.html b/templates/certified/search/_category-filters.html index de7aa4c80f8..046ea6022cf 100644 --- a/templates/certified/search/_category-filters.html +++ b/templates/certified/search/_category-filters.html @@ -3,23 +3,23 @@