Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
6f9ed88
MainPageSeasonEvents
hjpalpha Mar 27, 2026
e03f35c
StreamList
hjpalpha Mar 27, 2026
efac17a
TranslationList
hjpalpha Mar 28, 2026
c938c6d
TeamTabs
hjpalpha Mar 28, 2026
cdf917e
moverino
hjpalpha Mar 29, 2026
8e43101
CountryParticipation
hjpalpha Mar 29, 2026
00f1a7c
FindMatchesByPlayerDisplayName
hjpalpha Mar 29, 2026
9f21658
FindPlayersOnTeamFromPlacements
hjpalpha Mar 29, 2026
121ec01
fixerino
hjpalpha Mar 29, 2026
0519a2d
PlayerAchievementsTableWrapper
hjpalpha Mar 29, 2026
15daf23
require to import
hjpalpha Mar 29, 2026
25c7b71
MostAllKills
hjpalpha Mar 29, 2026
cc9ba4f
SeriesTotalPrize
hjpalpha Mar 29, 2026
65ab2ca
BuildingStatisticsOverviewTable
hjpalpha Mar 29, 2026
9315966
fix anno
hjpalpha Mar 29, 2026
ec5b505
style
hjpalpha Mar 29, 2026
a83722f
AbilityUpgradeCard
hjpalpha Mar 29, 2026
8f3703b
some fixes
hjpalpha Mar 29, 2026
50fc4bd
moverino
hjpalpha Mar 31, 2026
dd0b5c6
some private annos
hjpalpha Mar 31, 2026
5e77632
mirror #7324
hjpalpha Mar 31, 2026
064b8f3
use #7324
hjpalpha Mar 31, 2026
fa902ae
stats on player and team pages
hjpalpha Mar 31, 2026
6470b23
Widget/Box --> Widget/Basic/Box
hjpalpha Apr 1, 2026
e856799
GslMaps
hjpalpha Apr 1, 2026
24db71a
Merge branch 'main' into sc2_non_git_Stuff
hjpalpha Apr 1, 2026
f50490e
#7333
hjpalpha Apr 1, 2026
ad5fb52
CurrentLadderMaps
hjpalpha Apr 1, 2026
d31af79
line breaks
hjpalpha Apr 1, 2026
aae0543
LadderMapsTimeLine
hjpalpha Apr 1, 2026
e7c4b54
shut up linter
hjpalpha Apr 1, 2026
ed5e00e
Disambiguation
hjpalpha Apr 1, 2026
c17fb52
PlayerTabs
hjpalpha Apr 1, 2026
fb6673a
TransferTabs
hjpalpha Apr 1, 2026
be2472d
Maps
hjpalpha Apr 1, 2026
0ca7253
PortalTournamentsTabs
hjpalpha Apr 1, 2026
72d5a3e
BirthCategories
hjpalpha Apr 1, 2026
008d074
Automated Patch
hjpalpha Apr 1, 2026
3f0f4b4
GTLWrapper
hjpalpha Apr 1, 2026
178a0a3
MapEventList
hjpalpha Apr 1, 2026
54dd7e7
shut up anno
hjpalpha Apr 1, 2026
4c70cc3
make linter happy
hjpalpha Apr 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lua/definitions/mw.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ function mw.uri.encode(str, enctype) end
function mw.uri.decode(str, enctype) end

---Encodes a table as a URI query string.
---@param query table<string, string|number|any[]|false>
---@param query table<string, string|number|any[]|false?>
---@return string
function mw.uri.buildQueryString(query) end

Expand Down
57 changes: 57 additions & 0 deletions lua/wikis/commons/Widget/Basic/Box.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
-- @Liquipedia
-- page=Module:Widget/Basic/Box
--
-- Please see https://github.com/Liquipedia/Lua-Modules to contribute
--

local Lua = require('Module:Lua')

local Array = Lua.import('Module:Array')
local Class = Lua.import('Module:Class')

local HtmlWidgets = Lua.import('Module:Widget/Html/All')
local Widget = Lua.import('Module:Widget')

---@class BoxProps
---@field children Renderable[]|Renderable
---@field maxWidth string?
---@field paddingRight string?
---@field paddingLeft string?
---@field paddingBottom string?
---@field width string?
---@field height string?

---@class Box: Widget
---@operator call(BoxProps): Box
---@field props BoxProps
local Box = Class.new(Widget)

---@return Widget|Renderable
function Box:render()
local children = self.props.children
if not Array.isArray(children) then
return self.props.children
end
---@cast children -Renderable

