Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ default_language_version:
python: python
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.17
rev: v0.16.5
hooks:
# Run the linter.
- id: ruff
Expand Down
25 changes: 15 additions & 10 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,22 @@ This section contains the configuration for the banners that appear on the main

<sub>*local_settings.py*</sub>
```py
BANNER_REFERENCE_TIME = datetime.strptime("2023-11-14", "%Y-%m-%d").replace(tzinfo=timezone.utc)
BANNER_REFERENCE_TIME = datetime.strptime("2023-11-14", "%Y-%m-%d").replace(
tzinfo=timezone.utc
)
# ^ not required, but recommended to set to whatever the start date/time
BANNER3 += [
dict(
start=BANNER_REFERENCE_TIME, # when to start displaying the banner
end=BANNER_REFERENCE_TIME + timedelta(days=5), # when to stop displaying the banner (e.g. 5 days after start)
content="Hello Hey!", # banner text
icon_url="/static/core/img/logo/logo-maskable-192.png", # optional, displays an icon on the left of the banner
cta_link="https://jasoncameron.dev", # optional
cta_label="wow! go visit this cool site!", # optional (but required if cta_link is present)
)
dict(
start=BANNER_REFERENCE_TIME, # when to start displaying the banner
end=BANNER_REFERENCE_TIME
+ timedelta(
days=5
), # when to stop displaying the banner (e.g. 5 days after start)
content="Hello Hey!", # banner text
icon_url="/static/core/img/logo/logo-maskable-192.png", # optional, displays an icon on the left of the banner
cta_link="https://jasoncameron.dev", # optional
cta_label="wow! go visit this cool site!", # optional (but required if cta_link is present)
)
]
```
the final result will look something like this (depending on the theme)
Expand All @@ -41,7 +46,7 @@ The options are as follows
#### How to change theme
<sub>*local_settings.py*</sub>
```py
CURRENT_THEME = "halloween" # or any of the other options
CURRENT_THEME = "halloween" # or any of the other options
```

#### How to add a theme
Expand Down
Loading