김유현

Modify scss

node_modules/
*.json
public/css
\ No newline at end of file
......
var express = require('express');
// index.js
var express = require('express');
var app = express();
app.use(express.static(__dirname + '/public')); // 1
app.set("view engine","ejs"); // 1
app.use(express.static(__dirname + '/public'));
// 2
app.use(express.json())
app.get("/index", function(req,res){
res.render("index");
});
app.get('/graph', function(req, res){
var payDay = req.query.payDay
var salary = req.query.salary
var workDay = req.query.workDay
var workTime = req.query.workTime
var offWork = req.query.offWork
console.log(payDay, salary,workDay,workTime, offWork);
res.send(`payDay : ${payDay}, salary : ${salary}, workDay : ${workDay}, workTime : ${workTime}, offWork : ${offWork}`);
})
app.listen(3000, function(){
console.log('Server On!');
console.log('Server On!');
});
......
B@import url(https://fonts.googleapis.com/css?family=Exo);
......
......@@ -25,7 +25,7 @@ a.button {
color: $white;
transform: translate(-50%,-50%);
transition: all .4s;
&:hover {
border-color: $green;
color: $green;
......@@ -112,7 +112,7 @@ a.button {
.message-form {
clear: both;
height: 350px;
.input-button {
text-align: center;
padding: 20px;
......@@ -131,6 +131,20 @@ a.button {
border-color: $green;
}
}
.button2 {
border: 1px solid $white;
background-color: transparent;
padding: 10px 20px;
transition: all .4s;
color: $white;
font-family: 'Exo', sans-serif;
cursor: pointer;
&:hover {
color: $green;
border-color: $green;
}
}
}
.input-box {
......@@ -168,13 +182,13 @@ a.button {
transition-property: all;
transition-duration: .5s;
transition-timing-function: cubic-bezier(0, 1, .5, 1);
.input-text {
resize: none;
overflow: hidden;
}
}
.input-label {
position: absolute;
line-height: 48px;
......@@ -228,4 +242,4 @@ a.button {
transition: all 450ms cubic-bezier(.23, 1, .32, 1) 0ms;
}
}
}
\ No newline at end of file
}
......
No preview for this file type
@import url(https://fonts.googleapis.com/css?family=Exo);
$white: #fff;
$black: #000;
$main-black: #333;
$green: #3ac28c;
$lucifer: #666;
html,body {
font-family: 'Exo', sans-serif;
background-color: $main-black;
height: 100%;
width: 100%;
position: relative;
}
a.button {
text-decoration: none;
padding: 20px;
display: inline-block;
border: 1px solid $white;
position: absolute;
top: 50%;
left: 50%;
color: $white;
transform: translate(-50%,-50%);
transition: all .4s;
&:hover {
border-color: $green;
color: $green;
}
}
.modal-overlay {
background: $main-black;
bottom: 0;
left: 0;
position: fixed;
right: 0;
text-align: center;
text-shadow: none;
top: 0;
opacity: 0;
transform: scale(.5);
transition: all .75s cubic-bezier(.68, -.55, .265, 1.55);
z-index: -100;
}
.modal-wrapper {
padding: 1em 0;
position: relative;
margin: 0 auto;
max-width: 500px;
width: 90%;
.close {
padding: 14px;
position: absolute;
right: .5em;
top: 2.5em;
width: 1.5em;
cursor: pointer;
&:before,
&:after {
content: '';
position: absolute;
display: block;
width: 2px;
height: 36px;
background-color: $green;
top:-5px;
}
&:before {
transform: rotate(45deg);
}
&:after {
transform: rotate(-45deg);
}
}
h2 {
color: $white;
margin-bottom: 1em;
text-transform: uppercase;
}
}
@media (min-width: 50em) {
.modal-wrapper {
padding: 1.75em;
}
}
@media (min-height: 37.5em) {
.modal-wrapper {
left: 50%;
position: absolute;
top: 50%;
transform: translate(-50%, -50%);
}
}
.active + .modal-overlay {
opacity: 1;
transform: scale(1);
z-index: 800;
}
.message-form {
clear: both;
height: 350px;
.input-button {
text-align: center;
padding: 20px;
.button {
border: 1px solid $white;
background-color: transparent;
padding: 10px 20px;
transition: all .4s;
color: $white;
font-family: 'Exo', sans-serif;
cursor: pointer;
&:hover {
color: $green;
border-color: $green;
}
}
}
.input-box {
font-size: 16px;
line-height: 24px;
width: 100%;
height: 72px;
display: block;
position: relative;
&.focus {
.input-label {
color: $green;
transform: perspective(1px) scale(.75) translate3d(0, -18px, 0);
}
.underline-focus {
transform: scaleX(1);
}
&.textarea {
overflow-y: hidden;
height: 200px; /* approximate max height */
padding: 0 0 60px;
.input-text {
max-height: 200px;
margin-top: 45px;
padding-top: 0;
}
}
}
&.textarea {
transition-property: all;
transition-duration: .5s;
transition-timing-function: cubic-bezier(0, 1, .5, 1);
.input-text {
resize: none;
overflow: hidden;
}
}
.input-label {
position: absolute;
line-height: 48px;
opacity: 1;
color: $lucifer;
transition: all 450ms cubic-bezier(.23, 1, .32, 1) 0ms;
top: 24px;
transform: scale(1) translate3d(0, 0, 0);
transform-origin: left top 0;
}
.input-text {
-webkit-tap-highlight-color: rgba(0,0,0,0);
position: relative;
width: 100%;
height: 100%;
border: 0;
outline: none;
background-color: transparent;
color: $white;
box-sizing: border-box;
padding-top: 36px;
box-shadow: none;
padding-left: 0;
font-size: 18px;
}
.underline {
border: 0;
border-bottom: solid 1px #e0e0e0;
position: absolute;
width: 100%;
bottom: 8px;
margin: 0;
// false: content-box;
box-sizing: content-box;
height: 0;
}
.underline-focus {
border-style: none none solid;
border-bottom-width: 2px;
position: absolute;
width: 100%;
bottom: 8px;
margin: 0;
box-sizing: content-box;
height: 0;
border-color: $green;
transform: scaleX(0);
transition: all 450ms cubic-bezier(.23, 1, .32, 1) 0ms;
}
}
}
\ No newline at end of file
......@@ -9,46 +9,40 @@
<div class="modal-wrapper">
<label class="close" for=""></label>
<h2 id="modal-title">Please fill in the blanks.</h2>
<form class="message-form" action="/graph" method="POST">
<form class="message-form" action="graph" method="get" id="indexForm">
<div class="input-box">
<label for="" class="input-label">Payment days (ex. 31)</label>
<input type="text" class="input-text">
<input type="text" class="input-text" name="payDay">
<hr class="underline">
<hr class="underline-focus">
</div>
<div class="input-box">
<label for="" class="input-label">Salary (ex. 1000000)</label>
<input type="text" class="input-text">
<input type="text" class="input-text" name="salary">
<hr class="underline">
<hr class="underline-focus">
</div>
<div class="input-box">
<label for="" class="input-label">Working days (ex. 월화수목금)</label>
<input type="text" class="input-text">
<input type="text" class="input-text" name="workDay">
<hr class="underline">
<hr class="underline-focus">
</div>
<div class="input-box">
<label for="" class="input-label">Working time (ex. 9)</label>
<input type="text" class="input-text">
<input type="text" class="input-text" name="workTime">
<hr class="underline">
<hr class="underline-focus">
</div>
<div class="input-box">
<label for="" class="input-label">Time off work (ex. 18)</label>
<input type="text" class="input-text">
<input type="text" class="input-text" name="offWork">
<hr class="underline">
<hr class="underline-focus">
</div>
<!-- <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>-->
<div class="input-button">
<button class="button">Enter</button>
<button type='submit' class="button2">Enter</button>
</div>
</form>
</div>
......@@ -75,4 +69,4 @@
}
});
</script>
</html>
\ No newline at end of file
</html>
......
<!-- views/index.ejs -->
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="css/index_style.css">
<script src="https://code.jquery.com/jquery-2.2.1.min.js"></script>
</head>
<body>
<a href="#" class="button">How much are you earning now?</a>
<div class="modal-overlay">
<div class="modal-wrapper">
<label class="close" for=""></label>
<h2 id="modal-title">Please fill in the blanks.</h2>
<form class="message-form" action="graph" method="get" id="indexForm">
<div class="input-box">
<label for="payDay" class="input-label">Payment days (ex. 31)</label>
<input id="payDay"type="text" class="input-text" name="payDay">
<hr class="underline">
<hr class="underline-focus">
</div>
<div class="input-box">
<label for="salary" class="input-label">Salary (ex. 1000000)</label>
<input id="salary" type="text" class="input-text" name="salary">
<hr class="underline">
<hr class="underline-focus">
</div>
<div class="input-box">
<label for="workDay" class="input-label">Working days (ex. 월화수목금)</label>
<input id="workDay" type="text" class="input-text" name="workDay">
<hr class="underline">
<hr class="underline-focus">
</div>
<div class="input-box">
<label for="workTime" class="input-label">Working time (ex. 9)</label>
<input id = "workTime"type="text" class="input-text" name="workTime">
<hr class="underline">
<hr class="underline-focus">
</div>
<div class="input-box">
<label for="offWork" class="input-label">Time off work (ex. 18)</label>
<input id = "offWork" type="text" class="input-text" name="offWork">
<hr class="underline">
<hr class="underline-focus">
</div>
<div class="input-button">
<button type="submit" form="indexForm" onclick="location.href='/graph'"class="button">Enter</button>
</div>
</form>
</div>
</div>
</body>
<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');
}
});
</script>
</html>
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');
}
});