Skip to content

Instantly share code, notes, and snippets.

View harunsengul's full-sized avatar
🔥
I may be slow to respond.

Harun Şengül harunsengul

🔥
I may be slow to respond.
View GitHub Profile
@harunsengul
harunsengul / index.html
Created November 14, 2018 13:05
todo list in Vue.js with LocalStorage
<div id="app">
<section class="todo-wrapper">
<h1 class="todo-title">{{ today.day }}<br>{{ today.date }}</h1>
<form @keydown.enter.prevent="">
<input type="text" class="input-todo" v-bind:class="{ active: new_todo }" placeholder="Take the garbage out" v-model="new_todo" v-on:keyup.enter="addItem">
<div class="btn btn-add" v-bind:class="{ active: new_todo }" @click="addItem">+</div>
</form>
<div v-if="pending.length > 0">
<p class="status busy">You have {{ pending.length }} pending item<span v-if="todoList.length>1">s</span></p>