Skip to content

Commit 1ef7050

Browse files
committed
fix dropdown logic
1 parent 9273104 commit 1ef7050

File tree

12 files changed

+1552
-75
lines changed

12 files changed

+1552
-75
lines changed

i18n/en-us/en-us.json

+9-1
Original file line numberDiff line numberDiff line change
@@ -860,5 +860,13 @@
860860
"contributors":"Contributors",
861861
"contribDesc":"This project wouldn't exist without these amazing contributors. Thank you guys for making this real!",
862862
"licence":"{{@link=partials/licence.html}}"
863-
}
863+
},
864+
"languages": [
865+
{"url":"pt-br","name":"Português"},
866+
{"url":"ko-kr","name":"한국어"},
867+
{"url":"es-es","name":"Español"},
868+
{"url":"de-de","name":"German"},
869+
{"url":"en-us","name":"English"},
870+
{"url":"zh-tw","name":"繁體中文"}
871+
]
864872
}

public/assets/css/core.css

+6-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ html {
77
body {
88
margin: 0;
99
padding: 0;
10-
}
10+
}
1111

1212
.wrapper {
1313
width: 80%;
@@ -59,18 +59,18 @@ header small {
5959
#dropdown {
6060
position: absolute;
6161
top: 10px;
62-
left: 10px;
62+
right: 15px;
6363
}
6464

6565
#dropdown input {
6666
display: none;
6767
}
6868

69-
#dropdown label,
70-
#dropdown ul li,
69+
#dropdown label,
70+
#dropdown ul li,
7171
#dropdown ul li a {
7272
background-color:#1A7594;
73-
font-size:13px;
73+
font-size:16px;
7474
color:#DDD;
7575
cursor:pointer;
7676
}
@@ -92,6 +92,7 @@ header small {
9292

9393
#dropdown label .flag {
9494
margin-right: 5px;
95+
margin: 1em 1em;
9596
}
9697

9798
#dropdown label:after {

