mirror of
				https://github.com/flarum/core.git
				synced 2025-10-29 06:26:17 +01:00 
			
		
		
		
	* Revert "Fix header contents moving when opening modal (#2131)" * Fix header contents moving when modal opened/closed. Conditionally apply the navbar-fixed-top class only when needed, so that we can take advantage of it without always having the navbar in position:fixed, as was done in the previous solution. That resulted in a clash with custom headers. * Show header on refresh of scrolled page Due to some magic in Mithril 0.1's context:retain flag, some DOM elements were cached across page reloads. Since that has been eliminated, if we refresh the page and we are scrolled down, the "affix" class which makes the header fixed (and as a result, visible) isn't applied until the first scroll. We fix this by running ScrollListener.update() immediately to set initial navbar state.
		
			
				
	
	
		
			43 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			43 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| {!! $forum['headerHtml'] !!}
 | |
| 
 | |
| <div id="app" class="App">
 | |
| 
 | |
|     <div id="app-navigation" class="App-navigation"></div>
 | |
| 
 | |
|     <div id="drawer" class="App-drawer">
 | |
| 
 | |
|         <header id="header" class="App-header">
 | |
|             <div id="header-navigation" class="Header-navigation"></div>
 | |
|             <div class="container">
 | |
|                 <h1 class="Header-title">
 | |
|                     <a href="{{ $forum['baseUrl'] }}" id="home-link">
 | |
|                         @if ($forum['logoUrl'])
 | |
|                             <img src="{{ $forum['logoUrl'] }}" alt="{{ $forum['title'] }}" class="Header-logo">
 | |
|                         @else
 | |
|                             {{ $forum['title'] }}
 | |
|                         @endif
 | |
|                     </a>
 | |
|                 </h1>
 | |
|                 <div id="header-primary" class="Header-primary"></div>
 | |
|                 <div id="header-secondary" class="Header-secondary"></div>
 | |
|             </div>
 | |
|         </header>
 | |
| 
 | |
|     </div>
 | |
| 
 | |
|     <main class="App-content">
 | |
|         <div id="content"></div>
 | |
| 
 | |
|         {!! $content !!}
 | |
| 
 | |
|         <div class="App-composer">
 | |
|             <div class="container">
 | |
|                 <div id="composer"></div>
 | |
|             </div>
 | |
|         </div>
 | |
|     </main>
 | |
| 
 | |
| </div>
 | |
| 
 | |
| {!! $forum['footerHtml'] !!}
 |