return HtmlWidgets.Div{
css = {['max-width'] = self.props.maxWidth},
children = Array.map(children, function(child)
return HtmlWidgets.Div{
classes = {'template-box'},
css = {
['padding-right'] = self.props.paddingRight,
['padding-left'] = self.props.paddingLeft,
['padding-bottom'] = self.props.paddingBottom,
width = self.props.width,
height = self.props.height,
overflow = self.props.height and 'hidden' or nil,
},
children = child,
}
end)
}
end

return Box
2 changes: 2 additions & 0 deletions lua/wikis/commons/Widget/Image/Icon/Image.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ local WidgetIcon = Lua.import('Module:Widget/Image/Icon')
---@field caption string?
---@field alt string?
---@field alignment string?
---@field location string?

---@class IconImageWidget: IconWidget
---@operator call(IconImageWidgetParameters): IconImageWidget
Expand All @@ -41,6 +42,7 @@ function Icon:render()
caption = self.props.caption,
alt = self.props.alt,
alignment = self.props.alignment,
location = self.props.location,
}
)
end
Expand Down
141 changes: 141 additions & 0 deletions lua/wikis/starcraft2/Automated Patch.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
local Lua = require('Module:Lua')

local Arguments = Lua.import('Module:Arguments')

local PatchAuto = {}

---@type {patch: string, date: string}[]
local PATCH_DATA = {
{patch = '3.0.0', date = '2015-10-06'},
{patch = '3.0.1', date = '2015-10-15'},
{patch = '3.0.2', date = '2015-10-19'},
{patch = '3.0.3', date = '2015-10-27'},
{patch = '3.0.4', date = '2015-11-10'},
{patch = '3.0.5', date = '2015-11-12'},
{patch = '3.1.0', date = '2015-12-15'},
{patch = '3.1.1', date = '2016-01-12'},
{patch = '3.1.2', date = '2016-02-02'},
{patch = '3.1.3', date = '2016-02-23'},
{patch = '3.1.4', date = '2016-03-03'},
{patch = '3.2.0', date = '2016-03-29'},
{patch = '3.2.1', date = '2016-04-05'},
{patch = '3.2.2', date = '2016-04-05'},
{patch = '3.3.0', date = '2016-05-17'},
{patch = '3.3.1', date = '2016-05-26'},
{patch = '3.3.2', date = '2016-06-14'},
{patch = '3.4.0', date = '2016-07-12'},
{patch = '3.5.0', date = '2016-08-02'},
{patch = '3.5.1', date = '2016-08-04'},
{patch = '3.5.2', date = '2016-08-11'},
{patch = '3.5.3', date = '2016-08-25'},
{patch = '3.6.0', date = '2016-09-13'},
{patch = '3.7.0', date = '2016-10-18'},
{patch = '3.7.1', date = '2016-10-25'},
{patch = '3.8.0', date = '2016-11-22'},
{patch = '3.9.0', date = '2016-12-13'},
{patch = '3.9.1', date = '2016-12-21'},
{patch = '3.10.0', date = '2017-01-24'},
{patch = '3.10.1', date = '2017-01-31'},
{patch = '3.11.0', date = '2017-03-07'},
{patch = '3.12.0', date = '2017-03-28'},
{patch = '3.13.0', date = '2017-05-02'},
{patch = '3.14.0', date = '2017-05-23'},
{patch = '3.15.0', date = '2017-06-20'},
{patch = '3.15.1', date = '2017-06-22'},
{patch = '3.16.0', date = '2017-07-18'},
{patch = '3.16.1', date = '2017-08-07'},
{patch = '3.17.0', date = '2017-08-30'},
{patch = '3.17.1', date = '2017-09-07'},
{patch = '3.18.0', date = '2017-09-19'},
{patch = '3.19.0', date = '2017-10-10'},
{patch = '3.19.1', date = '2017-10-12'},
{patch = '4.0.0', date = '2017-11-14'},
{patch = '4.0.1', date = '2017-11-15'},
{patch = '4.0.2', date = '2017-11-21'},
{patch = '4.1.0', date = '2017-12-05'},
{patch = '4.1.1', date = '2017-12-07'},
{patch = '4.1.2', date = '2017-12-19'},
{patch = '4.1.3', date = '2018-01-09'},
{patch = '4.1.4', date = '2018-01-23'},
{patch = '4.2.0', date = '2018-02-20'},
{patch = '4.2.1', date = '2018-03-06'},
{patch = '4.2.2', date = '2018-03-27'},
{patch = '4.2.3', date = '2018-04-05'},
{patch = '4.2.4', date = '2018-04-17'},
{patch = '4.3.0', date = '2018-04-24'},
{patch = '4.3.1', date = '2018-05-17'},
{patch = '4.3.2', date = '2018-05-30'},
{patch = '4.4.0', date = '2018-06-20'},
{patch = '4.4.1', date = '2018-07-17'},
{patch = '4.5.0', date = '2018-08-07'},
{patch = '4.5.1', date = '2018-08-14'},
{patch = '4.6.0', date = '2018-09-04'},
{patch = '4.6.1', date = '2018-09-11'},
{patch = '4.6.2', date = '2018-10-16'},
{patch = '4.7.0', date = '2018-11-13'},
{patch = '4.7.1', date = '2018-11-20'},
{patch = '4.8.0', date = '2018-12-18'},
{patch = '4.8.1', date = '2019-01-10'},
{patch = '4.8.2', date = '2019-01-22'},
{patch = '4.8.3', date = '2019-02-19'},
{patch = '4.8.4', date = '2019-04-09'},
{patch = '4.8.5', date = '2019-04-23'},
{patch = '4.8.6', date = '2019-04-24'},
{patch = '4.9.0', date = '2019-05-21'},
{patch = '4.9.1', date = '2019-06-04'},
{patch = '4.9.2', date = '2019-06-18'},
{patch = '4.9.3', date = '2019-07-10'},
{patch = '4.10.0', date = '2019-08-13'},
{patch = '4.10.1', date = '2019-08-21'},
{patch = '4.10.2', date = '2019-09-03'},
{patch = '4.10.3', date = '2019-09-10'},
{patch = '4.10.4', date = '2019-09-22'},
{patch = '4.11.0', date = '2019-11-26'},
{patch = '4.11.1', date = '2019-11-27'},
{patch = '4.11.2', date = '2019-12-06'},
{patch = '4.11.3', date = '2019-12-17'},
{patch = '4.11.4', date = '2020-02-18'},
{patch = '4.12.0', date = '2020-06-09'},
{patch = '4.12.1', date = '2020-06-16'},
{patch = '5.0.0', date = '2020-07-27'},
{patch = '5.0.1', date = '2020-07-29'},
{patch = '5.0.2', date = '2020-08-06'},
{patch = '5.0.3', date = '2020-08-25'},
{patch = '5.0.4', date = '2020-11-04'},
{patch = '5.0.5', date = '2020-12-02'},
{patch = '5.0.6', date = '2021-02-02'},
{patch = '5.0.7', date = '2021-04-07'},
{patch = '5.0.8', date = '2021-10-19'},
{patch = '5.0.9', date = '2022-03-15'},
{patch = '5.0.10', date = '2022-07-21'},
{patch = '5.0.11', date = '2023-01-24'},
{patch = '5.0.12', date = '2023-09-29'},
{patch = '5.0.13', date = '2024-03-26'},
{patch = '5.0.14', date = '2024-11-26'},
{patch = '5.0.15', date = '2025-10-01'},

{patch = '', date = '3999-01-01'}, -- keep this as last!
}

