Module:GameSkills: Difference between revisions
From SpiritVale Wiki
More actions
No edit summary |
No edit summary |
||
| Line 923: | Line 923: | ||
local hasNotes = (#notesList > 0) | local hasNotes = (#notesList > 0) | ||
local hasReq = (#reqSkills > 0) or (#reqWeapons > 0) or (#reqStances > 0) | local hasReq = (#reqSkills > 0) or (#reqWeapons > 0) or (#reqStances > 0) | ||
local wrap = mw.html.create("div") | local wrap = mw.html.create("div") | ||
| Line 938: | Line 939: | ||
textBox:addClass("sv-herobar-text") | textBox:addClass("sv-herobar-text") | ||
local | local titleRow = textBox:tag("div") | ||
titleRow:addClass("sv-herobar-title-row") | |||
local titleBox = titleRow:tag("div") | |||
titleBox:addClass("spiritvale-infobox-title") | |||
titleBox:wikitext(title) | |||
if hasNotes then | if hasNotes then | ||
notesBtn = mw.html.create("span") | local notesBtn = mw.html.create("span") | ||
notesBtn:addClass("sv-tip-btn sv-tip-btn--notes") | notesBtn:addClass("sv-tip-btn sv-tip-btn--notes") | ||
notesBtn:attr("role", "button") | notesBtn:attr("role", "button") | ||
| Line 948: | Line 955: | ||
notesBtn:attr("aria-expanded", "false") | notesBtn:attr("aria-expanded", "false") | ||
notesBtn:tag("span"):addClass("sv-ico sv-ico--info"):attr("aria-hidden", "true"):wikitext("i") | notesBtn:tag("span"):addClass("sv-ico sv-ico--info"):attr("aria-hidden", "true"):wikitext("i") | ||
titleRow:node(notesBtn) | |||
end | end | ||
if hasReq then | if hasReq then | ||
local pillRow = | local pillRow = wrap:tag("div") | ||
pillRow:addClass("sv-pill-row") | pillRow:addClass("sv-pill-row") | ||
local pill = | pillRow:addClass("sv-pill-row--req") | ||
local pill = pillRow:tag("span") | |||
pill:addClass("sv-pill sv-pill--req sv-tip-btn") | pill:addClass("sv-pill sv-pill--req sv-tip-btn") | ||
pill:attr("role", "button") | pill:attr("role", "button") | ||
| Line 971: | Line 970: | ||
pill:attr("aria-expanded", "false") | pill:attr("aria-expanded", "false") | ||
pill:wikitext("Requirements") | pill:wikitext("Requirements") | ||
end | end | ||