|
1 | | -<div class="container code-samples"> |
2 | | - <div class="columns"> |
3 | | - <div class="column is-8 is-offset-2"> |
4 | | - <div class="is-fullwidth"> |
5 | | - <!-- Tab links --> |
6 | | - <div class="tab"> |
7 | | - <button class="tablinks" onclick="openCode(event, 'Javascript')" id="defaultOpen">Node.js</button> |
8 | | - <button class="tablinks" onclick="openCode(event, 'Python')">Python</button> |
9 | | - <button class="tablinks" onclick="openCode(event, 'Go')">Go</button> |
10 | | - <button class="tablinks" onclick="openCode(event, 'Dockerfile')">Dockerfile</button> |
11 | | - <button class="tablinks" onclick="openCode(event, 'Bash')">Bash</button> |
12 | | - <button class="tablinks" onclick="openCode(event, 'Java')">Java</button> |
13 | | - </div> |
14 | | - </div> |
15 | | - |
16 | | - {% include landing-page/code-examples/java.html %} |
17 | | - {% include landing-page/code-examples/go.html %} |
18 | | - {% include landing-page/code-examples/python.html %} |
19 | | - {% include landing-page/code-examples/javascript.html %} |
20 | | - {% include landing-page/code-examples/bash.html %} |
21 | | - {% include landing-page/code-examples/dockerfile.html %} |
| 1 | +<div class="code-samples"> |
| 2 | + <div class="is-fullwidth"> |
| 3 | + <!-- Tab links --> |
| 4 | + <div class="tab"> |
| 5 | + <button class="tablinks" onclick="openCode(event, 'Javascript')" id="defaultOpen">Node.js</button> |
| 6 | + <button class="tablinks" onclick="openCode(event, 'Python')">Python</button> |
| 7 | + <button class="tablinks" onclick="openCode(event, 'Go')">Go</button> |
| 8 | + <button class="tablinks" onclick="openCode(event, 'Dockerfile')">Dockerfile</button> |
| 9 | + <button class="tablinks" onclick="openCode(event, 'Bash')">Bash</button> |
| 10 | + <button class="tablinks" onclick="openCode(event, 'Java')">Java</button> |
22 | 11 | </div> |
23 | 12 | </div> |
| 13 | + |
| 14 | + {% include landing-page/code-examples/java.html %} |
| 15 | + {% include landing-page/code-examples/go.html %} |
| 16 | + {% include landing-page/code-examples/python.html %} |
| 17 | + {% include landing-page/code-examples/javascript.html %} |
| 18 | + {% include landing-page/code-examples/bash.html %} |
| 19 | + {% include landing-page/code-examples/dockerfile.html %} |
24 | 20 | </div> |
25 | 21 |
|
26 | 22 | <script> |
27 | 23 | function openCode(evt, cityName) { |
28 | | - // Declare all variables |
29 | 24 | var i, tabcontent, tablinks; |
30 | 25 |
|
31 | | - // Get all elements with class="tabcontent" and hide them |
32 | 26 | tabcontent = document.getElementsByClassName("tabcontent"); |
33 | 27 | for (i = 0; i < tabcontent.length; i++) { |
34 | 28 | tabcontent[i].style.display = "none"; |
35 | 29 | } |
36 | 30 |
|
37 | | - // Get all elements with class="tablinks" and remove the class "active" |
38 | 31 | tablinks = document.getElementsByClassName("tablinks"); |
39 | 32 | for (i = 0; i < tablinks.length; i++) { |
40 | 33 | tablinks[i].className = tablinks[i].className.replace(" active", ""); |
41 | 34 | } |
42 | 35 |
|
43 | | - // Show the current tab, and add an "active" class to the button that opened the tab |
44 | 36 | document.getElementById(cityName).style.display = "block"; |
45 | 37 | evt.currentTarget.className += " active"; |
46 | 38 | } |
47 | 39 |
|
48 | 40 | </script> |
49 | 41 | <script> |
50 | | - // Get the element with id="defaultOpen" and click on it |
51 | 42 | document.getElementById("defaultOpen").click(); |
52 | 43 | </script> |
0 commit comments