|
@@ -97,31 +97,6 @@
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
- /* ---------------------------------------------------------------------------
|
|
|
|
- * Filter projects.
|
|
|
|
- * --------------------------------------------------------------------------- */
|
|
|
|
-
|
|
|
|
- $('.projects-container').each(function(index, container) {
|
|
|
|
- let $container = $(container);
|
|
|
|
- let $section = $container.closest('section');
|
|
|
|
-
|
|
|
|
- $container.imagesLoaded(function() {
|
|
|
|
- // Initialize Isotope after all images have loaded.
|
|
|
|
- $container.isotope({
|
|
|
|
- itemSelector: '.isotope-item',
|
|
|
|
- layoutMode: 'masonry',
|
|
|
|
- filter: $section.find('.default-project-filter').text()
|
|
|
|
- });
|
|
|
|
- // Filter items when filter link is clicked.
|
|
|
|
- $section.find('.project-filters a').click(function() {
|
|
|
|
- let selector = $(this).attr('data-filter');
|
|
|
|
- $container.isotope({filter: selector});
|
|
|
|
- $(this).removeClass('active').addClass('active').siblings().removeClass('active all');
|
|
|
|
- return false;
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
/* ---------------------------------------------------------------------------
|
|
/* ---------------------------------------------------------------------------
|
|
* Filter publications.
|
|
* Filter publications.
|
|
* --------------------------------------------------------------------------- */
|
|
* --------------------------------------------------------------------------- */
|
|
@@ -262,6 +237,32 @@
|
|
resizeTimer = setTimeout(fixScrollspy, 200);
|
|
resizeTimer = setTimeout(fixScrollspy, 200);
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ // Filter projects.
|
|
|
|
+ $('.projects-container').each(function(index, container) {
|
|
|
|
+ let $container = $(container);
|
|
|
|
+ let $section = $container.closest('section');
|
|
|
|
+ let layout = 'masonry';
|
|
|
|
+ if ($section.find('.isotope').hasClass('js-layout-row')) {
|
|
|
|
+ layout = 'fitRows';
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $container.imagesLoaded(function() {
|
|
|
|
+ // Initialize Isotope after all images have loaded.
|
|
|
|
+ $container.isotope({
|
|
|
|
+ itemSelector: '.isotope-item',
|
|
|
|
+ layoutMode: layout,
|
|
|
|
+ filter: $section.find('.default-project-filter').text()
|
|
|
|
+ });
|
|
|
|
+ // Filter items when filter link is clicked.
|
|
|
|
+ $section.find('.project-filters a').click(function() {
|
|
|
|
+ let selector = $(this).attr('data-filter');
|
|
|
|
+ $container.isotope({filter: selector});
|
|
|
|
+ $(this).removeClass('active').addClass('active').siblings().removeClass('active all');
|
|
|
|
+ return false;
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+
|
|
// Enable publication filter for publication index page.
|
|
// Enable publication filter for publication index page.
|
|
if ($('.pub-filters-select')) {
|
|
if ($('.pub-filters-select')) {
|
|
filter_publications();
|
|
filter_publications();
|