Calender

<div class="calender">
	<div class="calender-page">
		<div class="month">
			
		</div>
		<div class="day">
			<span class="date-suffix">th</span>
			<div class="page-flip"></div>
			<div class="calender-time">
			</div>
		</div>
		<div class="date"></div>
		<div class="year"></div>
	</div>
</div>

  <style>
html {
  box-sizing: border-box;
}
*, *:before, *:after {
  box-sizing: inherit;
}
.calender {
  margin: auto;
  max-width: 300px;
  padding: 1rem;
  width: 100%;
}
.calender .calender-page {
  box-shadow: 0 1px 4px #888;
  border-radius: 3px;
  overflow: hidden;
}
.calender .month {
  background: #f4d956;
  border-bottom: 5px solid #eec80f;
  font-size: 1.5rem;
  padding: 0.25rem;
  position: relative;
  text-align: center;
  font-family: 'Roboto Slab', 'Helvetica', 'Helvetica Neue', 'Arial', serif;
  font-style: normal;
  font-weight: 700;
}
.calender .month:after, .calender .month:before {
  background: #888;
  bottom: 50%;
  bottom: calc(50% - 5px);
  border-radius: 100px;
  box-shadow: 0 2px 0 0px #151515;
  content: '';
  height: 10px;
  position: absolute;
  width: 10px;
  z-index: 10;
}
.calender .month:after {
  box-shadow: -1px 2px 0 0px #151515, 0px 1px 0 0px #151515;
  right: 20px;
}
.calender .month:before {
  box-shadow: 1px 2px 0 0px #151515, 0px 1px 0 0px #151515;
  left: 20px;
}
.calender .day {
  background: #fff;
  background-image: linear-gradient(to bottom, whitesmoke, #fff);
  border-top: none;
  font-size: 6rem;
  letter-spacing: -5px;
  padding: 1rem 0;
  position: relative;
  text-align: center;
  font-family: 'Helvetica', 'Helvetica Neue', 'Arial', sans-serif;
  font-style: normal;
  font-weight: 700;
}
.calender .date {
  background: #fff;
  border-top: none;
  font-size: 1.3rem;
  letter-spacing: 3px;
  position: relative;
  text-align: center;
  font-family: 'Helvetica', 'Helvetica Neue', 'Arial', sans-serif;
  font-style: normal;
  font-weight: 700;
}
.calender .year {
  background: #fff;
  background-image: linear-gradient(to bottom, whitesmoke, #fff);
  border-top: none;
  font-size: 2rem;
  letter-spacing: 5px;
  padding: 1rem 0;
  position: relative;
  text-align: center;
  font-family: 'Helvetica', 'Helvetica Neue', 'Arial', sans-serif;
  font-style: normal;
  font-weight: 700;
}
.calender .day .date-suffix {
  display: inline-block;
  font-size: 2rem;
  letter-spacing: normal;
  margin-left: 0.35rem;
  font-family: 'Helvetica', 'Helvetica Neue', 'Arial', sans-serif;
  font-style: normal;
  font-weight: 400;
}
.calender .page-flip {
  border-radius: 3px 0 0 0;
  box-shadow: 0px 0px 3px 1px #dbdbdb;
  bottom: 0;
  height: 35px;
  right: 0;
  position: absolute;
  width: 35px;
}
.calender .page-flip:after {
  border-top: 35px solid transparent;
  border-bottom: 0px solid transparent;
  border-right: 35px solid #efefef;
  bottom: -2px;
  content: '';
  position: absolute;
  right: -2px;
}
.calender .page-flip:before {
  border-top: 0px solid transparent;
  border-bottom: 35px solid transparent;
  border-left: 35px solid #dbdbdb;
  border-radius: 3px 0 0 0;
  bottom: 0px;
  content: '';
  position: absolute;
  right: 0px;
}
body {
  background: #efefef;
}


  </style>
  
 
	
	<script>

	const monthEl = document.querySelector(".date");
	const dayEl = document.querySelector(".day");
	const yearEl = document.querySelector(".year");
	const dateEl = document.querySelector(".month");

	
	const days = ["Sunday", "Monday", "tuesday", "Wednesday", "Thursday", "Friday", "Saterday"];
	const months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
	
	
	
	function setTime() {
		const time = new Date();
		const year = time.getFullYear();
		const month = time.getMonth();
		const day = time.getDay();
		const date = time.getDate();
	  
	
	
		monthEl.innerHTML = ` ${months[month]}`;
		dayEl.innerHTML = ` ${date}`;
		yearEl.innerHTML = ` ${year}`;
		dateEl.innerHTML = ` ${days[day]}`;
	 
	}
	
	const scale = (num, in_min, in_max, out_min, Out_max) => {
		return (num - in_min) * (Out_max - out_min) / (in_max - in_min) + out_min;
	}
	
	setTime();
	
	setInterval(setTime, 1000);

	</script>
	

1 Reactie

  1. Rashed

    Keep going 💯🤩

    Antwoord

Reactie verzenden

Je e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *

Vaardigheden

Gepubliceerd op

september 25, 2022

Share This

Share This Page

Keep supporting us & Share this Page with your friends!

Open chat
1
💬 Need help?
hello 👋
Can we help you?