-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Switch to mkdocs material theme for documentation #9849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+321
−7,719
Merged
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
2c7c1b3
Switch to mkdocs material theme
browniebroke 319dbcd
Add logo
browniebroke e277940
Style badges on homepage
browniebroke 68203cb
Basic dark theme
browniebroke a8af6a7
Enable a few theme features
browniebroke 0b98599
Customise large logo for dark theme
browniebroke cd2ee60
CSS tweaks
browniebroke fbe8731
Add background grid back
browniebroke 3f5399b
Switch to mkdocs material theme
browniebroke 38f5513
Add logo
browniebroke 6d5dd9c
Style badges on homepage
browniebroke 5a44bec
Basic dark theme
browniebroke 2ea8cb1
Add syntax highlighting to code snippets
browniebroke 05cabcd
Merge remote-tracking branch 'origin/feat/mkdocs-material' into feat/…
browniebroke 9125483
Convert homepage snippets to code fences
browniebroke 2087222
Update homepage logos
browniebroke 4efe942
Merge branch 'main' into feat/mkdocs-material
browniebroke 3091af7
Move mkdocs-material to pyproject.toml docs group
browniebroke 35be8fb
Keep existing syntax highlighting
browniebroke 692196a
Remove old docs_theme folder
browniebroke 4b6053b
Tweak syntax highlighting colors on dark theme
browniebroke abc1951
Add readthedocs config file
browniebroke fc2ca65
Fix end of file empty lines
browniebroke 339a04f
Upgrade pip during install
browniebroke 2563b83
Merge branch 'main' into feat/mkdocs-material
browniebroke 6a06cde
Merge branch 'main' into feat/mkdocs-material
browniebroke 11293f0
Merge branch 'main' into feat/mkdocs-material
browniebroke 5a74bb2
Remove custom styling for .prettyprint
browniebroke 77d578c
Remove .prettyprint border entirely
browniebroke fa6039a
Make tabs sticky in navbar
browniebroke ffff7ee
Merge page ToC with navigation
browniebroke 9be5124
Tweak colors for more accessible contrast
browniebroke 1f7feaa
Add Figma file for the logos
browniebroke 095e6c4
Merge branch 'main' into feat/mkdocs-material
auvipy 635b651
Apply suggestion from @Copilot
auvipy 908f4d8
Adjust styles for badges
browniebroke a8553ad
Enable content tabs for OS specific instructions
browniebroke 97b3a02
Add icons for content tabs
browniebroke db9f78c
Standardize on .venv for virtualenv name in docs
browniebroke fd4d56a
Add note about bash for Windows
browniebroke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| docs/theme/src/drf-logos.fig filter=lfs diff=lfs merge=lfs -text |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Read the Docs configuration file | ||
| # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
|
||
| # Required | ||
| version: 2 | ||
|
|
||
| # Set the OS, Python version, and other tools you might need | ||
| build: | ||
| os: ubuntu-24.04 | ||
| tools: | ||
| python: "3.13" | ||
| jobs: | ||
| install: | ||
| - pip install --upgrade pip | ||
| - pip install -e . --group docs | ||
|
|
||
| # Build documentation with Mkdocs | ||
| mkdocs: | ||
| configuration: mkdocs.yml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| {% extends "base.html" %} | ||
|
|
||
| {% block scripts %} | ||
| {{ super() }} | ||
| <script> | ||
| document$.subscribe(function() { | ||
| document.querySelectorAll('pre code').forEach(code => { | ||
| code.parentElement.classList.add('prettyprint', 'well'); | ||
| }); | ||
| prettyPrint(); | ||
| }); | ||
| </script> | ||
| {% endblock %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # DRF logos | ||
|
|
||
| This folder contains the source file for the DRF logos as Figma file. |
Git LFS file not shown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| :root > * { | ||
| /* primary */ | ||
| --md-primary-fg-color: #2c2c2c; | ||
| --md-primary-fg-color--light: #a8a8a8; | ||
| --md-primary-fg-color--dark: #181818; | ||
| /* accent */ | ||
| --md-accent-fg-color: #c50d0d; | ||
| --md-accent-fg-color--light: #ff8f8f; | ||
| --md-accent-fg-color--dark: #A30000; | ||
|
|
||
| /* Style links */ | ||
| --md-typeset-a-color: var(--md-typeset-color); | ||
| } | ||
|
|
||
| /* Dark theme customisation */ | ||
| [data-md-color-scheme="slate"] | ||
| { | ||
| --md-accent-fg-color--dark: #F25757; | ||
| } | ||
|
|
||
| .md-header { | ||
| border-top: 5px solid #A30000; | ||
| } | ||
|
|
||
| body hr { | ||
| border-top: 1px dotted var(--md-accent-fg-color--dark); | ||
| } | ||
|
|
||
| .badges { | ||
| display: flex; | ||
| justify-content: end; | ||
| gap: 8px; | ||
| } | ||
|
|
||
| /* Cutesy quote styling */ | ||
| [dir="ltr"] .md-typeset blockquote { | ||
| font-family: Georgia, serif; | ||
| font-size: 18px; | ||
| font-style: italic; | ||
| margin: 0.25em 0; | ||
| padding: 0.25em 40px; | ||
| line-height: 1.45; | ||
| position: relative; | ||
| color: var(--md-typeset-color); | ||
| border-left: none; | ||
| } | ||
|
|
||
| [dir="ltr"] .md-typeset blockquote:before { | ||
| display: block; | ||
| content: "\201C"; | ||
| font-size: 80px; | ||
| position: absolute; | ||
| left: -10px; | ||
| top: -20px; | ||
| color: #7a7a7a; | ||
| } | ||
|
|
||
| [dir="ltr"] .md-typeset blockquote p:last-child { | ||
| color: #999999; | ||
| font-size: 14px; | ||
| display: block; | ||
| margin-top: 5px; | ||
| } | ||
|
|
||
| .md-typeset a { | ||
| color: var(--md-accent-fg-color--dark); | ||
| } | ||
|
|
||
| /* Replacement for `body { background-attachment: fixed; }`, which | ||
| has performance issues when scrolling on large displays. */ | ||
| body::before { | ||
| content: ' '; | ||
| position: fixed; | ||
| width: 100%; | ||
| height: 100%; | ||
| top: 0; | ||
| left: 0; | ||
| background-color: #f8f8f8; | ||
| background: url(../img/grid.png) repeat-x; | ||
| will-change: transform; | ||
| z-index: -1; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.