Showing
13 changed files
with
96 additions
and
7 deletions
... | @@ -24,8 +24,9 @@ app.use('/',express.static(path.join(__dirname, 'public'))); | ... | @@ -24,8 +24,9 @@ app.use('/',express.static(path.join(__dirname, 'public'))); |
24 | app.use('/',express.static(path.join(__dirname, 'code'))); | 24 | app.use('/',express.static(path.join(__dirname, 'code'))); |
25 | app.use('/Cname/:Cname/Cbirth',express.static(path.join(__dirname, 'public'))); | 25 | app.use('/Cname/:Cname/Cbirth',express.static(path.join(__dirname, 'public'))); |
26 | app.use('/Cname/:Cname/Cbirth',express.static(path.join(__dirname, 'code'))); | 26 | app.use('/Cname/:Cname/Cbirth',express.static(path.join(__dirname, 'code'))); |
27 | -app.use('/Fname/:Fname/Fbirth',express.static(path.join(__dirname, 'public'))); | 27 | +app.use('/Fname/:Fname/Fbirth',express.static(path.join(__dirname, 'newpublic'))); |
28 | -app.use('/Fname/:Fname/Fbirth',express.static(path.join(__dirname, 'code'))); | 28 | +app.use('/Cname/:Cname/Cbirth',express.static(path.join(__dirname, 'newcode'))); |
29 | + | ||
29 | 30 | ||
30 | app.use('/', indexRouter); | 31 | app.use('/', indexRouter); |
31 | app.use('/users', usersRouter); | 32 | app.use('/users', usersRouter); | ... | ... |
newcode/kts.js
0 → 100644
1 | +function clickhome() { | ||
2 | + document.getElementById('photo').src = "../image/home.png"; | ||
3 | + document.getElementById('home').style.fontWeight = 'bold'; | ||
4 | + | ||
5 | + | ||
6 | +} | ||
7 | +// # : id, . :class | ||
8 | +$('#home').on('click',clickhome); | ||
9 | + | ||
10 | +function clickParis(){ | ||
11 | + $('#photo').attr('src','../image/paris.png'); | ||
12 | + $('#home').css('fontWeight','normal'); | ||
13 | + $('#paris').css('fontWeight','bold'); | ||
14 | + $('#seoul').css('fontWeight','normal'); | ||
15 | + $('#tokyo').css('fontWeight','normal'); | ||
16 | +} | ||
17 | +function clickSeoul(){ | ||
18 | + $('#photo').attr('src','../image/seoul.png'); | ||
19 | + $('#home').css('fontWeight','normal'); | ||
20 | + $('#paris').css('fontWeight','normal'); | ||
21 | + $('#seoul').css('fontWeight','bold'); | ||
22 | + $('#tokyo').css('fontWeight','normal'); | ||
23 | +} | ||
24 | +function clickTokyo(){ | ||
25 | + $('#photo').attr('src','../image/tokyo.png'); | ||
26 | + $('#home').css('fontWeight','normal'); | ||
27 | + $('#paris').css('fontWeight','normal'); | ||
28 | + $('#seoul').css('fontWeight','normal'); | ||
29 | + $('#tokyo').css('fontWeight','bold'); | ||
30 | +} | ||
31 | +$('#paris').on('click',clickParis); | ||
32 | +$('#seoul').on('click',clickSeoul); | ||
33 | +$('#tokyo').on('click',clickTokyo); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
newpublic/images/1231.jpg
0 → 100644

215 KB
newpublic/images/2.jpg
0 → 100644

204 KB
newpublic/images/background.jpg
0 → 100644

243 KB
newpublic/images/fdd.jpg
0 → 100644

34.2 KB
newpublic/images/images (2).jpg
0 → 100644
.jpg)
4 KB
newpublic/images/images.jpg
0 → 100644

12.5 KB
newpublic/images/indexWallpaper.jpg
0 → 100644

