From 7618134813499a6a5b218eeb64bf4e40b10e9888 Mon Sep 17 00:00:00 2001
From: Martyn Welch <martyn.welch@collabora.com>
Date: Tue, 6 Jul 2021 10:29:15 +0100
Subject: [PATCH] Update the homepage to improved layout

The homepage currently uses a very standard layout, which doesn't provide
a very compelling initial impression. Improve the layout to give the
website a more professional feel, as implemented by Jon Wallace but replace
`DIVclass` with distinct shortcodes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>
---
 content/_index.md                             | 61 +++++++++++--------
 .../apertis/layouts/shortcodes/DIVclass.html  |  3 -
 .../shortcodes/homepage-column-set.html       |  3 +
 .../layouts/shortcodes/homepage-column.html   |  5 ++
 .../layouts/shortcodes/introduction.html      |  3 +
 .../apertis/layouts/shortcodes/link-box.html  |  3 +
 6 files changed, 50 insertions(+), 28 deletions(-)
 delete mode 100644 themes/apertis/layouts/shortcodes/DIVclass.html
 create mode 100644 themes/apertis/layouts/shortcodes/homepage-column-set.html
 create mode 100644 themes/apertis/layouts/shortcodes/homepage-column.html
 create mode 100644 themes/apertis/layouts/shortcodes/introduction.html
 create mode 100644 themes/apertis/layouts/shortcodes/link-box.html

diff --git a/content/_index.md b/content/_index.md
index 3fe0883d0..273a13621 100644
--- a/content/_index.md
+++ b/content/_index.md
@@ -22,19 +22,20 @@ aliases = [
 ]
 +++
 
-Apertis is a versatile
-[open source infrastructure]({{< ref "platform-guide.md" >}}) tailored to the
-automotive needs and fit for a wide variety of electronic devices.  Security
-and modularity are two of its primary strengths. Apertis provides a
-feature-rich framework for add-on software and resilient upgrade capabilities.
-Beyond an operating system, it offers new APIs, tools and cloud services.
+{{% introduction %}}
+Apertis is a versatile [open source infrastructure]({{< ref "platform-guide.md" >}}) tailored to the automotive needs and fit for a wide variety of electronic devices.  Security and modularity are two of its primary strengths. Apertis provides a feature-rich framework for add-on software and resilient upgrade capabilities. Beyond an operating system, it offers new APIs, tools and cloud services.
+{{% /introduction %}}
 
-# Production Friendly
+{{% homepage-column-set %}}
 
-Apertis aims to accomplish the following goals:
+{{% homepage-column %}}
+## Production Friendly
 
-* Ensure that all the software shipped in Apertis is open source or at least freely distributable, so that downstreams are entitled to use, modify and redistribute work derived from our deliverables.
-* Ensure that Apertis images targeting devices (such as target and minimal), are not subject to licensing constraints that may conflict with the regulatory requirements of some intended use cases.
+#### Apertis aims to accomplish the following goals:
+
+Ensure that all the software shipped in Apertis is open source or at least freely distributable, so that downstreams are entitled to use, modify and redistribute work derived from our deliverables.
+
+Ensure that Apertis images targeting devices (such as target and minimal), are not subject to licensing constraints that may conflict with the regulatory requirements of some intended use cases.
 
 Apertis is primarily licensed under the Mozilla Public License Version 2.0, with images and documentation licensed under CC BY-SA 4.0.
 
