From bd8b069ad328a13a2a657e3a8513f9ec43cc997e Mon Sep 17 00:00:00 2001 From: bohung Date: Tue, 23 Mar 2021 18:49:07 +0800 Subject: [PATCH] Fix bug. --- modules/archive/archive_index7.html.erb | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/modules/archive/archive_index7.html.erb b/modules/archive/archive_index7.html.erb index f595d7d..3a8b2a5 100644 --- a/modules/archive/archive_index7.html.erb +++ b/modules/archive/archive_index7.html.erb @@ -39,7 +39,22 @@ if( window.location.href.indexOf('/en/') > -1 ) { $('.title-thead').replaceWith('
Title
') $('.file-thead').replaceWith('
Download file
') } -$(".archive-items .date").each(function(i,d){ - $(d).parent().eq(0).children().height($(d).parent().height()); +$(document).ready(function(){ + if(window.innerWidth){ + $(".archive-items .date").each(function(i,d){ + $(d).parent().eq(0).children().css("min-height",$(d).parent().height()); + }) + }else{ + $(".archive-items >").css("min-height",""); + } +}) +$(window).resize(function(){ + if(window.innerWidth){ + $(".archive-items .date").each(function(i,d){ + $(d).parent().eq(0).children().css("min-height",$(d).parent().height()); + }) + }else{ + $(".archive-items >").css("min-height",""); + } }) \ No newline at end of file