205 KB
newpublic/kts.js
0 → 100644
1 | +function clickhome() { | ||
2 | + document.getElementById('banner').src = "../newpublic/images/1231.png"; | ||
3 | + document.getElementById('home').style.fontWeight = 'bold'; | ||
4 | + | ||
5 | + | ||
6 | +} | ||
7 | +// # : id, . :class | ||
8 | +$('#home').on('click',clickhome); | ||
9 | + | ||
10 | +function clickParis(){ | ||
11 | + $('#photo').attr('src','../image/paris.png'); | ||
12 | + $('#home').css('fontWeight','normal'); | ||
13 | + $('#paris').css('fontWeight','bold'); | ||
14 | + $('#seoul').css('fontWeight','normal'); | ||
15 | + $('#tokyo').css('fontWeight','normal'); | ||
16 | +} | ||
17 | +function clickSeoul(){ | ||
18 | + $('#photo').attr('src','../image/seoul.png'); | ||
19 | + $('#home').css('fontWeight','normal'); | ||
20 | + $('#paris').css('fontWeight','normal'); | ||
21 | + $('#seoul').css('fontWeight','bold'); | ||
22 | + $('#tokyo').css('fontWeight','normal'); | ||
23 | +} | ||
24 | +function clickTokyo(){ | ||
25 | + $('#photo').attr('src','../image/tokyo.png'); | ||
26 | + $('#home').css('fontWeight','normal'); | ||
27 | + $('#paris').css('fontWeight','normal'); | ||
28 | + $('#seoul').css('fontWeight','normal'); | ||
29 | + $('#tokyo').css('fontWeight','bold'); | ||
30 | +} | ||
31 | +$('#paris').on('click',clickParis); | ||
32 | +$('#seoul').on('click',clickSeoul); | ||
33 | +$('#tokyo').on('click',clickTokyo); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -7,11 +7,13 @@ var db = require('../lib/db'); | ... | @@ -7,11 +7,13 @@ var db = require('../lib/db'); |
7 | router.post('/starting' , (req,res) => { | 7 | router.post('/starting' , (req,res) => { |
8 | res.redirect(`/Cname/${req.body.name}/Cbirth/${req.body.birth}`); | 8 | res.redirect(`/Cname/${req.body.name}/Cbirth/${req.body.birth}`); |
9 | }) | 9 | }) |
10 | +//예보 추가 | ||
10 | router.post('/forecasting' , (req,res) =>{ | 11 | router.post('/forecasting' , (req,res) =>{ |
11 | res.redirect(`/Fname/${req.body.name}/Fbirth/${req.body.birth}`); | 12 | res.redirect(`/Fname/${req.body.name}/Fbirth/${req.body.birth}`); |
12 | }) | 13 | }) |
14 | + | ||
13 | router.get('/Fname/:Fname/Fbirth/:Fbirth',(req,res)=>{ | 15 | router.get('/Fname/:Fname/Fbirth/:Fbirth',(req,res)=>{ |
14 | - | 16 | + |
15 | // 렌더링 변수 | 17 | // 렌더링 변수 |
16 | var time = new Array(); // 타임스탬프 | 18 | var time = new Array(); // 타임스탬프 |
17 | var ptArr = new Array(); // 현재 온도 | 19 | var ptArr = new Array(); // 현재 온도 |
... | @@ -56,7 +58,7 @@ router.get('/Fname/:Fname/Fbirth/:Fbirth',(req,res)=>{ | ... | @@ -56,7 +58,7 @@ router.get('/Fname/:Fname/Fbirth/:Fbirth',(req,res)=>{ |
56 | } | 58 | } |
57 | 59 | ||
58 | dataLen = probArr.length; | 60 | dataLen = probArr.length; |
59 | - res.render('index', { | 61 | + res.render('new_index', { |
60 | empty, | 62 | empty, |
61 | time, | 63 | time, |
62 | ptArr, | 64 | ptArr, | ... | ... |
... | @@ -28,6 +28,7 @@ | ... | @@ -28,6 +28,7 @@ |
28 | position: absolute; | 28 | position: absolute; |
29 | top: 0; | 29 | top: 0; |
30 | width: 100%; | 30 | width: 100%; |
31 | + | ||
31 | } | 32 | } |
32 | 33 | ||
33 | </style> | 34 | </style> |
... | @@ -37,10 +38,10 @@ | ... | @@ -37,10 +38,10 @@ |
37 | <script src="highcharts.js"></script> | 38 | <script src="highcharts.js"></script> |
38 | <script src="modules/exporting.js"></script> | 39 | <script src="modules/exporting.js"></script> |
39 | <script src="modules/export-data.js"></script> | 40 | <script src="modules/export-data.js"></script> |
40 | - | 41 | + <script src="kts.js"></script> |
41 | <img src="images/indexWallpaper.jpg" alt="" style="z-index:-1; min-width: 100%; min-height: 100%"width="50%" height="100%"> | 42 | <img src="images/indexWallpaper.jpg" alt="" style="z-index:-1; min-width: 100%; min-height: 100%"width="50%" height="100%"> |
42 | 43 | ||
43 | - <div id="banner" ani_type="fade"> | 44 | + <div id="banner" > |
44 | <div id="container1" style="width:1260px; height: 400px; margin: 0 auto;"></div> | 45 | <div id="container1" style="width:1260px; height: 400px; margin: 0 auto;"></div> |
45 | 46 | ||
46 | <div style="width:1275px; margin:0 auto;"> | 47 | <div style="width:1275px; margin:0 auto;"> | ... | ... |
... | @@ -27,4 +27,23 @@ | ... | @@ -27,4 +27,23 @@ |
27 | } | 27 | } |
28 | 28 | ||
29 | </style> | 29 | </style> |
30 | -</head> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
30 | +</head> | ||
31 | +<body> | ||
32 | + <img src="images/background.jpg" alt="" style="z-index:-1; min-width: 100%; min-height: 100%"width="50%" height="100%"> | ||
33 | + | ||
34 | + <div class="menu"> | ||
35 | + | ||
36 | + <a id ="home">Home</a> | ||
37 | + <a id ="paris">Paris</a> | ||
38 | + <a id ="seoul">Seoul</a> | ||
39 | + <a id ="tokyo">Tokyo</a> | ||
40 | + </div> | ||
41 | + | ||
42 | + | ||
43 | + <img id ="photo" src="../image/home.png" width="50%" height="50%"> | ||
44 | + <script | ||
45 | + src="https://code.jquery.com/jquery-3.4.1.js" | ||
46 | + integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU=" | ||
47 | + crossorigin="anonymous"></script> | ||
48 | + <script src="../js/kts.js"type="text/javascript"></script> | ||
49 | +</body> | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or login to post a comment