extends ../annotation.pug
block annotation-area
div
div.card.has-text-weight-bold.has-text-white.has-background-royalblue
div.card-content
div.content(v-if="docs[pageNumber]") {{ docs[pageNumber].text }}
section.todoapp
header.header
input.textarea.new-todo(
v-model="newTodo"
v-on:keyup.enter="addTodo"
type="text"
placeholder="What is your response?"
)
section.main(v-cloak="")
ul.todo-list
li.todo(
v-for="todo in annotations[pageNumber]"
v-bind:key="todo.id"
v-bind:class="{ \
editing: todo == editedTodo \
}"
)
div.view
label(v-on:dblclick="editTodo(todo)") {{ todo.text }}
button.delete.destroy.is-large(v-on:click="removeTodo(todo)")
input.textarea.edit(
v-model="todo.text"
v-todo-focus="todo == editedTodo"
v-on:blur="doneEdit(todo)"
v-on:keyup.enter="doneEdit(todo)"
v-on:keyup.esc="cancelEdit(todo)"
type="text"
)