Skip to content

Commit b7f3bb5

Browse files
committed
Merge branch 'dev' into 1273-tomtoolkit-should-support-python-312-313
2 parents 458cffd + 5730323 commit b7f3bb5

24 files changed

Lines changed: 583 additions & 95 deletions

File tree

89.3 KB
Loading

docs/api/tom_observations/facilities.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,11 @@ SOAR
3030
****
3131

3232
.. automodule:: tom_observations.facilities.soar
33+
:members:
34+
35+
******
36+
Blanco
37+
******
38+
39+
.. automodule:: tom_observations.facilities.blanco
3340
:members:

docs/customization/customize_templates.rst

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
Customizing TOM Templates
22
-------------------------
3-
43
So you’ve got a TOM up and running, and your homepage looks something
54
like this:
65

@@ -24,13 +23,30 @@ have a project layout that looks something like this:
2423
├── urls.py
2524
└── wsgi.py
2625

27-
We are going to override the html template included with the TOM
28-
Toolkit, ``tom_common/index.html``, so that we can edit some text and
29-
change the image. Overriding and extending templates is `documented
26+
Using Themes
27+
~~~~~~~~~~~~
28+
You can set the color theme for your TOM to "Dark Mode" by setting the `CSS_THEME = 'Dark'` in your ``settings.py``.
29+
If the theme doesn't seem to be working properly, make sure you aren't overriding key components in your
30+
`static/tom_common/css/custom.css` file.
31+
|image2|
32+
33+
Making your own pages
34+
~~~~~~~~~~~~~~~~~~~~~
35+
36+
One very powerful, but more work intensive way to customize your TOM is
37+
to override the html templates included with the TOM
38+
Toolkit. In this example we are going to override the home page, ``tom_common/index.html``, so
39+
that we can edit some text and change the image. Overriding and extending templates is `documented
3040
extensively <https://docs.djangoproject.com/en/2.1/howto/overriding-templates/>`__
3141
on Django’s website and we highly recommend reading these docs if you
3242
plan on customizing your TOM further.
3343

44+
.. note::
45+
46+
You should generally try to avoid overriding entire templates when possible, instead using integration points
47+
(described below) or overriding specific partials. This lets you continue to benefit from maintenance done to these
48+
pages by the TOM Development team without having to continually update your TOM's versions of these templates.
49+
3450
Since the template we want to override is already part of the TOM
3551
Toolkit source code, we can use it as a starting point for our
3652
customized template. In fact, we’ll copy and paste the entire thing from
@@ -127,7 +143,7 @@ alone. Reload your homepage, and you should see something like this:
127143

128144
|image1|
129145

130-
Thats it! You’ve just customized your TOM homepage.
146+
That's it! You’ve just customized your TOM homepage.
131147

132148
Using static files
133149
~~~~~~~~~~~~~~~~~~
@@ -162,14 +178,20 @@ Customize default CSS:
162178
The default styling is mostly based on Bootstrap v4.6.2 (`https://getbootstrap.com/ <https://getbootstrap.com/>`__).
163179
If you ran the tom_setup script, you should have a directory ``static`` at the top level of your project.
164180
Within this folder, find the ``tom_common/css`` directory. In this folder, is a file named ``custom.css``.
165-
Editing this file will allow you to overwrite any of the custom css used at the base level in the TOM Toolkit.
181+
Editing this file will allow you to overwrite any of the css used at the base level in the TOM Toolkit, including the
182+
styling established by TOMToolkit themes such as "Dark Mode".
183+
184+
The TOMToolkit has several built in variables that allow you to establish a theme for your TOM. You can see these in
185+
`root` dictionay in yoyr ``custom.css``. Altering these will change the appearance of large portions of the website.
166186

167187
As an example, let's change the background color from white (#ffffff) to an off-white (#efead6).
188+
Add the following in your ``custom.css`` after the comments:
189+
168190

169191
.. code:: css
170192
171-
body {
172-
background-color: #efead6;
193+
:root {
194+
--theme_primary: #efead6;
173195
}
174196
175197
Once you have added these images to the ``static/tom_common/img`` directory and reloaded the page (you may need to
@@ -255,3 +277,4 @@ for more details.
255277

256278
.. |image0| image:: /_static/customize_templates_doc/tomhomepagenew.png
257279
.. |image1| image:: /_static/customize_templates_doc/tomhomepagemod.png
280+
.. |image2| image:: /_static/customize_templates_doc/darkmode.png

poetry.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)