Module:UpdateExcerpt: Difference between revisions

Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
-- Module:UpdateExcerpt
-- Module:UpdateExcerpt
-- Usage: {{#invoke:UpdateExcerpt|render|Month|Day|Year|number_of_lines}}
-- Usage: {{#invoke:UpdateExcerpt|render|Month|Day|Year|number_of_lines}}
-- Example: {{#invoke:UpdateExcerpt|render|March|6|2026|5}}


local p = {}
local p = {}
Line 68: Line 67:
     local hasMore = #lines > maxLines
     local hasMore = #lines > maxLines


    -- Wrap content in a scrollable div, put "Read more" outside it
     local html = '<div style="flex:1; min-height:0; overflow-y:auto; padding:14px 18px; font-family:\'Retail Demo\',\'Open Sans\',sans-serif; font-size:0.92em; line-height:1.7;">\n'
     local html = '<div style="flex:1; min-height:0; overflow-y:auto; padding:14px 18px; font-family:\'Retail Demo\',\'Open Sans\',sans-serif; font-size:0.92em; line-height:1.7;">'
         .. frame:preprocess(output)
         .. frame:preprocess(output)
         .. '</div>'
         .. '\n</div>'


     if hasMore then
     if hasMore then
         html = html .. '<div style="flex-shrink:0; padding:10px 18px; text-align:center; border-top:1px solid rgba(0,0,0,0.2); font-family:\'Retail Demo\',\'Open Sans\',sans-serif;">'
         html = html .. '<div style="flex-shrink:0; padding:10px 18px; text-align:center; border-top:1px solid rgba(255,255,255,0.1); font-family:\'Retail Demo\',\'Open Sans\',sans-serif;">'
             .. frame:preprocess('[[' .. pageTitle .. '|<span style="color:#e8be86; font-weight:bold;">Read more →</span>]]')
             .. frame:preprocess('[[' .. pageTitle .. '|<span style="color:#e8be86; font-weight:bold;">Read more →</span>]]')
             .. '</div>'
             .. '</div>'