forked from cadence/breezewiki
		
	Make top banner less flashy, add to all instances
This commit is contained in:
		
							parent
							
								
									04735851be
								
							
						
					
					
						commit
						d1c348a853
					
				
					 1 changed files with 14 additions and 23 deletions
				
			
		| 
						 | 
					@ -198,9 +198,7 @@
 | 
				
			||||||
                                      (λ (v) (u-proxy-url v))
 | 
					                                      (λ (v) (u-proxy-url v))
 | 
				
			||||||
                                      (head-data^-icon-url head-data))))))
 | 
					                                      (head-data^-icon-url head-data))))))
 | 
				
			||||||
     (body (@ (class ,(head-data^-body-class head-data)))
 | 
					     (body (@ (class ,(head-data^-body-class head-data)))
 | 
				
			||||||
           ,(if (config-true? 'instance_is_official)
 | 
					           ,(let ([extension-eligible?
 | 
				
			||||||
                (let ([balloon '(img (@ (src "/static/three-balloons.png") (class "bw-balloon") (title "Image Source: pngimg.com/image/4955 | License: CC BY-NC 4.0 | Modifications: Resized") (width "52") (height "56")))]
 | 
					 | 
				
			||||||
                      [extension-eligible?
 | 
					 | 
				
			||||||
                   (cond/var
 | 
					                   (cond/var
 | 
				
			||||||
                    [(not req) #f]
 | 
					                    [(not req) #f]
 | 
				
			||||||
                    (var ua-pair (assq 'user-agent (request-headers req)))
 | 
					                    (var ua-pair (assq 'user-agent (request-headers req)))
 | 
				
			||||||
| 
						 | 
					@ -209,19 +207,12 @@
 | 
				
			||||||
                    ;; everyone pretends to be chrome, so we do it in reverse
 | 
					                    ;; everyone pretends to be chrome, so we do it in reverse
 | 
				
			||||||
                    ;; this excludes common browsers that don't support the extension
 | 
					                    ;; this excludes common browsers that don't support the extension
 | 
				
			||||||
                    [#t (and (not (string-contains? ua "edge/"))
 | 
					                    [#t (and (not (string-contains? ua "edge/"))
 | 
				
			||||||
                                 (not (string-contains? ua "edg/"))
 | 
					 | 
				
			||||||
                             (not (string-contains? ua "mobile")))])])
 | 
					                             (not (string-contains? ua "mobile")))])])
 | 
				
			||||||
 | 
					              (if extension-eligible?
 | 
				
			||||||
                  `(div (@ (class "bw-top-banner"))
 | 
					                  `(div (@ (class "bw-top-banner"))
 | 
				
			||||||
                        ,balloon
 | 
					                        (div (@ (class "bw-top-banner-rainbow"))
 | 
				
			||||||
                        (div
 | 
					                             "Try " (a (@ (href "https://getindie.wiki/") (target "_blank")) "our affiliated browser extension") " - redirect to BreezeWiki automatically!\n"))
 | 
				
			||||||
                         "BreezeWiki is back! Most major wikis are available.\n"
 | 
					                  ""))
 | 
				
			||||||
                         ,(if extension-eligible?
 | 
					 | 
				
			||||||
                              '(div (@ (class "bw-top-banner-rainbow"))
 | 
					 | 
				
			||||||
                                    "Try " (a (@ (href "https://getindie.wiki/") (target "_blank")) "our affiliated browser extension") " - redirect to BreezeWiki automatically!\n")
 | 
					 | 
				
			||||||
                              "")
 | 
					 | 
				
			||||||
                         "As always, " (a (@ (href "https://docs.breezewiki.com/Reporting_Bugs.html")) "please go here") " to report problems, suggest features, or talk about the project.")
 | 
					 | 
				
			||||||
                        ,balloon))
 | 
					 | 
				
			||||||
                "")
 | 
					 | 
				
			||||||
           (div (@ (class "main-container"))
 | 
					           (div (@ (class "main-container"))
 | 
				
			||||||
                (div (@ (class "fandom-community-header__background tileHorizontally header")))
 | 
					                (div (@ (class "fandom-community-header__background tileHorizontally header")))
 | 
				
			||||||
                (div (@ (class "page"))
 | 
					                (div (@ (class "page"))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue