Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fb17785

Browse files
Merge pull request plotly#1417 from plotly/cleanup
Cleanup
2 parents ee9bba3 + 6d7867d commit fb17785

File tree

14 files changed

+1508
-1937
lines changed

14 files changed

+1508
-1937
lines changed

_data/cache_bust_css.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
237a635fa4eec3f9922f5a2e1e8db22c ../all_static/css/main.css
1+
e37c5d56b6d30ee1a2bb50451a2bd902 ../all_static/css/main.css
22
a5765df8bc2358dd61c19edcc0cbef7d ../all_static/css/normalize.css

_includes/_new/_page-components/_footer-main.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,3 +203,4 @@ <h6 style="color:#119dff" class="--footer-heading">JOIN THE DASH CLUB</h6>&#x9;&
203203
}
204204
});
205205
</script>
206+
-->

_includes/_new/_page-components/_header-main.html

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,31 +14,6 @@
1414
<!-- <li><a href="https://plot.ly/create/" class="button">PRODUCTS</a></li> -->
1515
</ul>
1616
</nav>
17-
<div class="mobile-menu-btn" ng-click="mobile = !mobile" ng-class="{'active': mobile}" style="cursor: pointer;">
18-
19-
20-
<div href="#" class="menu"><span></span></div>
21-
22-
</div>
23-
<nav class="--nav-mobile">
24-
<ul>
25-
<li><a href="https://plot.ly/feed/" target="_blank"><span class="--item">Feed</span></a></li>
26-
<li><a href="https://plot.ly/products/cloud/" target="_blank"><span class="--item">Pricing</span></a></li>
27-
<li><a href="https://plot.ly/api/" onmouseover="dropDownMenu('api-menu')" onmouseout="hideDropDownMenu('api-menu')" target="_self"><span class="--item">API
28-
<div class="icon">
29-
<svg style="width:24px;height:24px" viewbox="0 0 24 24"></svg>
30-
<path fill="#000000" d="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"></path>
31-
</div></span></a></li>
32-
<li class="tablet"><a id="toolsignin" href="/settings" target="_self" class="headerbar-nav-item --product-header">
33-
Sign
34-
In</a></li>
35-
<li class="tablet"><a id="signup" href="/settings" target="_self" class="button --enterprise-quaternary">SIGN UP</a></li>
36-
<li class="tablet"><a href="https://plot.ly/products/cloud/" class="button">UPGRADE</a></li>
37-
<li class="tablet"><a href="https://plotly.typeform.com/to/seG7Vb" data-mode="1" target="_blank" class="typeform-share button --enterprise-quaternary">
38-
REQUEST
39-
DEMO</a></li>
40-
</ul>
41-
</nav>
4217
</div>
4318
</div>
4419
</header>

_includes/_new/_page-components/insertSidebarElement.html

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,24 @@
33
var array = [];
44

55
$('.tutorial-content :header:not(h6)').each(function (i, e) {
6-
76
var item = $(e);
87
var itemText = item.text();
9-
10-
118
var hash = itemText.replace(/[^a-z0-9\s]/gi, '').replace(/[_\s]/g, '-').replace(/^-+|-+$/g, '').toLowerCase();
12-
console.log(hash);
139
item.attr("id", hash);
14-
15-
array.push(itemText);
16-
10+
array.push({text: itemText, tag: item.prop("tagName"), hash: hash});
1711
});
1812

