generated from FGA0138-MDS-Ajax/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
205 additions
and
4 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
18 changes: 18 additions & 0 deletions
18
mamutes/Users/migrations/0006_membroequipe_profile_picture.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 5.1.4 on 2024-12-10 00:46 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('Users', '0005_area_function_membroequipe_areas_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='membroequipe', | ||
name='profile_picture', | ||
field=models.ImageField(blank=True, null=True, upload_to='profile_pictures/'), | ||
), | ||
] |
17 changes: 17 additions & 0 deletions
17
mamutes/Users/migrations/0007_remove_membroequipe_profile_picture.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Django 5.1.4 on 2024-12-16 23:40 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('Users', '0006_membroequipe_profile_picture'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='membroequipe', | ||
name='profile_picture', | ||
), | ||
] |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
const carouselTrack = document.querySelector('.carousel-track'); | ||
const carouselItems = document.querySelectorAll('.carousel-item'); | ||
const totalItems = carouselItems.length; | ||
|
||
const itemWidth = carouselItems[0].offsetWidth; | ||
const gap = 16; | ||
const fullItemWidth = itemWidth + gap; | ||
|
||
let offset = 0; | ||
const speed = 1; | ||
let isPaused = false; | ||
|
||
function moveCarousel() { | ||
if (!isPaused) { | ||
offset -= speed; | ||
|
||
if (offset <= -fullItemWidth) { | ||
carouselTrack.appendChild(carouselTrack.firstElementChild); | ||
offset += fullItemWidth; | ||
} | ||
|
||
carouselTrack.style.transition = 'none'; | ||
carouselTrack.style.transform = `translateX(${offset}px)`; | ||
|
||
setTimeout(() => { | ||
carouselTrack.style.transition = 'transform 0.5s ease'; | ||
}, 100); | ||
} | ||
|
||
requestAnimationFrame(moveCarousel); | ||
} | ||
|
||
carouselTrack.addEventListener('mouseover', () => { | ||
isPaused = true; | ||
}); | ||
|
||
carouselTrack.addEventListener('mouseout', () => { | ||
isPaused = false; | ||
}); | ||
|
||
|
||
moveCarousel(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.