Add message flashing
This commit is contained in:
		
							parent
							
								
									263b09c912
								
							
						
					
					
						commit
						faa793174f
					
				
					 2 changed files with 13 additions and 0 deletions
				
			
		|  | @ -11,6 +11,7 @@ html(lang="en") | |||
|       include ./navigation | ||||
| 
 | ||||
|     .container.floating-container | ||||
|       include ./message-flash.html | ||||
|       block content | ||||
| 
 | ||||
|     block footer | ||||
|  |  | |||
							
								
								
									
										12
									
								
								src/lib/pug/message-flash.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								src/lib/pug/message-flash.html
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,12 @@ | |||
| {% with messages = get_flashed_messages(with_categories=true) %} | ||||
|   {% if messages %} | ||||
|     {% for category, message in messages %} | ||||
|       <div class="alert alert-{{ category }} alert-dismissible fade show" role="alert"> | ||||
|         {{ message }} | ||||
|         <button type="button" class="close" data-dismiss="alert" aria-label="Close"> | ||||
|           <span aria-hidden="true">×</span> | ||||
|         </button> | ||||
|       </div> | ||||
|     {% endfor %} | ||||
|   {% endif %} | ||||
| {% endwith %} | ||||
		Reference in a new issue