Commit 0634533
authored
feat: add dismiss button to announcement banner (#2287)
Addresses #1384
Using essentially the same approach as was used for the version warning
banner in #1763
Some questions for the announcement banner compared to the versions:
- Do we also want to only remember it for 14 days, or just forever for a
certain announcement?
- Ideally the stored dismiss state takes into account the content of the
announcement, so that when you add a new announcement, all users see it?
- I am assuming that for a general announcement banner, we do _not_ want
this to be version specific (i.e. remember it separately per version)
Note: I only tested it with a remote announcement that gets injected,
not yet with a local snippet.1 parent 3a35f55 commit 0634533
File tree
2 files changed
+54
-0
lines changed- src/pydata_sphinx_theme/assets
- scripts
- styles/sections
2 files changed
+54
-0
lines changedLines changed: 47 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
922 | 922 | | |
923 | 923 | | |
924 | 924 | | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
925 | 947 | | |
926 | 948 | | |
927 | 949 | | |
| |||
947 | 969 | | |
948 | 970 | | |
949 | 971 | | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
950 | 997 | | |
951 | 998 | | |
952 | 999 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
40 | 47 | | |
41 | 48 | | |
42 | 49 | | |
| |||
0 commit comments