-
Notifications
You must be signed in to change notification settings - Fork 350
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
update: prep work for lang switcher versioning #484
Conversation
src/templates/partials/header.html
Outdated
@@ -2,6 +2,164 @@ | |||
templateType: global_partial | |||
label: Website header | |||
--> | |||
|
|||
{% macro add_lang_siwtcher() %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of settings to get this to look similar to v0. This is because we pretty much added a million settings to the new module. These were not manually set in code but rather pulled from the page-editor using ?devMode=true
. That is how I would recommend all folks pull hubl values from modules if they want to hardcode them into a template.
src/css/components/_header.css
Outdated
@@ -337,6 +337,19 @@ | |||
.header__language-switcher .lang_list_class:after { | |||
content: none; | |||
} | |||
|
|||
/* V1 lang switcher updates to keep "in line" w/ v0 mobile styles */ | |||
.header__language-switcher .hs-language-switcher__menu { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these just needed for the v1? If so could we toss these in a {% if get_asset_version('@hubspot/language_switcher') == 1 %}
conditional?
src/templates/partials/header.html
Outdated
display_mode="localized" | ||
%} | ||
<div class="header__language-switcher--label-current"> {{ locale_name(locale) }}</div> | ||
{{ add_lang_siwtcher() }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{{ add_lang_siwtcher() }} | |
{{ add_lang_switcher() }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hahaha thank god VS code keeps things consistent.
src/templates/partials/header.html
Outdated
@@ -2,6 +2,164 @@ | |||
templateType: global_partial | |||
label: Website header | |||
--> | |||
|
|||
{% macro add_lang_siwtcher() %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{% macro add_lang_siwtcher() %} | |
{% macro add_lang_switcher() %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just added a couple of minor suggestions! Beyond that, I think this looks great for a first pass. Thanks for getting it up so quickly!
Would you be able to spin up a new issue in the repo once this is all set to follow this up by exploring using theme settings as some of the module style field values (e.g. I think it could be a nice enhancement to pull in the background, text styles from theme settings > website header if that is possible to do from the global partial)?
Types of change
Description
This update adds template support for the new
language_switcher
version. Styles overall are pretty close but have been updated a bit. DEMO PAGERelevant links
Example page:
GitHub issue:
Checklist
People to notify