webyesod: cleaner urls when clicking nav links
This commit is contained in:
		
							parent
							
								
									2ae94a9011
								
							
						
					
					
						commit
						3d2daf3bdf
					
				@ -181,7 +181,8 @@ navlinks here a p = [$hamlet|
 | 
				
			|||||||
  registerlink = navlink here "register" RegisterPage
 | 
					  registerlink = navlink here "register" RegisterPage
 | 
				
			||||||
  balancelink = navlink here "balance" BalancePage
 | 
					  balancelink = navlink here "balance" BalancePage
 | 
				
			||||||
  navlink here s dest = [$hamlet|%a.$style$!href=@?u@ $string.s$|]
 | 
					  navlink here s dest = [$hamlet|%a.$style$!href=@?u@ $string.s$|]
 | 
				
			||||||
   where u = (dest, [("a", a), ("p", p)])
 | 
					   where u = (dest, concat [(if null a then [] else [("a", a)])
 | 
				
			||||||
 | 
					                           ,(if null p then [] else [("p", p)])])
 | 
				
			||||||
         style | here == dest = string "navlinkcurrent"
 | 
					         style | here == dest = string "navlinkcurrent"
 | 
				
			||||||
               | otherwise = string "navlink"
 | 
					               | otherwise = string "navlink"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user