diff --git a/web/Images/calendar.png b/web/Images/calendar.png new file mode 100644 index 0000000..e804aa9 Binary files /dev/null and b/web/Images/calendar.png differ diff --git a/web/Images/calendar2.png b/web/Images/calendar2.png new file mode 100644 index 0000000..e740212 Binary files /dev/null and b/web/Images/calendar2.png differ diff --git a/web/Images/calendar3.png b/web/Images/calendar3.png new file mode 100644 index 0000000..221b119 Binary files /dev/null and b/web/Images/calendar3.png differ diff --git a/web/Images/calendar4.png b/web/Images/calendar4.png new file mode 100644 index 0000000..c44443c Binary files /dev/null and b/web/Images/calendar4.png differ diff --git a/web/pages/calendar.html b/web/pages/calendar.html new file mode 100644 index 0000000..1ab57d1 --- /dev/null +++ b/web/pages/calendar.html @@ -0,0 +1,96 @@ + + + + + + Dynamic Calendar JavaScript | CodingNepal + + + + + + + +
+
+

+
+ chevron_left + chevron_right +
+
+
+ + +
+
+ + + + + \ No newline at end of file diff --git a/web/stylesheet/calendar.css b/web/stylesheet/calendar.css new file mode 100644 index 0000000..57cd8bf --- /dev/null +++ b/web/stylesheet/calendar.css @@ -0,0 +1,124 @@ +/* Import Google font - Poppins */ +@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap'); + +* { + margin: 0; + padding: 0; + box-sizing: border-box; + font-family: 'Poppins', sans-serif; +} + +body { + display: flex; + align-items: center; + padding: 0 10px; + justify-content: center; + min-height: 100vh; + background: white; +} + +.wrapper { + width: 450px; + background: #6175f7; + ; + border-radius: 10px; + box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12); +} + +.wrapper header { + display: flex; + align-items: center; + padding: 25px 30px 10px; + justify-content: space-between; +} + +header .icons { + display: flex; +} + +header .icons span { + height: 38px; + width: 38px; + margin: 0 1px; + cursor: pointer; + color: orange; + text-align: center; + line-height: 38px; + font-size: 1.9rem; + user-select: none; + border-radius: 50%; +} + +.icons span:last-child { + margin-right: -10px; +} + +header .icons span:hover { + background: #f2f2f2; +} + +header .current-date { + font-size: 1.45rem; + font-weight: 500; +} + +.calendar { + padding: 20px; +} + +.calendar ul { + display: flex; + flex-wrap: wrap; + list-style: none; + text-align: center; +} + +.calendar .days { + margin-bottom: 20px; +} + +.calendar li { + color: #333; + width: calc(100% / 7); + font-size: 1.07rem; +} + +.calendar .weeks li { + font-weight: 500; + cursor: default; +} + +.calendar .days li { + z-index: 1; + cursor: pointer; + position: relative; + margin-top: 30px; +} + +.days li.inactive { + color: orange; +} + +.days li.active { + color: #fff; +} + +.days li::before { + position: absolute; + content: ""; + left: 50%; + top: 50%; + height: 40px; + width: 40px; + z-index: -1; + border-radius: 50%; + transform: translate(-50%, -50%); +} + +.days li.active::before { + background: palegoldenrod; +} + +.days li:not(.active):hover::before { + background: #f2f2f2; +} \ No newline at end of file