<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Cool Calendar</title>
<link href="https://fonts.googleapis.com/css2?family=Quicksand:wght@500;700&display=swap" rel="stylesheet">
<style>
:root {
--primary: #6c63ff;
--secondary: #ff6c60;
--bg: #121212;
--card: #1e1e1e;
--text: #ffffff;
--highlight: #ffeb3b;
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: 'Quicksand', sans-serif;
background: var(--bg);
color: var(--text);
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
padding: 20px;
}
.calendar {
background: var(--card);
border-radius: 16px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
padding: 20px;
width: 320px;
max-width: 90%;
transition: transform 0.3s ease;
}
.calendar:hover {
transform: scale(1.02);
}
.header {
text-align: center;
font-size: 1.5rem;
font-weight: 700;
margin-bottom: 15px;
color: var(--primary);
}
.days-of-week {
display: grid;
grid-template-columns: repeat(7, 1fr);
gap: 5px;
margin-bottom: 10px;
font-weight: 500;
color: #aaa;
}
.days-of-week div {
text-align: center;
padding: 8px 0;
border-radius: 8px;
transition: background 0.3s;
}
.days-of-week div:hover {
background: rgba(255, 255, 255, 0.1);
}
.dates {
display: grid;
grid-template-columns: repeat(7, 1fr);
gap: 5px;
}
.date {
background: transparent;
border: 2px solid transparent;
border-radius: 8px;
text-align: center;
padding: 10px 0;
font-size: 1rem;
cursor: pointer;
transition: all 0.3s ease;
}
.date:hover {
background: rgba(255, 255, 255, 0.05);
border-color: var(--primary);
}
.date.current {
background: var(--primary);
color: #000;
font-weight: bold;
box-shadow: 0 0 10px rgba(108, 99, 255, 0.5);
}
.date.disabled {
color: #555;
cursor: default;
}
@media (max-width: 360px) {
.calendar {
width: 100%;
}
}
</style>
</head>
<body>
<div class="calendar">
<div class="header">April 2023</div>
<div class="days-of-week">
<div>Mon</div>
<div>Tue</div>
<div>Wed</div>
<div>Thu</div>
<div>Fri</div>
<div>Sat</div>
<div>Sun</div>
</div>
<div class="dates">
<!-- Empty cells for days before the 1st -->
<div class="date disabled"></div>
<div class="date disabled"></div>
<div class="date disabled"></div>
<div class="date disabled"></div>
<div class="date disabled"></div>
<div class="date">1</div>
<div class="date">2</div>
<div class="date">3</div>
<div class="date">4</div>
<div class="date">5</div>
<div class="date">6</div>
<div class="date">7</div>
<div class="date">8</div>
<div class="date">9</div>
<div class="date">10</div>
<div class="date">11</div>
<div class="date">12</div>
<div class="date">13</div>
<div class="date">14</div>
<div class="date">15</div>
<div class="date">16</div>
<div class="date">17</div>
<div class="date">18</div>
<div class="date">19</div>
<div class="date">20</div>
<div class="date">21</div>
<div class="date">22</div>
<div class="date">23</div>
<div class="date">24</div>
<div class="date">25</div>
<div class="date">26</div>
<div class="date">27</div>
<div class="date">28</div>
<div class="date">29</div>
<div class="date">30</div>
<!-- Empty cells for days after the 30th -->
<div class="date disabled"></div>
<div class="date disabled"></div>
<div class="date disabled"></div>
<div class="date disabled"></div>
<div class="date disabled"></div>
</div>
</div>
<script>
// Highlight current day (April 5, 2023)
const today = new Date();
const currentDay = today.getDate();
const dates = document.querySelectorAll('.date');
dates.forEach(date => {
if (parseInt(date.textContent) === currentDay) {
date.classList.add('current');
}
});
</script>
</body>
</html>
🎨 Features & Design Notes:
- Font: Uses Quicksand, a clean and modern sans-serif font from Google Fonts.
- Theme: A sleek dark mode with neon-like highlights using
var(--primary) and box-shadow.
- Effects:
- Smooth hover transitions on date cells.
- A glow effect on the current day.
- Subtle scale-up effect on hover for the entire calendar.
- Structure:
- Uses grid layout for both days of the week and date cells.
- Includes empty cells for days outside the current month.
- Interactivity:
- Highlights the current day dynamically via JavaScript.
✅ How to Use:
- Copy and paste the code into an
.html file.
- Open in any modern browser.
- Customize the month/year or add interactivity (like navigation) as needed.
Let me know if you want to add navigation buttons or a mobile-friendly version! 📅✨