Skip to content

Commit 50e0d17

Browse files
committed
Added plotly studio image to nav bar on the left and applied plotly styling
1 parent 6316104 commit 50e0d17

File tree

3 files changed

+77
-0
lines changed

3 files changed

+77
-0
lines changed

mkdocs.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,17 @@ plugins:
1919

2020
theme:
2121
name: "material"
22+
custom_dir: "pages/overrides"
2223

2324
markdown_extensions:
2425
- footnotes
2526
- pymdownx.snippets:
2627
base_path: ["docs/tmp"]
2728

29+
extra_css:
30+
- css/extra_css.css
31+
- https://docs.plotly.com/css/plotly-style.css
32+
2833
nav:
2934
- Event Reference: examples/plotlyjs-events.md
3035
- Fundamentals:

pages/css/extra_css.css

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.md-nav--primary {
2+
position: relative;
3+
display: flex;
4+
flex-direction: column;
5+
}
6+
7+
.nav-bottom-image{
8+
position: sticky;
9+
bottom: 0;
10+
z-index: 10;
11+
background: var(--md-default-bg-color);
12+
padding: 30px 25px 0px 25px;
13+
height: 12.1rem;
14+
}
15+
16+
.nav-bottom-image img{
17+
height: auto !important;
18+
width: 100%;
19+
object-fit: contain;
20+
}
21+
22+
.nav-bottom-image a::after {
23+
content: none !important;
24+
}

pages/overrides/main.html

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{% extends "base.html" %}
2+
3+
{% block site_nav %}
4+
5+
<!-- Main navigation -->
6+
{% if nav %}
7+
{% if page and page.meta and page.meta.hide %}
8+
{% set hidden = "hidden" if "navigation" in page.meta.hide %}
9+
{% endif %}
10+
<div
11+
class="md-sidebar md-sidebar--primary"
12+
data-md-component="sidebar"
13+
data-md-type="navigation"
14+
{{ hidden }}
15+
>
16+
<div class="md-sidebar__scrollwrap">
17+
<div class="md-sidebar__inner">
18+
{% include "partials/nav.html" %}
19+
</div>
20+
21+
<div class="nav-bottom-image">
22+
<a href="https://plotly.com/webinars/data-apps-publishing-playbook/?utm_medium=graphing_libraries&utm_campaign=plotly_publishing_playbook&utm_content=sidebar" target="_blank">
23+
<img src="https://images.prismic.io/plotly-marketing-website-2/aNMW2J5xUNkB1CWg_PlotlyPublishingPlaybook.jpg?auto=format,compress" alt="plotly-studio-banner" type="image/avif">
24+
</a>
25+
</div>
26+
</div>
27+
</div>
28+
{% endif %}
29+
30+
<!-- Table of contents -->
31+
{% if not "toc.integrate" in features %}
32+
{% if page and page.meta and page.meta.hide %}
33+
{% set hidden = "hidden" if "toc" in page.meta.hide %}
34+
{% endif %}
35+
<div
36+
class="md-sidebar md-sidebar--secondary"
37+
data-md-component="sidebar"
38+
data-md-type="toc"
39+
{{ hidden }}
40+
>
41+
<div class="md-sidebar__scrollwrap">
42+
<div class="md-sidebar__inner">
43+
{% include "partials/toc.html" %}
44+
</div>
45+
</div>
46+
</div>
47+
{% endif %}
48+
{% endblock %}

0 commit comments

Comments
 (0)