Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: Add shared CSS and meganav to datasets docs #400

Merged
merged 20 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 44 additions & 2 deletions kedro-datasets/docs/source/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,50 @@
{% extends "!layout.html" %}
{% extends "!layout.html" %} {%- block extrabody %}

<div class="wy-grid-header">
<div class="wy-header-logo">
{%- set _logo_url = logo_url|default(pathto('_static/' + (logo or ""), 1))
%} {%- set _root_doc = root_doc|default(master_doc) %}
<a href="{{ pathto(_root_doc) }}">
<img src="https://raw.githubusercontent.com/kedro-org/kedro-brand-identity/main/horizontal/color/kedro-horizontal-color-on-light.svg" class="logo" alt="{{ _('Logo') }}" />
</a>
</div>

<div class="wy-main-nav">
<a href="https://docs.kedro.org/">Kedro</a>
<a href="https://docs.kedro.org/projects/kedro-viz/en/stable/">Kedro-Viz</a>
<a href="/" class="active">Kedro-Datasets</a>
</div>

{%- include "searchbox.html" %}
</div>

{% endblock %}

{%- block extrahead %}
<script type="text/javascript">
window.heap=window.heap||[],heap.load=function(e,t){window.heap.appid=e,window.heap.config=t=t||{};var r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src="https://cdn.heapanalytics.com/js/heap-"+e+".js";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(r,a);for(var n=function(e){return function(){heap.push([e].concat(Array.prototype.slice.call(arguments,0)))}},p=["addEventProperties","addUserProperties","clearEventProperties","identify","resetIdentity","removeEventProperty","setEventProperties","track","unsetEventProperty"],o=0;o<p.length;o++)heap[p[o]]=n(p[o])};
heap.load({{ "2164194004" | env_override }});{# 2164194004 coresponds to the Development environment #}

heap.load({{ "1625763777" }});

// Wait for DOM to load and clone main nav into the sidebar
document.addEventListener("DOMContentLoaded", function() {
var sidebarSearch = document.querySelector('.wy-side-nav-search div[role="search"]');
sidebarSearch.parentNode.insertBefore(document.querySelector('.wy-main-nav').cloneNode(true), sidebarSearch);

// Prepend close button to mobile header
var closeBtn = document.createElement("span");
closeBtn.dataset.toggle = 'wy-nav-top';
closeBtn.classList.add('wy-nav-top-close');
document.querySelector('.wy-nav-top').prepend(closeBtn);
// Prepend open button to mobile header
var openBtn = document.createElement("span");
openBtn.dataset.toggle = 'wy-nav-top';
openBtn.classList.add('wy-nav-top-open');
document.querySelector('.wy-nav-top').prepend(openBtn);
});
</script>
<link rel="stylesheet" href="https://kedro-shared-files.s3.eu-west-2.amazonaws.com/qb1-sphinx-rtd.css" type="text/css"
/>
<link rel="stylesheet" href="https://kedro-shared-files.s3.eu-west-2.amazonaws.com/theme-overrides.css" type="text/css"
/>
{% endblock %}
3 changes: 2 additions & 1 deletion kedro-datasets/docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

# -- Project information -----------------------------------------------------

project = "kedro-datasets"
project = "kedro"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if this should still be kedro-datasets (sorry I didn't catch that early on)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops! Well, next time. At least it's now merged ! And https://docs.kedro.org/projects/kedro-datasets/en/latest/ is looking splendid.

author = "kedro"

# The short X.Y version.
Expand All @@ -52,6 +52,7 @@
"sphinx_copybutton",
"myst_parser",
"notfound.extension",
"sphinxcontrib.jquery",
]

# enable autosummary plugin (table of contents for modules/classes/class
Expand Down