todo
This commit is contained in:
		
							parent
							
								
									4c135c4901
								
							
						
					
					
						commit
						cf4fc1be93
					
				| @ -280,31 +280,28 @@ | |||||||
|   </div> |   </div> | ||||||
|    |    | ||||||
|   <!-- Existing content --> |   <!-- Existing content --> | ||||||
|   <table class="table todo-table"> |   <div class="todo-table-container"> | ||||||
|     <thead> |     <table class="table todo-table"> | ||||||
|     <th class="c-col">#</th> |       <thead> | ||||||
|     <th>Item</th> |       <th class="c-col">#</th> | ||||||
|     <th></th> |       <th>Item</th> | ||||||
|     </thead> |       <th></th> | ||||||
|     <tr class="ui basic segment" *ngFor="let todo of todoList; let i = index"> |       </thead> | ||||||
|         <td class="c-col">{{i + 1}}</td> |       <tr class="ui basic segment" *ngFor="let todo of todoList; let i = index"> | ||||||
|         <td>{{todo}}</td> |           <td class="c-col">{{i + 1}}</td> | ||||||
|         <td style="text-align:right"> |           <td>{{todo}}</td> | ||||||
|             <a routerLink="." (click)="removeTodo(i)"> |           <td style="text-align:right"> | ||||||
|                 <clr-icon shape="times"></clr-icon> |               <a (click)="removeTodo(i)" class="remove-button"> | ||||||
|             </a> |                   <clr-icon shape="times"></clr-icon> | ||||||
|         </td> |               </a> | ||||||
|     </tr> |           </td> | ||||||
|     <tr> |       </tr> | ||||||
|         <td></td> |     </table> | ||||||
|         <td> |   </div> | ||||||
|           <input [(ngModel)]="todo" (keyup.enter)="addTodo(todo)" placeholder="Add Todo" class="clr-input todo-input"> |   <div class="add-todo-section"> | ||||||
|         </td> |     <input [(ngModel)]="todo" (keyup.enter)="addTodo(todo)" placeholder="Add Todo" class="clr-input todo-input"> | ||||||
|         <td style="text-align:right"> |     <button (click)="addTodo(todo)" class="btn btn-primary add-button"> | ||||||
|             <a color='primary' (click)="addTodo(todo)" class="add-button"> |       <clr-icon shape="plus"></clr-icon> Add | ||||||
|                 <clr-icon shape="plus"></clr-icon> |     </button> | ||||||
|             </a> |   </div> | ||||||
|         </td> |  | ||||||
|     </tr> |  | ||||||
|   </table> |  | ||||||
| </div> | </div> | ||||||
| @ -1,3 +1,92 @@ | |||||||
|  | // To Do Chart specific styles | ||||||
|  | .to-do-chart-container { | ||||||
|  |   padding: 20px; | ||||||
|  |   height: 100%; | ||||||
|  |   display: flex; | ||||||
|  |   flex-direction: column; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .todo-table-container { | ||||||
|  |   flex: 1; | ||||||
|  |   overflow-y: auto; | ||||||
|  |   max-height: 400px; | ||||||
|  |   border: 1px solid #ddd; | ||||||
|  |   border-radius: 4px; | ||||||
|  |   margin-bottom: 20px; // Add margin at the bottom for spacing | ||||||
|  |    | ||||||
|  |   .todo-table { | ||||||
|  |     width: 100%; | ||||||
|  |     border-collapse: collapse; | ||||||
|  |     margin: 0; | ||||||
|  |      | ||||||
|  |     th, td { | ||||||
|  |       padding: 12px; | ||||||
|  |       text-align: left; | ||||||
|  |       border-bottom: 1px solid #ddd; | ||||||
|  |     } | ||||||
|  |      | ||||||
|  |     th { | ||||||
|  |       background-color: #f2f2f2; | ||||||
|  |       font-weight: bold; | ||||||
|  |       position: sticky; | ||||||
|  |       top: 0; | ||||||
|  |       z-index: 10; | ||||||
|  |     } | ||||||
|  |      | ||||||
|  |     tr:hover { | ||||||
|  |       background-color: #f5f5f5; | ||||||
|  |     } | ||||||
|  |      | ||||||
|  |     .c-col { | ||||||
|  |       width: 50px; | ||||||
|  |     } | ||||||
|  |      | ||||||
|  |     // Add padding at the bottom of the table body | ||||||
|  |     tbody { | ||||||
|  |       tr:last-child td { | ||||||
|  |         padding-bottom: 20px; // Extra padding for the last row | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .add-todo-section { | ||||||
|  |   display: flex; | ||||||
|  |   gap: 10px; | ||||||
|  |   margin-top: 15px; | ||||||
|  |   padding: 20px; // Increased padding all around | ||||||
|  |   border-top: 1px solid #eee; | ||||||
|  |   border: 1px solid #ddd; | ||||||
|  |   border-radius: 4px; | ||||||
|  |   background-color: #f9f9f9; | ||||||
|  |    | ||||||
|  |   .todo-input { | ||||||
|  |     flex: 1; | ||||||
|  |     padding: 12px; // Increased padding for better touch targets | ||||||
|  |     border: 1px solid #ccc; | ||||||
|  |     border-radius: 4px; | ||||||
|  |     font-size: 14px; | ||||||
|  |   } | ||||||
|  |    | ||||||
|  |   .add-button { | ||||||
|  |     white-space: nowrap; | ||||||
|  |     padding: 12px 20px; // Increased padding for better touch targets | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .remove-button { | ||||||
|  |   background: none; | ||||||
|  |   border: none; | ||||||
|  |   cursor: pointer; | ||||||
|  |   padding: 8px; // Increased padding for better touch targets | ||||||
|  |   border-radius: 3px; | ||||||
|  |   color: #dc3545; | ||||||
|  |    | ||||||
|  |   &:hover { | ||||||
|  |     background-color: #e0e0e0; | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | 
 | ||||||
| .filter-section { | .filter-section { | ||||||
|   margin-bottom: 20px; |   margin-bottom: 20px; | ||||||
|   padding: 15px; |   padding: 15px; | ||||||
| @ -189,61 +278,12 @@ | |||||||
|       font-size: 16px; |       font-size: 16px; | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| } |  | ||||||
| 
 |  | ||||||
| // To Do Chart specific styles |  | ||||||
| .to-do-chart-container { |  | ||||||
|   padding: 20px; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .todo-table { |  | ||||||
|   width: 100%; |  | ||||||
|   border-collapse: collapse; |  | ||||||
|   margin-top: 20px; |  | ||||||
|    |    | ||||||
|   th, td { |   .add-todo-section { | ||||||
|     padding: 12px; |     flex-direction: column; | ||||||
|     text-align: left; |  | ||||||
|     border-bottom: 1px solid #ddd; |  | ||||||
|   } |   } | ||||||
|    |    | ||||||
|   th { |   .to-do-chart-container { | ||||||
|     background-color: #f2f2f2; |     padding: 15px; // Adjust padding for mobile | ||||||
|     font-weight: bold; |  | ||||||
|   } |  | ||||||
|    |  | ||||||
|   tr:hover { |  | ||||||
|     background-color: #f5f5f5; |  | ||||||
|   } |  | ||||||
|    |  | ||||||
|   .c-col { |  | ||||||
|     width: 50px; |  | ||||||
|   } |  | ||||||
|    |  | ||||||
|   .todo-input { |  | ||||||
|     width: 100%; |  | ||||||
|     padding: 8px; |  | ||||||
|     border: 1px solid #ccc; |  | ||||||
|     border-radius: 4px; |  | ||||||
|   } |  | ||||||
|    |  | ||||||
|   .add-button, .remove-button { |  | ||||||
|     background: none; |  | ||||||
|     border: none; |  | ||||||
|     cursor: pointer; |  | ||||||
|     padding: 5px; |  | ||||||
|     border-radius: 3px; |  | ||||||
|      |  | ||||||
|     &:hover { |  | ||||||
|       background-color: #e0e0e0; |  | ||||||
|     } |  | ||||||
|   } |  | ||||||
|    |  | ||||||
|   .add-button { |  | ||||||
|     color: #28a745; |  | ||||||
|   } |  | ||||||
|    |  | ||||||
|   .remove-button { |  | ||||||
|     color: #dc3545; |  | ||||||
|   } |   } | ||||||
| } | } | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user