todo-main.jade 1.35 KB
form#form-task.form-inline(class='todos')
  .form
    .main
      input(type='text', id='content', name='content', placeholder='해야할 일이 무엇인가요?')
    .sub
      .form-group
        select.form-control(name='category')
          option(value='개인', selected) 개인
          option(value='가족') 가족
          option(value='업무') 업무
          option(value='기타') 기타
      .form-group
        select.form-control(name='priority')
          option(value='3') 중요
          option(value='2', selected) 보통
          option(value='1') 사소
  .actions
      button#post-task.btn.btn-primary.btn-lg.btn-block(type='button') 저장

ul.tasks

.no-task 
  .alert.alert-info Task가 없습니다.
script#task-template(type='text/template').
  <li class='task <%= doneStr %>' data-id='<%= id %>'>
    <span class='check'>
      <i class='fa fa-check fa-lg'></i>
    </span>
    <span class='content'><%=content %></span>
    <% if (category) { %>
      <span class='label label-default category'> 
        <%= category %>
      </span>
    <% } %>
    <span class='priority p<%= priority %>'>
      <%= (priority === 3) ? "중요" : ((priority === 1) ? "사소": "보통") %>
    </span>
    <a href='#' class='remove'><i class='fa fa-trash-o'></i></a>
  </li>
      
script.
  $(function() {
    var todo = new TaskController();    
  });