-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creating public-images and src-components folder
- Loading branch information
1 parent
c401242
commit 0a5f523
Showing
6 changed files
with
59 additions
and
3 deletions.
There are no files selected for viewing
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<script> | ||
import Todoitem from './Todos.svelte'; | ||
//Variables | ||
let newToDoTitle = ''; | ||
let currentFilter = 'all'; | ||
let nextId = 4; | ||
let todos = [ | ||
{ | ||
id: 1, | ||
title: 'My first todo', | ||
completed: false | ||
}, | ||
{ | ||
id: 2, | ||
title: 'My second todo', | ||
completed: false | ||
}, | ||
{ | ||
id: 3, | ||
title: 'My third todo', | ||
completed: false | ||
} | ||
]; | ||
</script> | ||
|
||
<div class="container"> | ||
<img src={'./images/flagAfrica.png'} alt="Flags of African countries in African continent" class="logo"> | ||
|
||
<h1> | ||
To Do App | ||
</h1> | ||
<input type="text" class="todo-input" placeholder="Insert to-do item" bind:value={newToDoTitle} on:keydown={addToDo}> | ||
|
||
<!-- Output --> | ||
{#each filteredTodos as todo} | ||
<div class="todo-item"> | ||
<Todoitem {...todo} on:deleteTodo={handleDeleteTodo} on:toggleComplete={handleToggleComplete} /> | ||
</div> | ||
{/each} | ||
|
||
<div class="inner-container"> | ||
<div><label><input class="inner-container-input" type="checkbox" on:change={checkAllTodos}>Check All</label></div> | ||
<div>{todosRemaining} items left</div> | ||
</div> | ||
</div> | ||
|
||
|
||
|
||
<style> | ||
.logo { | ||
max-width: 100px; | ||
border-radius: 10px; | ||
} | ||
</style> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters