Skip to content
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
18 changes: 1 addition & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,7 @@
</picture>
</p>

<p align="center">
<a href="https://github.com/ecmwf/codex/raw/refs/heads/main/ESEE">
<img src="https://github.com/ecmwf/codex/raw/refs/heads/main/ESEE/foundation_badge.svg" alt="ECMWF Software EnginE">
</a>
<a href="https://github.com/ecmwf/codex/raw/refs/heads/main/Project Maturity">
<img src="https://github.com/ecmwf/codex/raw/refs/heads/main/Project Maturity/incubating_badge.svg" alt="Maturity Level">
</a>
<!-- <a href="https://codecov.io/gh/ecmwf/earthkit">
<img src="https://codecov.io/gh/ecmwf/earthkit/branch/main/graph/badge.svg" alt="Code Coverage">
</a> -->
<a href="https://opensource.org/licenses/apache-2-0">
<img src="https://img.shields.io/badge/Licence-Apache 2.0-blue.svg" alt="Licence">
</a>
<a href="https://github.com/ecmwf/earthkit/releases">
<img src="https://img.shields.io/github/v/release/ecmwf/earthkit?color=purple&label=Release" alt="Latest Release">
</a>
</p>


<p align="center">
<!-- <a href="#quick-start">Quick Start</a>
Expand Down
1 change: 1 addition & 0 deletions docs/_static/book.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
129 changes: 129 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
@import url("https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap");

:root {
--font-stack: "Nunito", sans-serif;
--font-stack--monospace: "Nunito", sans-serif;
}

body {
font-family: "Nunito", sans-serif;
}

h1, h2, h3, h4, h5, h6 {
font-family: "Nunito", sans-serif;
}

/* Sidebar solid background colour */
.sidebar-drawer {
background: #262640;
}

/* SVG overlay – absolute on mobile so it collapses with the drawer */
.sidebar-drawer::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: url("octahedral-grid.svg") no-repeat top center / auto 150vh;
opacity: 0.08;
pointer-events: none;
z-index: 0;
}

/*
On desktop, switch the overlay to position: fixed so it stays in place
while scrolling (avoids background-attachment:fixed Safari flicker).
Width values mirror Furo's own sidebar-drawer widths at each breakpoint.
*/
@media screen and (min-width: 63em) {
.sidebar-drawer::before {
position: fixed;
top: 0;
left: 0;
width: calc(50% - 18.5em);
min-width: 15em;
height: 100vh;
}
}

@media screen and (min-width: 82em) {
.sidebar-drawer::before {
width: calc(50% - 26em);
}
}

/* ── xarray dark-mode fix for Furo "auto" theme ──────────────────────
xarray's inline <style> only targets explicit body[data-theme="dark"],
but Furo's auto mode keeps data-theme="auto" and relies on
@media (prefers-color-scheme: dark). Mirror the dark palette here
so xarray widgets remain readable when the OS is in dark mode.
─────────────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
body:not([data-theme="light"]) {
--xr-font-color0: rgba(255, 255, 255, 1);
--xr-font-color2: rgba(255, 255, 255, 0.54);
--xr-font-color3: rgba(255, 255, 255, 0.38);
--xr-border-color: #555;
--xr-disabled-color: #888;
--xr-background-color: var(--color-background-primary, #131416);
--xr-background-color-row-even: var(--color-background-secondary, #1a1c1e);
--xr-background-color-row-odd: var(--color-background-hover, #1e2124);
}
}

/* Dropdown container in the brand slot (above search bar) */
.ek-project-selector-brand {
padding: 0.4rem 0.75rem 0.6rem;
}

/* Related projects dropdown */
.ek-project-selector {
display: flex;
align-items: center;
gap: 0.4rem;
}

.ek-project-selector select {
flex: 1;
min-width: 0;
background: #131320;
color: #fff;
border: 1px solid #444;
border-radius: 4px;
padding: 0.3rem 0.4rem;
font-size: 0.8rem;
font-family: inherit;
cursor: pointer;
outline: none;
appearance: auto;
}

.ek-project-selector select:focus {
border-color: #FCE54B;
}

/* Homepage card styling */
.sd-card .sd-card-img-top {
height: 100px;
width: auto;
object-fit: contain;
margin: 1rem auto 0 auto;
display: block;
background: transparent;
filter: brightness(0.8) invert(0.1);
transition: filter 0.2s ease;
}

/* Dark mode when user explicitly selects dark */
[data-theme="dark"] .sd-card .sd-card-img-top {
filter: invert(1) brightness(0.6);
}

/* Dark mode when theme = auto and system prefers dark */
@media (prefers-color-scheme: dark) {
body:not([data-theme="light"]) .sd-card .sd-card-img-top {
filter: invert(1) brightness(0.6);
}
}
44 changes: 44 additions & 0 deletions docs/_static/custom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
document.addEventListener("DOMContentLoaded", function () {
// Packages list is injected at build time from earthkit-packages.yml via earthkit-packages.js
var packages = window.earthkitPackages || [];
if (!packages.length) return;

// Build the <select> from the YAML-derived packages list
var select = document.createElement("select");
select.setAttribute("aria-label", "Select earthkit documentation");

// Placeholder option
var placeholder = document.createElement("option");
placeholder.value = "";
placeholder.textContent = "Explore the earthkit ecosystem";
placeholder.disabled = true;
placeholder.selected = true;
select.appendChild(placeholder);

packages.forEach(function (p) {
var opt = document.createElement("option");
opt.value = p.url;
opt.textContent = p.name;
select.appendChild(opt);
});

// Navigate immediately on selection
select.addEventListener("change", function () {
var url = select.value;
if (url) {
window.location.href = url;
select.value = "";
}
});

// Wrapper div
var wrapper = document.createElement("div");
wrapper.className = "ek-project-selector";
wrapper.appendChild(select);

// Mount into the brand placeholder above the search bar
var mount = document.getElementById("ek-project-selector-mount");
if (mount) {
mount.appendChild(wrapper);
}
});
Loading
Loading