File tree Expand file tree Collapse file tree 3 files changed +31
-0
lines changed
Expand file tree Collapse file tree 3 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -179,4 +179,20 @@ header h1{
179179 padding : 10px ;
180180 border-width : 1px ;
181181 display : none;
182+ }
183+
184+ # banner {
185+ display : none
186+ }
187+ @media only screen and (min-width : 768px ){
188+ # banner {
189+ line-height : 1.1 ;
190+ font-size : small;
191+ display : block;
192+ margin-left : 300px ;
193+ text-align : center;
194+ overflow-y : auto;
195+ font-weight : bold;
196+ height : 100% ;
197+ }
182198}
Original file line number Diff line number Diff line change 8484 </ ol >
8585 < span id ="locate-me " style ="display: none "> < i class ="icon-target "> </ i > </ span >
8686 < span id ="app_name "> < b > no< br /> location</ b > </ span >
87+ < span id ="banner "> </ span >
8788 </ div >
8889 </ header >
8990
Original file line number Diff line number Diff line change @@ -1126,6 +1126,19 @@ function update_site(){
11261126 window . location . reload ( true )
11271127}
11281128
1129+ function check_banner ( ) {
1130+ const bannerRequest = new Request ( "https://api.v2.sondehub.org/banner" ) ;
1131+ fetch ( bannerRequest )
1132+ . then ( function ( response ) { return response . json ( ) } )
1133+ . then ( function ( response ) {
1134+ if ( response [ 'banner' ] ) {
1135+ document . getElementsByTagName ( "header" ) [ 0 ] . style . backgroundColor = "#ff6259"
1136+ document . getElementsByTagName ( "header" ) [ 0 ] . style . borderColor = "#eb3d34"
1137+ document . getElementById ( "banner" ) . innerText = response [ 'banner' ]
1138+ }
1139+ } )
1140+ }
1141+
11291142function update_countdown ( ) {
11301143 var date = new Date ( 0 ) ;
11311144 time_remaining = ( reload_end_time - new Date ( ) . getTime ( ) ) / 1000
@@ -1135,6 +1148,7 @@ function update_countdown(){
11351148}
11361149
11371150check_version ( )
1151+ check_banner ( )
11381152update_check = setInterval ( check_version , 15 * 60 * 1000 )
11391153load_hash ( ) ;
11401154startAjax ( ) ;
You can’t perform that action at this time.
0 commit comments