Changes to fitplan.scroll.pub

root
root
26 days ago
Initial commit
body.html
Changed around line 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Create Your Perfect Workout Plan

+

Drag and drop exercises to build your custom routine

+
+
+
+
+

Exercise Library

+
+
Push-ups
+
Squats
+
Planks
+
Lunges
+
Burpees
+
Mountain Climbers
+
+
+
+
+

Your Workout Plan

+
+
+

Monday

+
+
+
+

Wednesday

+
+
+
+

Friday

+
+
+
+
+
+
+
+
+

FitPlan - Your Personal Exercise Planner

+
index.scroll
Changed around line 1
+ buildHtml
+ baseUrl https://fitplan.scroll.pub
+ metaTags
+ editButton /edit.html
+ title FitPlan - Your Personal Exercise Planner
+ style.css
+ body.html
+ script.js
readme.scroll
Changed around line 1
+ # fitplan.scroll.pub
+ Website generated by Claude from prompt: create a exercise planner having these excexises
script.js
Changed around line 1
+ document.addEventListener('DOMContentLoaded', () => {
+ // Mobile menu toggle
+ const menuToggle = document.querySelector('.menu-toggle');
+ const navLinks = document.querySelector('.nav-links');
+
+ menuToggle.addEventListener('click', () => {
+ navLinks.classList.toggle('active');
+ });
+
+ // Drag and drop functionality
+ const exercises = document.querySelectorAll('.exercise');
+ const dropZones = document.querySelectorAll('.drop-zone');
+
+ exercises.forEach(exercise => {
+ exercise.addEventListener('dragstart', dragStart);
+ exercise.addEventListener('dragend', dragEnd);
+ });
+
+ dropZones.forEach(zone => {
+ zone.addEventListener('dragover', dragOver);
+ zone.addEventListener('dragleave', dragLeave);
+ zone.addEventListener('drop', drop);
+ });
+
+ function dragStart(e) {
+ e.target.classList.add('dragging');
+ e.dataTransfer.setData('text/plain', e.target.dataset.exercise);
+ }
+
+ function dragEnd(e) {
+ e.target.classList.remove('dragging');
+ }
+
+ function dragOver(e) {
+ e.preventDefault();
+ e.currentTarget.classList.add('dragover');
+ }
+
+ function dragLeave(e) {
+ e.currentTarget.classList.remove('dragover');
+ }
+
+ function drop(e) {
+ e.preventDefault();
+ const exerciseName = e.dataTransfer.getData('text/plain');
+ const exerciseElement = document.createElement('div');
+ exerciseElement.className = 'exercise';
+ exerciseElement.textContent = exerciseName;
+
+ // Add remove functionality
+ exerciseElement.addEventListener('dblclick', function() {
+ this.remove();
+ });
+
+ e.currentTarget.appendChild(exerciseElement);
+ e.currentTarget.classList.remove('dragover');
+ }
+
+ // Save functionality
+ const savePlan = () => {
+ const plan = {};
+ dropZones.forEach(zone => {
+ const day = zone.parentElement.dataset.day;
+ const exercises = Array.from(zone.children).map(ex => ex.textContent);
+ plan[day] = exercises;
+ });
+ localStorage.setItem('workoutPlan', JSON.stringify(plan));
+ alert('Workout plan saved!');
+ };
+
+ // Load saved plan
+ const loadPlan = () => {
+ const savedPlan = localStorage.getItem('workoutPlan');
+ if (savedPlan) {
+ const plan = JSON.parse(savedPlan);
+ dropZones.forEach(zone => {
+ const day = zone.parentElement.dataset.day;
+ if (plan[day]) {
+ plan[day].forEach(exercise => {
+ const exerciseElement = document.createElement('div');
+ exerciseElement.className = 'exercise';
+ exerciseElement.textContent = exercise;
+ exerciseElement.addEventListener('dblclick', function() {
+ this.remove();
+ });
+ zone.appendChild(exerciseElement);
+ });
+ }
+ });
+ }
+ };
+
+ // Load saved plan on page load
+ loadPlan();
+
+ // Add save button functionality
+ document.querySelector('a[href="#save"]').addEventListener('click', (e) => {
+ e.preventDefault();
+ savePlan();
+ });
+ });
style.css
Changed around line 1
+ :root {
+ --primary-color: #2c3e50;
+ --accent-color: #3498db;
+ --background-color: #f5f6fa;
+ --text-color: #2c3e50;
+ --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
+ }
+
+ * {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+ }
+
+ body {
+ font-family: 'Segoe UI', system-ui, sans-serif;
+ line-height: 1.6;
+ color: var(--text-color);
+ background: var(--background-color);
+ }
+
+ header {
+ background: var(--primary-color);
+ padding: 1rem;
+ box-shadow: var(--shadow);
+ }
+
+ nav {
+ max-width: 1200px;
+ margin: 0 auto;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ }
+
+ .logo {
+ font-size: 1.5rem;
+ font-weight: bold;
+ color: white;
+ }
+
+ .nav-links {
+ display: flex;
+ list-style: none;
+ }
+
+ .nav-links li a {
+ color: white;
+ text-decoration: none;
+ padding: 0.5rem 1rem;
+ transition: color 0.3s ease;
+ }
+
+ .nav-links li a:hover {
+ color: var(--accent-color);
+ }
+
+ .menu-toggle {
+ display: none;
+ flex-direction: column;
+ gap: 5px;
+ cursor: pointer;
+ }
+
+ .menu-toggle span {
+ width: 25px;
+ height: 3px;
+ background: white;
+ transition: 0.3s;
+ }
+
+ .hero {
+ text-align: center;
+ padding: 4rem 1rem;
+ background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
+ color: white;
+ }
+
+ .hero h1 {
+ font-size: 2.5rem;
+ margin-bottom: 1rem;
+ }
+
+ .planner-grid {
+ max-width: 1200px;
+ margin: 2rem auto;
+ padding: 0 1rem;
+ display: grid;
+ grid-template-columns: 1fr 2fr;
+ gap: 2rem;
+ }
+
+ .exercise-library, .workout-plan {
+ background: white;
+ padding: 1.5rem;
+ border-radius: 10px;
+ box-shadow: var(--shadow);
+ }
+
+ .exercise {
+ background: var(--accent-color);
+ color: white;
+ padding: 1rem;
+ margin: 0.5rem 0;
+ border-radius: 5px;
+ cursor: move;
+ transition: transform 0.2s ease;
+ }
+
+ .exercise:hover {
+ transform: translateY(-2px);
+ }
+
+ .plan-container {
+ display: grid;
+ grid-template-columns: repeat(3, 1fr);
+ gap: 1rem;
+ }
+
+ .day-column {
+ background: var(--background-color);
+ padding: 1rem;
+ border-radius: 5px;
+ }
+
+ .drop-zone {
+ min-height: 200px;
+ border: 2px dashed #ccc;
+ border-radius: 5px;
+ margin-top: 1rem;
+ padding: 1rem;
+ }
+
+ .drop-zone.dragover {
+ background: rgba(52, 152, 219, 0.1);
+ border-color: var(--accent-color);
+ }
+
+ @media (max-width: 768px) {
+ .planner-grid {
+ grid-template-columns: 1fr;
+ }
+
+ .menu-toggle {
+ display: flex;
+ }
+
+ .nav-links {
+ display: none;
+ position: absolute;
+ top: 100%;
+ left: 0;
+ right: 0;
+ background: var(--primary-color);
+ flex-direction: column;
+ padding: 1rem;
+ }
+
+ .nav-links.active {
+ display: flex;
+ }
+
+ .plan-container {
+ grid-template-columns: 1fr;
+ }
+ }