{% extends "templates/one-column.html" %} {% block head_extra %}{% endblock %} {% block title %}Takeover template example | Ubuntu{% endblock %} {% block content %}

Takeover templates

Using the suru gradient patterns, you can now easily build homepage takeovers with a simple include, passing in all your variables to build a takeover in minutes.

p-takeover--grad

{% with title="A guide to developing Android apps on Ubuntu", subtitle="Learn what makes Ubuntu the perfect platform for Android app development", class="", header_image="https://assets.ubuntu.com/v1/30f461a5-android-on-ubuntu.svg", image_style="margin: 1.5rem 0;", image_height="158", image_width="380", image_hide_small=true, equal_cols=true, primary_url="/engage/developing-android-on-ubuntu?utm_source=takeover&utm_campaign=CY19_IOT_Snapstore_Whitepaper_AndroidonUbuntu", primary_cta="Download the whitepaper", primary_cta_class="", secondary_url="", secondary_cta="", lang="", locale="" %} {% include "takeovers/_template.html" %} {% endwith %}

Default takeover - gradient

p-takeover--grad

This is the default takeover style with an aubergine to orange gradient.

The following is the jinja2 template code you need for all takeovers, but with the default pattern.

{% with title="A guide to developing Android apps on Ubuntu",
subtitle="Learn what makes Ubuntu the perfect platform for Android app development",
class="",
header_image="https://assets.ubuntu.com/v1/30f461a5-android-on-ubuntu.svg",
image_style="margin: 1.5rem 0;",
image_height="158",
image_width="380",
image_hide_small=true,
equal_cols=true,
primary_url="/engage/developing-android-on-ubuntu?utm_source=takeover&utm_campaign=CY19_IOT_Snapstore_Whitepaper_AndroidonUbuntu",
primary_cta="Download the whitepaper",
primary_cta_class="",
secondary_url="",
secondary_cta="",
lang="",
locale="",
timezone="" %}
{% include "takeovers/_template.html" %}
{% endwith %}

Details

  • title: the h1 text for the takeover
  • subtitle: the h4 text for the takeover optional
  • class: the full class name for the takeover - null or p-takeover--grad, p-takeover--k8s, p-takeover--dark, p-takeover--snapcraft, p-takeover--aqua optional
  • header_image: the full path to the image optional
  • image_style: any extra information to add to the image in the 'style' property optional
  • image_hide_small: 'true' if you want to hide the image on small screens optional
  • equal_cols: 'true' if you want the takeover to be spilt into two six cols, otherwise the default will be col-7, col-5 optional
  • primary_url: the url for the primary cta, which will be a button and a p-link--external will be added automatically optional
  • primary_cta: The text of the button optional
  • primary_cta_class: the class of the button, defaults to p-button--positive optional
  • secondary_url: the url for the secondary cta, which will be a text link and a p-link--external will be added automatically optional
  • lang: the language of the takeover, default is 'en' optional
  • locale: the locale of the takeover, default is 'en-GB' optional
  • timezone: One or several IANA timezone area and location names(reference) for the takeover, eg. "London", "Europe", "Kentucky, Indiana", "London, Paris, Berlin", etc. defaults to null optional

p-takeover--k8s

{% with title="A guide to developing Android apps on Ubuntu", subtitle="Learn what makes Ubuntu the perfect platform for Android app development", class="p-takeover--k8s", header_image="https://assets.ubuntu.com/v1/dba11aee-kubernetes.svg", image_height="233", image_width="240", image_hide_small=true, equal_cols=true, primary_url="https://kubeflow-news.com", primary_cta="Download the whitepaper", primary_cta_class="", secondary_url="", secondary_cta="", lang="", locale="" %} {% include "takeovers/_template.html" %} {% endwith %}

p-takeover--dark

{% with title="A guide to developing Android apps on Ubuntu", subtitle="Learn what makes Ubuntu the perfect platform for Android app development", class="p-takeover--dark", header_image="https://assets.ubuntu.com/v1/30f461a5-android-on-ubuntu.svg", image_style="margin: 1.5rem 0;", image_height="158", image_width="380", image_hide_small=true, equal_cols=true, primary_url="/engage/developing-android-on-ubuntu?utm_source=takeover&utm_campaign=CY19_IOT_Snapstore_Whitepaper_AndroidonUbuntu", primary_cta="Download the whitepaper", primary_cta_class="", secondary_url="/contact-us#get-in-touch", secondary_cta="Contact Canonical", lang="", locale="" %} {% include "takeovers/_template.html" %} {% endwith %}

p-takeover--snapcraft

{% with title="A guide to developing Android apps on Ubuntu", subtitle="Learn what makes Ubuntu the perfect platform for Android app development", class="p-takeover--snapcraft", header_image="https://assets.ubuntu.com/v1/c3b8a9dd-Snap_Store_shopping_icon.svg", image_height="175", image_width="200", image_hide_small=true, equal_cols=true, primary_url="https://snapcraft.io", primary_cta="Download the whitepaper", primary_cta_class="p-button", secondary_url="", secondary_cta="", lang="", locale="" %} {% include "takeovers/_template.html" %} {% endwith %}

p-takeover--aqua

{% with title="Machine Learning at Scale", subtitle="What do successful solutions have in common?", class="p-takeover--aqua", header_image="https://assets.ubuntu.com/v1/5fc06110-AI+illustration.svg", image_height="180", image_width="200", image_hide_small=true, equal_cols=false, primary_url="/engage/get-started-with-ai-part2", primary_cta="Register for the webinar", primary_cta_class="p-button", secondary_url="", secondary_cta="", lang="", locale="" %} {% include "takeovers/_template.html" %} {% endwith %}
{% endblock %}