-
Notifications
You must be signed in to change notification settings - Fork 928
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
Add language selection page (Fixes #5827) #6397
Merged
stephaniehobson
merged 2 commits into
mozilla:master
from
alexgibson:language-selector-page
Nov 8, 2018
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
{# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. -#} | ||
|
||
{% extends "base-protocol.html" %} | ||
|
||
{% block page_title %}Choose your language or locale to browse Mozilla.org{% endblock %} | ||
|
||
{% block page_desc %} | ||
Select your country or region to indicate your preferred language. Learn how Mozilla puts people before profit, making products designed to keep the internet open to all. | ||
{% endblock %} | ||
|
||
{% block canonical_urls %} | ||
{# This page should have a self referencing canonical URL but no hreflang entries #} | ||
<link rel="canonical" href="{{ settings.CANONICAL_URL + '/locales/' }}"> | ||
{% endblock %} | ||
|
||
{% block page_css %} | ||
{{ css_bundle('locales') }} | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<main role="main" class="mzp-l-content"> | ||
<header class="c-simple-header"> | ||
<h1 class="c-simple-header-title">Choose your language</h1> | ||
</header> | ||
<section class="c-block-list"> | ||
<h2 class="c-block-list-title">America</h2> | ||
<ul> | ||
<li lang="cak"><a href="/cak/">Maya Kaqchikel</a></li> | ||
<li lang="en-CA"><a href="/en-CA/">English (Canadian)</a></li> | ||
<li lang="en-US"><a href="/en-US/">English (US)</a></li> | ||
<li lang="es-AR"><a href="/es-AR/">Español (de Argentina)</a></li> | ||
<li lang="es-CL"><a href="/es-CL/">Español (de Chile)</a></li> | ||
<li lang="es-MX"><a href="/es-MX/">Español (de México)</a></li> | ||
<li lang="gn"><a href="/gn/">Avañe'ẽ</a></li> | ||
<li lang="pt-BR"><a href="/pt-BR/">Português (do Brasil)</a></li> | ||
<li lang="trs"><a href="/trs/">Triqui</a></li> | ||
</ul> | ||
</section> | ||
<section class="c-block-list"> | ||
<h2 class="c-block-list-title">Asia Pacific</h2> | ||
<ul> | ||
<li lang="gu-IN"><a href="/gu-IN/">જરાતી (ભારત)</a></li> | ||
<li lang="hi-IN"><a href="/hi-IN/">हिन्दी (भारत)</a></li> | ||
<li lang="id"><a href="/id/">Bahasa Indonesia</a></li> | ||
<li lang="ja"><a href="/ja/">日本語</a></li> | ||
<li lang="ko"><a href="/ko/">한국어</a></li> | ||
<li lang="ml"><a href="/ml/">മലയാളം</a></li> | ||
<li lang="mr"><a href="/mr/">मराठी</a></li> | ||
<li lang="ms"><a href="/ms/">Melayu</a></li> | ||
<li lang="pa-IN"><a href="/pa-IN/">ਪੰਜਾਬੀ (ਭਾਰਤ)</a></li> | ||
<li lang="ta"><a href="/ta/">தமிழ்</a></li> | ||
<li lang="th"><a href="/th/">ไทย</a></li> | ||
<li lang="zh-CN"><a href="/zh-CN/">中文 (简体)</a></li> | ||
<li lang="zh-TW"><a href="/zh-TW/">正體中文 (繁體)</a></li> | ||
</ul> | ||
</section> | ||
<section class="c-block-list"> | ||
<h2 class="c-block-list-title">Europe</h2> | ||
<ul> | ||
<li lang="an"><a href="/an/">aragonés</a></li> | ||
<li lang="ast"><a href="/ast/">Asturianu</a></li> | ||
<li lang="be"><a href="/be/">Беларуская</a></li> | ||
<li lang="bg"><a href="/bg/">Български</a></li> | ||
<li lang="bs"><a href="/bs/">Bosanski</a></li> | ||
<li lang="ca"><a href="/ca/">Català</a></li> | ||
<li lang="cs"><a href="/cs/">Čeština</a></li> | ||
<li lang="cy"><a href="/cy/">Cymraeg</a></li> | ||
<li lang="da"><a href="/da/">Dansk</a></li> | ||
<li lang="de"><a href="/de/">Deutsch</a></li> | ||
<li lang="dsb"><a href="/dsb/">Dolnoserbšćina</a></li> | ||
<li lang="el"><a href="/el/">Ελληνικά</a></li> | ||
<li lang="en-GB"><a href="/en-GB/">English (British)</a></li> | ||
<li lang="eo"><a href="/eo/">Esperanto</a></li> | ||
<li lang="es-ES"><a href="/es-ES/">Español (de España)</a></li> | ||
<li lang="et"><a href="/et/">Eesti keel</a></li> | ||
<li lang="eu"><a href="/eu/">Euskara</a></li> | ||
<li lang="fi"><a href="/fi/">suomi</a></li> | ||
<li lang="fr"><a href="/fr/">Français</a></li> | ||
<li lang="fy-NL"><a href="/fy-NL/">Frysk</a></li> | ||
<li lang="gl"><a href="/gl/">Galego</a></li> | ||
<li lang="hsb"><a href="/hsb/">Hornjoserbsce</a></li> | ||
<li lang="hu"><a href="/hu/">magyar</a></li> | ||
<li lang="hy-AM"><a href="/hy-AM/">Հայերեն</a></li> | ||
<li lang="ia"><a href="/ia/">Interlingua</a></li> | ||
<li lang="it"><a href="/it/">Italiano</a></li> | ||
<li lang="ka"><a href="/ka/">ქართული</a></li> | ||
<li lang="lij"><a href="/lij/">Ligure</a></li> | ||
<li lang="lt"><a href="/lt/">Lietuvių</a></li> | ||
<li lang="nb-NO"><a href="nb-NO">Norsk bokmål</a></li> | ||
<li lang="nl"><a href="/nl/">Nederlands</a></li> | ||
<li lang="nn-NO"><a href="/nn-NO/">Norsk nynorsk</a></li> | ||
<li lang="pl"><a href="/pl/">Polski</a></li> | ||
<li lang="pt-PT"><a href="/pt-PT/">Português (Europeu)</a></li> | ||
<li lang="rm"><a href="/rm/">rumantsch</a></li> | ||
<li lang="ro"><a href="/ro/">Română</a></li> | ||
<li lang="ru"><a href="/ru/">Русский</a></li> | ||
<li lang="sk"><a href="/sk/">slovenčina</a></li> | ||
<li lang="sl"><a href="/sl/">Slovenščina</a></li> | ||
<li lang="sq"><a href="/sq/">Shqip</a></li> | ||
<li lang="sr"><a href="/sr/">Српски</a></li> | ||
<li lang="sv-SE"><a href="/sv-SE/">Svenska</a></li> | ||
<li lang="tr"><a href="/tr/">Türkçe</a></li> | ||
<li lang="uk"><a href="/uk/">Українська</a></li> | ||
</ul> | ||
</section> | ||
<section class="c-block-list"> | ||
<h2 class="c-block-list-title">Middle East and Africa</h2> | ||
<ul> | ||
<li lang="ar"><a href="/ar/">عربي</a></li> | ||
<li lang="az"><a href="/az/">Azərbaycanca</a></li> | ||
<li lang="fa"><a href="/fa/">فارسی</a></li> | ||
<li lang="kab"><a href="/kab/">Taqbaylit</a></li> | ||
</ul> | ||
</section> | ||
</main> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
$font-path: '/media/fonts'; | ||
$image-path: '/media/protocol/img'; | ||
|
||
@import '../../protocol/css/includes/lib'; | ||
|
||
.c-simple-header { | ||
@include at2x('/media/img/mozorg/locales/world-map.png', 179px, 90px); | ||
background-position: top center; | ||
background-repeat: no-repeat; | ||
padding-top: 90px + $spacing-md; | ||
margin-top: $layout-xs; | ||
text-align: center; | ||
|
||
.c-simple-header-title { | ||
@include text-display-md; | ||
} | ||
|
||
@media #{$mq-md} { | ||
margin-top: $layout-lg; | ||
} | ||
} | ||
|
||
.c-block-list { | ||
margin: $layout-md 0; | ||
|
||
.c-block-list-title { | ||
@include text-display-sm; | ||
border-bottom: 1px solid $color-gray-30; | ||
padding-bottom: $spacing-md; | ||
} | ||
|
||
a:link, | ||
a:visited { | ||
color: $color-black; | ||
text-decoration: none; | ||
} | ||
|
||
a:hover, | ||
a:visited, | ||
a:focus { | ||
text-decoration: underline; | ||
} | ||
|
||
ul { | ||
margin: $spacing-xl 0; | ||
|
||
li { | ||
margin-bottom: $spacing-lg; | ||
} | ||
} | ||
|
||
@media #{$mq-sm} { | ||
ul { | ||
@include grid-gap($spacing-lg $spacing-xl); | ||
display: grid; | ||
grid-template-columns: repeat(2, 1fr); | ||
} | ||
|
||
@supports (display: grid) { | ||
ul li { | ||
margin-bottom: 0; | ||
} | ||
} | ||
} | ||
|
||
@media #{$mq-md} { | ||
margin: $layout-lg 0; | ||
|
||
ul { | ||
grid-template-columns: repeat(4, 1fr); | ||
} | ||
} | ||
|
||
@media #{$mq-lg} { | ||
margin: $layout-xl 0; | ||
|
||
ul { | ||
grid-template-columns: repeat(5, 1fr); | ||
} | ||
} | ||
|
||
@media #{$mq-xl} { | ||
ul { | ||
grid-template-columns: repeat(6, 1fr); | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Note for reviewer: as this page is so simple, I decided not to include a float/flex based fallback for browsers that don't support grid. Older browsers will just get a simple vertical list. I figured that this page is mainly for robots, so shouldn't matter too much. Happy to add a fallback if folks disagree, or we could update this page later to use the upcoming Protocol grid mixins.
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.
👍