Skip to content

Commit

Permalink
Merge pull request #367 from rajdeepchakraborty-rc/villain
Browse files Browse the repository at this point in the history
Added a Villain Page
  • Loading branch information
aslams2020 authored Nov 3, 2024
2 parents 593a424 + c2f723a commit b44732c
Show file tree
Hide file tree
Showing 19 changed files with 1,524 additions and 8 deletions.
3 changes: 2 additions & 1 deletion Appearances.html
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,8 @@ <h4 class="h46">Overview</h4>
<a href="#">Who is Iron Man?</a>
<a href="#">Franchise</a>
<a href="#">Community</a>
<a href="#">Media Kit</a>
<!-- Added Villain page redirect -->
<a href="villain.html">Marvel Villains</a>
</div>
<div class="footer-col-main">
<h4 class="h46">About Us</h4>
Expand Down
3 changes: 2 additions & 1 deletion Comics.html
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ <h4 class="h46">Overview</h4>
<a href="#">Who is Iron Man?</a>
<a href="#">Franchise</a>
<a href="#">Community</a>
<a href="#">Media Kit</a>
<!-- Added Villain page redirect -->
<a href="villain.html">Marvel Villains</a>
</div>
<div class="footer-col-main">
<h4 class="h46">About Us</h4>
Expand Down
66 changes: 66 additions & 0 deletions Js/villain.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
(function ($) {
$(function () {
$(window).on('scroll', function () {
fnOnScroll();
});

$(window).on('resize', function () {
fnOnResize();
});

var agTimeline = $('.js-timeline'),
agTimelineLine = $('.js-timeline_line'),
agTimelineLineProgress = $('.js-timeline_line-progress'),
agTimelinePoint = $('.js-timeline-card_point-box'),
agTimelineItem = $('.js-timeline_item'),
agOuterHeight = $(window).outerHeight(),
agHeight = $(window).height(),
f = -1,
agFlag = false;

function fnOnScroll() {
agPosY = $(window).scrollTop();

fnUpdateFrame();
}

function fnOnResize() {
agPosY = $(window).scrollTop();
agHeight = $(window).height();

fnUpdateFrame();
}

function fnUpdateWindow() {
agFlag = false;

agTimelineLine.css({
top: agTimelineItem.first().find(agTimelinePoint).offset().top - agTimelineItem.first().offset().top,
bottom: agTimeline.offset().top + agTimeline.outerHeight() - agTimelineItem.last().find(agTimelinePoint).offset().top
});

f !== agPosY && (f = agPosY, agHeight, fnUpdateProgress());
}

function fnUpdateProgress() {
var agTop = agTimelineItem.last().find(agTimelinePoint).offset().top;

i = agTop + agPosY - $(window).scrollTop();
a = agTimelineLineProgress.offset().top + agPosY - $(window).scrollTop();
n = agPosY - a + agOuterHeight / 2;
i <= agPosY + agOuterHeight / 2 && (n = i - a);
agTimelineLineProgress.css({ height: n + "px" });

agTimelineItem.each(function () {
var agTop = $(this).find(agTimelinePoint).offset().top;

(agTop + agPosY - $(window).scrollTop()) < agPosY + .5 * agOuterHeight ? $(this).addClass('js-ag-active') : $(this).removeClass('js-ag-active');
})
}

function fnUpdateFrame() {
agFlag || requestAnimationFrame(fnUpdateWindow);
agFlag = true;
}
});
})(jQuery);
3 changes: 2 additions & 1 deletion PrivacyPolicy.html
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ <h4 class="h46">Overview</h4>
<a href="#">Who is Iron Man?</a>
<a href="#">Franchise</a>
<a href="#">Community</a>
<a href="#">Media Kit</a>
<!-- Added Villain page redirect -->
<a href="villain.html">Marvel Villains</a>
</div>
<div class="footer-col-main">
<h4 class="h46">About Us</h4>
Expand Down
3 changes: 2 additions & 1 deletion Terms&Conditions.html
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ <h4 class="h46">Overview</h4>
<a href="#">Who is Iron Man?</a>
<a href="#">Franchise</a>
<a href="#">Community</a>
<a href="#">Media Kit</a>
<!-- Added Villain page redirect -->
<a href="villain.html">Marvel Villains</a>
</div>
<div class="footer-col-main">
<h4 class="h46">About Us</h4>
Expand Down
Binary file added assets/Villains/Aldrich Killian.webp
Binary file not shown.
Binary file added assets/Villains/Iron_Monger.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/Villains/Justin Hammer.webp
Binary file not shown.
Binary file added assets/Villains/Loki.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/Villains/Thanos.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/Villains/TheMandarin.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/Villains/Ultron.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/Villains/Whiplash.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/Villains/Winter_Soldier.webp
Binary file not shown.
3 changes: 2 additions & 1 deletion blog.html
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ <h4 class="h46">Overview</h4>
<a href="#">Who is Iron Man?</a>
<a href="#">Franchise</a>
<a href="#">Community</a>
<a href="#">Media Kit</a>
<!-- Added Villain page redirect -->
<a href="villain.html">Marvel Villains</a>
</div>
<div class="footer-col-main">
<h4 class="h46">About Us</h4>
Expand Down
3 changes: 2 additions & 1 deletion contributor.html
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,8 @@ <h4 class="h46">Overview</h4>
<a href="#">Who is Iron Man?</a>
<a href="#">Franchise</a>
<a href="#">Community</a>
<a href="#">Media Kit</a>
<!-- Added Villain page redirect -->
<a href="villain.html">Marvel Villains</a>
</div>
<div class="footer-col-main">
<h4 class="h46">About Us</h4>
Expand Down
Loading

0 comments on commit b44732c

Please sign in to comment.