Files
Model-Optimizer/docs/source/_static/announcements.css
T
realAsma a0513f18bd Update documentation theme to Shibuya (#2242)
### What does this PR do?

Type of change: documentation.

Replaces the legacy Sphinx RTD theme with Shibuya and gives the ModelOpt
documentation a modern responsive light/dark presentation.

The configuration uses the Shibuya green palette with NVIDIA green
(#76b900) as the primary accent, follows the reader system color
preference by default, enables dark code blocks, and expands the first
level of global navigation. RTD-specific CSS is removed, while the
announcement page now uses Shibuya semantic color tokens in both light
and dark modes.

Shibuya 2026.7.12 is licensed under BSD-3-Clause.

### Usage

```python
html_theme = "shibuya"
html_theme_options = {
    "accent_color": "green",
    "color_mode": "auto",
    "dark_code": True,
    "globaltoc_expand_depth": 1,
}
```

Doc preview:
https://nvidia.github.io/Model-Optimizer/pr-preview/pr-2242/

### Testing

- `nox -N --envdir /tmp/modelopt-shibuya-nox -s docs`
- Sphinx 9.1 built all 411 pages successfully with `--fail-on-warning`.
- `pre-commit run --files docs/source/conf.py
docs/source/_static/custom.css docs/source/_static/announcements.css
pyproject.toml uv.lock --show-diff-on-failure`
  - All applicable hooks passed.
- Verified generated HTML loads Shibuya assets, declares the green
accent, includes automatic light/dark mode logic, and includes the
custom theme-token CSS.

### Before your PR is "*Ready for review*"

Make sure you read and follow [Contributor
guidelines](https://github.com/NVIDIA/Model-Optimizer/blob/main/CONTRIBUTING.md)
and your commits are signed (`git commit -s -S`).

Make sure you read and follow the [Security Best
Practices](https://github.com/NVIDIA/Model-Optimizer/blob/main/SECURITY.md#security-coding-practices-for-contributors)
(e.g. avoiding hardcoded `trust_remote_code=True`, `torch.load(...,
weights_only=False)`, `pickle`, etc.).

- Is this change backward compatible?: ✅
- If you copied code from any other sources or added a new PIP
dependency, did you follow guidance in `CONTRIBUTING.md`: ✅
- Did you write any new necessary tests?: N/A — documentation theme
change covered by the full warning-as-error build.
- Did you update
[Changelog](https://github.com/NVIDIA/Model-Optimizer/blob/main/CHANGELOG.rst)?:
N/A — documentation presentation change.
- Did you get Claude approval on this PR?: N/A — focused documentation
theme migration.

### Additional Information

No source code or public API behavior changes.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
  * Updated the documentation site with the Shibuya theme.
* Added green theme accents, automatic light/dark mode, and dark code
blocks.
* Improved table-of-contents behavior and refreshed announcement
styling.
  * Removed outdated layout and table customization overrides.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: realAsma <akuriparambi@nvidia.com>
2026-08-26 15:38:08 -07:00

145 lines
2.5 KiB
CSS

/* Scoped announcement styles using Shibuya's light and dark color tokens. */
#announcements > h1,
#announcements > p,
.announcement-section {
max-width: 860px;
margin-left: auto;
margin-right: auto;
}
.announcement-section {
width: 100%;
}
.announcement-toolbar {
border: 1px solid var(--sy-c-border);
border-radius: 4px;
margin: 1.5rem 0;
padding: 1rem;
background: var(--sy-c-background);
}
.announcement-search-label {
display: block;
font-weight: 700;
margin-bottom: 0.35rem;
}
.announcement-search {
box-sizing: border-box;
width: 100%;
padding: 0.55rem 0.65rem;
border: 1px solid var(--sy-c-border);
border-radius: 4px;
background: var(--sy-c-background);
color: var(--sy-c-text);
font-size: 1rem;
}
.announcement-tags {
display: flex;
flex-wrap: wrap;
gap: 0.45rem;
margin-top: 0.75rem;
}
.announcement-tag {
border: 1px solid var(--sy-c-border);
border-radius: 999px;
padding: 0.28rem 0.65rem;
background: var(--sy-c-background);
color: var(--sy-c-text);
cursor: pointer;
font-size: 0.86rem;
}
.announcement-tag.is-active,
.announcement-tag:hover {
border-color: #76b900;
background: #76b900;
color: #111;
}
.announcement-grid {
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: 1rem;
margin: 1rem 0 1.25rem;
}
.announcement-card {
border-bottom: 1px solid var(--sy-c-border);
padding: 0 0 1rem;
}
.announcement-card:last-child {
border-bottom: 0;
}
.announcement-card h2 {
margin-top: 0.25rem;
font-size: 1.2rem;
line-height: 1.35;
}
.announcement-card p {
margin-bottom: 0.75rem;
}
.announcement-card-meta {
color: var(--sy-c-light);
font-size: 0.85rem;
}
.announcement-card-tags {
display: flex;
flex-wrap: wrap;
gap: 0.35rem;
}
.announcement-card-tags span {
border: 1px solid var(--sy-c-border);
border-radius: 999px;
color: var(--sy-c-light);
font-size: 0.78rem;
padding: 0.15rem 0.45rem;
}
.announcement-empty {
border-left: 4px solid #76b900;
padding-left: 0.75rem;
}
.announcement-pager {
align-items: center;
display: flex;
gap: 0.75rem;
justify-content: flex-end;
margin: 0 0 2rem;
}
.announcement-page-button {
border: 1px solid var(--sy-c-border);
border-radius: 4px;
background: var(--sy-c-background);
color: var(--sy-c-text);
cursor: pointer;
padding: 0.35rem 0.7rem;
}
.announcement-page-button:disabled {
cursor: not-allowed;
opacity: 0.45;
}
.announcement-page-status {
color: var(--sy-c-light);
font-size: 0.9rem;
}
.toctree-wrapper.compound:empty {
display: none;
}