From 1d592eccbb896f431db69e3eb58b613d1c34e5fb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 9 Sep 2023 03:33:14 +0000 Subject: [PATCH] Merge pull request #4 from skoudoro/update-menu Menu update 5ce7f484b27c56a4f3444426751a405a2735c82c --- .buildinfo | 2 +- _static/macros.html | 7 + _static/scripts/components/toctree.js | 64 +++ _static/scripts/grg-sphinx-theme.js | 6 + _static/styles/animations.css | 21 + _static/styles/components/navbar.css | 50 +++ _static/styles/components/toctree.css | 48 ++ _static/styles/grg-sphinx-theme.css | 5 + _static/styles/variables.css | 4 + blog.html | 409 +++++++++++++++-- blog/2023.html | 409 +++++++++++++++-- blog/archive.html | 409 +++++++++++++++-- blog/author.html | 409 +++++++++++++++-- blog/author/shilpi-prasad.html | 409 +++++++++++++++-- blog/author/vara-lakshmi-bayanagari.html | 409 +++++++++++++++-- blog/category.html | 409 +++++++++++++++-- blog/category/gsoc.html | 409 +++++++++++++++-- blog/drafts.html | 409 +++++++++++++++-- blog/tag.html | 409 +++++++++++++++-- blog/tag/google.html | 409 +++++++++++++++-- developers.html | 409 +++++++++++++++-- documentation.html | 409 +++++++++++++++-- faq.html | 409 +++++++++++++++-- genindex.html | 409 +++++++++++++++-- gimbal_lock.html | 409 +++++++++++++++-- glossary.html | 409 +++++++++++++++-- index.html | 409 +++++++++++++++-- installation.html | 409 +++++++++++++++-- introduction.html | 409 +++++++++++++++-- mission.html | 409 +++++++++++++++-- posts/2023/2023_05_19_vara_week0.html | 409 +++++++++++++++-- posts/2023/2023_05_29_Shilpi_Week_0_1.html | 409 +++++++++++++++-- posts/2023/2023_05_29_vara_week1.html | 409 +++++++++++++++-- posts/2023/2023_06_05_Shilpi_week2.html | 409 +++++++++++++++-- posts/2023/2023_06_05_vara_week2.html | 409 +++++++++++++++-- posts/2023/2023_06_12_vara_week3.html | 409 +++++++++++++++-- posts/2023/2023_06_13_Shipi_week3.html | 409 +++++++++++++++-- posts/2023/2023_06_19_Shilpi_week4.html | 409 +++++++++++++++-- posts/2023/2023_06_19_vara_week4.html | 409 +++++++++++++++-- posts/2023/2023_06_26_vara_week5.html | 409 +++++++++++++++-- posts/2023/2023_07_06_shilpi_week5.html | 409 +++++++++++++++-- posts/2023/2023_07_06_shilpi_week6.html | 409 +++++++++++++++-- .../2023/2023_07_10_vara_week6_and_week7.html | 409 +++++++++++++++-- posts/2023/2023_07_12_Shilpi_week7.html | 409 +++++++++++++++-- posts/2023/2023_07_24_vara_week_8_9.html | 409 +++++++++++++++-- posts/2023/2023_07_27_Shilpi_week_8_9.html | 409 +++++++++++++++-- posts/2023/2023_07_31_Shilpi_week10.html | 409 +++++++++++++++-- posts/2023/2023_08_07_vara_week_10_11.html | 409 +++++++++++++++-- posts/2023/2023_08_08_Shilpi_week11.html | 409 +++++++++++++++-- posts/2023/2023_08_15_Shilpi_week12.html | 409 +++++++++++++++-- posts/2023/2023_08_21_vara_week_12_13.html | 409 +++++++++++++++-- posts/2023/2023_08_22_Shilpi_Week13.html | 409 +++++++++++++++-- posts/2023/2023_08_28_Shilpi_Week14.html | 409 +++++++++++++++-- search.html | 413 ++++++++++++++++-- stateoftheart.html | 409 +++++++++++++++-- subscribe.html | 409 +++++++++++++++-- theory/b_and_q.html | 409 +++++++++++++++-- theory/bmatrix.html | 409 +++++++++++++++-- theory/gqi.html | 409 +++++++++++++++-- theory/index.html | 409 +++++++++++++++-- theory/sh_basis.html | 409 +++++++++++++++-- theory/spherical.html | 409 +++++++++++++++-- 62 files changed, 20454 insertions(+), 1434 deletions(-) create mode 100644 _static/macros.html create mode 100644 _static/scripts/components/toctree.js create mode 100644 _static/scripts/grg-sphinx-theme.js create mode 100644 _static/styles/animations.css create mode 100644 _static/styles/components/navbar.css create mode 100644 _static/styles/components/toctree.css create mode 100644 _static/styles/grg-sphinx-theme.css create mode 100644 _static/styles/variables.css diff --git a/.buildinfo b/.buildinfo index dd1b4566..c05803c5 100644 --- a/.buildinfo +++ b/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 4f4926e84c5e9b7b19185b2601b9c80c +config: 7f0696966261c11bdd0c3656aa633dcc tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/_static/macros.html b/_static/macros.html new file mode 100644 index 00000000..3be46824 --- /dev/null +++ b/_static/macros.html @@ -0,0 +1,7 @@ +{% macro head_assets() %} + +{% endmacro %} + +{% macro body_scripts() %} + +{% endmacro %} \ No newline at end of file diff --git a/_static/scripts/components/toctree.js b/_static/scripts/components/toctree.js new file mode 100644 index 00000000..114dc393 --- /dev/null +++ b/_static/scripts/components/toctree.js @@ -0,0 +1,64 @@ +/** + * This method introduces a click function to click the + * underlying "a" tag for "li" element with toctree-l2 of the design. + */ +export const toctreeClick = () => { + const toctreeSubtopics = document.querySelectorAll( + ".toctree-wrapper li.toctree-l2" + ); + + toctreeSubtopics.forEach((toctreel2) => { + const link = toctreel2.querySelector("a"); + toctreel2.addEventListener("click", () => { + link.click(); + }); + }); +}; + +/** + * This method introduces calculations for grid for toc tree + * not letting the grid to overflow the space provided by + * sphinx on different platforms + */ +export const gridCalculation = () => { + const toctrees = document.querySelectorAll(".toctree-wrapper li.toctree-l1"); + + toctrees.forEach((toctree) => { + const containerWidth = toctree.clientWidth; + const subtrees = toctree.querySelectorAll("li.toctree-l2 a"); + const subtreeContainer = toctree.querySelector("ul"); + + let width = 0; + let noOfElements = 0; + const MAX_ELEMENTS = 3; + const UNIT_SPACE = 16; + + // handling the empty case + if (subtrees.length === 0) { + return; + } + + // handling the single element case + if (subtrees.length === 1) { + subtreeContainer.classList.add("grid-3"); + return; + } + + for (let i = 0; i < Math.min(MAX_ELEMENTS, subtrees.length); i++) { + // Getting the size of text in the list + // considering the padding applied on right and left side + width += subtrees[i].offsetWidth + 2 * UNIT_SPACE; + + if (width > containerWidth) { + break; + } else { + noOfElements++; + } + + // considering the gap applied + width += UNIT_SPACE; + } + + subtreeContainer.classList.add(`grid-${noOfElements}`); + }); +}; diff --git a/_static/scripts/grg-sphinx-theme.js b/_static/scripts/grg-sphinx-theme.js new file mode 100644 index 00000000..c282d77b --- /dev/null +++ b/_static/scripts/grg-sphinx-theme.js @@ -0,0 +1,6 @@ +import { toctreeClick, gridCalculation } from "./components/toctree.js"; + +document.addEventListener("DOMContentLoaded", () => { + toctreeClick(); + gridCalculation(); +}); diff --git a/_static/styles/animations.css b/_static/styles/animations.css new file mode 100644 index 00000000..7d08e667 --- /dev/null +++ b/_static/styles/animations.css @@ -0,0 +1,21 @@ +@keyframes slideUp { + from { + transform: translateY(5%); + opacity: 0; + } + to { + transform: translateY(0%); + opacity: 1; + } +} + +@keyframes slideDown { + from { + transform: translateY(-5%); + opacity: 0; + } + to { + transform: translateY(0%); + opacity: 1; + } +} \ No newline at end of file diff --git a/_static/styles/components/navbar.css b/_static/styles/components/navbar.css new file mode 100644 index 00000000..3b2b0384 --- /dev/null +++ b/_static/styles/components/navbar.css @@ -0,0 +1,50 @@ +/* Customizing the navbar dropdown */ +.bd-header .navbar-nav .dropdown .dropdown-menu { + box-shadow: var(--pst-shadow); + border: 0; + animation: 0.1s slideDown; + min-width: 10rem; + padding: 0.5rem 0; +} + +/* Overriding the CSS for section title in drop down */ +ol li>p:first-child, ul li>p:first-child { + margin-top: 0; + margin-bottom: 0; +} + +/* Making sure font behavior is same across the pages for navbar */ +.nav-link, +.bd-header .navbar-nav li a.nav-link, +.bd-header .navbar-nav .dropdown button, +.bd-sidebar-primary, +.bd-sidebar-primary .nav-link { + color: var(--pst-color-text-base); + font-size: 14px; + font-weight: 400; +} + +.nav-section-title.nav-link, +.bd-sidebar-primary .nav-section-title.nav-link { + color: var(--pst-color-text-muted); + font-weight: bold; +} + +.nav-section-title:not(:first-of-type) { + border-top: 1px solid var(--pst-color-border); +} + +.nav-link.nav-external:after { + transform: rotate(-45deg); + color: var(--pst-color-shadow); +} + +.dropdown-toggle:after { + position: absolute; + border: 0; + content: "\f078"; + font: var(--fa-font-solid); + font-size: .75em; + margin-top: 0.4rem; + margin-left: 0.5em; +} diff --git a/_static/styles/components/toctree.css b/_static/styles/components/toctree.css new file mode 100644 index 00000000..d70559e0 --- /dev/null +++ b/_static/styles/components/toctree.css @@ -0,0 +1,48 @@ +.toctree-wrapper li.toctree-l1 { + margin-bottom: 2em; +} + +.toctree-wrapper li.toctree-l1 a { + font-size: 1.8em; + font-weight: 600; + color: var(--pst-color-text-base); +} + +.toctree-wrapper li.toctree-l2 { + border: 1px solid var(--pst-color-border); + border-radius: 4px; + padding: 1em; +} + +.toctree-wrapper li.toctree-l2 a { + font-size: 16px; + font-weight: 600; + color: var(--pst-color-primary); + text-decoration: none; +} + +.toctree-wrapper li.toctree-l2:hover { + border: 1px solid var(--pst-color-secondary); + cursor: pointer; +} + +.toctree-wrapper li.toctree-l2:hover a { + color: var(--pst-color-secondary); +} + +.toctree-wrapper li.toctree-l1 ul { + display: grid; + gap: 1em; + padding-inline-start: 0; + padding: 1em 0; +} + +.toctree-wrapper li.toctree-l2 ul { + display: none; +} + +@media only screen and (max-width: 767px) { + .toctree-wrapper li.toctree-l1 ul { + grid-template-columns: repeat(1, 1fr); + } +} \ No newline at end of file diff --git a/_static/styles/grg-sphinx-theme.css b/_static/styles/grg-sphinx-theme.css new file mode 100644 index 00000000..763a4c4e --- /dev/null +++ b/_static/styles/grg-sphinx-theme.css @@ -0,0 +1,5 @@ +@import "./animations.css"; +@import "./variables.css"; +@import "./components/toctree.css"; +@import "./components/navbar.css"; +@import url("https://cdn.jsdelivr.net/gh/GRG-projects/CDN@latest/util.min.css"); \ No newline at end of file diff --git a/_static/styles/variables.css b/_static/styles/variables.css new file mode 100644 index 00000000..665d2336 --- /dev/null +++ b/_static/styles/variables.css @@ -0,0 +1,4 @@ +html { + --pst-icon-external-link: "\f178"; + --pst-shadow: 0 12px 32px rgba(0, 0, 0, .1), 0 2px 6px rgba(0, 0, 0, .08); +} \ No newline at end of file diff --git a/blog.html b/blog.html index 167510cc..e3d8dd6b 100644 --- a/blog.html +++ b/blog.html @@ -11,6 +11,7 @@ + @@ -97,7 +101,7 @@ - - +
@@ -218,22 +395,196 @@ aria-label="Site Navigation"> Site Navigation

+ +
@@ -2077,10 +2428,14 @@

+ + + +