19-
$(".--sidebar-list").html(array.map(function(value) {
20-
var hash = value.replace(/[^a-z0-9\s]/gi, '').replace(/[_\s]/g, '-').replace(/^-+|-+$/g, '').toLowerCase();
21-
return('<li class="--sidebar-item"><a href="#' + hash + '">' + value.replace(/[^a-z0-9\s\.:]/gi, '') + '</a></li>');
13+
$(".--sidebar-list").html(array.map(function(entry) {
14+
var text = entry.text.replace(/[^a-z0-9\s\.:]/gi, '');
15+
if(entry.tag.toLowerCase() < "h4"){
16+
return('<li class="--sidebar-item"><a href="#' + entry.hash + '">' + text + '</a></li>');
17+
}
18+
else {
19+
return('<li class="--sidebar-item"><a href="#' + entry.hash + '">' + text + '</a></li>');
20+
}
2221
}).join(""));
2322

2423

25-
$(".tutorial-content :header:not(h6)").append( "\<div class=\"icon copy\" data-tooltip=\"Click to copy direct link\"><svg style=\"width:24px;height:24px\" viewBox=\"0 0 24 24\"><path fill=\"#000000\" d=\"M10.59,13.41C11,13.8 11,14.44 10.59,14.83C10.2,15.22 9.56,15.22 9.17,14.83C7.22,12.88 7.22,9.71 9.17,7.76V7.76L12.71,4.22C14.66,2.27 17.83,2.27 19.78,4.22C21.73,6.17 21.73,9.34 19.78,11.29L18.29,12.78C18.3,11.96 18.17,11.14 17.89,10.36L18.36,9.88C19.54,8.71 19.54,6.81 18.36,5.64C17.19,4.46 15.29,4.46 14.12,5.64L10.59,9.17C9.41,10.34 9.41,12.24 10.59,13.41M13.41,9.17C13.8,8.78 14.44,8.78 14.83,9.17C16.78,11.12 16.78,14.29 14.83,16.24V16.24L11.29,19.78C9.34,21.73 6.17,21.73 4.22,19.78C2.27,17.83 2.27,14.66 4.22,12.71L5.71,11.22C5.7,12.04 5.83,12.86 6.11,13.65L5.64,14.12C4.46,15.29 4.46,17.19 5.64,18.36C6.81,19.54 8.71,19.54 9.88,18.36L13.41,14.83C14.59,13.66 14.59,11.76 13.41,10.59C13,10.2 13,9.56 13.41,9.17Z\"/> </svg> </div>");
24+
//$(".tutorial-content :header:not(h6)").append( "\<div class=\"icon copy\" data-tooltip=\"Click to copy direct link\"><svg style=\"width:24px;height:24px\" viewBox=\"0 0 24 24\"><path fill=\"#000000\" d=\"M10.59,13.41C11,13.8 11,14.44 10.59,14.83C10.2,15.22 9.56,15.22 9.17,14.83C7.22,12.88 7.22,9.71 9.17,7.76V7.76L12.71,4.22C14.66,2.27 17.83,2.27 19.78,4.22C21.73,6.17 21.73,9.34 19.78,11.29L18.29,12.78C18.3,11.96 18.17,11.14 17.89,10.36L18.36,9.88C19.54,8.71 19.54,6.81 18.36,5.64C17.19,4.46 15.29,4.46 14.12,5.64L10.59,9.17C9.41,10.34 9.41,12.24 10.59,13.41M13.41,9.17C13.8,8.78 14.44,8.78 14.83,9.17C16.78,11.12 16.78,14.29 14.83,16.24V16.24L11.29,19.78C9.34,21.73 6.17,21.73 4.22,19.78C2.27,17.83 2.27,14.66 4.22,12.71L5.71,11.22C5.7,12.04 5.83,12.86 6.11,13.65L5.64,14.12C4.46,15.29 4.46,17.19 5.64,18.36C6.81,19.54 8.71,19.54 9.88,18.36L13.41,14.83C14.59,13.66 14.59,11.76 13.41,10.59C13,10.2 13,9.56 13.41,9.17Z\"/> </svg> </div>");
2625

2726
</script>

_includes/breadcrumb.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</div>
2727
<a href="https://help.plot.ly/"><span>Help</span></a>
2828
</li>
29-
<li class="--breadcrumb-item"><a href="/api/"><span>Open Source Graphing Libraries</span></a></li>
29+
<li class="--breadcrumb-item"><a href="/graphing-libraries/"><span>Open Source Graphing Libraries</span></a></li>
3030
{% if page.permalink != "/api/" %}
3131
<li class="--breadcrumb-item">
3232
<a href="/{% if page.permalink contains 'javascript' %}javascript{% else %}{{page.language}}{% endif %}" {% if page.layout == "langindex" %} class="--current" {% endif %} ><span>{% if page.language == "plotly_js" %}plotly.js{% elsif page.language == "ggplot2" %}ggplot2{% elsif page.language == "matlab" %}MATLAB{% elsif page.language == "matplotlib" %}matplotlib{% else %}{{page.language | capitalize}}{% endif %}</span></a>

0 commit comments

Comments
 (0)