---@param frame Frame
---@return string?
function PatchAuto.get(frame)
return PatchAuto._main(Arguments.getArgs(frame))
end

---@param args table
---@return string?
function PatchAuto._main(args)
local numberOfPatches = #PATCH_DATA

-- Get the date for which the patch is to be determined
local date = args[1]:gsub('-XX', '99'):gsub('-??', '99')

for index = 0, (numberOfPatches - 2) do
if (PATCH_DATA[numberOfPatches - index].date > date) and (PATCH_DATA[numberOfPatches - 1 - index].date <= date) then
return PATCH_DATA[numberOfPatches - 1 - index].patch
end
end
end

return PatchAuto
38 changes: 38 additions & 0 deletions lua/wikis/starcraft2/BirthCategories.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
local Lua = require('Module:Lua')

local Array = Lua.import('Module:Array')

local Link = Lua.import('Module:Widget/Basic/Link')
local HtmlWidgets = Lua.import('Module:Widget/Html/All')

local BirthCategories = {}

---@return Widget
function BirthCategories.get()
local yearString = string.gsub(mw.title.getCurrentTitle().text, ' births', '')
local year = tonumber(yearString)

local row = HtmlWidgets.Div{
classes = {'hlist'},
css = {['margin-left'] = '0'},
children = HtmlWidgets.Ul{children = Array.map(Array.range((year-4), (year+4)), function(currentYear)
return HtmlWidgets.Li{
children = Link{link = ':Category:' .. currentYear .. ' births', children = currentYear}
}
end)}
}

return HtmlWidgets.Fragment{
children = {
HtmlWidgets.Table{
classes = {'toccolours'},
attributes = {align = 'right'},
children = HtmlWidgets.Tr{children = HtmlWidgets.Td{children = row}}
},
HtmlWidgets.Br{},
'List of people born in ' .. year .. '.'
}
}
end

return BirthCategories
Loading
Loading