create a futuristic website about AI Calendar it should use css for futuristic design…
- User
create a futuristic website about AI Calendar it should use css for futuristic design and js code
- Assistant
Certainly! Here's a futuristic website for "AI Calendar" that utilizes HTML, CSS for the futuristic design, and JavaScript code for interactivity.
HTML (
index.html)<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>AI Calendar - Futuristic Design</title> <!-- Link to the CSS file --> <link rel="stylesheet" href="style.css"> <!-- Google Fonts for futuristic typography --> <link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@500&display=swap" rel="stylesheet"> </head> <body> <div class="container"> <h1>AI Calendar</h1> <div id="calendar"></div> </div> <!-- Include the JavaScript file --> <script src="script.js"></script> </body> </html>
CSS (
style.css)/* Futuristic background gradient */ body { margin: 0; padding: 0; background: linear-gradient(135deg, #0f2027, #2c5364); font-family: 'Orbitron', sans-serif; color: #00ffd5; } /* Container styling */ .container { max-width: 1200px; margin: 0 auto; padding: 50px 20px; text-align: center; } /* Title styling with neon glow */ h1 { font-size: 4em; margin-bottom: 50px; text-shadow: 0 0 20px #00ffd5, 0 0 40px #00ffd5, 0 0 60px #00ffd5; } /* Calendar grid layout */ #calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 15px; } /* Individual day styling */ .day { background-color: rgba(0, 255, 213, 0.1); border: 1px solid #00ffd5; border-radius: 10px; padding: 20px; position: relative; overflow: hidden; cursor: pointer; transition: transform 0.3s; } /* Hover effect with transformation */ .day:hover { transform: scale(1.05); background-color: rgba(0, 255, 213, 0.2); } /* Animated circuit pattern overlay */ .day::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: repeating-linear-gradient( 45deg, transparent, transparent 10px, rgba(0, 255, 213, 0.05) 10px, rgba(0, 255, 213, 0.05) 20px ); animation: rotate 20s linear infinite; } /* Keyframes for rotation animation */ @keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } /* Day number styling */ .day-number { font-size: 2em; z-index: 1; position: relative; } /* Responsive design for smaller screens */ @media (max-width: 768px) { #calendar { grid-template-columns: repeat(4, 1fr); } h1 { font-size: 3em; } } @media (max-width: 480px) { #calendar { grid-template-columns: repeat(2, 1fr); } .container { padding: 20px 10px; } h1 { font-size: 2em; } }
JavaScript (
script.js)// Wait for the DOM to fully load document.addEventListener('DOMContentLoaded', () => { const calendarEl = document.getElementById('calendar'); const daysInMonth = 31; // Assuming 31 days for simplicity // Generate the calendar days for (let i = 1; i <= daysInMonth; i++) { const dayEl = document.createElement('div'); dayEl.classList.add('day'); const dayNumberEl = document.createElement('div'); dayNumberEl.classList.add('day-number'); dayNumberEl.innerText = i; dayEl.appendChild(dayNumberEl); calendarEl.appendChild(dayEl); // Click event to simulate AI event scheduling dayEl.addEventListener('click', () => { alert(`AI Event scheduled on day ${i}`); }); } });
Explanation
-
HTML (
index.html):- Sets up the structure of the webpage.
- Links to the CSS (
style.css) for styling and the JavaScript (script.js) for functionality. - Uses the Google Font Orbitron for a futuristic look.
-
CSS (
style.css):- Applies a dark, gradient background for a sleek appearance.
- Uses neon colors (
#00ffd5) for text and borders to create a glowing effect. - Implements a grid layout for the calendar with responsive design for various screen sizes.
- Adds hover effects and animations to enhance the futuristic feel.
- Includes media queries for responsive adjustments on tablets and mobile devices.
-
JavaScript (
script.js):- Dynamically generates the days of the month inside the calendar grid.
- Adds an event listener to each day to simulate scheduling an AI event.
- Displays an alert when a day is clicked to demonstrate interactivity.
Preview
View a live preview of the AI Calendar here (Note: Since this is a text-based assistant, please copy the code into your development environment to see it in action.)
Screenshot
As this is a text-based platform, please copy the code into an HTML file to view the futuristic design and interactivity.
You can customize and expand upon this code to add more features, such as connecting to a backend, displaying real AI-generated events, or enhancing the animations and styles to suit your vision of a futuristic AI Calendar.
Feel free to ask if you need further assistance or additional features!
-