Skip to content

Commit

Permalink
attempt at adding custom css
Browse files Browse the repository at this point in the history
  • Loading branch information
avivajpeyi committed Jul 31, 2023
1 parent c8c0771 commit 449a8ed
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,5 @@ theano_cache
.coverage*
*.xml
*.txt
src/tess_atlas/notebook_controllers/templates/*.ipybn
src/tess_atlas/notebook_controllers/templates/*.md
19 changes: 16 additions & 3 deletions src/tess_atlas/notebook_controllers/templates/menu_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# ---
# jupyter:
# jupytext:
# formats: ipynb,py:light
# formats: ipynb,py:light,md
# text_representation:
# extension: .py
# format_name: light
Expand All @@ -26,7 +26,7 @@
#
# Each TOI’s analysis has its own page. Access them from the table below.
#
# + tags=[ "remove-input"]
# + tags=["remove-input"]
from itables import init_notebook_mode, show

from tess_atlas.data.analysis_summary import AnalysisSummary
Expand All @@ -36,7 +36,7 @@
"{{{SUMMARY_PATH}}}"
).generate_summary_table()

# + tags=[ "remove-input"]
# + tags=["remove-input"]
show(
summary_df,
caption="TESS Atlas Catalog Summary",
Expand Down Expand Up @@ -68,3 +68,16 @@
# [1]: https://exoplanetarchive.ipac.caltech.edu/docs/API_toi_columns.html
# [2]: https://exofop.ipac.caltech.edu/tess/view_toi.php#
#
# -

# <!--COMMENTS WITH Utterance.es-->
# <!--FIXME: dont seem to be working atm :(-->
# ```{raw} html
# <script src="https://utteranc.es/client.js"
# repo="avivajpeyi/tess-atlas"
# issue-term="title"
# theme="github-light"
# crossorigin="anonymous"
# async>
# </script>
# ```
15 changes: 14 additions & 1 deletion src/tess_atlas/notebook_controllers/templates/toi_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.10.3
# jupytext_version: 1.14.5
# kernelspec:
# display_name: Python 3 (ipykernel)
# language: python
Expand Down Expand Up @@ -363,3 +363,16 @@ def run_inference(model) -> InferenceData:

# + pycharm={"name": "#%%\n"} tags=["exe", "output_scroll"]
citations.print_packages()
# -

# <!--## Comments-->
# <!--FIXME: dont seem to be working atm :(-->
# ```{raw} html
# <script src="https://utteranc.es/client.js"
# repo="avivajpeyi/tess-atlas"
# issue-term="title"
# theme="github-light"
# crossorigin="anonymous"
# async>
# </script>
# ```
23 changes: 23 additions & 0 deletions src/tess_atlas/webbuilder/template/_static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*Prevent scrollbar on left sidebar*/
#sidebar {
overflow: hidden;
}

/* Sidebar */
.wy-nav-side {
background: #ff0000;
}


body {
/* ... */
}

/*Test to see if this is actually being picked up anything works*/
/*h1 {*/
/* color: #003B71 !important;*/
/*}*/
/*^Above _does_ seem to work*/


/*At the bottom add javascript */
7 changes: 7 additions & 0 deletions src/tess_atlas/webbuilder/template/_static/custom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// <script src="https://utteranc.es/client.js"
// repo="avivajpeyi/tess-atlas"
// issue-term="title"
// theme="github-light"
// crossOrigin="anonymous"
// async>
// </script>
17 changes: 14 additions & 3 deletions src/tess_atlas/webbuilder/template/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
html_logo = "_static/atlas_logo.png"
html_favicon = "_static/atlas_logo.png"
release = "1"
# templates_path = ["_templates"]
extensions = [
"myst_nb",
"sphinx_comments",
Expand All @@ -29,19 +30,29 @@
show_prev_next=False,
home_page_in_toc=True,
toc_title=project,
# navbar_end= ["paperbutton.html"],
# navbar_end=["paperbutton.html", "navbar-icon-links"],
navbar_end=["navbar-icon-links"],
launch_buttons=dict(colab_url="https://colab.research.google.com"),
)
# templates_path = ["_templates"]


html_sidebars = {"**": ["navbar-logo.html", "sbt-sidebar-nav.html"]}
html_static_path = ["_static"]

html_css_files = ["custom.css"]
html_js_files = ["custom.js"]
html_permalinks = True
html_sourcelink_suffix = ""
numfig = True
panels_add_bootstrap_css = True
suppress_warnings = ["myst.domains"]
html_copy_source = False
remove_from_toctrees = ["content/toi_notebooks/toi_*.ipynb"]
comments_config = {
"utterances": {
"repo": "avivajpeyi/tess-atlas", # as https://utteranc.es/ not installed in dfm/tess-atlas atm
"optional": "config",
"label": "comment",
}
}

# https://stackoverflow.com/questions/55297443/including-notebook-with-nbsphinx-fails/70474616#70474616

0 comments on commit 449a8ed

Please sign in to comment.