-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🎨 Automatic addition of styles with extension addition
- Loading branch information
1 parent
d15f641
commit 67c4615
Showing
22 changed files
with
1,870 additions
and
170 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
from .autoflex import AutoFlex | ||
from .flextree import FlexTree | ||
from .flexsummary import FlexSummary |
This file contains 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 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 @@ | ||
FlexSummary = None |
Empty file.
This file contains 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,92 @@ | ||
/* FONTS */ | ||
@font-face { | ||
font-family: 'autoflex_title'; | ||
src: url('ornitons_bold.ttf') format('truetype'); | ||
} | ||
|
||
@font-face { | ||
font-family: 'autoflex_subtitle'; | ||
src: url('inter_var.woff2') format('truetype'); | ||
} | ||
|
||
|
||
.wy-side-nav-search { background-color: #b5445b; } | ||
.wy-nav-top { background-color: #666666; } | ||
.wy-menu > .caption > span.caption-text { color: #b5445b; } | ||
|
||
.wy-nav-content { max-width: 900px !important; } | ||
.wy-table-responsive table td { white-space: normal !important; } | ||
.wy-table-responsive { overflow: visible !important; } | ||
body { line-height: 1.42857143; } | ||
.heading-style, h1, h2, h3, h4, h5, h6 {margin: 1.6rem 0 1rem;} | ||
h1 {font-family: 'autoflex_title', sans-serif;} | ||
h2, h3, h4, h5, h6 {font-family: 'autoflex_subtitle', sans-serif;} | ||
p {margin-bottom: 0.5rem; font-family: 'Roboto', sans-serif} | ||
iframe {width: 100%;border: unset} | ||
|
||
.toctree-wrapper li[class^=toctree-l1]>a {font-size: 1.4em; text-decoration: none} | ||
.toctree-wrapper li[class^=toctree-l2]>a {font-size: 1em; text-decoration: none} | ||
.toctree-wrapper li[class^=toctree-l3]>a {font-size: 0.9em; text-decoration: none} | ||
.toctree-wrapper li[class^=toctree-l4]>a {font-size: 0.9em; text-decoration: none} | ||
|
||
html[data-theme="light"] { | ||
--pst-color-primary: #b5445b; | ||
--pst-color-secondary: #4772ae; | ||
--tab-color: var(--pst-color-secondary); | ||
--pst-color-link: var(--pst-color-muted); | ||
} | ||
|
||
html[data-theme="dark"] { | ||
--pst-color-primary: #4772ae; | ||
--pst-color-secondary: #b5445b; | ||
--tab-color: #9647AE; /*#1C2E46;*/ | ||
--pst-color-link: var(--pst-color-muted); | ||
--sd-color-info-bg: var(--pst-color-primary); | ||
} | ||
|
||
html[data-theme=dark] .bd-content .nboutput .output_area.rendered_html { | ||
background-color: var(--pst-color-background); | ||
} | ||
|
||
img { | ||
margin: 0.1em; | ||
} | ||
|
||
|
||
.sphinx-tabs-panel { | ||
background: var(--sd-color-info-bg); | ||
padding: 1em; | ||
border-radius: 0.25rem; | ||
margin-bottom: 0.5em; | ||
border-top-left-radius: 0; | ||
} | ||
|
||
.sphinx-tabs-tab { | ||
background: var(--tab-color); | ||
padding: 0.5em; | ||
padding-right: 2em; | ||
padding-left: 2em; | ||
margin-top: 0.5em; | ||
margin-right: 0.5em; | ||
border-top-left-radius: 1em; | ||
border-top-right-radius: 0.1em; | ||
border: 0; | ||
font-weight: bold; | ||
} | ||
|
||
.sphinx-tabs-tab[aria-selected="true"] { | ||
background-color: var(--sd-color-info-bg); | ||
} | ||
|
||
html[data-theme=dark] .dataframe { | ||
background-color: var(--pst-color-primary); | ||
} | ||
|
||
/* TODO make sure this is only for the API tables */ | ||
/*table {*/ | ||
/* border: solid;*/ | ||
/*}*/ | ||
|
||
/*th {*/ | ||
/* border: thin;*/ | ||
/*}*/ |
Binary file not shown.
Binary file not shown.
This file contains 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,21 @@ | ||
import shutil | ||
import pathlib | ||
|
||
|
||
def copy_autoflex_styles_to_static(app, exception): | ||
# Define source directory where your styles are located | ||
source_dir = pathlib.Path(__file__).parent / "css" | ||
|
||
# Define destination directory in the build output's _static folder | ||
build_static_dir = pathlib.Path(app.outdir) / '_static' / "css" | ||
|
||
# Ensure the destination directory exists | ||
build_static_dir.mkdir(parents=True, exist_ok=True) | ||
|
||
# Copy all files from the source to the destination | ||
for item in source_dir.iterdir(): | ||
if item.is_file(): | ||
shutil.copy(item, build_static_dir / item.name) | ||
elif item.is_dir(): | ||
# Copy directories recursively | ||
shutil.copytree(item, build_static_dir / item.name, dirs_exist_ok=True) |
This file contains 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 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 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,2 @@ | ||
``flexsummary`` | ||
--------------- |
This file contains 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,4 @@ | ||
``flextree`` | ||
------------- | ||
|
||
This should be a drop in replacement to ``toctree`` with more customizable options. |
This file contains 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 |
---|---|---|
@@ -1,4 +1,14 @@ | ||
Directives | ||
========== | ||
|
||
.. include:: autoflex.rst | ||
.. include:: flextree.rst | ||
.. include:: flexsummary.rst | ||
|
||
.. flextree:: | ||
:hidden: | ||
|
||
autoflex | ||
flexsummary | ||
flextree | ||
|
||
autoflex | ||
flextree |
This file contains 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 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
Example | ||
Custom Demo | ||
----------- | ||
|
||
.. autoflex:: | ||
Let's demonstrate some of the directives functionality with custom classes here. |
This file contains 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 |
---|---|---|
@@ -1,8 +1,7 @@ | ||
Examples | ||
======== | ||
|
||
.. code:: bash | ||
.. flextree:: | ||
|
||
poetry run python -m sphinx docs/ _docs/ | ||
.. include:: demo.rst | ||
|
||
.. autoflex:: | ||
demo | ||
tidy3d |
This file contains 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,9 @@ | ||
``tidy3d`` | ||
----------- | ||
|
||
|
||
.. currentmodule:: tidy3d | ||
|
||
.. autoflex:: tidy3d.Simulation | ||
|
||
hey |
This file contains 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 |
---|---|---|
@@ -1,3 +1,25 @@ | ||
Get Started | ||
=========== | ||
============= | ||
|
||
Install | ||
-------- | ||
|
||
``autoflex`` is designed to be intentionally easy to install via ``pip`` and use within your project | ||
|
||
.. code:: | ||
pip install autoflex | ||
In your documentation project ``conf.py``: | ||
|
||
.. code:: | ||
extensions = [ | ||
... | ||
"autoflex", | ||
... | ||
] | ||
That's it! | ||
|
This file contains 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.