File tree 4 files changed +27
-15
lines changed
4 files changed +27
-15
lines changed Original file line number Diff line number Diff line change @@ -294,18 +294,18 @@ img {
294
294
max-width : 100% ;
295
295
height : auto; }
296
296
297
- .alternative-logo {
297
+ .alternative-logo-uwu {
298
298
filter : drop-shadow (0px 0px 1px black); }
299
299
300
- . alternative-logo-visible {
300
+ # alternative-logo {
301
301
display : none; }
302
302
303
- .alternative-logo . alternative-logo-visible , .alternative-logo-hidden {
303
+ .with- alternative-logo # alternative-logo , .alternative-logo-hidden {
304
304
display : block;
305
305
max-width : 100% ;
306
306
height : auto; }
307
307
308
- .alternative-logo .alternative-logo-hidden {
308
+ .with- alternative-logo .alternative-logo-hidden {
309
309
display : none; }
310
310
311
311
.img-rounded {
Original file line number Diff line number Diff line change 13
13
< div class ="branding ">
14
14
< br class ="hidden-xs alternative-logo-hidden ">
15
15
< img src ="/img/haskell-logo.svg " alt ="Haskell " class ="img-responsive alternative-logo-hidden ">
16
- < img src ="/img/haskell-uwu.png " alt ="Haskell UwU " class ="alternative-logo alternative-logo-visible ">
16
+ < img src ="" alt ="Haskell " id ="alternative-logo ">
17
17
< h4 class ="summary "> An advanced, purely functional programming language</ h4 >
18
18
</ div >
19
19
</ div >
Original file line number Diff line number Diff line change 15
15
< script >
16
16
( function ( ) {
17
17
try {
18
- const isUwuValue = window . location
19
- && window . location . search
20
- && window . location . search . match ( / u w u = ( t r u e | f a l s e ) / ) ;
21
-
22
- if ( isUwuValue ) {
23
- const isUwu = isUwuValue [ 1 ] === 'true' ;
24
- if ( isUwu ) {
25
- document . documentElement . classList . add ( 'alternative-logo' ) ;
26
- console . log ( 'alternative logo enabled. turn off with ?uwu=false' )
27
- console . log ( 'logo credit to @sawaratsuki1004. Slightly tweaked by @Tritlo' ) ;
18
+ const altLogos = {
19
+ retro : {
20
+ src : 'haskell-retro.gif' ,
21
+ credit : 'logo credit to @rhendric and the official Haskell logo designers' ,
22
+ } ,
23
+ uwu : {
24
+ src : 'haskell-uwu.png' ,
25
+ credit : 'logo credit to @sawaratsuki1004. Slightly tweaked by @Tritlo' ,
26
+ } ,
27
+ } ;
28
+ const params = new URLSearchParams ( window . location . search ) ;
29
+ for ( const name in altLogos ) {
30
+ const isEnabled = params . get ( name ) ;
31
+ if ( isEnabled === 'true' ) {
32
+ document . documentElement . classList . add ( 'with-alternative-logo' ) ;
33
+ document . addEventListener ( 'DOMContentLoaded' , function ( ) {
34
+ const img = document . getElementById ( 'alternative-logo' ) ;
35
+ img . setAttribute ( 'src' , '/img/' + altLogos [ name ] . src ) ;
36
+ img . classList . add ( 'alternative-logo-' + name ) ;
37
+ } ) ;
38
+ console . log ( 'alternative logo enabled. turn off with ?' + name + '=false' )
39
+ console . log ( altLogos [ name ] . credit ) ;
28
40
}
29
41
}
30
42
} catch ( err ) { }
You can’t perform that action at this time.
0 commit comments