@@ -42,46 +43,56 @@ For more information see [Open source License expectations]( {{< ref "license-ex
 
 Apertis undergoes regular [automated and manual testing](https://qa.apertis.org) on the [reference hardware]( {{< ref "/reference_hardware/_index.md" >}} ) with [publicly available results](https://lavaphabbridge.apertis.org).
 
-
-## Further Links
+{{% link-box %}}
+#### Further Links
 
 * [Policy documentation]( {{< ref "policies" >}} )
 * [Quality assurance]( {{< ref "/qa/_index.md" >}} )
 * [Test results](https://lavaphabbridge.apertis.org)
+{{% /link-box %}}
+{{% /homepage-column %}}
 
 
-# Frequent Releases
+{{% homepage-column %}}
+## Frequent Releases
 
-The overall goal is for Apertis to do a yearly product release. A product release is intended to both be based on the most recent mainline kernel LTS release and the current Debian stable release. Since Debian releases roughly once every two years, that means that there will typically be two Apertis product releases based on a single Debian stable release. With Linux doing an LTS release on a yearly basis, each Apertis product release will be based on a different (and then current) Linux kernel release.
+#### The overall goal is for Apertis to do a yearly product release. 
 
-The standard support period for each Apertis product release is 7 quarters. In other words from the initial release at the end of Q1 until the end of the next year.
+A product release is intended to both be based on the most recent mainline kernel LTS release and the current Debian stable release. Since Debian releases roughly once every two years, that means that there will typically be two Apertis product releases based on a single Debian stable release. With Linux doing an LTS release on a yearly basis, each Apertis product release will be based on a different (and then current) Linux kernel release.
 
-For more information, see [Release flow and product lines]( {{< ref "release-flow.md" >}} ).
+The standard support period for each Apertis product release is 7 quarters. In other words from the initial release at the end of Q1 until the end of the next year. 
 
+For more information, see [Release flow and product lines]( {{< ref "release-flow.md" >}} ).
 
-## Further Links
+{{% link-box %}}
+#### Further Links
 
 * Current stable release: [v2021.1]( {{< ref "/release/v2021.1/releasenotes.md" >}} )
 * Current old stable release: [v2020.5]( {{< ref "/release/v2020.5/releasenotes.md" >}} )
 * Current development release: [v2022dev2]( {{< ref "/release/v2022dev2/releasenotes.md" >}} )
 * [Further releases]( {{< ref "releases.md" >}} )
+{{% /link-box %}}
+{{% /homepage-column %}}
 
 
-# Developer Ready
+{{% homepage-column %}}
+## Developer Ready
 
-Apertis provides a number of [pre-built images]({{< ref "download.md" >}}) for
-Intel (64-bit) and ARM (32-bit and 64-bit) for evaluation on one of the Apertis
-[reference hardware]( {{< ref "/reference_hardware/_index.md" >}} ) platforms.
-Additionally Apertis provides an SDK image to simplify development for the
-platform.
+#### Apertis provides a number of [pre-built images]({{< ref "download.md" >}}) for Intel (64-bit) and ARM (32-bit and 64-bit) for evaluation on one of the Apertis [reference hardware]( {{< ref "/reference_hardware/_index.md" >}} ) platforms. 
 
-![The Apertis SD](/images/vm-sdk.png)
+Additionally Apertis provides an SDK image to simplify development for the platform.
 
+![The Apertis SD](/images/vm-sdk.png)
 
-## Further Links
+{{% link-box %}}
+#### Further Links
 
 * [Download the current images]( {{< ref "download.md" >}} )
 * [Source code](https://gitlab.apertis.org)
 * [Architectural documentation]( {{< ref "architecture" >}}) 
 * [Development guides]( {{< ref "guides" >}} )
 * [Concept designs]( {{< ref "concepts" >}} )
+{{% /link-box %}}
+{{% /homepage-column %}}
+
+{{% /homepage-column-set %}}
diff --git a/themes/apertis/layouts/shortcodes/DIVclass.html b/themes/apertis/layouts/shortcodes/DIVclass.html
deleted file mode 100644
index 7fb7a704b..000000000
--- a/themes/apertis/layouts/shortcodes/DIVclass.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<div class="{{ .Get 0 }}">
-{{ .Inner }}
-</div>
\ No newline at end of file
diff --git a/themes/apertis/layouts/shortcodes/homepage-column-set.html b/themes/apertis/layouts/shortcodes/homepage-column-set.html
new file mode 100644
index 000000000..4417a60df
--- /dev/null
+++ b/themes/apertis/layouts/shortcodes/homepage-column-set.html
@@ -0,0 +1,3 @@
+<div class="homepageFeatColsWrapper">
+{{ .Inner }}
+</div>
diff --git a/themes/apertis/layouts/shortcodes/homepage-column.html b/themes/apertis/layouts/shortcodes/homepage-column.html
new file mode 100644
index 000000000..96c02699a
--- /dev/null
+++ b/themes/apertis/layouts/shortcodes/homepage-column.html
@@ -0,0 +1,5 @@
+<div class="homepageFeatCol">
+<div class="homepageFeatureColInners">
+{{ .Inner }}
+</div>
+</div>
diff --git a/themes/apertis/layouts/shortcodes/introduction.html b/themes/apertis/layouts/shortcodes/introduction.html
new file mode 100644
index 000000000..1d470133a
--- /dev/null
+++ b/themes/apertis/layouts/shortcodes/introduction.html
@@ -0,0 +1,3 @@
+<div class="homeIntroP" >
+{{ .Inner }}
+</div>
diff --git a/themes/apertis/layouts/shortcodes/link-box.html b/themes/apertis/layouts/shortcodes/link-box.html
new file mode 100644
index 000000000..9e6dfcc84
--- /dev/null
+++ b/themes/apertis/layouts/shortcodes/link-box.html
@@ -0,0 +1,3 @@
+<div class="homepageFeatureColRelatedLinksBox">
+{{ .Inner }}
+</div>
-- 
GitLab