Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to Splide Carousel Library #2934

Open
wants to merge 56 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
5f34df5
feat(splide): initial replacement of Slick with Splide, with comparab…
crhallberg Jun 7, 2023
016f0d4
style: global comment doc.
crhallberg Jun 7, 2023
55acba9
feat: npm install splide.
crhallberg Jun 12, 2023
8f13155
Merge branch 'dev' into splide
demiankatz Jun 26, 2023
35d5338
feat: similaritems carousels.
crhallberg Aug 24, 2023
f473122
feat: channel carousels to splide.
crhallberg Aug 25, 2023
9e19a7e
fix: add channels and styles.
crhallberg Aug 25, 2023
b7a4368
style: reduce package.json diff
crhallberg Aug 25, 2023
fe4e3be
Merge remote-tracking branch 'origin/dev' into splide
crhallberg Aug 30, 2023
fc6e590
style: typo in global comment.
crhallberg Aug 31, 2023
3e363bf
revert: dev to prod.
crhallberg Oct 18, 2023
9c3c5f0
Merge remote-tracking branch 'origin/dev' into splide
crhallberg Oct 18, 2023
0a9277a
fix: orphaned merge conflict.
crhallberg Oct 18, 2023
af1ad9a
chore: lessToSass.
crhallberg Oct 18, 2023
234b101
style: hoist function.
crhallberg Oct 18, 2023
47692dd
style: php-cs-fixer
crhallberg Oct 18, 2023
42a9daf
Merge remote-tracking branch 'origin/dev' into splide
crhallberg Dec 5, 2023
b6acde8
lint: global fix.
crhallberg Dec 5, 2023
18becd6
Merge branch 'dev' into splide
demiankatz Dec 8, 2023
4ec3f7b
refactor: move function down.
crhallberg Dec 11, 2023
75a62bd
revert: remove getDependencies method from RecordTabs.
crhallberg Dec 11, 2023
77be7ab
Merge remote-tracking branch 'origin/dev' into splide
crhallberg Jan 9, 2024
018231f
feat: namespace carousels.
crhallberg Jan 10, 2024
bff4a7e
breaking: disable AJAX loading for SimilarItemsCarousel. Move Splide …
crhallberg Jan 10, 2024
e7030bd
Merge remote-tracking branch 'origin/dev' into splide
crhallberg Jan 10, 2024
757be97
fix: bring up-to-date with new dependency structure.
crhallberg Jan 12, 2024
dd8ce3c
fix: copy splide dependencies.
crhallberg Jan 12, 2024
e324ac4
Fix comment.
demiankatz Jan 12, 2024
00cfc09
fix: load carousels submodule where we need it.
crhallberg Jan 12, 2024
8732d24
Merge branch 'dev' into splide
demiankatz Jan 16, 2024
1f437b3
fix: error with AJAX loaded record tabs.
crhallberg Jan 17, 2024
87f7a42
Merge remote-tracking branch 'origin/dev' into splide
crhallberg Feb 6, 2024
b7c185f
Merge remote-tracking branch 'origin/dev' into splide
crhallberg Feb 27, 2024
e11808d
Merge remote-tracking branch 'origin/dev' into splide
crhallberg Apr 22, 2024
488656a
feat: add a title to the Similar Item Carousels for just a bit more i…
crhallberg Apr 22, 2024
8ec7014
chore: lessToSass.
crhallberg Apr 22, 2024
e9f83a9
Merge remote-tracking branch 'origin/dev' into splide
crhallberg Apr 30, 2024
c09cc32
fix: splide arrows accessibility and appearance.
crhallberg May 7, 2024
2d31bd4
fix: fit carousel arrows inside RecordTab.
crhallberg May 7, 2024
d42100a
Merge remote-tracking branch 'origin/dev' into splide
crhallberg May 7, 2024
c4fee0d
Merge branch 'dev' into splide
demiankatz May 8, 2024
f3828dd
fix: mobile stylings and layout fitting.
crhallberg Jun 3, 2024
1ad7f21
Merge remote-tracking branch 'origin/dev' into splide
crhallberg Jun 3, 2024
cd8673e
chore: update-bs5.
crhallberg Jun 3, 2024
259cb64
Merge branch 'dev' into splide
demiankatz Jun 4, 2024
0cde2c0
lessToSass.
demiankatz Jun 4, 2024
a7f11a2
fix: add padding to prevent sandal theme clamping loop.
crhallberg Jun 5, 2024
c3cae10
Merge branch 'splide' of https://github.com/crhallberg/vufind into sp…
crhallberg Jun 5, 2024
bbf5c5a
chore: lessToSass.
crhallberg Jun 5, 2024
a6063f5
feat: adapt splide carousels for bs3 and bs5 compatibility.
crhallberg Jun 5, 2024
8083ffe
chore: qa-js-and-less and check-bootstrap5
crhallberg Jun 5, 2024
85d7b26
chore: compile less.
crhallberg Jun 5, 2024
c6cee44
Merge remote-tracking branch 'upstream/dev' into splide
crhallberg Jun 6, 2024
9e90e09
chore: sync version of vendor files
crhallberg Jun 6, 2024
78d8e57
chore: sync vendor CSS too.
crhallberg Jun 6, 2024
50fd024
chore: diff reduction.
crhallberg Jun 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions module/VuFind/src/VuFind/RecordTab/SimilarItemsCarousel.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,17 @@ public function __construct(
$this->config = $config;
}

/**
* Can this tab be loaded via AJAX?
*
* @return bool
*/
public function supportsAjax()
{
// We cannot load this tab with AJAX because of the carousel library.
return false;
}

/**
* Get the on-screen description for this tab.
*
Expand Down
4 changes: 2 additions & 2 deletions themes/bootprint3/css/compiled.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions themes/bootstrap3/css/compiled.css

Large diffs are not rendered by default.

204 changes: 0 additions & 204 deletions themes/bootstrap3/css/vendor/slick-theme.css

This file was deleted.

119 changes: 0 additions & 119 deletions themes/bootstrap3/css/vendor/slick.css

This file was deleted.

1 change: 1 addition & 0 deletions themes/bootstrap3/css/vendor/splide.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions themes/bootstrap3/js/carousels.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*global VuFind, Splide, unwrapJQuery */
VuFind.register("carousels", function VuFindCarousels() {
function setup(scope = document) {
if (typeof Splide === "undefined") {
return;
}

const config = {
autoHeight: true,
gap: "0.5em",
perPage: 4,
breakpoints: { 640: { perPage: 3 }},
classes: {
// Add classes for pagination.
pagination: "splide__pagination carousel-pagination", // container
page: "splide__pagination__page carousel-indicator", // each button
}
};

unwrapJQuery(scope)
.querySelectorAll("[data-carousel]")
.forEach((carousel) => {
if (carousel.classList.contains("is-initialized")) {
return;
}

new Splide(carousel, config).mount();
});
}

function init() {
setup();
}

return { init, setup };
});
Loading
Loading