A modern, responsive website for the Infinity, one of the FR Legends community.
The website is available at:
- GitHub Pages: https://razanius12.github.io/InfinityWorks/
- Main URL: https://infinityworks.rf.gd/
- Alternate URL: https://infinityworks.vercel.app/
- Responsive design that works across all devices
- Modern UI with smooth animations and transitions
- Team member profiles with social links
- Embedded YouTube Video gallery showcasing drift content
- Dynamic photo gallery of team activities
- Bootstrap 5 framework integration
- Custom CSS styling
- HTML5
- CSS3
- JavaScript
- jQuery
- Bootstrap 5
- Bootstrap Icons
- Google Fonts
- Home - Welcome section with team introduction
- About - Team history and mission statement
- Members - Team member profiles with social links
- Videos - YouTube video gallery
- Gallery - Dynamic photo gallery
- Discord - Community invitation section
- Open the
index.html
file. - Locate the section you want to modify by searching for the relevant text.
- Edit the text within the HTML tags.
- Open the
css/templatemo-festava-live.css
file. - Locate the CSS rules you want to modify.
- Edit the CSS properties as needed.
- Replace the image files in the
images
directory with your new images. - Ensure the new images have the same file names as the old ones, or update the
src
attributes in theindex.html
file to match the new file names.
- Open the
index.html
file. - Locate the
<section class="hero-section" id="section_1">
block. - To update the video, replace the
<source>
tags within the<video>
tag with new video sources. - To update the image, replace the
poster
attribute of the<video>
tag with the new image path. - The
retryLoadVideo(video, attempt)
function in thejs/custom.js
ensures that the video loads correctly by retrying the load operation with exponential backoff if the video is not near the viewport or fails to load initially. It uses an intersection observer to load the video when it comes into view and retries loading up to a maximum number of attempts with increasing intervals. You can modify themaxAttempts
andbackoffInterval
variables to adjust the retry behavior. - The video is split into four sources to ensure compatibility and fallback options for different browsers.
- Open the
index.html
file. - Locate the
Members
section. - Copy an existing member's
<div class="col">
block and paste it where you want the new member to appear. - Update the image
src
, member name, role, and quote. - If using the carousel, also add the new member's
<div class="carousel-item">
block within the carousel structure.
The adjustCarouselControls()
function in the js/custom.js
file adjusts the visibility and positioning of the carousel controls based on the number of items and the current state of the carousel. This function ensures that the controls are correctly positioned and visible on different screen sizes.
- Identify Active Item: The function first identifies the currently active carousel item.
- Determine Screen Size: It checks the screen size using
window.matchMedia
. - Adjust Control Position: Based on the screen size, it adjusts the position of the carousel controls (
.carousel-control-prev
and.carousel-control-next
).
- Mobile Screens (max-width: 576px):
- The controls are positioned based on the height of the image within the active carousel item.
- Small Screens (max-width: 620px):
- The controls are positioned at a fixed height, ensuring they are visible and accessible.
- Larger Screens:
- The controls are reset to their default positions.
-
Change Control Positioning:
-
To change the positioning of the controls for mobile screens, modify the
topPosition
calculation within theif (window.matchMedia('(max-width: 576px)').matches)
block. -
Example:
if (window.matchMedia('(max-width: 576px)').matches) { const topPosition = imageHeight - 50; // Adjusted from -24 to -50 if (prevControl) prevControl.style.top = `${topPosition}px`; if (nextControl) nextControl.style.top = `${topPosition}px`; }
-
-
Add New Screen Size Conditions:
-
To add a new condition for a different screen size, add a new
else if
block with the desiredwindow.matchMedia
query. -
Example:
else if (window.matchMedia('(max-width: 768px)').matches) { const topPosition = 200; // Custom position for screens up to 768px if (prevControl) prevControl.style.top = `${topPosition}px`; if (nextControl) nextControl.style.top = `${topPosition}px`; }
-
-
Modify Control Visibility:
-
To hide or show the controls based on the number of items, you can add logic to check the number of carousel items and adjust the visibility accordingly.
-
Example:
const carouselItems = document.querySelectorAll('.carousel-item'); if (carouselItems.length <= 1) { if (prevControl) prevControl.style.display = 'none'; if (nextControl) nextControl.style.display = 'none'; } else { if (prevControl) prevControl.style.display = 'block'; if (nextControl) nextControl.style.display = 'block'; }
-
- Open the
index.html
file. - Locate the
Videos
section. - Copy an existing
<div class="col-auto">
block containing an<iframe>
and paste it where you want the new video to appear. - Update the
src
attribute of the<iframe>
tag with the new YouTube video URL.
- Open the
js/custom.js
file. - Locate the
generateImageHTML
function. - Update the loop range to include the new images.
- Add the new images to the
images/gallery
directory with the appropriate naming convention.
-
Open the
index.html
file. -
Copy an existing section's
<section>
block and paste it where you want the new section to appear. -
Update the
id
attribute and content as needed. -
Add corresponding styles in the
css/templatemo-festava-live.css
file if necessary. -
Locate the
<nav>
block. -
Copy an existing
<li class="nav-item">
block and paste it where you want the new navbar item to appear. -
Update the
href
attribute and text content.-
Example:
<li class="nav-item"> <a class="nav-link click-scroll" href="#section_7">New Section</a> </li>
-
-
Update the
var sectionArray
in thejs/click-scroll.js
file to include the new section for smooth scrolling functionality.-
Example:
var sectionArray = [1, 2, 3, 4, 5, 6, 7]; // Added new section with id="section_7"
-
-
Ensure that the new section's
id
matches thehref
attribute in the corresponding navbar link in theindex.html
file. -
The function in
custom.js
handles the smooth scrolling effect when a navbar link is clicked. It uses jQuery to animate the scroll to the target section.-
Example:
$('.smoothscroll').click(function () { var el = $(this).attr('href'); var elWrapped = $(el); var header_height = $('.navbar').height(); scrollToDiv(elWrapped, header_height); return false; function scrollToDiv(element, navheight) { var offset = element.offset(); var offsetTop = offset.top; var totalScroll = offsetTop - navheight; $('body,html').animate({ scrollTop: totalScroll }, 300); } });
-
-
The
click-scroll.js
file ensures that the active navbar link is highlighted based on the scroll position. It updates the active class on the navbar links as the user scrolls through the sections. -
The
jquery.sticky.js
file makes the navbar stick to the top of the page as the user scrolls down. This ensures that the navbar is always visible for easy navigation.
- Discord: Join Our Community
- Instagram: @works_infinity
The website uses a custom color scheme:
- Primary Color: #6376ca
- Secondary Color: #273987
- Dark Color: #000000
- Background Color: #f0f8ff
- Template based on TemplateMo 583 Festava Live
- Distributed by ThemeWagon
- Developed by Razanius12