Changes to swipemate.scroll.pub

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

Sarah, 25

+

Professional photographer who loves hiking and coffee ☕

+
+
+
+
+
+
+
+
+
+
+

It's a Match! 🎉

+

You and Sarah have liked each other

+
+
+
+
+
+
+
+
+
+
index.scroll
Changed around line 1
+ buildHtml
+ baseUrl https://swipemate.scroll.pub
+ metaTags
+ editButton /edit.html
+ title SwipeMate - Find Your Perfect Match
+ style.css
+ body.html
+ script.js
readme.scroll
Changed around line 1
+ # swipemate.scroll.pub
+ Website generated by Claude from prompt: Create fully functional Tinder website
script.js
Changed around line 1
+ document.addEventListener('DOMContentLoaded', () => {
+ const card = document.querySelector('.card');
+ const likeBtn = document.querySelector('.btn-like');
+ const dislikeBtn = document.querySelector('.btn-dislike');
+ const modal = document.querySelector('.match-modal');
+ let startX = 0;
+ let currentX = 0;
+
+ // Touch events for swiping
+ card.addEventListener('touchstart', (e) => {
+ startX = e.touches[0].clientX;
+ card.style.transition = 'none';
+ });
+
+ card.addEventListener('touchmove', (e) => {
+ currentX = e.touches[0].clientX - startX;
+ card.style.transform = `translateX(${currentX}px) rotate(${currentX * 0.1}deg)`;
+ });
+
+ card.addEventListener('touchend', () => {
+ card.style.transition = 'transform 0.3s ease';
+ if (Math.abs(currentX) > 100) {
+ const liked = currentX > 0;
+ handleSwipe(liked);
+ } else {
+ card.style.transform = '';
+ }
+ });
+
+ // Button click events
+ likeBtn.addEventListener('click', () => handleSwipe(true));
+ dislikeBtn.addEventListener('click', () => handleSwipe(false));
+
+ function handleSwipe(liked) {
+ const direction = liked ? 1 : -1;
+ card.style.transform = `translateX(${direction * window.innerWidth}px) rotate(${direction * 30}deg)`;
+
+ if (liked) {
+ // 30% chance of a match when liking
+ if (Math.random() < 0.3) {
+ setTimeout(() => {
+ modal.removeAttribute('hidden');
+ }, 500);
+ }
+ }
+
+ // Reset card position after animation
+ setTimeout(() => {
+ card.style.transition = 'none';
+ card.style.transform = '';
+ setTimeout(() => {
+ card.style.transition = 'transform 0.3s ease';
+ }, 50);
+ }, 300);
+ }
+
+ // Modal controls
+ modal.addEventListener('click', (e) => {
+ if (e.target === modal || e.target.classList.contains('btn-secondary')) {
+ modal.setAttribute('hidden', '');
+ }
+ });
+ });
style.css
Changed around line 1
+ :root {
+ --primary-color: #fe3c72;
+ --secondary-color: #424242;
+ --background-color: #f5f7fa;
+ --text-color: #333;
+ --card-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
+ }
+
+ * {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+ }
+
+ body {
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
+ background: var(--background-color);
+ color: var(--text-color);
+ line-height: 1.6;
+ }
+
+ header {
+ background: white;
+ padding: 1rem;
+ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
+ position: fixed;
+ width: 100%;
+ top: 0;
+ z-index: 100;
+ }
+
+ 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: var(--primary-color);
+ }
+
+ .nav-links {
+ display: flex;
+ gap: 1rem;
+ }
+
+ .nav-link {
+ text-decoration: none;
+ color: var(--secondary-color);
+ padding: 0.5rem 1rem;
+ border-radius: 20px;
+ transition: all 0.3s ease;
+ }
+
+ .btn-primary {
+ background: var(--primary-color);
+ color: white;
+ }
+
+ main {
+ margin-top: 80px;
+ padding: 2rem;
+ min-height: calc(100vh - 160px);
+ }
+
+ .card-container {
+ max-width: 400px;
+ margin: 0 auto;
+ }
+
+ .card {
+ background: white;
+ border-radius: 20px;
+ box-shadow: var(--card-shadow);
+ overflow: hidden;
+ transform-origin: center;
+ transition: transform 0.3s ease;
+ }
+
+ .card:hover {
+ transform: scale(1.02);
+ }
+
+ .profile-photo {
+ width: 100%;
+ height: 400px;
+ overflow: hidden;
+ }
+
+ .profile-photo img {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+ }
+
+ .profile-info {
+ padding: 1rem;
+ }
+
+ .action-buttons {
+ display: flex;
+ justify-content: center;
+ gap: 2rem;
+ padding: 1rem;
+ }
+
+ .btn-like, .btn-dislike {
+ width: 60px;
+ height: 60px;
+ border-radius: 50%;
+ border: none;
+ font-size: 1.5rem;
+ cursor: pointer;
+ transition: all 0.3s ease;
+ }
+
+ .btn-like {
+ background: #fff;
+ color: var(--primary-color);
+ border: 2px solid var(--primary-color);
+ }
+
+ .btn-dislike {
+ background: #fff;
+ color: #666;
+ border: 2px solid #666;
+ }
+
+ .btn-like:hover {
+ background: var(--primary-color);
+ color: white;
+ transform: scale(1.1);
+ }
+
+ .btn-dislike:hover {
+ background: #666;
+ color: white;
+ transform: scale(1.1);
+ }
+
+ .match-modal {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background: rgba(0, 0, 0, 0.5);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ z-index: 1000;
+ }
+
+ .modal-content {
+ background: white;
+ padding: 2rem;
+ border-radius: 20px;
+ text-align: center;
+ }
+
+ footer {
+ background: white;
+ padding: 1rem;
+ text-align: center;
+ }
+
+ footer nav {
+ display: flex;
+ justify-content: center;
+ gap: 2rem;
+ }
+
+ footer a {
+ color: var(--secondary-color);
+ text-decoration: none;
+ }
+
+ @media (max-width: 768px) {
+ .card-container {
+ max-width: 100%;
+ }
+
+ .profile-photo {
+ height: 300px;
+ }
+
+ .action-buttons {
+ gap: 1rem;
+ }
+
+ .btn-like, .btn-dislike {
+ width: 50px;
+ height: 50px;
+ }
+ }