Make the home page into reusable and translatable blocks (#10071)

* Make navigation and UI strings i18n friendly

This commit

* Extracts most UI strings into i18n bundles so they can be translated
* Makes a proper Hugo menu out of the hardcoded menu that is shown on smaller screens
* Changes the language selector logic to navigate to the current page in the other language if possible (e.g. the translation). If not possible, it takes you to the home page for that language.

For testing, this commit also adds Norwegian as a new language. This is turned off.

* Make the home page into reusable and translatable blocks

This commit adds a set of block type shortcodes that is then used to build the home page.

* These shortcodes gets common image resources from a new headless bundle. These resources can be inherited or overridden by translations.
* The hardcoded case studies section on the home page is replaced with a query and a loop.
* The hardcoded feature list on the home page is replaed qith a query and a loop.
This commit is contained in:
Bjørn Erik Pedersen
2018-09-14 23:47:24 +02:00
committed by k8s-ci-robot
parent 0df6621652
commit 1b5ff98a44
49 changed files with 501 additions and 2181 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

+3 -5
View File
@@ -178,6 +178,9 @@ var kub = (function () {
}
function setHomeHeaderStyles() {
if (!quickstartButton[0]) {
return;
}
var Y = window.pageYOffset;
var quickstartBottom = quickstartButton[0].getBoundingClientRect().bottom;
@@ -517,11 +520,6 @@ $(function() {
addAnchorTags();
// Make global nav be active based on pathname
if ((location.pathname.split("/")[1]) !== ""){
$('.global-nav li a[href^="/' + location.pathname.split("/")[1] + '"]').addClass('active');
}
// If vendor strip doesn't exist add className
if ( !$('#vendorStrip').length > 0 ) {
$('#hero').addClass('bot-bar');