Skip to content

Commit

Permalink
style: Add shared CSS and meganav to datasets docs (#400)
Browse files Browse the repository at this point in the history
* Add shared CSS and meganav

Signed-off-by: Jo Stichbury <[email protected]>

* Add end of file

Signed-off-by: Jo Stichbury <[email protected]>

* Add new heap data source

Signed-off-by: Jo Stichbury <[email protected]>

* adjust heap parameter

Signed-off-by: Jo Stichbury <[email protected]>

* Remove nav_version next to Kedro logo in top left; add Kedro logo

* Revise project name and author name

Signed-off-by: Jo Stichbury <[email protected]>

* Use full kedro icon and type for logo

* Add close btn to mobile nav

Signed-off-by: vladimir-mck <[email protected]>

* Add css for mobile nav logo image

Signed-off-by: vladimir-mck <[email protected]>

* Update close button for mobile nav

Signed-off-by: vladimir-mck <[email protected]>

* Add open button to mobile nav

Signed-off-by: vladimir-mck <[email protected]>

* Delete kedro-datasets/docs/source/kedro-horizontal-color-on-light.svg

Signed-off-by: vladimir-mck <[email protected]>

* Update conf.py

Signed-off-by: vladimir-mck <[email protected]>

* Update layout.html

Add links to subprojects

Signed-off-by: Jo Stichbury <[email protected]>

* Remove svg from docs -- not needed??

Signed-off-by: Jo Stichbury <[email protected]>

* linter error fix

Signed-off-by: Jo Stichbury <[email protected]>

---------

Signed-off-by: Jo Stichbury <[email protected]>
Signed-off-by: vladimir-mck <[email protected]>
Co-authored-by: Tynan DeBold <[email protected]>
Co-authored-by: vladimir-mck <[email protected]>
  • Loading branch information
3 people authored Nov 10, 2023
1 parent 45a52df commit d81a4d0
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 3 deletions.
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"
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

0 comments on commit d81a4d0

Please sign in to comment.