Open
Conversation
Use a current ruby version (the pinned version is 5+ years old), and update the tooling to ignore deps/vendor directories.
There were six fonts downloaded even though only two were used, and one of those only referenced in a few titles.
After this cleanup, down to just 4 JS files: jquery-1.11.0.js (94KB) - Required by Owl Carousel owl.carousel.min.js (43KB) - Testimonials carousel fslightbox.js (30KB) - Gallery lightbox (conditional) main.js (4KB) - Site functionality Total JS cleanup: - Started with: 17 files (~540KB) - Now: 4 files (~171KB) - Removed: 13 files (~369KB / 68% reduction)
The new solution uses portable, vanilla JS weighing in around 1KB, rather than Owl Carousel at 43KB.
Total JS reduction: - Started: 17 files, ~540KB - Now: 2 files, ~35KB - Removed: ~505KB (93% reduction) main.js now handles: - Page loader - Header background on scroll - Mobile menu toggle - Testimonials carousel (infinite loop, responsive, autoplay) - Smooth scrolling for anchor links All in ~190 lines of vanilla JS, no dependencies.
Remove fslightbox.js in favor of ~40 lines of JS and ~60 lines of CSS. Final JS summary: Started: 17 files, ~540KB Now: 1 file, ~8KB Removed: ~532KB (98.5% reduction) main.js now handles everything: - Page loader - Header scroll effect - Mobile menu - Testimonials carousel - Smooth scrolling - Gallery lightbox All in ~270 lines of vanilla JS, zero dependencies.
The vertical alignment for nav links and dropdowns as off because of some global rules that weren't overridden.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There are a lot of changes in this PR, from css fixes, to font reductions, and JS consolidation. Each commit outlines specific improvements, but overall: