모듈:한자: 두 판 사이의 차이

편집 요약 없음
편집 요약 없음
1번째 줄: 1번째 줄:
local p = {}
local p = {}
local html = mw.html


function p.main(frame)
function p.main(frame)

2021년 7월 18일 (일) 13:41 판

설명문서 [편집] [역사] [새로고침]
연습장이나 사용자 문서에서 틀의 사용이나 수정을 연습할 수 있습니다.
분류는 /설명문서에 넣어주세요.

local p = {}
local html = mw.html

function p.main(frame)
	local title = frame.args[1]
	local hanja = frame.args[2]
	local style = frame.args[3]
	
	if hanja == '' then
		return title
	else
		local div = html.create( 'div' ):addClass('NavFrame collapsed'):css('border', 'none'):cssText(style)
			div:tag('div'):addClass('NavHead'):wikitext(title)
			div:tag('div'):addClass('NavContent'):wikitext(hanja)
		return div
	end
end

return p