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 1616 > </ span >
1717 </ a >
1818</ div >
19- {% if not config.extra.announcement.active %}
2019< style type ="text/css ">
2120 .md-banner {
2221 display : none;
2322 }
2423</ 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 >
2551{% endif %} {% endblock %}
Original file line number Diff line number Diff line change @@ -117,6 +117,7 @@ extra:
117117 text_bold : March 10-14, 2025
118118 url : https://community.seqera.io/t/nextflow-training-week-2025-q1/1775/6
119119 url_text : More info
120+ hide_after : 2025-03-15
120121 # Analytics
121122 analytics :
122123 provider : google
You can’t perform that action at this time.
0 commit comments