Module:SkillList: Difference between revisions
From Eco - English Wiki
[unchecked revision] | [unchecked revision] |
No edit summary |
No edit summary |
||
Line 20: | Line 20: | ||
text = text .. '[[File:Banner4k.jpg|class=card-img-top|link=]]'; | text = text .. '[[File:Banner4k.jpg|class=card-img-top|link=]]'; | ||
text = text .. '<div class="card-body"><h5 class="card-title">' .. Pname .. ' Profession</h5><h6 class="card-subtitle mb-2 text-muted">' .. Pdata.Description .. '</h6><p class="card-text">'; | text = text .. '<div class="card-body"><h5 class="card-title">' .. Pname .. ' Profession</h5><h6 class="card-subtitle mb-2 text-muted">' .. Pdata.Description .. '</h6><p class="card-text">'; | ||
for Sname,Sdata in pairs(skillList) do | |||
if Sdata.Root == 'False' and Sdata.RootSkill == Pname then | |||
text = text .. '<div class="card"> <div class="card-body">тест</div> </div>'; | |||
end | |||
end | |||
text = text .. '</p></div></div></div>'; end | text = text .. '</p></div></div></div>'; end | ||
end | end |
Revision as of 10:12, 10 December 2024
This module provides the back end functionality of the Template:SkillList.
If the template is passed, this module creates a list using details from the following Modules:
local p = {}
local Utils = require('Module:Utils')
local IconUtils = require('Module:IconUtils')
local L = require('Module:Localization')
-- Main entry point for the Module
function p.main()
-- load lists
local skillData = require( "Module:SkillData" )
local skillList = skillData.skills
local text = '<div class="col-lg-12"><Center><h2 class="title">Skills</h2></Center></div>'
for Pname,Pdata in pairs(skillList) do
if Pdata.Root == 'True' then
text = text .. '<div class="col-lg-3"><div class="card">';
text = text .. '[[File:Banner4k.jpg|class=card-img-top|link=]]';
text = text .. '<div class="card-body"><h5 class="card-title">' .. Pname .. ' Profession</h5><h6 class="card-subtitle mb-2 text-muted">' .. Pdata.Description .. '</h6><p class="card-text">';
for Sname,Sdata in pairs(skillList) do
if Sdata.Root == 'False' and Sdata.RootSkill == Pname then
text = text .. '<div class="card"> <div class="card-body">тест</div> </div>';
end
end
text = text .. '</p></div></div></div>'; end
end
return text
end
return p