From e106e01ae662b4ae2e3f185de341f4acd5870006 Mon Sep 17 00:00:00 2001 From: Edan Bainglass Date: Thu, 22 Aug 2024 12:58:31 +0000 Subject: [PATCH] Modify test notebook --- aiidalab_widgets_base/static/styles/test.css | 3 --- notebooks/{test.ipynb => test_misc.ipynb} | 9 ++++----- tests_notebooks/static/styles/test.css | 3 +++ 3 files changed, 7 insertions(+), 8 deletions(-) delete mode 100644 aiidalab_widgets_base/static/styles/test.css rename notebooks/{test.ipynb => test_misc.ipynb} (81%) create mode 100644 tests_notebooks/static/styles/test.css diff --git a/aiidalab_widgets_base/static/styles/test.css b/aiidalab_widgets_base/static/styles/test.css deleted file mode 100644 index 882444eb0..000000000 --- a/aiidalab_widgets_base/static/styles/test.css +++ /dev/null @@ -1,3 +0,0 @@ -.for-testing-purposes { - color: red; -} diff --git a/notebooks/test.ipynb b/notebooks/test_misc.ipynb similarity index 81% rename from notebooks/test.ipynb rename to notebooks/test_misc.ipynb index a03b887cd..85504a7c7 100644 --- a/notebooks/test.ipynb +++ b/notebooks/test_misc.ipynb @@ -26,10 +26,9 @@ "metadata": {}, "outputs": [], "source": [ - "# DO NOT REMOVE!\n", - "# This triggers required jupyter-notebook specific actions.\n", - "# See `aiidalab_widgets_base.__init__.py` for details\n", - "import aiidalab_widgets_base" + "from aiidalab_widgets_base.utils.loaders import load_css_stylesheet\n", + "\n", + "load_css_stylesheet(css_path=\"../tests_notebooks/static/styles\")" ] }, { @@ -39,7 +38,7 @@ "outputs": [], "source": [ "label = ipw.Label(\"Testing\")\n", - "label.add_class(\"for-testing-purposes\")\n", + "label.add_class(\"red-text\")\n", "display(label)" ] } diff --git a/tests_notebooks/static/styles/test.css b/tests_notebooks/static/styles/test.css new file mode 100644 index 000000000..d5b15f3c0 --- /dev/null +++ b/tests_notebooks/static/styles/test.css @@ -0,0 +1,3 @@ +.red-text { + color: rgba(255, 0, 0, 1); +}