File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 16
16
> </ span >
17
17
</ a >
18
18
</ div >
19
- {% if not config.extra.announcement.active %}
20
19
< style type ="text/css ">
21
20
.md-banner {
22
21
display : none;
23
22
}
24
23
</ style >
24
+ {% if config.extra.announcement.active %}
25
+ < script >
26
+ ( function ( ) {
27
+ function hideAnnouncement ( ) {
28
+ var announcementDate = new Date (
29
+ "{{ config.extra.announcement.hide_after }}T00:00:00Z" ,
30
+ ) ;
31
+ var currentDate = new Date ( ) ;
32
+ var banner = document . querySelector ( ".md-banner" ) ;
33
+ if ( banner && currentDate <= announcementDate ) {
34
+ banner . style . display = "block" ;
35
+ }
36
+ }
37
+
38
+ // Run on initial load
39
+ hideAnnouncement ( ) ;
40
+
41
+ // Hook into XHR to run after each page update
42
+ var originalOpen = XMLHttpRequest . prototype . open ;
43
+ XMLHttpRequest . prototype . open = function ( ) {
44
+ this . addEventListener ( "load" , function ( ) {
45
+ setTimeout ( hideAnnouncement , 0 ) ; // Ensure it runs after the request completes
46
+ } ) ;
47
+ return originalOpen . apply ( this , arguments ) ;
48
+ } ;
49
+ } ) ( ) ;
50
+ </ script >
25
51
{% endif %} {% endblock %}
Original file line number Diff line number Diff line change @@ -117,6 +117,7 @@ extra:
117
117
text_bold : March 10-14, 2025
118
118
url : https://community.seqera.io/t/nextflow-training-week-2025-q1/1775/6
119
119
url_text : More info
120
+ hide_after : 2025-03-15
120
121
# Analytics
121
122
analytics :
122
123
provider : google
You can’t perform that action at this time.
0 commit comments