forked from plotly/documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlang-navigation.html
executable file
·112 lines (104 loc) · 4.68 KB
/
lang-navigation.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<nav class="lang-nav">
<ul class="lang-nav--list">
{% assign page_type = page.permalink | remove_first: page.language %}
{% if page.permalink contains "javascript" %}
{% assign page_type = page.permalink | remove_first: "javascript" %}
{% endif %}
{% if page.language == "python" %}
{% assign pyclass = "current" %}
{% elsif page.language == "pandas" %}
{% assign pdclass = "current" %}
{% elsif page.language == "excel" %}
{% assign xlsxclass = "current" %}
{% elsif page.language contains "matlab" %}
{% assign matclass = "current" %}
{% elsif page.language == "r" %}
{% assign rclass = "current" %}
{% elsif page.url contains "nodejs" %}
{% assign nodejsclass = "current" %}
{% elsif page.url contains "julia" %}
{% assign juliaclass = "current" %}
{% elsif page.url contains "matplotlib" %}
{% assign matplotclass = "current" %}
{% elsif page.url contains "ggplot2" %}
{% assign ggplotclass = "current" %}
{% elsif page.url contains "javascript" %}
{% assign plotjsclass = "current" %}
{% endif %}
{% assign allpages = site.posts %}
{% for page in allpages %}
{% if page.permalink contains {{page_type}} and page.language == "excel" %}
<li class="lang-nav--item">
<a class="lang_nav_button {{xlsxclass}}" href="http://help.plot.ly/excel{{page_type}}">
<img src="https://plot.ly/gh-pages/documentation/static/images/excel-small.png" alt="python" class="lang_nav_thum">
Excel
</a>
</li>
{% endif %}
{% if page.permalink contains {{page_type}} and page.language == "python" %}
<li class="lang-nav--item">
<a class="lang_nav_button {{pyclass}}" href="/python{{page_type}}">
<img src="https://plot.ly/gh-pages/documentation/static/images/python-small.png" alt="python" class="lang_nav_thum">
Python
</a>
</li>
{% endif %}
{% if page.permalink contains {{page_type}} and page.language == "pandas" %}
<li class="lang-nav--item">
<a class="lang_nav_button {{pdclass}}" href="/pandas{{page_type}}">
<img src="https://plot.ly/gh-pages/documentation/static/images/pandas-small.png" alt="pandas" class="lang_nav_thum">
Pandas
</a>
</li>
{% endif %}
{% if page.permalink contains {{page_type}} and page.language == "matlab" %}
<li class="lang-nav--item">
<a class="lang_nav_button {{matclass}}" href="/matlab{{page_type}}">
<img src="https://plot.ly/gh-pages/documentation/static/images/MATLAB-small.png" alt="matlab" class="lang_nav_thum">
MATLAB
</a>
</li>
{% endif %}
{% if page.permalink contains {{page_type}} and page.language == "r" %}
<li class="lang-nav--item">
<a class="lang_nav_button {{rclass}}" href="/r{{page_type}}">
<img src="https://plot.ly/gh-pages/documentation/static/images/r-small.png" alt="r" class="lang_nav_thum">
R
</a>
</li>
{% endif %}
{% if page.permalink contains {{page_type}} and page.language == "matplotlib" %}
<li class="lang-nav--item">
<a class="lang_nav_button {{matplotclass}}" href="/matplotlib{{page_type}}">
<img src="https://plot.ly/gh-pages/documentation/static/images/matplotlib_med.png" alt="matplotlib" class="lang_nav_thum">
matplotlib
</a>
</li>
{% endif %}
{% if page.permalink contains {{page_type}} and page.language == "ggplot2" %}
<li class="lang-nav--item">
<a class="lang_nav_button {{ggplotclass}}" href="/ggplot2{{page_type}}">
<img src="http://surf8.blue/wordpress/wp-content/uploads/2015/02/ggplot2-official-hexbin-logo.png" alt="ggplot2" class="lang_nav_thum">
ggplot2
</a>
</li>
{% endif %}
{% if page.permalink contains {{page_type}} and page.language == "plotly_js" %}
<li class="lang-nav--item">
<a class="lang_nav_button {{plotjsclass}}" href="/javascript{{page_type}}">
<img src="https://images.plot.ly/language-icons/api-home/js-logo.png" alt="plotly.js" class="lang_nav_thum">
plotly.js
</a>
</li>
{% endif %}
{% if page.permalink contains {{page_type}} and page.language == "nodejs" %}
<li class="lang-nav--item">
<a class="lang_nav_button" href="/nodejs{{page_type}}">
<img src="https://nodejs.org/static/images/logos/nodejs-new-pantone-black.png" alt="node js" class="lang_nav_thum">
node.js
</a>
</li>
{% endif %}
{% endfor %}
</ul>
</nav>