Skip to content

Commit

Permalink
Load CSS stylesheets in main notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
edan-bainglass committed Aug 30, 2024
1 parent 9bc95a4 commit 98226fa
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
11 changes: 11 additions & 0 deletions qe.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@
"load_profile();"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from aiidalab_widgets_base.utils.loaders import load_css\n",
"\n",
"load_css(css_path=\"src/aiidalab_qe/app/static/styles\")"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
11 changes: 11 additions & 0 deletions src/aiidalab_qe/app/static/styles/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Stylesheets for the Quantum ESPRESSO app

This folder contains `css` stylesheets which may be loaded directly from the CSS folder using

```python
from aiidalab_widgets_base.utils.loaders import load_css_stylesheet

load_css_stylesheet(package="aiidalab_qe.app.static.styles.css", filename="<stylesheet-name>.css")
```

If `filename` is not provided, all CSS stylesheets will be loaded from the `css` package.
3 changes: 3 additions & 0 deletions src/aiidalab_qe/app/static/styles/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.output_subarea {
max-width: none !important;
}

0 comments on commit 98226fa

Please sign in to comment.