public/assets/js/core.js

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ var App = (function( window, document, $ ) {
2525
'rwaldron',
2626
'darkwing',
2727
'bevacqua',
28-
'sindresorhus'
2928
'sindresorhus',
3029
'getify',
3130
'ericelliott',

public/de-de/index.html

+8-9
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,22 @@
1717

1818
<body>
1919
<header>
20-
<a class="fork-me" href="https://github.com/braziljs/js-the-right-way" target="_blank"><img style="position: absolute; top: 0; right: 0; border: 0" src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png" alt="Fork me on GitHub"></a>
20+
<a target="_blank" href="https://github.com/braziljs/js-the-right-way"><img style="position: absolute; top: 0; left: 0; border: 0" src="https://camo.githubusercontent.com/8b6b8ccc6da3aa5722903da7b58eb5ab1081adee/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f6c6566745f6f72616e67655f6666373630302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_left_orange_ff7600.png"></a>
2121

2222
<div class="wrapper">
2323
<h1>JavaScript</h1>
24-
<small>The Right Way</small>
24+
<small>The Right Way</small>
2525
</div>
2626

2727
<div id="dropdown">
2828
<input id="toggle" type="checkbox">
29-
<label for="toggle"><span class="flag">English</span></label>
29+
<label for="toggle"><span class="flag">German</span></label>
3030
<ul>
31-
<li><a href="/es-es">Español</a></li>
32-
<li><a href="/pt-br">Português</a></li>
33-
<li><a href="/ko-kr">한국어</a></li>
31+
<li><a href="/pt-br"> Português </a></li>
32+
<li><a href="/ko-kr"> 한국어 </a></li>
33+
<li><a href="/es-es"> Español </a></li>
34+
<li><a href="/"> English </a></li>
35+
<li><a href="/zh-tw"> 繁體中文 </a></li>
3436
</ul>
3537
</div>
3638
</header>
@@ -830,9 +832,6 @@ <h3>Newsletter</h3>
830832
<p class="source link">
831833
<a href="http://emberweekly.com" target="_blank">Ember Weekly</a>
832834
</p>
833-
<p class="source link">
834-
<a href="http://backboneweekly.com" target="_blank">Backbone Weekly</a>
835-
</p>
836835
<p class="source link">
837836
<a href="http://nodeweekly.com" target="_blank">Node Weekly</a>
838837
</p>

public/en-us/index.html

+8-9
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,22 @@
1717

1818
<body>
1919
<header>
20-
<a class="fork-me" href="https://github.com/braziljs/js-the-right-way" target="_blank"><img style="position: absolute; top: 0; right: 0; border: 0" src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png" alt="Fork me on GitHub"></a>
20+
<a target="_blank" href="https://github.com/braziljs/js-the-right-way"><img style="position: absolute; top: 0; left: 0; border: 0" src="https://camo.githubusercontent.com/8b6b8ccc6da3aa5722903da7b58eb5ab1081adee/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f6c6566745f6f72616e67655f6666373630302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_left_orange_ff7600.png"></a>
2121

2222
<div class="wrapper">
2323
<h1>JavaScript</h1>
24-
<small>The Right Way</small>
24+
<small>The Right Way</small>
2525
</div>
2626

2727
<div id="dropdown">
2828
<input id="toggle" type="checkbox">
2929
<label for="toggle"><span class="flag">English</span></label>
3030
<ul>
31-
<li><a href="/es-es">Español</a></li>
32-
<li><a href="/pt-br">Português</a></li>
33-
<li><a href="/ko-kr">한국어</a></li>
31+
<li><a href="/pt-br"> Português </a></li>
32+
<li><a href="/ko-kr"> 한국어 </a></li>
33+
<li><a href="/es-es"> Español </a></li>
34+
<li><a href="/de-de"> German </a></li>
35+
<li><a href="/zh-tw"> 繁體中文 </a></li>
3436
</ul>
3537
</div>
3638
</header>
@@ -117,7 +119,7 @@ <h3>ABOUT</h3>
117119
<h3>CURRENT VERSION</h3>
118120

119121
<p>
120-
The JavaScript standard is ECMAScript. As of 2012, all modern browsers fully support ECMAScript 5.1. Older browsers support at least ECMAScript 3. A 6th major revision of the standard is being worked on.
122+
The JavaScript standard is ECMAScript. As of 2012, all modern browsers fully support ECMAScript 5.1. Older browsers support at least ECMAScript 3. As of June 2015 the spec for ES6/ES2015 has been approved. See the ECMAScript 2015 Language Specification at <a target="_blank" href="http://www.ecma-international.org/ecma-262/6.0/index.html">Ecma International</a>.
121123
</p>
122124

123125
<p>
@@ -828,9 +830,6 @@ <h3>Newsletter</h3>
828830
<p class="source link">
829831
<a href="http://emberweekly.com" target="_blank">Ember Weekly</a>
830832
</p>
831-
<p class="source link">
832-
<a href="http://backboneweekly.com" target="_blank">Backbone Weekly</a>
833-
</p>
834833
<p class="source link">
835834
<a href="http://nodeweekly.com" target="_blank">Node Weekly</a>
836835
</p>

public/es-es/index.html

+8-9
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,22 @@
1717

1818
<body>
1919
<header>
20-
<a class="fork-me" href="https://github.com/braziljs/js-the-right-way" target="_blank"><img style="position: absolute; top: 0; right: 0; border: 0" src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png" alt="Fork me on GitHub"></a>
20+
<a target="_blank" href="https://github.com/braziljs/js-the-right-way"><img style="position: absolute; top: 0; left: 0; border: 0" src="https://camo.githubusercontent.com/8b6b8ccc6da3aa5722903da7b58eb5ab1081adee/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f6c6566745f6f72616e67655f6666373630302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_left_orange_ff7600.png"></a>
2121

2222
<div class="wrapper">
2323
<h1>JavaScript</h1>
24-
<small>The Right Way</small>
24+
<small>The Right Way</small>
2525
</div>
2626

2727
<div id="dropdown">
2828
<input id="toggle" type="checkbox">
29-
<label for="toggle"><span class="flag">English</span></label>
29+
<label for="toggle"><span class="flag">Español</span></label>
3030
<ul>
31-
<li><a href="/es-es">Español</a></li>
32-
<li><a href="/pt-br">Português</a></li>
33-
<li><a href="/ko-kr">한국어</a></li>
31+
<li><a href="/pt-br"> Português </a></li>
32+
<li><a href="/ko-kr"> 한국어 </a></li>
33+
<li><a href="/de-de"> German </a></li>
34+
<li><a href="/"> English </a></li>
35+
<li><a href="/zh-tw"> 繁體中文 </a></li>
3436
</ul>
3537
</div>
3638
</header>
@@ -828,9 +830,6 @@ <h3>Boletín</h3>
828830
<p class="source link">
829831
<a href="http://emberweekly.com" target="_blank">Ember Weekly</a>
830832
</p>
831-
<p class="source link">
832-
<a href="http://backboneweekly.com" target="_blank">Backbone Weekly</a>
833-
</p>
834833
<p class="source link">
835834
<a href="http://nodeweekly.com" target="_blank">Node Weekly</a>
836835
</p>

public/index.html

+8-9
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<body>
1919
<header>
20-
<a class="fork-me" href="https://github.com/braziljs/js-the-right-way" target="_blank"><img style="position: absolute; top: 0; right: 0; border: 0" src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png" alt="Fork me on GitHub"></a>
20+
<a target="_blank" href="https://github.com/braziljs/js-the-right-way"><img style="position: absolute; top: 0; left: 0; border: 0" src="https://camo.githubusercontent.com/8b6b8ccc6da3aa5722903da7b58eb5ab1081adee/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f6c6566745f6f72616e67655f6666373630302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_left_orange_ff7600.png"></a>
2121

2222
<div class="wrapper">
2323
<h1>JavaScript</h1>
@@ -28,9 +28,11 @@ <h1>JavaScript</h1>
2828
<input id="toggle" type="checkbox">
2929
<label for="toggle"><span class="flag">English</span></label>
3030
<ul>
31-
<li><a href="/es-es">Español</a></li>
32-
<li><a href="/pt-br">Português</a></li>
33-
<li><a href="/ko-kr">한국어</a></li>
31+
<li><a href="/pt-br"> Português </a></li>
32+
<li><a href="/ko-kr"> 한국어 </a></li>
33+
<li><a href="/es-es"> Español </a></li>
34+
<li><a href="/de-de"> German </a></li>
35+
<li><a href="/zh-tw"> 繁體中文 </a></li>
3436
</ul>
3537
</div>
3638
</header>
@@ -117,7 +119,7 @@ <h3>ABOUT</h3>
117119
<h3>CURRENT VERSION</h3>
118120

119121
<p>
120-
The JavaScript standard is ECMAScript. As of 2012, all modern browsers fully support ECMAScript 5.1. Older browsers support at least ECMAScript 3. A 6th major revision of the standard is being worked on.
122+
The JavaScript standard is ECMAScript. As of 2012, all modern browsers fully support ECMAScript 5.1. Older browsers support at least ECMAScript 3. As of June 2015 the spec for ES6/ES2015 has been approved. See the ECMAScript 2015 Language Specification at <a target="_blank" href="http://www.ecma-international.org/ecma-262/6.0/index.html">Ecma International</a>.
121123
</p>
122124

123125
<p>
@@ -255,7 +257,7 @@ <h3>Immediately-Invoked Function Expression (IIFE)</h3>
255257
<section class="section" id="patterns">
256258
<div class="wrapper">
257259
<h1><a href="#patterns">PATTERNS</a></h1>
258-
260+
259261
<h3>Description</h3>
260262

261263
<p>
@@ -798,9 +800,6 @@ <h3>Websites</h3>
798800
<p class="source link">
799801
<a href="http://dailyjs.com" target="_blank">DailyJS</a>
800802
</p>
801-
<p class="source link">
802-
<a href="http://jsrocks.org/" target="_blank">JS Rocks</a>
803-
</p>
804803
<p class="source link">
805804
<a href="http://www.echojs.com" target="_blank">Echo JS</a>
806805
</p>

public/ko-kr/index.html

+9-10
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,22 @@
1717

1818
<body>
1919
<header>
20-
<a class="fork-me" href="https://github.com/braziljs/js-the-right-way" target="_blank"><img style="position: absolute; top: 0; right: 0; border: 0" src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png" alt="Fork me on GitHub"></a>
20+
<a target="_blank" href="https://github.com/braziljs/js-the-right-way"><img style="position: absolute; top: 0; left: 0; border: 0" src="https://camo.githubusercontent.com/8b6b8ccc6da3aa5722903da7b58eb5ab1081adee/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f6c6566745f6f72616e67655f6666373630302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_left_orange_ff7600.png"></a>
2121

2222
<div class="wrapper">
2323
<h1>JavaScript</h1>
24-
<small>The Right Way</small>
24+
<small>The Right Way</small>
2525
</div>
2626

2727
<div id="dropdown">
2828
<input id="toggle" type="checkbox">
29-
<label for="toggle"><span class="flag">English</span></label>
29+
<label for="toggle"><span class="flag">한국어</span></label>
3030
<ul>
31-
<li><a href="/es-es">Español</a></li>
32-
<li><a href="/pt-br">Português</a></li>
33-
<li><a href="/ko-kr">한국어</a></li>
31+
<li><a href="/pt-br"> Português </a></li>
32+
<li><a href="/es-es"> Español </a></li>
33+
<li><a href="/de-de"> German </a></li>
34+
<li><a href="/"> English </a></li>
35+
<li><a href="/zh-tw"> 繁體中文 </a></li>
3436
</ul>
3537
</div>
3638
</header>
@@ -117,7 +119,7 @@ <h3>JavaScript란?</h3>
117119
<h3>현재 버전</h3>
118120

119121
<p>
120-
JavaScript의 표준은 ECMAScript입니다. 2012년 현재, 모든 모던 브라우저는 ECMAScript 5.1을 완벽히 지원합니다. 조금 더 오래된 브라우저는 최소 ECMAScript 3를 지원합니다. 그리고 6번째 표준 개정판이 작업 중에 있습니다.
122+
JavaScript의 표준은 ECMAScript입니다. 2012년 현재, 모든 모던 브라우저는 ECMAScript 5.1을 완벽히 지원합니다. 조금 더 오래된 브라우저는 최소 ECMAScript 3를 지원합니다. 2015년 6월 현재, ES6/ES2015의 사양이 승인되었습니다. ECMAScript 2015 언어 사양은 <a target="_blank" href="http://www.ecma-international.org/ecma-262/6.0/index.html">Ecma International</a>에서 자세히 볼 수 있습니다.
121123
</p>
122124

123125
<p>
@@ -827,9 +829,6 @@ <h3>뉴스레터</h3>
827829
<p class="source link">
828830
<a href="http://emberweekly.com" target="_blank">Ember Weekly</a>
829831
</p>
830-
<p class="source link">
831-
<a href="http://backboneweekly.com" target="_blank">Backbone Weekly</a>
832-
</p>
833832
<p class="source link">
834833
<a href="http://nodeweekly.com" target="_blank">Node Weekly</a>
835834
</p>

public/pt-br/index.html

+10-14
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<body>
1919
<header>
20-
<a class="fork-me" href="https://github.com/braziljs/js-the-right-way" target="_blank"><img style="position: absolute; top: 0; right: 0; border: 0" src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png" alt="Fork me on GitHub"></a>
20+
<a target="_blank" href="https://github.com/braziljs/js-the-right-way"><img style="position: absolute; top: 0; left: 0; border: 0" src="https://camo.githubusercontent.com/8b6b8ccc6da3aa5722903da7b58eb5ab1081adee/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f6c6566745f6f72616e67655f6666373630302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_left_orange_ff7600.png"></a>
2121

2222
<div class="wrapper">
2323
<h1>JavaScript</h1>
@@ -26,11 +26,13 @@ <h1>JavaScript</h1>
2626

2727
<div id="dropdown">
2828
<input id="toggle" type="checkbox">
29-
<label for="toggle"><span class="flag">English</span></label>
29+
<label for="toggle"><span class="flag">Português</span></label>
3030
<ul>
31-
<li><a href="/es-es">Español</a></li>
32-
<li><a href="/pt-br">Português</a></li>
33-
<li><a href="/ko-kr">한국어</a></li>
31+
<li><a href="/ko-kr"> 한국어 </a></li>
32+
<li><a href="/es-es"> Español </a></li>
33+
<li><a href="/de-de"> German </a></li>
34+
<li><a href="/"> English </a></li>
35+
<li><a href="/zh-tw"> 繁體中文 </a></li>
3436
</ul>
3537
</div>
3638
</header>
@@ -121,7 +123,7 @@ <h3>VERSÃO ATUAL</h3>
121123
</p>
122124

123125
<p>
124-
Uma boa referência para versões, referências e novidades sobre o JavaScript pode ser encontrada no
126+
Uma boa referência para versões, referências e novidades sobre o JavaScript pode ser encontrada no
125127
<a target="_blank" href="https://developer.mozilla.org/pt-BR/docs/JavaScript">Mozilla Developer Network</a>.
126128
</p>
127129

@@ -222,7 +224,7 @@ <h3>Funções de fechamentos (<i>Closure</i>)</h3>
222224

223225
<p>
224226
<i>Closures</i> (fechamentos) são funções que se referem a variáveis livres (independentes). Em outras palavras, a função definida no <i>closure</i> "lembra" do ambiente em que ela foi criada.
225-
227+
226228
Esse é um importante conseito a ser entendido pois pode ser muito útil durante o desenvolvimento, como emulando métodos privados. Também pode ajudar a aprender como evitar erros comuns, como criando closures em loops.
227229
</p>
228230

@@ -257,7 +259,7 @@ <h3>Expressão de Função Invocada Imediatamente (IIFE - Immediately-Invoked Fu
257259
<section class="section" id="patterns">
258260
<div class="wrapper">
259261
<h1><a href="#patterns">PADRÕES</a></h1>
260-
262+
261263
<h3>Descrição</h3>
262264

263265
<p>
@@ -827,15 +829,9 @@ <h3>Newsletter</h3>
827829
<p class="source link">
828830
<a href="http://designpepper.com/a-drip-of-javascript" target="_blank">A Drip of JavaScript</a>
829831
</p>
830-
<p class="source link">
831-
<a href="http://braziljs.org/" target="_blank">BrazilJS Weekly</a>
832-
</p>
833832
<p class="source link">
834833
<a href="http://emberweekly.com" target="_blank">Ember Weekly</a>
835834
</p>
836-
<p class="source link">
837-
<a href="http://backboneweekly.com" target="_blank">Backbone Weekly</a>
838-
</p>
839835
<p class="source link">
840836
<a href="http://nodeweekly.com" target="_blank">Node Weekly</a>
841837
</p>

0 commit comments

Comments
 (0)