Technopedia Center
PMB University Brochure
Faculty of Engineering and Computer Science
S1 Informatics S1 Information Systems S1 Information Technology S1 Computer Engineering S1 Electrical Engineering S1 Civil Engineering

faculty of Economics and Business
S1 Management S1 Accountancy

Faculty of Letters and Educational Sciences
S1 English literature S1 English language education S1 Mathematics education S1 Sports Education
  • Registerasi
  • Brosur UTI
  • Kip Scholarship Information
  • Performance
  1. Weltenzyklopädie
  2. Module:YodaspirineTest — Wikipédia
Module:YodaspirineTest — Wikipédia 👆 Click Here! Read More..
Une page de Wikipédia, l'encyclopédie libre.

 Documentation[créer] [purger]
MIT

Ce module ne possède aucune documentation explicative en sous-page, pas même une description succincte.
Vous pouvez créer cette sous-page afin de documenter ce module adéquatement.

La documentation de ce module est générée par le modèle {{Documentation module}}.
Les éditeurs peuvent travailler dans le bac à sable (créer).
Voir les statistiques d'appel depuis le wikicode sur l'outil wstat et les appels depuis d'autres modules.

    • Projet Scribunto Projet Scribunto
local module = {}


-- fonction principale
function module.fonction_test_html(frame)
	local div = mw.html.create('div')
	div:attr('class', 'testdiv')
		:css('display', 'flex')
		:wikitext('Texte')
		:tag('hr')
	return tostring(div)
end
function module.grille(liste_blocs, base_largeur, limite_par_ligne)
	-- local nb_elements = #liste_blocs
	local i_ligne = 1
	local html_genere = ''
	local ligne = mw.html.create('div')
	ligne:css('display', 'flex')
		:css('flex-direction', 'row')
		:css('flex-wrap', 'wrap')
		:css('text-align', 'center')
		:css('align-items', 'center')

	for i,contenu in ipairs(liste_blocs) do
		if i > i_ligne*limite_par_ligne then
			html_genere = html_genere .. tostring(ligne)
			i_ligne = i_ligne + 1
			ligne = mw.html.create('div')
			ligne:css('display', 'flex')
				:css('flex-direction', 'row')
				:css('flex-wrap', 'wrap')
				:css('text-align', 'center')
				:css('align-items', 'center')
		end
		local bloc = mw.html.create('div')
		bloc:css('display', 'flex')
			:css('flex-direction', 'column')
			:css('flex', '1 1 '..base_largeur)
			:wikitext(contenu)

		ligne:node(bloc)
	end
	html_genere = html_genere .. tostring(ligne)

	return html_genere
end


function parse_list(str)
	local parse = mw.text.split(str, '\n%*')
	local res = {}
	local res_i = 1
	for i, ligne in pairs(parse) do
		if ligne ~= '' then
			res[res_i] = ligne
			res_i = res_i + 1
		end
	end
	return res
end

function module.test_grille(frame)
	local args = {}
	local argsParent = frame.args
	-- Paramètres vides interprétés par Lua.
	for cle, val in pairs(argsParent) do
		if val ~= '' then
			args[cle] = val
		end
	end
	local tableau = {}
	tableau[1] = '[[File:Crystal Clear action run.svg|35px|link=Portail:Industrie|alt=Industrie]]<br>[[Portail:Industrie|Industrie]]'
	tableau[2] = '[[Fichier:Monocline01.gif|35px|link=Portail:Géologie|alt=Géologie]]<br>[[Portail:Géologie|Géologie]]'

	return module.grille(tableau, '5em', 6)
end


function module.test_grille3(frame)
	local args = {}
	local argsParent = frame.args
	-- Paramètres vides interprétés par Lua.
	for cle, val in ipairs(argsParent) do
		if val ~= '' then
			args[cle] = val
		end
	end

	return module.grille(args, '5em', 6)
end


function module.test_grille4(frame)
	local args = {}
	local argsParent = frame.args
	-- Paramètres vides interprétés par Lua.
	for cle, val in ipairs(argsParent) do
		if val ~= '' then
			args[cle] = val
		end
	end
	for cle, val in pairs(argsParent) do
		if val ~= '' then
			args[cle] = val
		end
	end

	if args['largeur'] == nil then
		args['largeur'] = '5em'
	end

	if args['nombre'] == nil then
		args['nombre'] = 6
	else
		args['nombre'] = tonumber(args['nombre'])
	end

	local items = parse_list(args[1])
	return module.grille(items, args['largeur'], args['nombre'])
end
 
return module
Ce document provient de « https://fr.teknopedia.teknokrat.ac.id/w/index.php?title=Module:YodaspirineTest&oldid=166967892 ».
Catégories :
  • Module sans documentation
  • Module en langage Lua

  • indonesia
  • Polski
  • الرية
  • Deutsch
  • English
  • Español
  • Français
  • Italiano
  • مصر
  • Nederlands
  • 本語
  • Português
  • Sinugboanong Binisaya
  • Svenska
  • Українска
  • Tiếng Việt
  • Winaray
  • 中文
  • Русски
Sunting pranala
Pusat Layanan

UNIVERSITAS TEKNOKRAT INDONESIA | ASEAN's Best Private University
Jl. ZA. Pagar Alam No.9 -11, Labuhan Ratu, Kec. Kedaton, Kota Bandar Lampung, Lampung 35132
Phone: (0721) 702022
Email: pmb@teknokrat.ac.id