김유현

add .gitignore & sort folder & connect server

node_modules/
*.json
var express = require('express');
var app = express();
app.use(express.static(__dirname + '/public')); // 1
app.listen(3000, function(){
console.log('Server On!');
});
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
<html>
<style type="text/css">
body {
background: #18222F;
}
.wrapper {
position: absolute;
width: 400px;
height: 400px;
margin: auto;
top: 0;
bottom: 0;
left: 0;
right: 0;
display: flex;
flex-direction: row;
}
.container {
flex: 1;
padding: 0 20px;
}
</style>
<body>
<div class="wrapper">
<div class="container chart" data-size="400" data-value="88" data-arrow="up">
</div>
</div>
</body>
<script type="text/javascript">
//
// Library
//
var Dial = function(container) {
this.container = container;
this.size = this.container.dataset.size;
this.strokeWidth = this.size / 8;
this.radius = (this.size / 2) - (this.strokeWidth / 2);
this.value = this.container.dataset.value;
this.direction = this.container.dataset.arrow;
this.svg;
this.defs;
this.slice;
this.overlay;
this.text;
this.arrow;
this.create();
}
Dial.prototype.create = function() {
this.createSvg();
this.createDefs();
this.createSlice();
this.createOverlay();
this.createText();
this.createArrow();
this.container.appendChild(this.svg);
};
Dial.prototype.createSvg = function() {
var svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
svg.setAttribute('width', this.size + 'px');
svg.setAttribute('height', this.size + 'px');
this.svg = svg;
};
Dial.prototype.createDefs = function() {
var defs = document.createElementNS("http://www.w3.org/2000/svg", "defs");
var linearGradient = document.createElementNS("http://www.w3.org/2000/svg", "linearGradient");
linearGradient.setAttribute('id', 'gradient');
var stop1 = document.createElementNS("http://www.w3.org/2000/svg", "stop");
stop1.setAttribute('stop-color', '#6E4AE2');
stop1.setAttribute('offset', '0%');
linearGradient.appendChild(stop1);
var stop2 = document.createElementNS("http://www.w3.org/2000/svg", "stop");
stop2.setAttribute('stop-color', '#78F8EC');
stop2.setAttribute('offset', '100%');
linearGradient.appendChild(stop2);
var linearGradientBackground = document.createElementNS("http://www.w3.org/2000/svg", "linearGradient");
linearGradientBackground.setAttribute('id', 'gradient-background');
var stop1 = document.createElementNS("http://www.w3.org/2000/svg", "stop");
stop1.setAttribute('stop-color', 'rgba(0, 0, 0, 0.2)');
stop1.setAttribute('offset', '0%');
linearGradientBackground.appendChild(stop1);
var stop2 = document.createElementNS("http://www.w3.org/2000/svg", "stop");
stop2.setAttribute('stop-color', 'rgba(0, 0, 0, 0.05)');
stop2.setAttribute('offset', '100%');
linearGradientBackground.appendChild(stop2);
defs.appendChild(linearGradient);
defs.appendChild(linearGradientBackground);
this.svg.appendChild(defs);
this.defs = defs;
};
Dial.prototype.createSlice = function() {
var slice = document.createElementNS("http://www.w3.org/2000/svg", "path");
slice.setAttribute('fill', 'none');
slice.setAttribute('stroke', 'url(#gradient)');
slice.setAttribute('stroke-width', this.strokeWidth);
slice.setAttribute('transform', 'translate(' + this.strokeWidth / 2 + ',' + this.strokeWidth / 2 + ')');
slice.setAttribute('class', 'animate-draw');
this.svg.appendChild(slice);
this.slice = slice;
};
Dial.prototype.createOverlay = function() {
var r = this.size - (this.size / 2) - this.strokeWidth / 2;
var circle = document.createElementNS("http://www.w3.org/2000/svg", "circle");
circle.setAttribute('cx', this.size / 2);
circle.setAttribute('cy', this.size / 2);
circle.setAttribute('r', r);
circle.setAttribute('fill', 'url(#gradient-background)');
this.svg.appendChild(circle);
this.overlay = circle;
};
Dial.prototype.createText = function() {
var fontSize = this.size / 3.5;
var text = document.createElementNS("http://www.w3.org/2000/svg", "text");
text.setAttribute('x', (this.size / 2) + fontSize / 7.5);
text.setAttribute('y', (this.size / 2) + fontSize / 4);
text.setAttribute('font-family', 'Century Gothic, Lato');
text.setAttribute('font-size', fontSize);
text.setAttribute('fill', '#78F8EC');
text.setAttribute('text-anchor', 'middle');
var tspanSize = fontSize / 3;
text.innerHTML = 0 + '<tspan font-size="' + tspanSize + '" dy="' + -tspanSize * 1.2 + '">%</tspan>';
this.svg.appendChild(text);
this.text = text;
};
Dial.prototype.createArrow = function() {
var arrowSize = this.size / 10;
var arrowYOffset, m;
if(this.direction === 'up') {
arrowYOffset = arrowSize / 2;
m = -1;
}
else if(this.direction === 'down') {
arrowYOffset = 0;
m = 1;
}
var arrowPosX = ((this.size / 2) - arrowSize / 2);
var arrowPosY = (this.size - this.size / 3) + arrowYOffset;
var arrowDOffset = m * (arrowSize / 1.5);
var arrow = document.createElementNS("http://www.w3.org/2000/svg", "path");
arrow.setAttribute('d', 'M 0 0 ' + arrowSize + ' 0 ' + arrowSize / 2 + ' ' + arrowDOffset + ' 0 0 Z');
arrow.setAttribute('fill', '#97F8F0');
arrow.setAttribute('opacity', '0.6');
arrow.setAttribute('transform', 'translate(' + arrowPosX + ',' + arrowPosY + ')');
this.svg.appendChild(arrow);
this.arrow = arrow;
};
Dial.prototype.animateStart = function() {
var v = 0;
var self = this;
var intervalOne = setInterval(function() {
var p = +(v / self.value).toFixed(2);
var a = (p < 0.95) ? 2 - (2 * p) : 0.05;
v += a;
// Stop
if(v >= +self.value) {
v = self.value;
clearInterval(intervalOne);
}
self.setValue(v);
}, 10);
};
Dial.prototype.animateReset = function() {
this.setValue(0);
};
Dial.prototype.polarToCartesian = function(centerX, centerY, radius, angleInDegrees) {
var angleInRadians = (angleInDegrees-90) * Math.PI / 180.0;
return {
x: centerX + (radius * Math.cos(angleInRadians)),
y: centerY + (radius * Math.sin(angleInRadians))
};
}
Dial.prototype.describeArc = function(x, y, radius, startAngle, endAngle){
var start = this.polarToCartesian(x, y, radius, endAngle);
var end = this.polarToCartesian(x, y, radius, startAngle);
var largeArcFlag = endAngle - startAngle <= 180 ? "0" : "1";
var d = [
"M", start.x, start.y,
"A", radius, radius, 0, largeArcFlag, 0, end.x, end.y
].join(" ");
return d;
}
Dial.prototype.setValue = function(value) {
var c = (value / 100) * 360;
if(c === 360)
c = 359.99;
var xy = this.size / 2 - this.strokeWidth / 2;
var d = this.describeArc(xy, xy, xy, 180, 180 + c);
this.slice.setAttribute('d', d);
var tspanSize = (this.size / 3.5) / 3;
this.text.innerHTML = Math.floor(value) + '<tspan font-size="' + tspanSize + '" dy="' + -tspanSize * 1.2 + '">%</tspan>';
};
//
// Usage
//
var containers = document.getElementsByClassName("chart");
var dial = new Dial(containers[0]);
dial.animateStart();
</script>
</html>
<html>
<head>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/index_style.css">
<script src="https://code.jquery.com/jquery-2.2.1.min.js"></script>
</head>
<body>
......@@ -8,28 +8,47 @@
<div class="modal-overlay">
<div class="modal-wrapper">
<label class="close" for=""></label>
<h2 id="modal-title">Envoyez-nous un message</h2>
<form class="message-form" action="">
<h2 id="modal-title">Please fill in the blanks.</h2>
<form class="message-form" action="/graph" method="POST">
<div class="input-box">
<label for="" class="input-label">Nom</label>
<label for="" class="input-label">Payment days (ex. 31)</label>
<input type="text" class="input-text">
<hr class="underline">
<hr class="underline-focus">
</div>
<div class="input-box">
<label for="" class="input-label">E-mail</label>
<label for="" class="input-label">Salary (ex. 1000000)</label>
<input type="text" class="input-text">
<hr class="underline">
<hr class="underline-focus">
</div>
<div class="input-box textarea">
<div class="input-box">
<label for="" class="input-label">Working days (ex. 월화수목금)</label>
<input type="text" class="input-text">
<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">
<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">
<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>-->
<div class="input-button">
<button class="button">Envoyer</button>
<button class="button">Enter</button>
</div>
</form>
</div>
......