Module:AchievementSystem: Difference between revisions
// via Wikitext Extension for VSCode |
// via Wikitext Extension for VSCode |
||
| Line 225: | Line 225: | ||
--[[ | --[[ | ||
Renders HTML for an achievement box to display in templates | Renders HTML for an achievement box to display in templates - ultra simplified version | ||
Simply shows numbered rows with the CSS setting content: "Test" | |||
@param pageId string|number The page ID to render achievements for | @param pageId string|number The page ID to render achievements for | ||
| Line 254: | Line 255: | ||
'<div class="achievement-box-title">Achievements</div>' .. | '<div class="achievement-box-title">Achievements</div>' .. | ||
'<div class="achievement-rows">' .. | '<div class="achievement-rows">' .. | ||
'<div class="achievement-row">1 | '<div class="achievement-row">1</div>' .. | ||
'</div></div>' | '</div></div>' | ||
end | end | ||
| Line 262: | Line 263: | ||
end | end | ||
-- Create achievement box | -- Create achievement box with numbered placeholders | ||
local html = '<div class="achievement-box">' | local html = '<div class="achievement-box">' | ||
html = html .. '<div class="achievement-box-title">Achievements</div>' | html = html .. '<div class="achievement-box-title">Achievements</div>' | ||
| Line 276: | Line 277: | ||
count = count + 1 | count = count + 1 | ||
-- | -- Just add numbered row - CSS will add "Test" text | ||
html = html .. string.format( | html = html .. string.format( | ||
'<div class="achievement-row">%d | '<div class="achievement-row">%d</div>', | ||
count | count | ||
) | ) | ||
end | end | ||