-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.html
108 lines (74 loc) · 4.87 KB
/
main.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="" />
<meta name="author" content="" />
<link rel="icon" type="image/x-icon" href="assets/favicon.ico" />
<!-- Font Awesome icons (free version)-->
<script src="https://use.fontawesome.com/releases/v6.3.0/js/all.js" crossorigin="anonymous"></script>
<!-- Google fonts-->
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link href="https://fonts.googleapis.com/css2?family=Tinos:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap" rel="stylesheet" />
<!-- Core theme CSS (includes Bootstrap)-->
<link href="css/styles.css" rel="stylesheet" />
<script src="js/scripts.js"></script>
</head>
<body>
<div class="masthead">
<div class="masthead-content text-white">
<div class="container-fluid px-4 px-lg-0">
<h1 class="fst-italic lh-1 mb-4">송이 오늘 뭐 입지?</h1>
<hr>
<div class="row input-group-newsletter" style="width: 510px;; background-color: aliceblue; color: black; padding: 10px; margin: 10px; border-radius: 5%; ">
<div id="school" style="padding: 10px;font-size: 40px;font-style: italic;font-weight: bold;">등교</div>
<div id="home" style="padding: 10px;font-size: 40px;font-style: italic;font-weight: bold;">하교</div>
<script>
let goHome=GetCookie("goHome");
console.log("gohome:", goHome);
let goSchool=GetCookie("goSchool");
let date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
let hours = ('0' + date.getHours()).slice(-2);
let minutes = ('0' + date.getMinutes()).slice(-2);
let goSchool_h=goSchool-hours- Math.ceil(minutes/60);
let goSchool_m = Math.ceil(goSchool_h/60) * 60 - minutes;
console.log(goHome)
console.log(hours)
console.log(minutes)
console.log(Math.ceil(minutes/60))
let goHome_h=goHome-hours- Math.ceil(minutes/60);
console.log(goHome_h)
let goHome_m = Math.ceil(goHome_h/60) * 60 - minutes;
document.getElementById("school").innerHTML="등교까지 "+ goSchool_h+" 시간 "+goSchool_m+" 분";
document.getElementById("home").innerHTML= "하교까지 "+goHome_h+" 시간 "+goHome_m+" 분";
</script>
</div>
</div>
</div>
</div>
<!-- Social Icons-->
<!-- For more icon options, visit https://fontawesome.com/icons?d=gallery&p=2&s=brands-->
<div class="social-icons">
<script>
function my_function(){
window.open("now_weather.html","","width=1000 height=800")
}
</script>
<div class="d-flex flex-row flex-lg-column justify-content-center align-items-center h-100 mt-3 mt-lg-0">
<a onclick="my_function()"id="now_weather" class="btn btn-dark m-3" href="#!" style="width: 250px;">청파동 날씨</a>
<a onclick="location.href='recommend.html'" id="recommend" class="btn btn-dark m-3" href="#!" style="width: 250px;">옷 추천</a>
<a onclick="location.href='closet.html'" id="closet" class="btn btn-dark m-3" href="#!" style="width: 250px;">나의 옷장</a>
</div>
</div>
<!-- Bootstrap core JS-->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<!-- Core theme JS-->
<script src="js/scripts.js"></script>
</body>
<footer style="font-size: 20px;">서울특별시 용산구 청파로47길 100</footer>
</html>