(feat): We've got a working admin panel
This commit is contained in:
		
							parent
							
								
									a8d2f7b798
								
							
						
					
					
						commit
						0628d45527
					
				
					 6 changed files with 205 additions and 78 deletions
				
			
		|  | @ -14,7 +14,7 @@ | |||
| </head> | ||||
| <body> | ||||
|     <h1>Subscribers</h1> | ||||
|   <p><a href="{{ url_for('send_update_email') }}">Send Update Email</a></p> | ||||
|   <p><a href="{{ url_for('send_update') }}">Send Update Email</a></p> | ||||
|   {% if emails %} | ||||
|     <table> | ||||
|       <tr> | ||||
|  |  | |||
							
								
								
									
										33
									
								
								templates/login.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								templates/login.html
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,33 @@ | |||
| <!DOCTYPE html> | ||||
| <html lang="en"> | ||||
| <head> | ||||
|   <meta charset="UTF-8" /> | ||||
|   <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||||
|   <title>Admin Login</title> | ||||
|   <style> | ||||
|     body { font-family: Arial, sans-serif; padding: 20px; } | ||||
|     form { max-width: 400px; margin: 0 auto; } | ||||
|     label { display: block; margin-top: 15px; } | ||||
|     input[type="text"], input[type="password"] { width: 100%; padding: 8px; } | ||||
|     button { margin-top: 15px; padding: 10px 20px; } | ||||
|     .flash { background-color: #f8d7da; color: #721c24; padding: 10px; margin-bottom: 10px; text-align: center; } | ||||
|   </style> | ||||
| </head> | ||||
| <body> | ||||
|   <h1>Admin Login</h1> | ||||
|   {% with messages = get_flashed_messages(with_categories=true) %} | ||||
|     {% if messages %} | ||||
|       {% for category, message in messages %} | ||||
|         <div class="flash">{{ message }}</div> | ||||
|       {% endfor %} | ||||
|     {% endif %} | ||||
|   {% endwith %} | ||||
|   <form action="{{ url_for('login') }}" method="POST"> | ||||
|     <label for="username">Username:</label> | ||||
|     <input type="text" name="username" required /> | ||||
|     <label for="password">Password:</label> | ||||
|     <input type="password" name="password" required /> | ||||
|     <button type="submit">Login</button> | ||||
|   </form> | ||||
| </body> | ||||
| </html> | ||||
|  | @ -1,7 +1,7 @@ | |||
| <!DOCTYPE html> | ||||
| <html lang="en"> | ||||
| <head> | ||||
|   <meta charset="UTF-8"> | ||||
|   <meta charset="UTF-8" /> | ||||
|   <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||||
|   <title>Admin Center - Send Update</title> | ||||
|   <style> | ||||
|  | @ -10,7 +10,12 @@ | |||
|     label { display: block; margin-top: 15px; } | ||||
|     input[type="text"], textarea { width: 100%; padding: 8px; } | ||||
|     button { margin-top: 15px; padding: 10px 20px; } | ||||
|     .flash { background-color: #f8d7da; color: #721c24; padding: 10px; margin-bottom: 10px; } | ||||
|     .flash { | ||||
|       background-color: #f8d7da; | ||||
|       color: #721c24; | ||||
|       padding: 10px; | ||||
|       margin-bottom: 10px; | ||||
|     } | ||||
|   </style> | ||||
| </head> | ||||
| <body> | ||||
|  | @ -23,7 +28,7 @@ | |||
|     {% endif %} | ||||
|   {% endwith %} | ||||
| 
 | ||||
|   <form action="{{ url_for('send_update_email') }}" method="POST"> | ||||
|   <form action="{{ url_for('send_update') }}" method="POST"> | ||||
|     <label for="subject">Subject:</label> | ||||
|     <input type="text" name="subject" required> | ||||
| 
 | ||||
|  | @ -32,6 +37,9 @@ | |||
| 
 | ||||
|     <button type="submit">Send Update</button> | ||||
|   </form> | ||||
|   <p><a href="{{ url_for('index') }}">Back to Subscribers List</a></p> | ||||
|   <p> | ||||
|     <a href="{{ url_for('index') }}">Back to Subscribers List</a> | | ||||
|     <a href="{{ url_for('logout') }}">Logout</a> | ||||
|   </p> | ||||
| </body> | ||||
| </html> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Blake Ridgway
						Blake Ridgway