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

편집 요약 없음
편집 요약 없음
5번째 줄: 5번째 줄:
if frame.args["dir"] == "col" then
if frame.args["dir"] == "col" then
return [[
return [[
|- style="/* tr */ display: flex; flex-direction: column-reverse; margin-bottom: 10px;"
|- 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);"
| style="padding: 0; background-color: #f5f8fa;"|<pre style="margin: 0; border: 0; border-radius: 0; white-space: pre-line; background-color: transparent;">
| style="padding: 0; background-color: #f5f8fa;"|<pre style="margin: 0; border: 0; border-radius: 0; white-space: pre-line; background-color: transparent;">
]]
]]

2022년 6월 28일 (화) 14:31 판

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

p = {}

function p.main(frame)
	local parts = require('Module:demo').get(frame)
	if frame.args["dir"] == "col" then
		return [[
			|- 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);"
			| style="padding: 0; background-color: #f5f8fa;"|<pre style="margin: 0; border: 0; border-radius: 0; white-space: pre-line; background-color: transparent;">
		]]
		    .. parts.source
		    .. '</pre>\n|<div>'
		    .. parts.output
		    .. '</div>\n'
	elseif frame.args["dir"] == "row" then
	    return [[
			|-
			| style="padding: 0; background-color: #f5f8fa;"|<pre style="margin: 0; border: 0; border-radius: 0; white-space: pre-line; background-color: transparent;">
		]]
		    .. parts.source
		    .. '</pre>\n|<div>'
		    .. parts.output
		    .. '</div>\n'
	else
		return "ERROR: NO DIR OPTION"
	end
end

return p