Module:DateTitleList: Difference between revisions

No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 45: Line 45:
     -- 构造最终输出
     -- 构造最终输出
     local category = string.format("[[:Category:%s %d|%s]]", month_full, day, category_link)
     local category = string.format("[[:Category:%s %d|%s]]", month_full, day, category_link)
     local page_link = string.format("[[Streaming_Records/vedal987_Channel/%s %s %d|%s]]", month_full, day, year_in_date, title)
     local page_link = string.format("[[Streaming_Records/vedal987_Channel/%s %s, %d|%s]]", month_full, day, year_in_date, title)


     -- 如果有 CSS 类,则将其应用到最外层 li
     -- 如果有 CSS 类,则将其应用到最外层 li
     if css_class then
     if css_class then
         return string.format('<li class="%s">* \'\'\'%s\'\'\' %s</li>', css_class, category, page_link)
         return string.format('<li class="%s">\'\'\'%s\'\'\' %s</li>', css_class, category, page_link)
     else
     else
         return string.format('<li>* \'\'\'%s\'\'\' %s</li>', category, page_link)
         return string.format('<li>\'\'\'%s\'\'\' %s</li>', category, page_link)
     end
     end
end
end
Line 86: Line 86:


     -- 包装在 <ul> 中,作为返回结果
     -- 包装在 <ul> 中,作为返回结果
     return '<ul class="date-title-list">' .. table.concat(result, "\n") .. '</ul>'
     return '<ul class="date-title-list" style="height: -webkit-fill-available;">' .. table.concat(result, "\n") .. '</ul>'
end
end


return p
return p