From 8c6d576f3e9558783e5185e713434d1e9d85fc9d Mon Sep 17 00:00:00 2001 From: Samuel Olwe Date: Fri, 12 Apr 2024 11:57:12 +0300 Subject: [PATCH 1/7] Updated cookie policy to v3.6.3 --- package.json | 2 +- templates/base_index.html | 2 +- yarn.lock | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 1e0365e484c..c2f534ae56b 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ }, "dependencies": { "@axe-core/playwright": "^4.8.5", - "@canonical/cookie-policy": "3.5.0", + "@canonical/cookie-policy": "^3.6.3", "@canonical/global-nav": "3.6.4", "@canonical/latest-news": "1.5.0", "@canonical/react-components": "^0.38.0", diff --git a/templates/base_index.html b/templates/base_index.html index fdb846b2b0f..2dca49cc4e9 100644 --- a/templates/base_index.html +++ b/templates/base_index.html @@ -1330,7 +1330,7 @@

var notices = document.querySelectorAll(".notice[lang=" + primaryParentLanguage + "]"); // display only one matching notice - if (notices.length > 0) { + if (notices.lengtgth > 0) { notices[0].classList.remove("u-hide") } diff --git a/yarn.lock b/yarn.lock index 9de01d577a0..6e3517689c0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1076,10 +1076,10 @@ resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@canonical/cookie-policy@3.5.0": - version "3.5.0" - resolved "https://registry.yarnpkg.com/@canonical/cookie-policy/-/cookie-policy-3.5.0.tgz#1c7e6cc2d5a7218375001b2cff2996a927693e89" - integrity sha512-XLCIl8+h+3BRfvqADqFsmAfWdaDGDchY/TPCKtpeQdb4r64SR6arsdNftlOb7vX8EuLCK2QRp6evUy0J+qnQTg== +"@canonical/cookie-policy@^3.6.3": + version "3.6.3" + resolved "https://registry.yarnpkg.com/@canonical/cookie-policy/-/cookie-policy-3.6.3.tgz#b242dd3cd838564be16e20c6bfadb92f6058950d" + integrity sha512-an3od9wrtESgbexSu4Cc81vyHExZaeDeDJWd0+g2SANSAt3OFMt+gsT2c78rGep9J7+a1qhuvQRC43koSVWACQ== "@canonical/global-nav@3.6.4": version "3.6.4" From 6c67c45549e34fd7ec63247a3ba36fca3859fb62 Mon Sep 17 00:00:00 2001 From: Samuel Olwe Date: Fri, 12 Apr 2024 12:04:10 +0300 Subject: [PATCH 2/7] Fix typo --- templates/base_index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/base_index.html b/templates/base_index.html index 2dca49cc4e9..fdb846b2b0f 100644 --- a/templates/base_index.html +++ b/templates/base_index.html @@ -1330,7 +1330,7 @@

var notices = document.querySelectorAll(".notice[lang=" + primaryParentLanguage + "]"); // display only one matching notice - if (notices.lengtgth > 0) { + if (notices.length > 0) { notices[0].classList.remove("u-hide") } From 4de0b2ffa1e090904a43ceb3173efac1b94eb0cc Mon Sep 17 00:00:00 2001 From: Samuel Olwe Date: Fri, 12 Apr 2024 12:08:30 +0300 Subject: [PATCH 3/7] Fixed formatting --- templates/base_index.html | 2842 ++++++++++++++++++------------------- 1 file changed, 1355 insertions(+), 1487 deletions(-) diff --git a/templates/base_index.html b/templates/base_index.html index fdb846b2b0f..b257a1dfd22 100644 --- a/templates/base_index.html +++ b/templates/base_index.html @@ -1,1502 +1,1370 @@ {% extends "templates/base.html" %} {% block title %}Enterprise Open Source and Linux{% endblock %} -{% block meta_description %}Ubuntu is the modern, open source operating system on Linux for the enterprise server, desktop, cloud, and IoT.{% endblock meta_description %} -{% block extra_body_class %}homepage {% block takeover_body_class %}{% endblock takeover_body_class %}{% endblock extra_body_class %} -{% block meta_copydoc %}https://docs.google.com/document/d/1ySJxQbqVdeH4Tra0zwBm2Tn0s56kFGnEF7d8xDRTxwU/edit{% endblock %} +{% block meta_description %} + Ubuntu is the modern, open source operating system on Linux for the enterprise server, desktop, cloud, and IoT. +{% endblock meta_description %} + +{% block extra_body_class %} + homepage + + {% block takeover_body_class %} + {% endblock takeover_body_class %} +{% endblock extra_body_class %} + +{% block meta_copydoc %} + https://docs.google.com/document/d/1ySJxQbqVdeH4Tra0zwBm2Tn0s56kFGnEF7d8xDRTxwU/edit +{% endblock %} {% block outer_content %} -{% block content %} - - -
-
-
-

What's new in
Ubuntu {{ releases.latest.short_version }}?

-

Introducing the Ubuntu Desktop for Raspberry Pi, the latest desktop features and micro clouds.

- -
-
- -
-
-
- -
-
-
-
-
End of standard support for 18.04 LTS - 31 May 2023
-

Upgrade to the latest Ubuntu LTS or get extended coverage until 2028 with Ubuntu Pro

-
-
-
-
- -{% block notices_content %} -{% endblock notices_content %} - -
-
-
-
-

Modern enterprise open source

-

Security, support, and managed services from the publisher of Ubuntu.

-

- - Get Ubuntu Pro - -

-
-
-
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
-
- -{% with section_classes='p-strip u-no-padding--top', spotlight='True' %} -{% include "shared/_latest_news_strip.html" %} -{% endwith %} - -
-
-
-

- Energise your engineers -

-

- Better security. More packages. Newer tools. All your open source, from cloud to edge. -

-

- 66% of experienced developers prefer Ubuntu. -

-

- That's why Ubuntu supports the fastest, biggest and most successful digital operations. -

- -
-
-
-

- - The 2020 HackerEarth Developer Survey - -

- {{ - image( - url="https://assets.ubuntu.com/v1/934a0626-Hackerearth_logo.svg", - alt="HackerEarth logo", - width="200", - height="40", - hi_def=True, - loading="lazy", - ) | safe - }} -
-
-
-
- -
-
-

- Open source security -

-

- Ubuntu Pro is more than Linux. Security and compliance for the full stack. -

-

- Secure your open source apps. Patch the full stack, from kernel to library and applications, for CVE compliance. Governments and auditors certify Ubuntu for FedRAMP, FISMA and HITECH. -

-
- -
-
- -

- - Secure all your open source with us › - -

-
-
- -
-
-
-
- {{ image ( - url="https://assets.ubuntu.com/v1/a94b7c55-nist-logo.png", - alt="NIST", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/d05ddc19-%40sec-logo.png", - alt="atsec", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} - -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/d16880fe-disa-logo.png", - alt="DISA", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/00644094-cis-logo.png", - alt="CIS", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/b3f94804-csec-logo.png", - alt="CSEC", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
-
-
-
- -
-
-
-

- Significant enterprise savings -

-

- Sustainable open source at the lowest cost, everywhere. -

-

- Rethink what's possible with Linux and open source. -

-

- Companies engage Canonical to drive down open source operating costs. Automate everything: multi-cloud operations, bare metal provisioning, edge clusters and IoT. -

-
-
- {{ - image( - url="https://assets.ubuntu.com/v1/f129afea-Save+Money-Yen-Euro-Dollar-2020.svg", - alt="", - width="266", - height="200", - hi_def=True, - loading="lazy", - ) | safe - }} -
-
-
-
- - - Let's talk open source › - -
-
-
- -
-
-

- Public cloud optimisation -

-

- Most public cloud instances are Ubuntu, for performance and security. -

-
-
-
-
    -
  • - Optimised kernels for AWS, Azure, Google, Oracle, IBM -
  • -
  • - FIPS, CIS hardening and CVE fixes with Ubuntu Pro -
  • -
  • - Minimise rolling reboots with Kernel Livepatch -
  • -
  • - Network & storage performance optimisation -
  • -
  • - GPU enablement for machines and containers -
  • -
  • - Pay-as-you-go billing, no more licenses -
  • -
  • - Enterprise support and Extended Security Maintenance -
  • -
  • - Cloud workload migration service -
  • -
  • - Containerisation and cloud-native migration service -
  • -
  • - Fully managed application service -
  • -
- -
-
- -
-
-
-
- {{ image ( - url="https://assets.ubuntu.com/v1/6889bfcb-uber-logo.png", - alt="Uber", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/2ef9f6ff-spotify-logo.png", - alt="Spotify", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/2b6c1718-bmp-paribas-logo.png", - alt="BNP Paribas", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
-
-
-
- -
-
-
-

- Carrier-grade private cloud -

-

- Operate private cloud the smart way – supported or fully managed. -

-
-
- -
-
- - -
-
- -
-
-
-
- {{ image ( - url="https://assets.ubuntu.com/v1/bd2a3282-bt-logo.png", - alt="BT", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/c6e197c4-deutsche-telekom-logo.png", - alt="Deutsche Telecom", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/6143a8ce-rabobank-logo.png", - alt="Rabobank", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/698f7a58-best-buy-logo.png", - alt="Best Buy", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/b1e3d2d2-bloomberg-logo.png", - alt="Bloomberg", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/6cd78b57-at%26t-logo.png", - alt="AT&T", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} - -
-
-
-
- -
-
-

- Multi-cloud Kubernetes and containers -

-

- AKS. EKS. GKE. Kubeadm. MicroK8s. Charmed Kubernetes. All on Ubuntu. -

-
- -
-
- - -
-
- -
-
-
-
- {{ image ( - url="https://assets.ubuntu.com/v1/de681426-aws-logo.png", - alt="Amazon Web Services", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/6ef81e08-microsoft-azure-new-logo.png", - alt="Microsoft Azure", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/d174f7bf-google-cloud-logo.png", - alt="Goggle Cloud", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/d493514f-liberty-global-logo.png", - alt="Liberty Global", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/aed42949-aci-universal-payments-logo.png", - alt="ACI", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
-
-
-
- -
-
-

- Ultra secure things -

-

- Ubuntu Core Appliances with transactional updates for a better embedded Linux. -

-
- -
-
-
    -
  • - OTA compressed updates for apps, kernel and OS -
  • -
  • - Automatic rollback and data snapshots -
  • -
  • - Managed private app stores for secure fleet management -
  • -
  • - DevSecOps pipeline for edge app delivery -
  • -
  • - Built-in device recovery and remote disk repair -
  • -
  • - 10 year security maintenance for every device -
  • -
  • - Provable system and software integrity -
  • -
  • - Secure boot backed by root of trust -
  • -
  • - Full disk encryption with hardware keys -
  • -
  • - FIPS certifiable embedded Linux -
  • -
  • - Support for real-time compute -
  • -
- -
-
- -
-
-
-
- {{ image ( - url="https://assets.ubuntu.com/v1/67f81bfe-intel-new-logo.png", - alt="Intel", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/5e075792-rexroth-logo.png", - alt="Bosch Rexroth", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/711be910-arm-logo.png", - alt="ARM", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/987acdaa-dell-logo.png", - alt="Dell", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/2b253402-advantech-logo.png", - alt="Advantech", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
-
-
-
- -
-
-

- Workstations and desktops -

-

- Optimised AI/ML and cloud devops. The professional developer's preference. -

-
-
-
- - -
-
- -
-
-
-
- {{ image ( - url="https://assets.ubuntu.com/v1/11814428-hp-logo.png", - alt="Hewlett Packard", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/c70b529e-lenovo-logo.png", - alt="Lenovo", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/67f81bfe-intel-new-logo.png", - alt="Intel", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/cd765ccc-nvidia-logo.png", - alt="Nvidia", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/6079d02b-amd-logo.png", - alt="AMD", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/987acdaa-dell-logo.png", - alt="Dell", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} - -
-
-
-
-
- -
-
-

- Data centre automation -

-

- Turn a rack into a bare metal cloud. Metal-as-a-Service provisions Windows, ESXi and Linux. -

-
-
-
-
    -
  • - Bare metal cloud with on-demand servers -
  • -
  • - Remote edge cluster operations -
  • -
  • - Infrastructure monitoring and discovery -
  • -
  • - Ansible, Chef, Puppet, SALT, Juju integration -
  • -
  • - Super fast install from scratch -
  • -
  • - VMWare ESXi, Windows, CentOS, RHEL, Ubuntu -
  • -
  • - Custom images with pre-installed apps -
  • -
  • - Disk and network configuration -
  • -
  • - API-driven DHCP, DNS, PXE, IPAM, provisioning -
  • -
  • - LDAP authentication and RBAC -
  • -
- -
-
- -
-
-
-
- {{ image ( - url="https://assets.ubuntu.com/v1/0352e974-verizon-logo.png", - alt="Verizon", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/ea3bc2f7-telefonica-logo.png", - alt="Telefónica", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/ce15a4d1-tele2-logo.png", - alt="TELE2", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/756e9ef4-telecom-italia-logo.png", - alt="Telecom Italia", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/83fb74ae-nec-logo.png", - alt="NEC", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/4af3ad39-barclays-logo.png", - alt="Barclays", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
-
-
-
- -
-
-

- Smart robots of all shapes and sizes -

-

- From turtles to trucks, Ubuntu drives the robot revolution. -

-
- -
-
-
    -
  • - Full support for ROS and ROS2 -
  • -
  • - Security patches for long-term ROS -
  • -
  • - Fault tolerant over-the-air updates -
  • -
  • - CIS certification for ROS and ROS2 -
  • -
  • - Trim time-to-market with SMART START consulting -
  • -
  • - Leading Robot-as-a-Platform ecosystem -
  • -
  • - Curated app stores -
  • -
- -
-
- -
-
-
-
- {{ image ( - url="https://assets.ubuntu.com/v1/e796fb76-abb-logo.png", - alt="ABB", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/2437987f-pal-robotics-logo.png", - alt="PAL Robotics", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/01e8486f-kuka-logo.png", - alt="KUKA", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/7e4f929b-apollo-logo.png", - alt="Apollo", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/466c2690-bosch-logo.png", - alt="Bosch", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/59af2c8f-bmw-logo.png", - alt="BMW", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
-
-
-
- -
-
-

- Multi-cloud applications – beyond PAAS -

-

- Universal model-driven operators for classic and Kubernetes estate. -

-
- -
-
-
    -
  • - Operate smoothly across public and private cloud -
  • -
  • - Reusable integration code as open source packages -
  • -
  • - Python Operator Framework for rapid development -
  • -
  • - Bring the K8s operator pattern to classic workloads -
  • -
  • - Lifecycle management and Day 2 operations -
  • -
  • - Open collection of community-driven operators -
  • -
-

- - Learn more about universal operators - -

-
-
- -
-
-
-
- {{ image ( - url="https://assets.ubuntu.com/v1/1dc7af1e-panasonic-logo.png", - alt="Panasonic", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/52e19575-scania-logo.png", - alt="Scania", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/6a3b49ef-sbi-bits-logo.png", - alt="SBI BITS", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
- {{ image ( - url="https://assets.ubuntu.com/v1/de8ab04f-swissquote-logo.png", - alt="Swissquote", - width="288", - height="288", - hi_def=True, - loading="lazy", - attrs={"class": "p-logo-section__logo"} - ) | safe - }} -
-
-
-
-
- -{% block footer_content %} -{# include "ubuntu/takeovers/_footer_homepage.html" #} -{% endblock footer_content %} - - - - -
-
- -{% endblock content %} + if (selectedTakeover.primary_url && selectedTakeover.primary_cta) { + primaryUrl.href = selectedTakeover.primary_url; + primaryUrl.textContent = selectedTakeover.primary_cta; + } else { + primaryUrl.remove(); + } + + if (selectedTakeover.secondary_url && selectedTakeover.secondary_url !== "") { + secondaryUrl.href = selectedTakeover.secondary_url; + secondaryUrl.innerHTML = selectedTakeover.secondary_cta + " ›"; + } else { + secondaryUrl.remove(); + } + + dataLayer.push({ + event: "NonInteractiveGAEvent", + eventCategory: "www.ubuntu.com-impression-takeover", + eventAction: "from:" + window.location.href + " to:" + selectedTakeover.primary_url, + eventLabel: selectedTakeover.primary_cta, + eventValue: undefined, + }); + } + + + +
+ + {% endblock content %} {% endblock outer_content %} From 8c68d78ba8a7ab472d0549959091973fe6cbb755 Mon Sep 17 00:00:00 2001 From: Samuel Olwe Date: Fri, 12 Apr 2024 12:16:09 +0300 Subject: [PATCH 4/7] Fix mismatched tags --- templates/base_index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/base_index.html b/templates/base_index.html index b257a1dfd22..7fdad6322a9 100644 --- a/templates/base_index.html +++ b/templates/base_index.html @@ -107,7 +107,7 @@

Modern enterprise open source

alt="Google Cloud logo" /> - + @@ -512,7 +512,7 @@

Carrier-grade private cloud

attrs={"class": "p-logo-section__logo"} ) | safe }} - + From df46d3fc79b692895ec83c6b17f253c8a873b65d Mon Sep 17 00:00:00 2001 From: Samuel Olwe Date: Fri, 12 Apr 2024 16:05:09 +0300 Subject: [PATCH 5/7] Load cookie policy first --- static/js/src/core.js | 3 - templates/templates/base.html | 363 +++++++++++++++++++++------------- 2 files changed, 223 insertions(+), 143 deletions(-) diff --git a/static/js/src/core.js b/static/js/src/core.js index 1766ba5bb7b..9c9dfa5f715 100755 --- a/static/js/src/core.js +++ b/static/js/src/core.js @@ -1,9 +1,6 @@ import { cookiePolicy } from "@canonical/cookie-policy"; import { createNav } from "@canonical/global-nav"; -// Initalise the cookie policy notification. -cookiePolicy(); - createNav({ breakpoint: 1150, mobileContainerSelector: ".global-nav-mobile", diff --git a/templates/templates/base.html b/templates/templates/base.html index 693d86aef75..2743225ea09 100644 --- a/templates/templates/base.html +++ b/templates/templates/base.html @@ -1,140 +1,223 @@ - - - - - - - - {% block title %}{% endblock %} | Ubuntu - - - - {% block content_experiment %}{% endblock %} - - - - - - - - - - - - - - - - - - - - {% block head_extra %}{% endblock %} - - - - - - - - - - - - - - - - - - {% if self.title() %} - - - {% endif %} - {% if self.meta_description() %} - - - {% endif %} - - {# Define the required meta_image block #} - - {% if self.meta_image() %} - - - - {% endif %} - - {% block extra_metatags %}{% endblock %} - - {% include "templates/_tag_manager.html" %} - - {% include "templates/_vwo_smartcode.html" %} - - - - - - - - - - {% if not(hide_nav == True) %} - {% include "templates/_navigation.html" %} - {% endif %} - -
-
-
-
-
-

Your submission was sent successfully! Close

-
-
-
-
-
-
-
-
-

You have successfully unsubscribed! Close

-
-
-
-
-
-
-
-
-

Thank you for signing up for our newsletter!
In these regular emails you will find the latest updates about Ubuntu and upcoming events where you can meet our team.Close

-
-
-
-
-
- {% block content_head %}{% endblock %} - {% block content_container %} - {% block outer_content %} - {% endblock outer_content %} - {% endblock content_container %} -
-
- - - {% if small_footer %} - {% include "templates/small-footer.html" %} - {% else %} - {% include "templates/footer.html" %} - {% if "/whitepapers" not in request.path %} - {% endif %} - {% block footer_extra %}{% endblock %} - {% endif %} - - + + + + + + + + + + {% block title %}{% endblock %} + | Ubuntu + + + + {% block content_experiment %}{% endblock %} + + + + + + + + + + + + + + + + + + + + + + + {% block + head_extra %} + {% endblock %} + + + + + + + + + + + + + + + + + + {% if self.title() %} + + + {% endif %} + + {% if self.meta_description() %} + + + {% endif %} + {# Define the required meta_image block #} + + {% if self.meta_image() %} + + + + {% endif %} + + {% block extra_metatags %}{% endblock %} + + {% include + "templates/_tag_manager.html" %} + + {% include "templates/_vwo_smartcode.html" + %} + + + + + + + + + + {% if not(hide_nav == True) %} + + {% include "templates/_navigation.html" %} + {% + endif %} + +
+
+
+
+
+

+ Your submission was sent successfully! + Close +

+
+
+
+
+
+
+
+
+

+ You have successfully unsubscribed! + Close +

+
+
+
+
+
+
+
+
+

+ Thank you for signing up for our newsletter! +
+ In these regular emails you will find the latest updates about + Ubuntu and upcoming events where you can meet our team.Close +

+
+
+
+
+
+ + {% block content_head %}{% endblock %} + + {% block content_container %} + + {% + block outer_content %} + {% endblock outer_content %} + + {% endblock + content_container %} +
+ +
+ + + + {% if small_footer %} + + {% include "templates/small-footer.html" %} + + {% else %} + {% include "templates/footer.html" %} + + {% if "/whitepapers" not in + request.path %} + + {% endif %} + + {% block footer_extra %}{% endblock %} + + {% endif + %} + + From 9a83212f5d94cfab119ca9a0f350ef3309c7e33c Mon Sep 17 00:00:00 2001 From: Samuel Olwe Date: Fri, 12 Apr 2024 16:34:38 +0300 Subject: [PATCH 6/7] Fix formatting --- templates/templates/base.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/templates/base.html b/templates/templates/base.html index 2743225ea09..1c3178a5f3b 100644 --- a/templates/templates/base.html +++ b/templates/templates/base.html @@ -1,6 +1,6 @@ - @@ -119,7 +119,7 @@ %} -