events.ejs 6.84 KB
<!DOCTYPE html>
<html>
  <head>
    <link rel='stylesheet' href='/stylesheets/style.css' />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"/>
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Jua|Nanum+Brush+Script|Yeon+Sung&display=swap&subset=korean" >
    <style>
      /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */
      .transition, form button, form .question label, form .question input[type="text"] {
  -moz-transition: all 0.25s cubic-bezier(0.53, 0.01, 0.35, 1.5);
  -o-transition: all 0.25s cubic-bezier(0.53, 0.01, 0.35, 1.5);
  -webkit-transition: all 0.25s cubic-bezier(0.53, 0.01, 0.35, 1.5);
  transition: all 0.25s cubic-bezier(0.53, 0.01, 0.35, 1.5);
}

* {
  font-weight: light;
  -webkit-font-smoothing: antialiased;
  font-family: 'Jua', sans-serif;
}

html {
  background-color: #e7ded9;
}

h1{
  margin-left:20px;
  font-family: 'Jua', sans-serif;
}

form {
  position: relative;
  display: inline-block;
  max-width: 300x;
  box-sizing: border-box;
  padding: 20px 20px;
  background-color: white;
  border: 2px solid #772f9c;
  border-radius: 40px;
  left: 30%;
  margin:50px;
  -moz-transform: translate(-50%, 0);
  -ms-transform: translate(-50%, 0);
  -webkit-transform: translate(-50%, 0);
  transform: translate(-50%, 0);
  font-family: 'Yeon Sung', cursive;
}
form h2 {
  color: #772f9c;
  font-weight: 100;
  letter-spacing: 0.01em;
  margin-left: 15px;
  margin-bottom: 35px;
  text-transform: uppercase;
  font-family: 'Jua', sans-serif;
}
form button {
  margin-top: 35px;
  background-color: white;
  border: 1px solid #772f9c;
  line-height: 0;
  font-size: 17px;
  display: inline-block;
  box-sizing: border-box;
  padding: 20px 15px;
  border-radius: 60px;
  color: #772f9c;
  font-weight: 100;
  letter-spacing: 0.01em;
  position: relative;
  z-index: 1;
  align-self: flex-end;
}
form button:hover, form button:focus {
  color: white;
  background-color: #772f9c;
}
form .question {
  position: relative;
  padding: 10px 0;
}
form .question:first-of-type {
  padding-top: 0;
}
form .question:last-of-type {
  padding-bottom: 0;
}
form .question label {
  transform-origin: left center;
  color: #772f9c;
  font-weight: 100;
  letter-spacing: 0.01em;
  font-size: 17px;
  box-sizing: border-box;
  padding: 10px 15px;
  display: block;
  position: absolute;
  margin-top: -40px;
  z-index: 2;
  pointer-events: none;
}
form .question input[type="text"] {
  appearance: none;
  background-color: none;
  border: 1px solid #772f9c;
  line-height: 0;
  font-size: 17px;
  width: 100%;
  display: block;
  box-sizing: border-box;
  padding: 10px 15px;
  border-radius: 60px;
  color: #772f9c;
  font-weight: 100;
  letter-spacing: 0.01em;
  position: relative;
  z-index: 1;
}
form .question input[type="text"]:focus {
  outline: none;
  background: #772f9c;
  color: white;
  margin-top: 30px;
}
form .question input[type="text"]:valid {
  margin-top: 30px;
}
form .question input[type="text"]:focus ~ label {
  -moz-transform: translate(0, -35px);
  -ms-transform: translate(0, -35px);
  -webkit-transform: translate(0, -35px);
  transform: translate(0, -35px);
}
form .question input[type="text"]:valid ~ label {
  text-transform: uppercase;
  font-style: italic;
  -moz-transform: translate(5px, -35px) scale(0.6);
  -ms-transform: translate(5px, -35px) scale(0.6);
  -webkit-transform: translate(5px, -35px) scale(0.6);
  transform: translate(5px, -35px) scale(0.6);
}

      #div_root{
        margin:auto;
        float:left;
      }
      #div_top{
        width:100%;
        height:100px;
        text-align:center;
      }
      #div_center{
        width:60%;
        float:left;
        
      }
      #div_right{
        width:40%;
        float:left;
      }
      #ls{
        transform-origin: left center;
        color: #772f9c;
        font-weight: 100;
        letter-spacing: 0.01em;
        font-size: 17px;
        box-sizing: border-box;
        padding: 10px 15px;
        display: block;
        position: absolute;
        z-index: 2;
        pointer-events: none;
      }
      #d{
        background-color: none;
        border: 1px solid #772f9c;
        line-height: 1;
        font-size: 17px;
        width: 65%;
        padding:10px 15px;
        display: block;
        box-sizing: border-box;
        border-radius: 60px;
        color: #772f9c;
        font-weight: 100;
        letter-spacing: 0.01em;
        position: relative;
        z-index: 1;
        margin-left: 100px;
      }
      #pad{
        padding:10px 0;
      }
      #title{
        color: #772f9c;
      }
    </style>
  </head>
  <a style="float:right; font-size:20px" href="/logout">Logout</a>
  <body>
    <div id="div_root">
        
        <div id="div_top">
          <h1 id='title'>Calendar ID : <%= id %></h1>
        </div>
        <div id="div_center">
            <% calendars.forEach(function(val){ %>
              <form action="/events/remove" method="POST">
              <p style="font-size:17px">일정</p>
              <p>summary : <%= val.summary %></p>
              <p>description : <%= val.description %></p>
              <p>start : <%= val.start.dateTime %></p>
              <p>end : <%= val.end.dateTime %></p>
              <input type="hidden" name="eId" value=<%= val.id %>>
              <button type="submit">Delete</button>
              </form>
            <% }) %>
        </div>
        <div id="div_right">
            <form name="add" action="/events/add" method="POST">
              <h2>Add Event!</h2>
              <input type="hidden" name="id" value=<%= id %> >
              <div class="question">
                  <input type="text" name="summary" required/>
                  <label>Summary</label>
                </div>
                <div class="question">
                  <input type="text" name="location" required/>
                  <label>Location</label>
                </div>
                <div class="question">
                  <input type="text"  name="description" required/>
                  <label>Desciption</label>
                </div>
                <div id="pad">
                  <label id='ls'>Start Day</label>
                  <input id="d" type="date" name="startDay">
                </div>
              <div style="padding:10px 0">
                <label id='ls'>Start Time</label>
                <input id="d" type="time" name="startTime">
              </div>
              <div id="pad">
                <label id='ls'>End Day</label>
                <input id="d" type="date" name="endDay">
              </div>
              <div id="pad">
                <label id='ls'>End Time</label>
                <input id="d" type="time" name="endTime">
              </div>
              <button type="submit">Submit</button>
             </form>
        </div>
    </div>
  </body>
</html>