diff --git a/.gitignore b/.gitignore index b50d4604..03e93670 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ reference/ _build -__pycache__ \ No newline at end of file +__pycache__ +.DS_Store \ No newline at end of file diff --git a/_static/css/common/override.css b/_static/css/common/override.css index e291d0e7..414fd900 100644 --- a/_static/css/common/override.css +++ b/_static/css/common/override.css @@ -3,15 +3,7 @@ This CSS file represents all the style changes to override the pydata-theme and sphinx. */ -h1, h2, h3, h4, h5, h6 { - color: var(--pst-color-text-base); - font-weight: 600; +.navbar-brand.logo { + padding: 1.1rem 1.1rem 1.1rem 0; } -h1 { - font-size: 2.5em; -} - -.bd-sidebar-primary .sidebar-primary-items__end { - margin-top: 0 !important; -} \ No newline at end of file diff --git a/_static/css/common/section-list.css b/_static/css/common/section-list.css deleted file mode 100644 index 48393f8e..00000000 --- a/_static/css/common/section-list.css +++ /dev/null @@ -1,34 +0,0 @@ -.section { - margin-bottom: 64px; -} - -.section .section-sub-topic-list { - display: grid; - grid-template-columns: repeat(3, 1fr); - gap: 1em; -} - -.section .section-sub-topic { - border: 1px solid var(--pst-color-border); - border-radius: 4px; - - padding: 1em; - - text-decoration: none; -} - -.section .section-sub-topic:hover { - border: 1px solid var(--pst-color-secondary); - color: var(--pst-color-secondary); - cursor: pointer; -} - -.section .section-sub-topic span { - font-weight: 600; -} - -@media only screen and (max-width: 767px) { - .section .section-sub-topic-list { - grid-template-columns: repeat(1, 1fr); - } -} \ No newline at end of file diff --git a/_static/css/common/variables.css b/_static/css/common/variables.css index bd8ad0e0..0245be3a 100644 --- a/_static/css/common/variables.css +++ b/_static/css/common/variables.css @@ -1,7 +1,15 @@ html[data-theme="light"] { - --pst-color-primary: #FD8D25; - --pst-color-secondary: #1B8BF4; + --gst-color-primary: #FD8D25; + --gst-color-secondary: #1B8BF4; + --gst-color-bg: var(--bs-white); + --gst-color-bg-gray: var(--bs-gray-100); + --gst-color-light-border: var(--pst-color-border); +} - --pst-color-link-hover: var(--pst-color-secondary); - --pst-color-border: rgb(229,229,229); +html[data-theme="dark"] { + --gst-color-primary: #FD8D25; + --gst-color-secondary: #1B8BF4; + --gst-color-bg: var(--bs-gray-900); + --gst-color-bg-gray: var(--bs-gray-900); + --gst-color-light-border: transparent; } diff --git a/_static/css/dipy.css b/_static/css/dipy.css index c6f758b2..8646f6c9 100644 --- a/_static/css/dipy.css +++ b/_static/css/dipy.css @@ -1,6 +1,12 @@ /* Index CSS file */ /* Do not add any css directly here.... */ +/* util css is no longer required as it is fetched from grg-sphinx-theme */ + +/* Common CSS */ + @import url("./common/variables.css"); -@import url("./common/section-list.css"); @import url("./common/override.css"); + +/* Home CSS */ +@import "./home/index.css"; \ No newline at end of file diff --git a/_static/css/home/carousel.css b/_static/css/home/carousel.css new file mode 100644 index 00000000..f7baeb64 --- /dev/null +++ b/_static/css/home/carousel.css @@ -0,0 +1,67 @@ +.carousel-item { + height: 440px; +} + +.carousel-item img { + /* border: 1px solid var(--pst-color-border); */ + +} + +.carousel-indicators [data-bs-target] { + background-color: var(--gst-color-primary); +} + + +.carousel-caption { + opacity: 0.9; + width: fit-content; + bottom: auto; + top: 40px; + left: 0; + background-color: var(--gst-color-primary); + box-shadow: var(--pst-shadow); +} + +.carousel-caption::after { + position: absolute; + content: ""; + height: 100%; + clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 35% 50%); + background-color: var(--gst-color-primary); + width: 60px; + transform: scaleX(-1); + right: -40px; + top: 0; +} + +.carousel-caption::before { + position: absolute; + left: 0; + content: ""; + width: 20px; + height: 100%; + background-image: linear-gradient(45deg, transparent 50%, var(--gst-color-primary-border) 50%); + background-size: 20px 20px; + background-repeat: no-repeat; + background-position: bottom right; + z-index: -1; +} + + +.carousel-caption h5 { + color: var(--bs-white); + font-size: 24px; + font-weight: 900; + margin: 0; +} + +.carousel-caption a, +.carousel-caption a:visited { + color: var(--bs-white); +} + +@media only screen and (max-width: 768px) { + .carousel-item { + height: 260px; + } +} \ No newline at end of file diff --git a/_static/css/home/cite.css b/_static/css/home/cite.css new file mode 100644 index 00000000..0fdf279e --- /dev/null +++ b/_static/css/home/cite.css @@ -0,0 +1,59 @@ +.cite { + display: grid; + grid-template-columns: 100px 1fr; + gap: 1em; + border: 2px solid var(--gst-color-light-border); + background-color: var(--gst-color-bg); + border-radius: 12px; + width: fit-content; + margin: 0 auto; +} + +.cite-icon-bg { + height: 90px; + width: 90px; + border-radius: 50%; + + background-color: var(--gst-color-primary); + color: var(--bs-white); + font-size: 52px; + margin: 0 auto; + + display: flex; + justify-content: center; + align-items: center; + + box-shadow: var(--pst-shadow); +} + + +.cite-detail { + display: flex; + flex-direction: column; + align-items: start; + justify-content: center; +} + +.cite-detail p { + margin: 0; + margin-bottom: 0; + font-size: 18px; +} + +.cite-link, +.cite-link:visited { + color: var(--gst-color-primary); + text-decoration: underline; + font-weight: 600; +} + +@media only screen and (max-width: 768px) { + .cite { + grid-template-columns: 1fr; + } + + .cite-detail { + flex-direction: column; + align-items: start; + } +} \ No newline at end of file diff --git a/_static/css/home/explore.css b/_static/css/home/explore.css new file mode 100644 index 00000000..1276d86c --- /dev/null +++ b/_static/css/home/explore.css @@ -0,0 +1,44 @@ +.explore { + display: grid; + gap: 3em; +} + +.explore-tile { + border-radius: 12px; + background-color: var(--gst-color-bg-gray); + border: 1px solid var(--pst-color-border); + transition: all 0.2s ease-in-out; +} + +.explore-tile:hover, +.explore-tile:hover .explore-tile-icon { + box-shadow: var(--pst-shadow); +} + +.explore-tile-icon { + background-color: var(--gst-color-primary); + height: 55px; + width: 55px; + border-radius: 12px; + /* TODO This should be removed as the util will be available */ + padding: 12px; + margin-bottom: 24px; + transition: all 0.2s ease-in-out; +} + +.explore-tile-icon img { + filter: invert(1) !important; +} + +.explore-tile-title { + font-weight: 600; + color: var(--gst-color-section-heading); +} + +.explore-tile-know-more, +.explore-tile-know-more:visited { + color: var(--gst-color-primary); + text-transform: uppercase; + font-size: 14px; + font-weight: 600; +} \ No newline at end of file diff --git a/_static/css/home/index.css b/_static/css/home/index.css new file mode 100644 index 00000000..3cb55cf8 --- /dev/null +++ b/_static/css/home/index.css @@ -0,0 +1,31 @@ +@import "./intro.css"; +@import "./explore.css"; +@import "./carousel.css"; +@import "./sponsors.css"; +@import "./cite.css"; + +/* CSS which is common across the home page */ +.dipy-highlight { + color: var(--pst-color-primary); +} + +div.section:nth-child(n+3) { + margin: 72px 0; + padding: 0 20px; +} + +h2.section-title { + padding: 10px 0; + margin: 10px 0; + text-align: center; + font-weight: 900; + font-size: 50px; + color: var(--gst-color-heading); +} + +@media only screen and (max-width: 768px) { + /* Your CSS styles for phones go here */ + h2.section-title { + font-size: 30px; + } +} \ No newline at end of file diff --git a/_static/css/home/intro.css b/_static/css/home/intro.css new file mode 100644 index 00000000..3bfc86cf --- /dev/null +++ b/_static/css/home/intro.css @@ -0,0 +1,38 @@ +.intro { + width: 100%; + padding: 96px 32px; + text-align: center; +} + +.tagline { + color: var(--gst-color-heading); + font-size: 76px; + line-height: 1.25; + font-weight: 900; + margin: 0 auto; +} + +.description { + line-height: 1.25; + font-size: 20px; + max-width: 900px; + margin: 24px auto 40px; + color: var(--pst-color-text-muted); +} + +.actions { + margin: 0 auto; +} + +@media only screen and (max-width: 768px) { + /* Your CSS styles for phones go here */ + .intro { + padding: 90px 20px; + } + .tagline { + font-size: 40px; + } + .description { + font-size: 16px; + } +} \ No newline at end of file diff --git a/_static/css/home/sponsors.css b/_static/css/home/sponsors.css new file mode 100644 index 00000000..1c84b308 --- /dev/null +++ b/_static/css/home/sponsors.css @@ -0,0 +1,24 @@ +.sponsors { + gap: 5px; +} +.sponsors-item { + background-color: var(--gst-color-bg-gray); + border-radius: 2px; + display: flex; + justify-content: space-around; + align-items: center; + padding: 20px; + transition: all 0.2s ease-in-out; +} + +html[data-theme=dark] .sponsors-item:hover { + background-color: var(--bs-gray-100); +} + +html[data-theme=dark] .sponsors-item:hover img:not(.only-dark):not(.dark-light) { + filter: none; +} + +html[data-theme=dark] .sponsors-item img:not(.only-dark):not(.dark-light) { + filter: grayscale(1) invert(1); +} \ No newline at end of file diff --git a/_static/images/icons/chart.png b/_static/images/icons/chart.png new file mode 100644 index 00000000..9fd259cf Binary files /dev/null and b/_static/images/icons/chart.png differ diff --git a/_static/images/icons/cli.svg b/_static/images/icons/cli.svg new file mode 100644 index 00000000..a082ad98 --- /dev/null +++ b/_static/images/icons/cli.svg @@ -0,0 +1 @@ +Created by Braja Omar Justicofrom the Noun Project \ No newline at end of file diff --git a/_static/images/icons/denoise.png b/_static/images/icons/denoise.png new file mode 100644 index 00000000..3878205c Binary files /dev/null and b/_static/images/icons/denoise.png differ diff --git a/_static/images/icons/preprocessing.png b/_static/images/icons/preprocessing.png new file mode 100644 index 00000000..fdc91e28 Binary files /dev/null and b/_static/images/icons/preprocessing.png differ diff --git a/_static/images/icons/reconstruction.svg b/_static/images/icons/reconstruction.svg new file mode 100644 index 00000000..92d5cdc9 --- /dev/null +++ b/_static/images/icons/reconstruction.svg @@ -0,0 +1 @@ +Created by Flowiconfrom the Noun Project \ No newline at end of file diff --git a/_static/images/icons/registration.svg b/_static/images/icons/registration.svg new file mode 100644 index 00000000..8579166a --- /dev/null +++ b/_static/images/icons/registration.svg @@ -0,0 +1 @@ +Created by Zulfa Mahendrafrom the Noun Project \ No newline at end of file diff --git a/_static/images/icons/stat.svg b/_static/images/icons/stat.svg new file mode 100644 index 00000000..b7a23fa8 --- /dev/null +++ b/_static/images/icons/stat.svg @@ -0,0 +1 @@ +Artboard 38Created by Anggara Putrafrom the Noun Project \ No newline at end of file diff --git a/_static/images/icons/tractography.svg b/_static/images/icons/tractography.svg new file mode 100644 index 00000000..2ab1dee5 --- /dev/null +++ b/_static/images/icons/tractography.svg @@ -0,0 +1,5 @@ +Created by Kartika Sholehatinfrom the Noun Project \ No newline at end of file diff --git a/_static/images/logos/dipy-favicon.png b/_static/images/logos/dipy-favicon.png new file mode 100644 index 00000000..caffe0d8 Binary files /dev/null and b/_static/images/logos/dipy-favicon.png differ diff --git a/_static/images/logos/dipy-logo.png b/_static/images/logos/dipy-logo.png new file mode 100644 index 00000000..d9bac5eb Binary files /dev/null and b/_static/images/logos/dipy-logo.png differ diff --git a/_static/images/sponsors/NIH_NIBIB.png b/_static/images/sponsors/NIH_NIBIB.png new file mode 100644 index 00000000..6ebddde6 Binary files /dev/null and b/_static/images/sponsors/NIH_NIBIB.png differ diff --git a/_static/images/sponsors/gsoc.png b/_static/images/sponsors/gsoc.png new file mode 100644 index 00000000..4665b4a5 Binary files /dev/null and b/_static/images/sponsors/gsoc.png differ diff --git a/_static/images/sponsors/iu.webp b/_static/images/sponsors/iu.webp new file mode 100644 index 00000000..c76c512e Binary files /dev/null and b/_static/images/sponsors/iu.webp differ diff --git a/_static/images/sponsors/luddy.png b/_static/images/sponsors/luddy.png new file mode 100644 index 00000000..7c00fc69 Binary files /dev/null and b/_static/images/sponsors/luddy.png differ diff --git a/_static/images/sponsors/uwescience.png b/_static/images/sponsors/uwescience.png new file mode 100644 index 00000000..cf45f39b Binary files /dev/null and b/_static/images/sponsors/uwescience.png differ diff --git a/_templates/components/carousel.html b/_templates/components/carousel.html new file mode 100644 index 00000000..bc2ec7c0 --- /dev/null +++ b/_templates/components/carousel.html @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/_templates/components/cite.html b/_templates/components/cite.html new file mode 100644 index 00000000..e69de29b diff --git a/_templates/components/explore.html b/_templates/components/explore.html new file mode 100644 index 00000000..e268a781 --- /dev/null +++ b/_templates/components/explore.html @@ -0,0 +1,19 @@ +

Explore DIPY

+
+ {% for explore in explore_items %} +
+
+ {{explore.title}} +
+

{{ explore.title }}

+

+ {{ explore.description }} +

+ + + Know more + + +
+ {% endfor %} +
\ No newline at end of file diff --git a/_templates/components/intro.html b/_templates/components/intro.html new file mode 100644 index 00000000..6040d0fb --- /dev/null +++ b/_templates/components/intro.html @@ -0,0 +1,23 @@ +
+

+ Diffusion Imaging in Python +

+

+ An open-source, user-friendly and growing imaging library for 3D/4D+ imaging. +

+

+ + + + + + +

+
\ No newline at end of file diff --git a/_templates/components/sponsors.html b/_templates/components/sponsors.html new file mode 100644 index 00000000..4cdab825 --- /dev/null +++ b/_templates/components/sponsors.html @@ -0,0 +1,8 @@ +

Sponsors

+
+ {% for sponsor in sponsors %} + + {{ sponsor.name }} + + {% endfor %} +
\ No newline at end of file diff --git a/_templates/home.html b/_templates/home.html new file mode 100644 index 00000000..e311bec1 --- /dev/null +++ b/_templates/home.html @@ -0,0 +1,37 @@ +{# Extending the incoming html page to handle everything from pydata/grg theme #} +{% extends "layout.html" %} + +{# Reimplementing the main content #} +{% block docs_main %} +
+ {%- include "components/intro.html" %} +
+
+ {%- include "components/carousel.html" with context %} +
+
+ {%- include "components/explore.html" with context %} +
+
+ {%- include "components/sponsors.html" with context %} +
+
+

Cite Us!

+
+
+ +
+
+

+ DIPY, a library for the analysis of diffusion MRI data. +

+

+ Garyfallidis E, Brett M, Amirbekian B, Rokem A, van der Walt S, Descoteaux M, Nimmo-Smith I and Dipy Contributors (2014).

+

+ Frontiers in Neuroinformatics, vol.8, no.8. +

+
+
+
+{% endblock docs_main %} \ No newline at end of file diff --git a/conf.py b/conf.py index 8f1ee2d8..0397994b 100644 --- a/conf.py +++ b/conf.py @@ -13,6 +13,10 @@ import os import sys +try: + import tomllib +except ImportError: + import tomli as tomllib from packaging.version import Version @@ -125,7 +129,8 @@ # documentation. html_theme_options = { "secondary_sidebar_items": ["page-toc"], - "show_toc_level": 2, + "show_toc_level": 1, + "navbar_center": ["components/navbar-links.html"], "navbar_links": [ { @@ -259,7 +264,45 @@ }, ] }, - ] + ], + # To remove search icon + "navbar_persistent": "", + "icon_links": [ + { + "name": "GitHub", + "url": "https://github.com/dipy", + "icon": "fa-brands fa-github" + }, + { + "name": "Twitter/X", + "url": "https://twitter.com/dipymri", + "icon": "fa-brands fa-twitter" + }, + { + "name": "YouTube", + "url": "https://www.youtube.com/c/diffusionimaginginpython", + "icon": "fa-brands fa-youtube" + }, + { + "name": "LinkedIn", + "url": "https://www.linkedin.com/company/dipy/", + "icon": "fa-brands fa-linkedin" + }, + ], + "logo": { + "image_dark": "_static/images/logos/dipy-logo.png", + "alt_text": "DIPY", + } +} + +with open('context/context.toml', 'rb') as f: + config = tomllib.load(f) + + +html_context = { + "sponsors": config["sponsors"], + "explore_items": config["explore_items"], + "carousel_slides": config["carousel_slides"] } # Add any paths that contain custom themes here, relative to this directory. @@ -274,12 +317,12 @@ # The name of an image file (relative to this directory) to place at the top # of the sidebar. -#html_logo = None +html_logo = "_static/images/logos/dipy-logo.png" # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. -#html_favicon = None +html_favicon = "_static/images/logos/dipy-favicon.png" # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, @@ -299,7 +342,9 @@ # Additional templates that should be rendered to pages, maps page names to # template names. -#html_additional_pages = {} +html_additional_pages = { + "index": "home.html" +} # If false, no module index is generated. # Setting to false fixes double module listing under header diff --git a/context/context.toml b/context/context.toml new file mode 100644 index 00000000..1affad6c --- /dev/null +++ b/context/context.toml @@ -0,0 +1,98 @@ +[[carousel_slides]] +caption = "EVAC+, ISMRM 2023" +description = "" +img = "https://raw.githubusercontent.com/dipy/dipy_data/master/dipy_main_evac.png" +link = "https://arxiv.org/abs/2206.02837" + +[[carousel_slides]] +caption = "Patch2Self, NeurIPS 2020" +description = "" +img = "https://raw.githubusercontent.com/dipy/dipy_data/master/patch2self_banner.PNG" + +[[carousel_slides]] +caption = "BUAN, Nature 2020" +description = "" +img = "https://raw.githubusercontent.com/dipy/dipy_data/master/buan_profiles.png" + +[[carousel_slides]] +caption = "SLR, NeuroImage 2015" +description = "" +img = "https://github.com/Garyfallidis/garyfallidis.github.com/blob/master_bak/images/slr_banner.jpg?raw=true" + +[[carousel_slides]] +caption = "Quick Bundles, Frontiers 2012" +description = "" +img = "https://github.com/Garyfallidis/garyfallidis.github.com/blob/master_bak/images/quickbundles_banner.jpg?raw=true" + +[[explore_items]] +title = "Command-Line Interfaces" +icon = "cli.svg" +description = "All the algorithms are available using CLI. You can also create your own algorithms." +link = "https://dipy.org/documentation/1.7.0/interfaces/" + +[[explore_items]] +title = "Statistical Analysis" +icon = "stat.svg" +description = "DIPY allows you to use different methods like BUAN, AFQ, K-Fold cross validation." +link = "https://dipy.org/documentation/1.7.0/interfaces/" + +[[explore_items]] +title = "Reconstruction" +icon = "reconstruction.svg" +description = "Single shell: DTI, CSA, SFM, SDT, Q-Ball, CSD, and many more.
Multi shell: GQI, DTI, DKI, SHORE, MAPMRI, MSMT-CSD, and many more." +link = "https://dipy.org/documentation/1.7.0/interfaces/" + +[[explore_items]] +title = "Registration" +icon = "registration.svg" +description = "Affine Registration, Diffeomorphic 2D/3D Registration, Streamlines based Registration, and much more." +link = "https://dipy.org/documentation/1.7.0/interfaces/" + +[[explore_items]] +title = "Tractography" +icon = "tractography.svg" +description = "Probabilistic Tracking, Deterministic Tracking, PFT Tracking, and much more." +link = "https://dipy.org/documentation/1.7.0/interfaces/" + +[[explore_items]] +title = "Denoising" +icon = "denoise.png" +description = "Affine Registration, Diffeomorphic 2D/3D Registration, Streamlines based Registration, and much more." +link = "https://dipy.org/documentation/1.7.0/interfaces/" + +[[explore_items]] +title = "Visualization" +icon = "chart.png" +description = "ODFs visualization, interactive tractogram visualization, Advanced UI and Shaders, and much more." +link = "https://dipy.org/documentation/1.7.0/interfaces/" + +[[explore_items]] +title = "Pre-Processing" +icon = "preprocessing.png" +description = "Brain extraction, SNR estimation, Reslice Datasets, and much more." +link = "https://dipy.org/documentation/1.7.0/interfaces/" + +[[sponsors]] +name = "NIH NIBIB" +image = "NIH_NIBIB.png" +url = "https://www.nibib.nih.gov/" + +[[sponsors]] +name = "Luddy IU" +image = "luddy.png" +url = "https://luddy.indiana.edu/" + +[[sponsors]] +name = "Google Summer of Code" +image = "gsoc.png" +url = "https://summerofcode.withgoogle.com/" + +[[sponsors]] +name = "Indiana Univesity" +image = "iu.webp" +url = "https://www.iu.edu/" + +[[sponsors]] +name = "UW eScience Institute" +image = "uwescience.png" +url = "https://escience.washington.edu/"