1
+ {% assign t = site.data.locales[page.lang][page.lang] %}
1
2
< footer class ="bg-white border-top text-center pt-5 ">
2
3
< div class ="container-lg p-responsive mx-auto ">
3
4
4
5
< div class ="d-flex flex-wrap flex-items-stretch ">
5
6
< div class ="col-12 col-sm-6 mb-4 col-border ">
6
7
< div class ="height-full p-5 ">
7
8
< img src ="{{ "/assets/images/illos/squirrel.svg" | relative_url }}" class="little-illo mb-3" alt="squirrel illustration">
8
- < h3 class ="alt-h3 mb-3 "> {{ site.data.locale[site.locale] .footer.contribute.heading }}</ h3 >
9
- < p class ="mb-3 p-large "> {{ site.data.locale[site.locale] .footer.contribute.description }}</ p >
9
+ < h3 class ="alt-h3 mb-3 "> {{ t .footer.contribute.heading }}</ h3 >
10
+ < p class ="mb-3 p-large "> {{ t .footer.contribute.description }}</ p >
10
11
< p >
11
12
< a data-proofer-ignore href ="https://github.com/{{ site.github.repository_nwo }}/edit/{{ site.branch }}/{{ page.path }} " class ="btn btn-outline ">
12
- {{ site.data.locale[site.locale] .footer.contribute.button }}
13
+ {{ t .footer.contribute.button }}
13
14
</ a >
14
15
</ p >
15
16
</ div >
@@ -20,14 +21,14 @@ <h3 class="alt-h3 mb-3">{{ site.data.locale[site.locale].footer.contribute.headi
20
21
< form action ="//github.us11.list-manage.com/subscribe/post?u=9d7ced8c4bbd6c2f238673f0f&id=b514344ba3 " method ="post " id ="mc-embedded-subscribe-form " name ="mc-embedded-subscribe-form " class ="validate " target ="_blank " novalidate >
21
22
< div id ="mc_embed_signup_scroll ">
22
23
< img src ="{{ "/assets/images/illos/bird.svg" | relative_url }}" class="little-illo mb-3" alt="bird illustration">
23
- < h3 class ="alt-h3 mb-3 "> {{ site.data.locale[site.locale] .footer.subscribe.heading }}</ h3 >
24
- < p class ="mb-3 p-large "> {{ site.data.locale[site.locale] .footer.subscribe.description }}</ p >
24
+ < h3 class ="alt-h3 mb-3 "> {{ t .footer.subscribe.heading }}</ h3 >
25
+ < p class ="mb-3 p-large "> {{ t .footer.subscribe.description }}</ p >
25
26
26
27
< div class ="mc-field-group col-12 ">
27
- < label for ="mce-EMAIL " class ="d-none "> {{ site.data.locale[site.locale] .footer.subscribe.label }}</ label >
28
- < input type ="email " placeholder ="{{ site.data.locale[site.locale] .footer.subscribe.label }} " name ="EMAIL " class ="form-input required email d-block col-10 mx-auto py-2 px-3 mb-3 " id ="mce-EMAIL " autocomplete ="home email ">
28
+ < label for ="mce-EMAIL " class ="d-none "> {{ t .footer.subscribe.label }}</ label >
29
+ < input type ="email " placeholder ="{{ t .footer.subscribe.label }} " name ="EMAIL " class ="form-input required email d-block col-10 mx-auto py-2 px-3 mb-3 " id ="mce-EMAIL " autocomplete ="home email ">
29
30
< input type ="checkbox " value ="1 " name ="group[9617][1] " id ="mce-group[9617]-9617-0 " checked ="checked " style ="display:none ">
30
- < input type ="submit " value ="{{ site.data.locale[site.locale] .footer.subscribe.button }} " name ="subscribe " id ="mc-embedded-subscribe " class ="btn btn-outline ">
31
+ < input type ="submit " value ="{{ t .footer.subscribe.button }} " name ="subscribe " id ="mc-embedded-subscribe " class ="btn btn-outline ">
31
32
</ div >
32
33
< div id ="mce-responses " class ="clear ">
33
34
< div class ="" id ="mce-error-response " style ="display:none "> </ div >
@@ -42,38 +43,42 @@ <h3 class="alt-h3 mb-3">{{ site.data.locale[site.locale].footer.subscribe.headin
42
43
</ div >
43
44
44
45
< div class ="border-top text-gray py-5 ">
46
+ {% if page.lang and site.data.locales.size > 1 %}
47
+ < select id ="language " class ="float-md-left ">
48
+ {% assign locales = site.data.locales | sort %}
49
+ {% for locale in locales %}
50
+ {% assign lang = locale[0] %}
51
+ {% assign locale_name = locale[1][lang].locale_name %}
52
+ {% if page.lang == lang %}
53
+ < option value ="{{ lang }} " selected ="selected "> {{ locale_name }}</ option >
54
+ {% else %}
55
+ < option value ="{{ lang }} "> {{ locale_name }}</ option >
56
+ {% endif %}
57
+ {% endfor %}
58
+ </ select >
59
+ {% endif %}
45
60
< p class ="float-md-right "> < a class ="text-gray-light text-small " href ="{{ "/notices/" | relative_url }}"> fine print</ a > </ p >
46
61
47
62
< div >
48
63
{% capture code %}
49
- {% assign code_label = site.data.locale[site.locale] .footer.byline.code_label %}
64
+ {% assign code_label = t .footer.byline.code_label %}
50
65
< svg height ="20 " class ="octicon octicon-code v-align-middle fill-gray mr-1 " aria-label ="{{ code_label }} " viewBox ="0 0 14 16 " version ="1.1 " width ="17 " role ="img "> < path d ="M9.5 3L8 4.5 11.5 8 8 11.5 9.5 13 14 8 9.5 3zm-5 0L0 8l4.5 5L6 11.5 2.5 8 6 4.5 4.5 3z "> </ path > </ svg >
51
66
{% endcapture %}
52
67
{% capture love %}
53
- {% assign love_label = site.data.locale[site.locale] .footer.byline.love_label %}
68
+ {% assign love_label = t .footer.byline.love_label %}
54
69
< svg height ="20 " class ="octicon octicon-heart v-align-middle fill-gray mx-1 " aria-label ="{{love_label}} " viewBox ="0 0 12 16 " version ="1.1 " width ="15 " role ="img "> < path d ="M11.2 3c-.52-.63-1.25-.95-2.2-1-.97 0-1.69.42-2.2 1-.51.58-.78.92-.8 1-.02-.08-.28-.42-.8-1-.52-.58-1.17-1-2.2-1-.95.05-1.69.38-2.2 1-.52.61-.78 1.28-.8 2 0 .52.09 1.52.67 2.67C1.25 8.82 3.01 10.61 6 13c2.98-2.39 4.77-4.17 5.34-5.33C11.91 6.51 12 5.5 12 5c-.02-.72-.28-1.39-.8-2.02V3z "> </ path > </ svg >
55
70
{% endcapture %}
56
71
{% capture github %}
57
72
< svg height ="20 " class ="octicon octicon-mark-github v-align-middle fill-gray mx-1 " aria-label ="GitHub " viewBox ="0 0 16 16 " version ="1.1 " width ="20 " role ="img "> < path d ="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z "> </ path > </ svg >
58
73
{% endcapture %}
59
74
{% capture friends %}
60
- {% assign friends_label = site.data.locale[site.locale] .footer.byline.friends_label %}
75
+ {% assign friends_label = t .footer.byline.friends_label %}
61
76
< a href ="https://github.com/github/opensource.guide/graphs/contributors " class ="text-gray "> {{ friends_label }}</ a >
62
77
{% endcapture %}
63
78
64
- {% assign byline = site.data.locale[site.locale] .footer.byline.format %}
79
+ {% assign byline = t .footer.byline.format %}
65
80
{{ byline | replace: "[code]", code | replace: "[love]", love | replace: "[github]", github | replace: "[friends]", friends }}
66
81
</ div >
67
-
68
- {% if site.translations.size > 1 %}
69
- < div class ="text-small my-6 ">
70
- {% for translation in site.translations %}
71
- < a class ="locale-chooser text-gray-light d-inline-block px-1 "
72
- lang ="{{ translation[0] }} "
73
- href ="{{ page.url | prepend: translation[1].url }}?l={{ translation[0] }} "> {{ translation[1].name }}</ a >
74
- {% endfor %}
75
- </ div >
76
- {% endif %}
77
82
</ div >
78
83
</ div >
79
84
</ footer >
0 commit comments