@@ -7,17 +7,22 @@ This section contains the configuration for the banners that appear on the main
77
88<sub >* local_settings.py* </sub >
99``` py
10- BANNER_REFERENCE_TIME = datetime.strptime(" 2023-11-14" , " %Y-%m-%d " ).replace(tzinfo = timezone.utc)
10+ BANNER_REFERENCE_TIME = datetime.strptime(" 2023-11-14" , " %Y-%m-%d " ).replace(
11+ tzinfo = timezone.utc
12+ )
1113# ^ not required, but recommended to set to whatever the start date/time
1214BANNER3 += [
13- dict (
14- start = BANNER_REFERENCE_TIME , # when to start displaying the banner
15- end = BANNER_REFERENCE_TIME + timedelta(days = 5 ), # when to stop displaying the banner (e.g. 5 days after start)
16- content = " Hello Hey!" , # banner text
17- icon_url = " /static/core/img/logo/logo-maskable-192.png" , # optional, displays an icon on the left of the banner
18- cta_link = " https://jasoncameron.dev" , # optional
19- cta_label = " wow! go visit this cool site!" , # optional (but required if cta_link is present)
20- )
15+ dict (
16+ start = BANNER_REFERENCE_TIME , # when to start displaying the banner
17+ end = BANNER_REFERENCE_TIME
18+ + timedelta(
19+ days = 5
20+ ), # when to stop displaying the banner (e.g. 5 days after start)
21+ content = " Hello Hey!" , # banner text
22+ icon_url = " /static/core/img/logo/logo-maskable-192.png" , # optional, displays an icon on the left of the banner
23+ cta_link = " https://jasoncameron.dev" , # optional
24+ cta_label = " wow! go visit this cool site!" , # optional (but required if cta_link is present)
25+ )
2126]
2227```
2328the final result will look something like this (depending on the theme)
@@ -41,7 +46,7 @@ The options are as follows
4146#### How to change theme
4247<sub >* local_settings.py* </sub >
4348``` py
44- CURRENT_THEME = " halloween" # or any of the other options
49+ CURRENT_THEME = " halloween" # or any of the other options
4550```
4651
4752#### How to add a theme
0 commit comments