This commit is contained in:
BoHung Chiu 2021-06-09 11:15:46 +08:00
parent 6eb97bddae
commit 174e0d657b
2 changed files with 3 additions and 2 deletions

View File

@ -193,7 +193,8 @@ module AnnouncementsHelper
page_number = 1 if page_number == 0 page_number = 1 if page_number == 0
page_data_count = data_count || OrbitHelper.page_data_count.to_i page_data_count = data_count || OrbitHelper.page_data_count.to_i
feeds_anns = [] feeds_anns = []
page = Page.where(url:params['url']).first page = OrbitHelper.page rescue nil
page = Page.where(url:params['url']).first if page.nil?
if @type == "show_widget" if @type == "show_widget"
tags = @tags tags = @tags
categories = @categories categories = @categories

View File

@ -78,7 +78,7 @@
for(var i=0;i< lilength -num ; i++) for(var i=0;i< lilength -num ; i++)
$(v).find('ul.w-annc__list').eq(0).find("li.w-annc__item").eq(num).remove(); $(v).find('ul.w-annc__list').eq(0).find("li.w-annc__item").eq(num).remove();
}) })
$('.widget-announcement-4 ul.w-annc__list >li').css('width','calc('+100/num+'% - '+20/16+'em)'); //20px=>li的margin $('[data-subpart-id=\"{{subpart-id}}\"] ul.w-annc__list >li').css('width','calc('+100/num+'% - '+20/16+'em)'); //20px=>li的margin
}; };
$(window).resize(function(){ $(window).resize(function(){
if($(window).width()>1024){ if($(window).width()>1024){