-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcalender.html
More file actions
92 lines (84 loc) · 2.36 KB
/
calender.html
File metadata and controls
92 lines (84 loc) · 2.36 KB
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
<!DOCTYPE html>
<html>
<head>
<title>Calender-Design</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700;800;900&display=swap');
*
{
margin: 0px;
padding: 0px;
box-sizing: border-box;
font-family: 'Poppins' , sans-serif;
}
body
{
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: #ff006a;
/*url(https://images.unsplash.com/photo-1478760329108-5c3ed9d495a0?ixlib=rb-1.2.1&auto=format&fit=crop&w=1267&q=80);*/
background-size: cover;
background-position: center;
}
.calender
{
position: relative;
width: 200px;
background: #fff;
text-align: center;
border-radius: 8px;
overflow: hidden;
-webkit-box-reflect: below 1px linear-gradient(transparent,transparent,#0004);
}
.calender #monthName
{
position: relative;
padding: 5px 10px;
background: #ff6331;
color: #fff;
font-size: 30px;
font-weight: 700;
}
.calender #dayName
{
margin-top: 20px;
font-size: 20px;
font-weight: 300;
color: #999;
}
.calender #dayNumber
{
margin-top: 0px;
line-height: 1em;
font-size: 80px;
font-weight: 700;
color: #333;
}
.calender #year
{
margin-bottom: 20px;
font-size: 20px;
font-weight: 500;
color: #999;
}
</style>
</head>
<body>
<div class="calender">
<p id="monthName"></p>
<p id="dayName"></p>
<p id="dayNumber"></p>
<p id="year"></p>
</div>
<script>
const lang = navigator.language;
let today = new Date();
let month = document.getElementById("monthName").innerHTML = today.toLocaleString(lang, { month: 'long' });
let day = document.getElementById("dayName").innerHTML = today.toLocaleString(lang, { weekday: 'long' });
let date = document.getElementById("dayNumber").innerHTML = today.getDate();
let year = document.getElementById("year").innerHTML = today.getFullYear();
</script>
</body>
</html>