Skip to content

Commit d73f1e4

Browse files
committed
some clean up
added meta/sponsor sections for various languages - sponsored by fastly - browser support section
1 parent 3867614 commit d73f1e4

File tree

5 files changed

+62
-26
lines changed

5 files changed

+62
-26
lines changed

_includes/auto_examples.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ <h4 id="{{ example.name | replace:' ','-' | remove:',' | downcase | strip_html }
2121
{% if example.plot_url contains '.gif' or example.plot_url contains '.png' %}
2222
<img src="{{ example.plot_url }}" />
2323
{% else %}
24-
<iframe id="auto-examples" src="{{ example.plot_url }}{% if example.plot_url contains 'plot.ly' %}.embed{% endif %}"
24+
<iframe id="auto-examples" src="{{ example.plot_url }}{% if example.plot_url contains 'plot.ly' %}.embed{% endif %}"
2525
style="width: {% if example.width %}{{example.width}}px;{% else %}100%;{% endif %} height: {% if example.height %}{{example.height}}px;{% else %}550px;{% endif %} border: none;"></iframe>
2626
{% endif %}
2727
</div>

_layouts/base.html

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -105,35 +105,37 @@ <h1>
105105

106106
<!-- Start Plotly Basics Section -->
107107
<section class="tutorial-content">
108-
{{ content }}
108+
{{ content }}
109109
</section>
110110
<!--End Plotly Basics Section-->
111+
{% if page.language == "plotly_js" %}
112+
<section class="meta">
113+
<div class="wrap">
114+
<img width="250" src="{{ site.staticurl }}/images/browser_support.png">
115+
<p style="text-align: center;">
116+
<b style="color:#447adb;">plotly.js</b> runs on all SVG-compatible browsers
117+
</p>
118+
</div>
119+
</section>
120+
{% endif %}
111121
</section>
112122
</div>
113123
</main>
124+
114125
{% include helpbox.html %}
115126

116127

117128
{% include _new/_page-components/insertSidebarElement.html %}
118129

119-
120-
121-
{% if page.language == "plotly_js" %}
122-
<img width="250" src="{{ site.staticurl }}/images/browser_support.png">
123-
<p style="text-align: center;">
124-
<b style="color:#447adb;">plotly.js</b> runs on all SVG-compatible browsers
125-
</p>
126-
{% endif %}
130+
{% include _new/_page-components/_footer-main.html %}
127131

128132
{% if page.language == "r" or page.language == "python" %}
129-
<script>
130-
window.intercomSettings = { app_id: "anwi88es" };
131-
</script>
132-
<script>(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',intercomSettings);}else{var d=document;var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};w.Intercom=i;function l(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/anwi88es';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})()</script>
133+
<script>
134+
window.intercomSettings = { app_id: "anwi88es" };
135+
</script>
136+
<script>(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',intercomSettings);}else{var d=document;var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};w.Intercom=i;function l(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/anwi88es';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})()</script>
133137
{% endif %}
134138

135-
{% include _new/_page-components/_footer-main.html %}
136-
137139
</body>
138140

139141
</html>

_layouts/langindex.html

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,23 @@
2424
<!-- Start pulling content -->
2525
{{ content }}
2626
<!--End content -->
27+
28+
{% if page.language == "plotly_js" %}
29+
<section class="sponsor--wrap">
30+
<div class="sponsor--desc">Distribution powered by</div>
31+
<div class="sponsor--title">
32+
<a target="_blank" href="https://www.fastly.com/">
33+
<img src="https://www.fastly.com/sites/default/files/fastly_logo.png" alt="Fastly">
34+
</a>
35+
</div>
36+
</section>
37+
{% endif %}
2738
</section>
2839
</div>
2940

3041
</main>
3142

32-
{% if page.language == "plotly_js" %}
33-
<section class="sponsor--wrap">
34-
<div class="sponsor--desc">Distribution powered by</div>
35-
<div class="sponsor--title">
36-
<a target="_blank" href="https://www.fastly.com/">
37-
<img src="https://www.fastly.com/sites/default/files/fastly_logo.png" alt="Fastly">
38-
</a>
39-
</div>
40-
</section>
41-
{% endif %}
43+
4244

4345
{% include helpbox.html %}
4446

scss/_components/_sidebar.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,7 @@ aside {
793793
&--list {
794794
display: flex;
795795
align-items: stretch;
796+
margin-top:$unit*2;
796797
@include handheld {
797798
max-width: 100%;
798799
flex-wrap: wrap;

scss/_pages/_tutorial-single.scss

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,4 +236,35 @@ div.output_html{
236236
overflow-x: auto;
237237

238238
}
239+
}
240+
section.sponsor{
241+
&--wrap{
242+
//@extend .wrap;
243+
display: flex;
244+
margin-top:$unit*2;
245+
padding:$unit*4;
246+
background: $lb;
247+
max-width:$mw;
248+
justify-content: center;
249+
flex-direction: column;
250+
align-items: center;
251+
}
252+
&--title{
253+
254+
}
255+
}
256+
section.meta{
257+
background: $lb;
258+
padding:$unit*4;
259+
border:$border;
260+
div.wrap{
261+
display: flex;
262+
align-items: center;
263+
justify-content: center;
264+
flex-direction: column;
265+
266+
img{
267+
margin:0 auto;
268+
}
269+
}
239270
}

0 commit comments

Comments
 (0)