Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPIN-149 // Removed language navigation #49

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions blocks/header/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,23 +73,6 @@ function buildLogoNode() {
return logoNode;
}

function buildLanguageNavigation() {
const languageNavigation = document.createElement('li');
const svgChevron = '<svg class="language-navigation-symbol" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" fill="none">\n'
+ '<path d="M11 1.39856L6 6.39856L1 1.39856" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n'
+ '</svg>';
languageNavigation.classList.add('language-navigation');
languageNavigation.innerHTML = `
<div class="language-navigation-button" >${getCurrentLanguage()} ${svgChevron}</div>
<div class="language-navigation-selection">
<a href="/" class="${getCurrentLanguage() === 'de' ? 'current-language' : ''} language-navigation-item">DE</a>
<p class="language-navigation-separator"> / </p>
<a href="/en/" class="${getCurrentLanguage() === 'en' ? 'current-language' : ''} language-navigation-item">EN</a>
</div>
`;
return languageNavigation;
}

function buildNavigationWithNavigationItems() {
const navNode = document.createElement('nav');
const ulNode = document.createElement('ul');
Expand All @@ -108,7 +91,6 @@ function buildNavigationWithNavigationItems() {
});
navNode.setAttribute('aria-expanded', 'false');
navNode.id = 'nav';
ulNode.appendChild(buildLanguageNavigation());
return navNode;
}

Expand Down
4 changes: 2 additions & 2 deletions styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ pre {

/* buttons */

a.button:any-link, button, form .hs-button, main .form .button, header nav li:nth-last-child(2) a {
a.button:any-link, button, form .hs-button, main .form .button, header nav li:nth-last-child(1) a {
font-family: var(--body-font-family);
display: inline-flex;
position: relative;
Expand All @@ -265,7 +265,7 @@ a.button:any-link, button, form .hs-button, main .form .button, header nav li:nt
align-items: center;
}

nav ul li:nth-last-child(2) a {
nav ul li:nth-last-child(1) a {
--button-border-color: transparent;
}

Expand Down
Loading