모듈:코드 보여주기: 두 판 사이의 차이

편집 요약 없음
편집 요약 없음
 
(같은 사용자의 중간 판 6개는 보이지 않습니다)
2번째 줄: 2번째 줄:


function p.main(frame)
function p.main(frame)
  local parts = require('Module:demo').get(frame)
local parts = require('Module:demo').get(frame)
  return '|-\n|style="padding: 0;"|<pre style="margin: 0;border:0;border-radius:0;">'  
local result
    .. parts.source
if frame.args["dir"] == "col" then
    .. '</pre>\n|<div>'
result = '|- style="/* tr */ display: flex; flex-direction: column-reverse; margin-bottom: 20px; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.03), 0 4px 6px -4px rgba(0, 0, 0, 0.03);"'
    .. parts.output
elseif frame.args["dir"] == "row" then
    .. '</div>\n'
    result = '|-'
else
return "ERROR: NO DIR OPTION"
end
return result
.. '\n| style="overflow: scroll; padding: 0; background-color: #f5f8fa;"|<pre style="margin: 0; border: 0; border-radius: 0; background-color: transparent;">'
    .. parts.source
    .. '</pre>\n| style="overflow: scroll;" | <div>'
    .. parts.output
    .. '</div>\n'
end
end


return p
return p

2022년 6월 28일 (화) 16:31 기준 최신판

이 모듈에 대한 설명문서는 모듈:코드 보여주기/설명문서에서 만들 수 있습니다

p = {}

function p.main(frame)
	local parts = require('Module:demo').get(frame)
	local result
	if frame.args["dir"] == "col" then
		result = '|- style="/* tr */ display: flex; flex-direction: column-reverse; margin-bottom: 20px; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.03), 0 4px 6px -4px rgba(0, 0, 0, 0.03);"'
	elseif frame.args["dir"] == "row" then
	    result = '|-'
	else
		return "ERROR: NO DIR OPTION"
	end
	return result
		.. '\n| style="overflow: scroll; padding: 0; background-color: #f5f8fa;"|<pre style="margin: 0; border: 0; border-radius: 0; background-color: transparent;">'
	    .. parts.source
	    .. '</pre>\n| style="overflow: scroll;" | <div>'
	    .. parts.output
	    .. '</div>\n'
end

return p