post.pug 2.26 KB
html
  head
    link(rel='stylesheet', href='css/index_style.css')
    script(src='https://code.jquery.com/jquery-2.2.1.min.js')
  body
    a.button(href='#') How much are you earning now?
    .modal-overlay
      .modal-wrapper
        label.close(for='')
        h2#modal-title Please fill in the blanks.
        form.message-form(action='/graph', method='POST')
          .input-box
            label.input-label(for='') Payment days (ex. 31)
            input.input-text(type='text', name='payDay')
            hr.underline
            hr.underline-focus
          .input-box
            label.input-label(for='') Salary (ex. 1000000)
            input.input-text(type='text', name='salary')
            hr.underline
            hr.underline-focus
          .input-box
            label.input-label(for='') Working days (ex. 월화수목금)
            input.input-text(type='text', name='workDay')
            hr.underline
            hr.underline-focus
          .input-box
            label.input-label(for='') Working time (ex. 9)
            input.input-text(type='text', name='workTime')
            hr.underline
            hr.underline-focus
          .input-box
            label.input-label(for='') Time off work (ex. 18)
            input.input-text(type='text', name='offWork')
            hr.underline
            hr.underline-focus
          //
            <div class="input-box textarea">
            <label for="" class="input-label">Message</label>
            <textarea class="input-text"></textarea>
            <hr class="underline">
            <hr class="underline-focus">
            </div>
          .input-button
            button.button(type='button', onclick="location.href='/graph' ") Enter
    script(type='text/javascript').
      $('.button').on('click', function(e) {
      e.preventDefault();
      $(this).addClass('active');
      });
      $('.modal-wrapper').find('label').on('click', function() {
      $('.button').removeClass('active');
      });
      $('.input-text').focus(function() {
      $(this).parents('.input-box').addClass('focus');
      })
      $('.input-text').blur(function() {
      if ($(this).val()) {
      $(this).parents('.input-box').addClass('focus');
      } else {
      $(this).parents('.input-box').removeClass('focus');
      }
      });