4,554
edits
No edit summary  | 
				No edit summary  | 
				||
| Line 8: | Line 8: | ||
     var showArticleWrapper = $('#show-article-wrapper');  |      var showArticleWrapper = $('#show-article-wrapper');  | ||
     var list = $('#list');  |      var list = $('#list');  | ||
     var originalListWidth = list.width(); // Store the original width  |     var listList = $('#list-list');  | ||
     var originalListWidth = list.width(); // Store the original width for #list  | |||
    var originalListListWidth = listList.width(); // Store the original width for #list-list  | |||
     if (communityFeatured.length && filteredCards.length >= 2) {  |      if (communityFeatured.length && filteredCards.length >= 2) {  | ||
| Line 144: | Line 146: | ||
     // Function to open the modal and adjust the list  |      // Function to open the modal and adjust the list  | ||
     function openModal(cardElement) {  |      function openModal(cardElement) {  | ||
		console.log('Clicked on card:', cardElement);  | |||
         showArticleWrapper.css('display', 'block');  |          showArticleWrapper.css('display', 'block');  | ||
         var wrapperWidth = showArticleWrapper.outerWidth(true);  |          var wrapperWidth = showArticleWrapper.outerWidth(true);  | ||
         list.width(originalListWidth - wrapperWidth).css('margin-right', wrapperWidth + 'px');  |          list.width(originalListWidth - wrapperWidth).css('margin-right', wrapperWidth + 'px');  | ||
        listList.width(originalListListWidth - wrapperWidth).css('margin-right', wrapperWidth + 'px');  | |||
         // Extract and handle the information from the cardElement  |          // Extract and handle the information from the cardElement  | ||
         var cardImages = [];  |          var cardImages = [];  | ||
| Line 259: | Line 263: | ||
         showArticleWrapper.hide();  |          showArticleWrapper.hide();  | ||
         list.width(originalListWidth).css('margin-right', '0');  |          list.width(originalListWidth).css('margin-right', '0');  | ||
        listList.width(originalListListWidth).css('margin-right', '0');  | |||
     }  |      }  | ||
     // Delegate the mousedown event for both block view and list view pages  |      // Delegate the mousedown event for both block view and list view pages  | ||
	$('#list, #list-list').on('mousedown', '.card, .list-card', function (event) {  | 	$('#list, #list-list').on('mousedown', '.card, .list-card', function (event) {  | ||