곽태식

새로운 페이지 생성

......@@ -24,8 +24,9 @@ app.use('/',express.static(path.join(__dirname, 'public')));
app.use('/',express.static(path.join(__dirname, 'code')));
app.use('/Cname/:Cname/Cbirth',express.static(path.join(__dirname, 'public')));
app.use('/Cname/:Cname/Cbirth',express.static(path.join(__dirname, 'code')));
app.use('/Fname/:Fname/Fbirth',express.static(path.join(__dirname, 'public')));
app.use('/Fname/:Fname/Fbirth',express.static(path.join(__dirname, 'code')));
app.use('/Fname/:Fname/Fbirth',express.static(path.join(__dirname, 'newpublic')));
app.use('/Cname/:Cname/Cbirth',express.static(path.join(__dirname, 'newcode')));
app.use('/', indexRouter);
app.use('/users', usersRouter);
......
function clickhome() {
document.getElementById('photo').src = "../image/home.png";
document.getElementById('home').style.fontWeight = 'bold';
}
// # : id, . :class
$('#home').on('click',clickhome);
function clickParis(){
$('#photo').attr('src','../image/paris.png');
$('#home').css('fontWeight','normal');
$('#paris').css('fontWeight','bold');
$('#seoul').css('fontWeight','normal');
$('#tokyo').css('fontWeight','normal');
}
function clickSeoul(){
$('#photo').attr('src','../image/seoul.png');
$('#home').css('fontWeight','normal');
$('#paris').css('fontWeight','normal');
$('#seoul').css('fontWeight','bold');
$('#tokyo').css('fontWeight','normal');
}
function clickTokyo(){
$('#photo').attr('src','../image/tokyo.png');
$('#home').css('fontWeight','normal');
$('#paris').css('fontWeight','normal');
$('#seoul').css('fontWeight','normal');
$('#tokyo').css('fontWeight','bold');
}
$('#paris').on('click',clickParis);
$('#seoul').on('click',clickSeoul);
$('#tokyo').on('click',clickTokyo);
\ No newline at end of file
function clickhome() {
document.getElementById('banner').src = "../newpublic/images/1231.png";
document.getElementById('home').style.fontWeight = 'bold';
}
// # : id, . :class
$('#home').on('click',clickhome);
function clickParis(){
$('#photo').attr('src','../image/paris.png');
$('#home').css('fontWeight','normal');
$('#paris').css('fontWeight','bold');
$('#seoul').css('fontWeight','normal');
$('#tokyo').css('fontWeight','normal');
}
function clickSeoul(){
$('#photo').attr('src','../image/seoul.png');
$('#home').css('fontWeight','normal');
$('#paris').css('fontWeight','normal');
$('#seoul').css('fontWeight','bold');
$('#tokyo').css('fontWeight','normal');
}
function clickTokyo(){
$('#photo').attr('src','../image/tokyo.png');
$('#home').css('fontWeight','normal');
$('#paris').css('fontWeight','normal');
$('#seoul').css('fontWeight','normal');
$('#tokyo').css('fontWeight','bold');
}
$('#paris').on('click',clickParis);
$('#seoul').on('click',clickSeoul);
$('#tokyo').on('click',clickTokyo);
\ No newline at end of file
......@@ -7,9 +7,11 @@ var db = require('../lib/db');
router.post('/starting' , (req,res) => {
res.redirect(`/Cname/${req.body.name}/Cbirth/${req.body.birth}`);
})
//예보 추가
router.post('/forecasting' , (req,res) =>{
res.redirect(`/Fname/${req.body.name}/Fbirth/${req.body.birth}`);
})
router.get('/Fname/:Fname/Fbirth/:Fbirth',(req,res)=>{
// 렌더링 변수
......@@ -56,7 +58,7 @@ router.get('/Fname/:Fname/Fbirth/:Fbirth',(req,res)=>{
}
dataLen = probArr.length;
res.render('index', {
res.render('new_index', {
empty,
time,
ptArr,
......
......@@ -28,6 +28,7 @@
position: absolute;
top: 0;
width: 100%;
}
</style>
......@@ -37,10 +38,10 @@
<script src="highcharts.js"></script>
<script src="modules/exporting.js"></script>
<script src="modules/export-data.js"></script>
<script src="kts.js"></script>
<img src="images/indexWallpaper.jpg" alt="" style="z-index:-1; min-width: 100%; min-height: 100%"width="50%" height="100%">
<div id="banner" ani_type="fade">
<div id="banner" >
<div id="container1" style="width:1260px; height: 400px; margin: 0 auto;"></div>
<div style="width:1275px; margin:0 auto;">
......
......@@ -28,3 +28,22 @@
</style>
</head>
<body>
<img src="images/background.jpg" alt="" style="z-index:-1; min-width: 100%; min-height: 100%"width="50%" height="100%">
<div class="menu">
<a id ="home">Home</a>
<a id ="paris">Paris</a>
<a id ="seoul">Seoul</a>
<a id ="tokyo">Tokyo</a>
</div>
<img id ="photo" src="../image/home.png" width="50%" height="50%">
<script
src="https://code.jquery.com/jquery-3.4.1.js"
integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU="
crossorigin="anonymous"></script>
<script src="../js/kts.js"type="text/javascript"></script>
</body>
\ No newline at end of file
......