Wikibækur iswikibooks https://is.wikibooks.org/wiki/Fors%C3%AD%C3%B0a MediaWiki 1.47.0-wmf.6 first-letter Miðill Kerfissíða Spjall Notandi Notandaspjall Wikibækur Wikibækurspjall Mynd Myndaspjall Melding Meldingarspjall Snið Sniðaspjall Hjálp Hjálparspjall Flokkur Flokkaspjall TimedText TimedText talk Module Module talk Event Event talk Snið:Babel-X 10 3311 35194 23746 2026-06-14T17:35:43Z MyraMidnight 2947 Upplýsingaskjölun 35194 wikitext text/x-wiki {{#babel:{{#if:{{{1|}}}|{{{1}}}}}|{{#if:{{{2|}}}|{{{2}}}}}|{{#if:{{{3|}}}|{{{3}}}}}|{{#if:{{{4|}}}|{{{4}}}}}|{{#if:{{{5|}}}|{{{5}}}}}|{{#if:{{{6|}}}|{{{6}}}}}|{{#if:{{{7|}}}|{{{7}}}}}|{{#if:{{{8|}}}|{{{8}}}}}|{{#if:{{{9|}}}|{{{9}}}}}|{{#if:{{{10|}}}|{{{10}}}}}|{{#if:{{{11|}}}|{{{11}}}}}|{{#if:{{{12|}}}|{{{12}}}}}|{{#if:{{{13|}}}|{{{13}}}}}|{{#if:{{{14|}}}|{{{14}}}}}|{{#if:{{{15|}}}|{{{15}}}}}|{{#if:{{{16|}}}|{{{16}}}}}|{{#if:{{{17|}}}|{{{17}}}}}|{{#if:{{{18|}}}|{{{18}}}}}|{{#if:{{{19|}}}|{{{19}}}}}|{{#if:{{{20|}}}|{{{20}}}}}|{{#if:{{{21|}}}|{{{21}}}}}|{{#if:{{{22|}}}|{{{22}}}}}|{{#if:{{{23|}}}|{{{23}}}}}|{{#if:{{{24|}}}|{{{24}}}}}|{{#if:{{{25|}}}|{{{25}}}}}|{{#if:{{{26|}}}|{{{26}}}}}|{{#if:{{{27|}}}|{{{27}}}}}|{{#if:{{{28|}}}|{{{28}}}}}|{{#if:{{{29|}}}|{{{29}}}}}|{{#if:{{{30|}}}|{{{30}}}}}|{{#if:{{{31|}}}|{{{31}}}}}|{{#if:{{{32|}}}|{{{32}}}}}|{{#if:{{{33|}}}|{{{33}}}}}|{{#if:{{{34|}}}|{{{34}}}}}|{{#if:{{{35|}}}|{{{35}}}}}|{{#if:{{{36|}}}|{{{36}}}}}|{{#if:{{{37|}}}|{{{37}}}}}|{{#if:{{{38|}}}|{{{38}}}}}|{{#if:{{{39|}}}|{{{39}}}}}|{{#if:{{{40|}}}|{{{40}}}}}|{{#if:{{{41|}}}|{{{41}}}}}|{{#if:{{{42|}}}|{{{42}}}}}|{{#if:{{{43|}}}|{{{43}}}}}|{{#if:{{{44|}}}|{{{44}}}}}|{{#if:{{{45|}}}|{{{45}}}}}|{{#if:{{{46|}}}|{{{46}}}}}|{{#if:{{{47|}}}|{{{47}}}}}|{{#if:{{{48|}}}|{{{48}}}}}|{{#if:{{{49|}}}|{{{49}}}}}|{{#if:{{{50|}}}|{{{50}}}}}|{{#if:{{{51|}}}|{{{51}}}}}|{{#if:{{{52|}}}|{{{52}}}}}|{{#if:{{{53|}}}|{{{53}}}}}|{{#if:{{{54|}}}|{{{54}}}}}|{{#if:{{{55|}}}|{{{55}}}}}|{{#if:{{{56|}}}|{{{56}}}}}|{{#if:{{{57|}}}|{{{57}}}}}|{{#if:{{{58|}}}|{{{58}}}}}|{{#if:{{{59|}}}|{{{59}}}}}|{{#if:{{{60|}}}|{{{60}}}}}|{{#if:{{{61|}}}|{{{61}}}}}|{{#if:{{{62|}}}|{{{62}}}}}|{{#if:{{{63|}}}|{{{63}}}}}|{{#if:{{{64|}}}|{{{64}}}}}|{{#if:{{{65|}}}|{{{65}}}}}|{{#if:{{{66|}}}|{{{66}}}}}|{{#if:{{{67|}}}|{{{67}}}}}|{{#if:{{{68|}}}|{{{68}}}}}|{{#if:{{{69|}}}|{{{69}}}}}|{{#if:{{{70|}}}|{{{70}}}}}|{{#if:{{{71|}}}|{{{71}}}}}|{{#if:{{{72|}}}|{{{72}}}}}|{{#if:{{{73|}}}|{{{73}}}}}|{{#if:{{{74|}}}|{{{74}}}}}|{{#if:{{{75|}}}|{{{75}}}}}|{{#if:{{{76|}}}|{{{76}}}}}|{{#if:{{{77|}}}|{{{77}}}}}|{{#if:{{{78|}}}|{{{78}}}}}|{{#if:{{{79|}}}|{{{79}}}}}|{{#if:{{{80|}}}|{{{80}}}}}|{{#if:{{{81|}}}|{{{81}}}}}|{{#if:{{{82|}}}|{{{82}}}}}|{{#if:{{{83|}}}|{{{83}}}}}|{{#if:{{{84|}}}|{{{84}}}}}|{{#if:{{{85|}}}|{{{85}}}}}|{{#if:{{{86|}}}|{{{86}}}}}|{{#if:{{{87|}}}|{{{87}}}}}|{{#if:{{{88|}}}|{{{88}}}}}|{{#if:{{{89|}}}|{{{89}}}}}|{{#if:{{{90|}}}|{{{90}}}}}|{{#if:{{{91|}}}|{{{91}}}}}|{{#if:{{{92|}}}|{{{92}}}}}|{{#if:{{{93|}}}|{{{93}}}}}|{{#if:{{{94|}}}|{{{94}}}}}|{{#if:{{{95|}}}|{{{95}}}}}|{{#if:{{{96|}}}|{{{96}}}}}|{{#if:{{{97|}}}|{{{97}}}}}|{{#if:{{{98|}}}|{{{98}}}}}|{{#if:{{{99|}}}|{{{99}}}}}|{{#if:{{{100|}}}|{{{100}}}}}}} <noinclude> {{Upplýsingaskjölun}} </noinclude> d2cqswemt2mn1eqzqmy7o5w98jsoe73 Snið:NotandaUpplýs 10 4602 35186 14185 2026-06-14T17:14:07Z MyraMidnight 2947 Bæti við upplýsingaskjölun og færi og bæti upplýsingum í /doc 35186 wikitext text/x-wiki {| {{prettytable}} width=370 |- | rowspan=5 width=150 valign=top | [[Mynd:{{{1}}}|none|150px]] | <small>Notandanafn</small><br />[[Notandi:{{{2}}}|{{{2}}}]] |- | <small>Fullt nafn</small><br />{{{3}}} |- | <small>Fæðingardagur</small><br />{{{4}}} |- | <small>Staður</small><br />{{{5}}} |- | valign=top | {{{6}}} |}<noinclude>{{Upplýsingaskjölun}} </noinclude> 608bq1jo9yi863qww41yfyj42ww2uth Danska 0 5045 35177 31617 2026-06-14T15:27:28Z MyraMidnight 2947 Flokkur:Germönsk tungumál 35177 wikitext text/x-wiki <big><big>'''Velkommen! Her kan du studere Dansk! Held og Lykke!'''</big></big><br> [[Mynd:Flag of Denmark.svg|40px]] == Danska fyrir byrjendur == == Danska fyrir lengra komna== == Danska fyrir mjög langt komna== *[[Danskt ævintýri og próf í dönsku]] *[[Unge sniffere skal stoppes/verkefni í dönsku]] [[Flokkur:Tungumál|Danska]][[Flokkur:Germönsk tungumál]] {{InterWiki|kóði=da|útgáfa=dönsku}} {{Germönsk Tungumál}} dj0cgxdnsgi34sueio7zf4v6m1enshn Enska 0 5050 35176 30503 2026-06-14T15:23:05Z MyraMidnight 2947 Flokkur:Germönsk tungumál 35176 wikitext text/x-wiki <span style="font-size:16pt">'''Welcome! Here you can study the English language! Good luck!</span> [[Mynd:Flag of the United States.svg|40px]] [[Mynd:Flag of the United Kingdom.svg|40px]] [[Mynd:Flag of the United States Virgin Islands.svg|40px]] [[Mynd:Flag of Australia.svg|40px]] [[Mynd:Flag of New Zealand.svg|40px]] [[Mynd:Flag of Canada.svg|40px]] [[Mynd:Flag of Ireland.svg|40px]] [[Mynd:Flag of the Bahamas.svg|40px]] [[Mynd:Flag of South Africa.svg|30px]] [[Mynd:Flag of Singapore.svg|35px]] [[Mynd:Flag of Bermuda.svg|40px]] [[Mynd:Flag of Europe.svg|35px]] == Enska 1. stig == *[[Enska/Lærðu ensku 1|Lærðu ensku 1]] <small>''Grunnenska fyrir byrjendur''</small> *[[Enska/Lærðu ensku 2|Lærðu ensku 2]] *[[Enska/Reading English 1|Reading English 1]] == Enska 2. stig == *[[Enska/Tölum á ensku 1|Tölum á ensku 1]] *[[Enska/Tölum á ensku 2|Tölum á ensku 2]] == Enska 3. stig== *[[Enska/Halloween|Halloween]] {{InterWiki|kóði=en|útgáfa=ensku}} {{Wikipedia}} {{Germönsk Tungumál}} [[Flokkur:Tungumál|Enska]] [[Flokkur:Germönsk tungumál]] [[de:Englisch]] [[en:English]] [[es:Inglés]] [[fr:Enseignement de l'anglais]] [[it:Corso di inglese]] [[he:אנגלית למתחילים]] [[ja:英語]] [[pl:Angielski/Okładka]] [[pt:Inglês]] [[sv:Engelska]] [[th:ภาษาอังกฤษ]] [[zh:英语]] bywiwx1znlb73ddc2jdh43wsdqb1fqr Snið:Tilvitnun 10 5112 35190 23878 2026-06-14T17:21:50Z MyraMidnight 2947 Upplýsingaskjölun, færi upplýsingar í /doc 35190 wikitext text/x-wiki <div style="font-size: 95%; margin: 1em 4em 1em 4em"> <div style="vertical-align: top; margin: 1.2em 0.8em 0 0; float: left">[[Mynd:Quote3.png|23px|none|]]</div> <p style="padding-top: 5px">{{{1<noinclude>|Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</noinclude>}}}“</p> <p style="text-align: right" class="hiddenStructure{{{2|<noinclude>Cicero</noinclude>}}}"><cite style="font-style:normal;">— {{{2|<noinclude>Cicero</noinclude>}}}<span class="hiddenStructure{{{3|<noinclude>de Finibus Bonorum et Malorum</noinclude>}}}">, <i>{{{3|<noinclude>de Finibus Bonorum et Malorum</noinclude>}}}</i></span>.</cite></p> </div><noinclude> {{Upplýsingaskjölun}} </noinclude> gbvcjzi5jbv2cwwwjv6x865m0y2etfc Þýska 0 5368 35200 34004 2026-06-15T07:19:57Z MyraMidnight 2947 Germönsk tungumál 35200 wikitext text/x-wiki <div float="center" style="font-size:12pt; text-align:center"> [[Mynd:Þýska_aðal_mynd.JPG ]] '''Willkommen! Hier könnt ihr Deutsch lernen!''' </div> === Þýska fyrir byrjendur === *[[Þýska/Lærðu Þýsku 1|Lærðu Þýsku 1]] <small>''Grunnþýska fyrir byrjendur''</small> *[[Þýska/Lærðu Þýsku 2|Lærðu Þýsku 2]] === Þýska á millstiginu === *[[Þýska/Tölum á Þýsku 1|Tölum á Þýsku 1]] *[[Þýska/Tölum á Þýsku 2|Tölum á Þýsku 2]] === Þýska á háustig === {{Germönsk Tungumál}} [[Flokkur:Tungumál]][[Flokkur:Germönsk tungumál]] <gallery> Mynd:Flag map of Germany.svg|<center>'''Þýskaland''' Mynd:Flag-map of Austria.svg‎|<center>'''Austurríki''' Mynd:Flag-map of Switzerland.svg|<center>'''Sviss''' Mynd:Legal status of German in Europe.svg|Kort </gallery> [[af:Duits]], [[ca:Alemany]], [[cs:Němčina]], [[cy:Almaeneg]], [[de:Regal:Deutsch als Fremdsprache]], [[en:German]] [[es:Alemán]] [[eo:Germana]] [[fr:Enseignement de l'allemand]] [[it:Tedesco]] [[he:גרמנית]] [[ka:გერმანული ენა]] [[nl:Duits]] [[ja:ドイツ語]] [[pl:Niemiecki/Okładka]] [[fi:Saksan kieli]] [[tr:Almanca]] [[uk:Мова людства/Верхньонімецька]] [[zh:德语]] 8ummhvrzdy1squ1wu1utykdgb70j67z Sænska 0 5548 35178 34074 2026-06-14T16:16:39Z MyraMidnight 2947 Flokkur:Germönsk tungumál 35178 wikitext text/x-wiki <div style="font-size:16pt">'''Välkommen! Här kan du studera svenska! Lycka till!'''</div> [[Mynd:Flag of Sweden.svg|40px|border]] [[Mynd:Flag_of_Åland.svg|40px|border]] [[Mynd:Flag of Finland.svg|40px|border]] [[Mynd:Idioma sueco.png|right|frameless]] == Sænska fyrir byrjendur == *[[Sænska/Lærðu sænsku 1|Lærðu sænsku 1]] <small>''Grunnsænska fyrir byrjendur''</small> *[[Sænska/Lærðu sænsku 2|Lærðu sænsku 2]] == Sænska fyrir lengra komna == *[[Enska/Tölum á sænsku 1|Tölum á sænsku 1]] *[[Enska/Tölum á sænsku 2|Tölum á sænsku 2]] == Sænska fyrir mjög langt komna== {{InterWiki|kóði=sv|útgáfa=sænsku}} {{Wikipedia}} {{Germönsk Tungumál}} [[Flokkur:Tungumál|Sænska]] [[Flokkur:Germönsk tungumál]] 0kjngnkrnzy3sickqcg55qb46ixmvwl Færeyska 0 5569 35179 26126 2026-06-14T16:26:58Z MyraMidnight 2947 Flokkur:Germönsk tungumál 35179 wikitext text/x-wiki <big><big>'''Vælkomin! Her tit kunna lært føroyskt! Gangi tær væl!'''</big></big><br> [[Mynd:Flag of the Faroe Islands.svg|40px|border]] == Færeyska fyrir byrjendur == *[[Færeyska/Lærðu færeysku 1|Lærðu færeysku 1]] <small>''Grunnfæreyska fyrir byrjendur''</small> *[[Færeyska/Lærðu færeysku 2|Lærðu færeysku 2]] == Færeyska fyrir lengra komna == == Færeyska fyrir mjög langt komna == [[Flokkur:Tungumál|Færeyska]][[Flokkur:Germönsk tungumál]] {{InterWiki|kóði=fo|útgáfa=færeysku}} {{Germönsk Tungumál}} 6oa26948l27bqedxblo7i5oek6zyrk7 Module:Documentation 828 8040 35180 2026-06-14T16:46:09Z MyraMidnight 2947 Documentation / Upplýsingaskjölun Lua skrifta frá is.wikipedia.org 35180 Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub local format = mw.ustring.format ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error('skilaboð: type villa í skilaboðum cfg.' .. cfgKey .. ' (vildi ' .. expectType .. ', fékk ' .. type(msg) .. ')', 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('skilaboð: ekkert gildi fannst fyrir lykil $' .. match .. ' í skilaboðum cfg.' .. cfgKey, 4) end return ugsub(msg, '$([1-9][0-9]*)', getMessageVal) end p.message = message local function makeWikilink(page, display) if display then return format('[[%s|%s]]', page, display) else return format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end -- 'documentation-toolbar' return format( '<span class="%s">(%s)</span>', message('toolbar-class'), table.concat(ret, ' &#124; ') ) end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Entry points ---------------------------------------------------------------------------- --[[ title var 'module test case notice' ]] function p.nonexistent(frame) if mw.title.getCurrentTitle().subpageText == 'testcases' then return frame:expandTemplate{title = 'Tilkynning um sýnishorn skriftu'} else return p.main(frame) end end p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user --]] local env = p.getEnvironment(args) local root = mw.html.create() root :wikitext(p._getModuleWikitext(args, env)) :wikitext(p.protectionTemplate(env)) :wikitext(p.sandboxNotice(args, env)) :tag('div') -- 'documentation-container' :addClass(message('container')) :attr('role', 'complementary') :attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil) :attr('aria-label', args.heading == '' and 'Documentation' or nil) :newline() :tag('div') -- 'documentation' :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') -- 'documentation-clear' :addClass(message('clear')) :done() :newline() :done() :wikitext(p._endBox(args, env)) :done() :wikitext(p.addTrackingCategories(env)) -- 'Module:Documentation/styles.css' return mw.getCurrentFrame():extensionTag ( 'templatestyles', '', {src=cfg['templatestyles'] }) .. tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title -- objects and other namespace- or path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- -- Data includes: -- env.protectionLevels - the protection levels table of the title object. -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') or (subpage == message('doc-subpage') and mw.title.getCurrentTitle().namespace == env.docSpace) then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.protectionLevels() -- The protection levels table of the title object. return env.title.protectionLevels end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the -- same as the subject namespace. However, pages in the Article, File, -- MediaWiki or Category namespaces must have their /doc, /sandbox and -- /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Special:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.canonicalUrl( 'Special:ComparePages', { page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Auxiliary templates ---------------------------------------------------------------------------- p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext') function p._getModuleWikitext(args, env) local currentTitle = mw.title.getCurrentTitle() if currentTitle.contentModel ~= 'Scribunto' then return end pcall(require, currentTitle.prefixedText) -- if it fails, we don't care local moduleWikitext = package.loaded["Module:Module wikitext"] if moduleWikitext then return moduleWikitext.main() end end function p.sandboxNotice(args, env) --[=[ -- Generates a sandbox notice for display above sandbox pages. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-notice-image' --> '[[File:Sandbox.svg|50px|alt=|link=]]' -- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' -- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' -- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page' -- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page' -- 'sandbox-notice-pagetype-other' --> 'sandbox page' -- 'sandbox-notice-compare-link-display' --> 'diff' -- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.' -- 'sandbox-notice-testcases-link-display' --> 'test cases' -- 'sandbox-category' --> 'Template sandboxes' -- 'module-sandbox-category' --> 'Module sandboxes' -- 'other-sandbox-category' --> 'Sandboxes outside of template or module namespace' --]=] local title = env.title local sandboxTitle = env.sandboxTitle local templateTitle = env.templateTitle local subjectSpace = env.subjectSpace if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then return nil end -- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text". local omargs = {} omargs.image = message('sandbox-notice-image') -- Get the text. We start with the opening blurb, which is something like -- "This is the template sandbox for [[Template:Foo]] (diff)." local text = '__EXPECTUNUSEDTEMPLATE__' local pagetype, sandboxCat if subjectSpace == 10 then pagetype = message('sandbox-notice-pagetype-template') sandboxCat = message('sandbox-category') elseif subjectSpace == 828 then pagetype = message('sandbox-notice-pagetype-module') sandboxCat = message('module-sandbox-category') else pagetype = message('sandbox-notice-pagetype-other') sandboxCat = message('other-sandbox-category') end local templateLink = makeWikilink(templateTitle.prefixedText) local compareUrl = env.compareUrl if compareUrl then local compareDisplay = message('sandbox-notice-compare-link-display') local compareLink = makeUrlLink(compareUrl, compareDisplay) text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink}) else text = text .. message('sandbox-notice-blurb', {pagetype, templateLink}) end -- Get the test cases page blurb if the page exists. This is something like -- "See also the companion subpage for [[Template:Foo/testcases|test cases]]." local testcasesTitle = env.testcasesTitle if testcasesTitle and testcasesTitle.exists then if testcasesTitle.contentModel == "Scribunto" then local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink}) else local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) end end -- Add the sandbox to the sandbox category. omargs.text = text .. makeCategoryLink(sandboxCat) -- 'documentation-clear' return '<div class="' .. message('clear') .. '"></div>' .. require('Module:Message box').main('ombox', omargs) end function p.protectionTemplate(env) -- Generates the padlock icon in the top right. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'protection-template' --> 'pp-template' -- 'protection-template-args' --> {docusage = 'yes'} local protectionLevels = env.protectionLevels if not protectionLevels then return nil end local editProt = protectionLevels.edit and protectionLevels.edit[1] local moveProt = protectionLevels.move and protectionLevels.move[1] if editProt then -- The page is edit-protected. return require('Module:Protection banner')._main{ message('protection-reason-edit'), small = true } elseif moveProt and moveProt ~= 'autoconfirmed' then -- The page is move-protected but not edit-protected. Exclude move -- protection with the level "autoconfirmed", as this is equivalent to -- no move protection at all. return require('Module:Protection banner')._main{ action = 'move', small = true } else return nil end end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content or args[1] then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end return { title = title, docTitle = docTitle, -- View, display, edit, and purge links if /doc exists. viewLinkDisplay = message('view-link-display'), editLinkDisplay = message('edit-link-display'), historyLinkDisplay = message('history-link-display'), purgeLinkDisplay = message('purge-link-display'), preload = preload, createLinkDisplay = message('create-link-display') } end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create][purge] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local docTitle = data.docTitle -- yes, we do intend to purge the template page on which the documentation appears local purgeLink = makeWikilink("Special:Purge/" .. data.title.prefixedText, data.purgeLinkDisplay) if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, data.editLinkDisplay) local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, data.historyLinkDisplay) return "&#91;" .. viewLink .. "&#93; &#91;" .. editLink .. "&#93; &#91;" .. historyLink .. "&#93; &#91;" .. purgeLink .. "&#93;" else local createLink = makeUrlLink(docTitle:canonicalUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) return "&#91;" .. createLink .. "&#93; &#91;" .. purgeLink .. "&#93;" end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading') elseif subjectSpace == 828 then -- Module namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading') elseif subjectSpace == 6 then -- File namespace data.heading = message('file-namespace-heading') else data.heading = message('other-namespaces-heading') end -- Heading CSS local headingStyle = args['heading-style'] if headingStyle then data.headingStyleText = headingStyle else -- 'documentation-heading' data.headingClass = message('main-div-heading-class') end -- Data for the [view][edit][history][purge] or [create] links. if links then -- 'mw-editsection-like plainlinks' data.linksClass = message('start-box-link-classes') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox -- 'documentation-startbox' :addClass(message('start-box-class')) :newline() :tag('span') :addClass(data.headingClass) :attr('id', 'documentation-heading') :cssText(data.headingStyleText) :wikitext(data.heading) local links = data.links if links then sbox:tag('span') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. return '\n' .. (content or '') .. '\n' end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the link box. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" end end local box = mw.html.create('div') -- 'documentation-metadata' box:attr('role', 'note') :addClass(message('end-box-class')) -- 'plainlinks' :addClass(message('end-box-plainlinks')) :wikitext(text) :done() return '\n' .. tostring(box) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[Wikipedia:Template documentation|documentation]] -- is [[Help:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle then return nil end if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editDisplay = message('edit-link-display') local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, editDisplay) local historyDisplay = message('history-link-display') local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, historyDisplay) return message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:canonicalUrl{action = 'edit', preload = message('module-preload')} local createDisplay = message('create-link-display') local createLink = makeUrlLink(createUrl, createDisplay) return message('create-module-doc-blurb', {createLink}) .. '<br />' end end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeWikilink("Special:EditPage/" .. sandboxPage, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} if subjectSpace == 828 then mirrorUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary} end local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:canonicalUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeWikilink("Special:EditPage/" .. testcasesPage, testcasesEditDisplay) -- for Modules, add testcases run link if exists if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then local testcasesRunLinkDisplay = message('testcases-run-link-display') local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink) else testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) end else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:canonicalUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then return makeCategoryLink(message('strange-usage-category')) end return '' end return p 5s7ncm40inxm758tgflrjt73d3274x7 Module:Documentation/config 828 8041 35181 2026-06-14T16:49:34Z MyraMidnight 2947 Upplýsingaskjölun Lua 35181 Scribunto text/plain ---------------------------------------------------------------------------------------------------- -- -- Configuration for Module:Documentation -- -- Here you can set the values of the parameters and messages used in Module:Documentation to -- localise it to your wiki and your language. Unless specified otherwise, values given here -- should be string values. ---------------------------------------------------------------------------------------------------- local cfg = {} -- Do not edit this line. ---------------------------------------------------------------------------------------------------- -- Protection template configuration ---------------------------------------------------------------------------------------------------- -- cfg['protection-reason-edit'] -- The protection reason for edit-protected templates to pass to -- [[Module:Protection banner]]. cfg['protection-reason-edit'] = 'template' --[[ ---------------------------------------------------------------------------------------------------- -- Sandbox notice configuration -- -- On sandbox pages the module can display a template notifying users that the current page is a -- sandbox, and the location of test cases pages, etc. The module decides whether the page is a -- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the -- messages that the notices contains. ---------------------------------------------------------------------------------------------------- --]] -- cfg['sandbox-notice-image'] -- The image displayed in the sandbox notice. cfg['sandbox-notice-image'] = '[[Mynd:Sandbox.svg|50px|alt=|link=]]' --[[ -- cfg['sandbox-notice-pagetype-template'] -- cfg['sandbox-notice-pagetype-module'] -- cfg['sandbox-notice-pagetype-other'] -- The page type of the sandbox page. The message that is displayed depends on the current subject -- namespace. This message is used in either cfg['sandbox-notice-blurb'] or -- cfg['sandbox-notice-diff-blurb']. --]] cfg['sandbox-notice-pagetype-template'] = 'Sandkassi sniðs' cfg['sandbox-notice-pagetype-module'] = 'Sandkassi skriftu' cfg['sandbox-notice-pagetype-other'] = 'sandkassinn' --[[ -- cfg['sandbox-notice-blurb'] -- cfg['sandbox-notice-diff-blurb'] -- cfg['sandbox-notice-diff-display'] -- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence -- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page -- type, which is either cfg['sandbox-notice-pagetype-template'], -- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what -- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between -- the sandbox and the main template. The display value of the diff link is set by -- cfg['sandbox-notice-compare-link-display']. --]] cfg['sandbox-notice-blurb'] = 'Þetta er $1 fyrir $2.' cfg['sandbox-notice-diff-blurb'] = 'Þetta er $1 fyrir $2 ($3).' cfg['sandbox-notice-compare-link-display'] = 'samanburður' --[[ -- cfg['sandbox-notice-testcases-blurb'] -- cfg['sandbox-notice-testcases-link-display'] -- cfg['sandbox-notice-testcases-run-blurb'] -- cfg['sandbox-notice-testcases-run-link-display'] -- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit. $1 is a link to the test cases page. -- cfg['sandbox-notice-testcases-link-display'] is the display value for that link. -- cfg['sandbox-notice-testcases-run-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test -- cases page, and $2 is a link to the page to run it. -- cfg['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test -- cases. --]] cfg['sandbox-notice-testcases-blurb'] = 'Sjá einnig fylgisíðuna á $1.' cfg['sandbox-notice-testcases-link-display'] = 'prufudæmi' cfg['sandbox-notice-testcases-run-blurb'] = 'Sjá einnig fylgisíðuna á $1 ($2).' cfg['sandbox-notice-testcases-run-link-display'] = 'keyra' -- cfg['sandbox-category'] -- A category to add to all template sandboxes. cfg['sandbox-category'] = 'Sniða sandkassar' ---------------------------------------------------------------------------------------------------- -- Start box configuration ---------------------------------------------------------------------------------------------------- -- cfg['documentation-icon-wikitext'] -- The wikitext for the icon shown at the top of the template. cfg['documentation-icon-wikitext'] = '[[Mynd:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- cfg['template-namespace-heading'] -- The heading shown in the template namespace. cfg['template-namespace-heading'] = 'Upplýsingaskjölun sniðs' -- cfg['module-namespace-heading'] -- The heading shown in the module namespace. cfg['module-namespace-heading'] = 'Upplýsingaskjölun skriftu' -- cfg['file-namespace-heading'] -- The heading shown in the file namespace. cfg['file-namespace-heading'] = 'Upplýsingaskjölun' -- cfg['other-namespaces-heading'] -- The heading shown in other namespaces. cfg['other-namespaces-heading'] = 'Upplýsingaskjölun' -- cfg['view-link-display'] -- The text to display for "view" links. cfg['view-link-display'] = 'skoða' -- cfg['edit-link-display'] -- The text to display for "edit" links. cfg['edit-link-display'] = 'breyta' -- cfg['history-link-display'] -- The text to display for "history" links. cfg['history-link-display'] = 'saga' -- cfg['purge-link-display'] -- The text to display for "purge" links. cfg['purge-link-display'] = 'hreinsa' -- cfg['create-link-display'] -- The text to display for "create" links. cfg['create-link-display'] = 'skapa' ---------------------------------------------------------------------------------------------------- -- Link box (end box) configuration ---------------------------------------------------------------------------------------------------- -- cfg['transcluded-from-blurb'] -- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page. cfg['transcluded-from-blurb'] = 'Upplýsingarnar fyrir ofan er ítengd frá $1.' --[[ -- cfg['create-module-doc-blurb'] -- Notice displayed in the module namespace when the documentation subpage does not exist. -- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the -- display cfg['create-link-display']. --]] cfg['create-module-doc-blurb'] = 'Þú gætir viljað $1 upplýsingaskjölunarsíðu fyrir þessa Skribunto skriftu.' ---------------------------------------------------------------------------------------------------- -- Experiment blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['experiment-blurb-template'] -- cfg['experiment-blurb-module'] -- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages. -- It is only shown in the template and module namespaces. With the default English settings, it -- might look like this: -- -- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. -- -- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links. -- -- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending -- on what namespace we are in. -- -- Parameters: -- -- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display']) -- -- If the sandbox doesn't exist, it is in the format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display']) -- -- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload'] -- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display'] -- loads a default edit summary of cfg['mirror-edit-summary']. -- -- $2 is a link to the test cases page. If the test cases page exists, it is in the following format: -- -- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display']) -- -- If the test cases page doesn't exist, it is in the format: -- -- cfg['testcases-link-display'] (cfg['testcases-create-link-display']) -- -- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the -- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current -- namespace. --]] cfg['experiment-blurb-template'] = "Notendur geta prófað sig áfram í $1 og $2 sniðsins." cfg['experiment-blurb-module'] = "Notendur geta prófað sig áfram í $1 og $2 skriftunnar." ---------------------------------------------------------------------------------------------------- -- Sandbox link configuration ---------------------------------------------------------------------------------------------------- -- cfg['sandbox-subpage'] -- The name of the template subpage typically used for sandboxes. cfg['sandbox-subpage'] = 'sandkassi' -- cfg['template-sandbox-preload'] -- Preload file for template sandbox pages. cfg['template-sandbox-preload'] = 'Snið:Documentation/preload-sandbox' -- cfg['module-sandbox-preload'] -- Preload file for Lua module sandbox pages. cfg['module-sandbox-preload'] = 'Snið:Documentation/preload-module-sandbox' -- cfg['sandbox-link-display'] -- The text to display for "sandbox" links. cfg['sandbox-link-display'] = 'sandkassa' -- cfg['sandbox-edit-link-display'] -- The text to display for sandbox "edit" links. cfg['sandbox-edit-link-display'] = 'breyta' -- cfg['sandbox-create-link-display'] -- The text to display for sandbox "create" links. cfg['sandbox-create-link-display'] = 'skapa' -- cfg['compare-link-display'] -- The text to display for "compare" links. cfg['compare-link-display'] = 'samanburður' -- cfg['mirror-edit-summary'] -- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the -- template page. cfg['mirror-edit-summary'] = 'Bý til sandkassa útgáfu af $1' -- cfg['mirror-link-display'] -- The text to display for "mirror" links. cfg['mirror-link-display'] = 'spegla' -- cfg['mirror-link-preload'] -- The page to preload when a user clicks the "mirror" link. cfg['mirror-link-preload'] = 'Snið:Documentation/spegill' ---------------------------------------------------------------------------------------------------- -- Test cases link configuration ---------------------------------------------------------------------------------------------------- -- cfg['testcases-subpage'] -- The name of the template subpage typically used for test cases. cfg['testcases-subpage'] = 'prufudæmi' -- cfg['template-testcases-preload'] -- Preload file for template test cases pages. cfg['template-testcases-preload'] = 'Snið:Documentation/preload-testcases' -- cfg['module-testcases-preload'] -- Preload file for Lua module test cases pages. cfg['module-testcases-preload'] = 'Snið:Documentation/preload-module-testcases' -- cfg['testcases-link-display'] -- The text to display for "testcases" links. cfg['testcases-link-display'] = 'prufudæmi' -- cfg['testcases-edit-link-display'] -- The text to display for test cases "edit" links. cfg['testcases-edit-link-display'] = 'breyta' -- cfg['testcases-run-link-display'] -- The text to display for test cases "run" links. cfg['testcases-run-link-display'] = 'keyra' -- cfg['testcases-create-link-display'] -- The text to display for test cases "create" links. cfg['testcases-create-link-display'] = 'skapa' ---------------------------------------------------------------------------------------------------- -- Add categories blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['add-categories-blurb'] -- Text to direct users to add categories to the /doc subpage. Not used if the "content" or -- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a -- link to the /doc subpage with a display value of cfg['doc-link-display']. --]] cfg['add-categories-blurb'] = 'Bættu við flokkum á $1 undirsíðunni.' -- cfg['doc-link-display'] -- The text to display when linking to the /doc subpage. cfg['doc-link-display'] = '/doc' ---------------------------------------------------------------------------------------------------- -- Subpages link configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['subpages-blurb'] -- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a -- display value of cfg['subpages-link-display']. In the English version this blurb is simply -- the link followed by a period, and the link display provides the actual text. --]] cfg['subpages-blurb'] = '$1.' --[[ -- cfg['subpages-link-display'] -- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'], -- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in -- the template namespace, the module namespace, or another namespace. --]] cfg['subpages-link-display'] = 'Undirssíður $1' -- cfg['template-pagetype'] -- The pagetype to display for template pages. cfg['template-pagetype'] = 'sniðsins' -- cfg['module-pagetype'] -- The pagetype to display for Lua module pages. cfg['module-pagetype'] = 'skriftunnar' -- cfg['default-pagetype'] -- The pagetype to display for pages other than templates or Lua modules. cfg['default-pagetype'] = 'síðunnar' ---------------------------------------------------------------------------------------------------- -- Doc link configuration ---------------------------------------------------------------------------------------------------- -- cfg['doc-subpage'] -- The name of the subpage typically used for documentation pages. cfg['doc-subpage'] = 'doc' -- cfg['docpage-preload'] -- Preload file for template documentation pages in all namespaces. cfg['docpage-preload'] = 'Snið:Documentation/preload' -- cfg['module-preload'] -- Preload file for Lua module documentation pages. cfg['module-preload'] = 'Snið:Documentation/preload-module-doc' ---------------------------------------------------------------------------------------------------- -- HTML and CSS configuration ---------------------------------------------------------------------------------------------------- -- cfg['templatestyles'] -- The name of the TemplateStyles page where CSS is kept. -- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed. cfg['templatestyles'] = 'Module:Documentation/styles.css' -- cfg['container'] -- Class which can be used to set flex or grid CSS on the -- two child divs documentation and documentation-metadata cfg['container'] = 'documentation-container' -- cfg['main-div-classes'] -- Classes added to the main HTML "div" tag. cfg['main-div-classes'] = 'documentation' -- cfg['main-div-heading-class'] -- Class for the main heading for templates and modules and assoc. talk spaces cfg['main-div-heading-class'] = 'documentation-heading' -- cfg['start-box-class'] -- Class for the start box cfg['start-box-class'] = 'documentation-startbox' -- cfg['start-box-link-classes'] -- Classes used for the [view][edit][history] or [create] links in the start box. -- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]] cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks' -- cfg['end-box-class'] -- Class for the end box. cfg['end-box-class'] = 'documentation-metadata' -- cfg['end-box-plainlinks'] -- Plainlinks cfg['end-box-plainlinks'] = 'plainlinks' -- cfg['toolbar-class'] -- Class added for toolbar links. cfg['toolbar-class'] = 'documentation-toolbar' -- cfg['clear'] -- Just used to clear things. cfg['clear'] = 'documentation-clear' ---------------------------------------------------------------------------------------------------- -- Tracking category configuration ---------------------------------------------------------------------------------------------------- -- cfg['display-strange-usage-category'] -- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage -- or a /testcases subpage. This should be a boolean value (either true or false). cfg['display-strange-usage-category'] = true -- cfg['strange-usage-category'] -- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a -- /doc subpage or a /testcases subpage. cfg['strange-usage-category'] = 'Wikipedia síður sem nota ((documentation)) furðulega' --[[ ---------------------------------------------------------------------------------------------------- -- End configuration -- -- Don't edit anything below this line. ---------------------------------------------------------------------------------------------------- --]] return cfg ny2sncdm5nybt0euhncbnz52kdyf5rg Module:Documentation/styles.css 828 8042 35182 2026-06-14T16:52:05Z MyraMidnight 2947 Upplýsingaskjölun lua grunnur 35182 sanitized-css text/css /* {{pp|small=yes}} */ .documentation, .documentation-metadata { border: 1px solid #a2a9b1; background-color: #ecfcf4; clear: both; } .documentation { margin: 1em 0 0 0; padding: 1em; } .documentation-metadata { margin: 0.2em 0; /* same margin left-right as .documentation */ font-style: italic; padding: 0.4em 1em; /* same padding left-right as .documentation */ } .documentation-startbox { padding-bottom: 3px; border-bottom: 1px solid #aaa; margin-bottom: 1ex; } .documentation-heading { font-weight: bold; font-size: 125%; } .documentation-clear { /* Don't want things to stick out where they shouldn't. */ clear: both; } .documentation-toolbar { font-style: normal; font-size: 85%; } @media screen { html.skin-theme-clientpref-night .documentation, html.skin-theme-clientpref-night .documentation-metadata { background-color: inherit; } } @media screen and (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .documentation, html.skin-theme-clientpref-os .documentation-metadata { background-color: inherit; } } jeq1kmu3rrhpox1nuj8199arjyex6ty Snið:Upplýsingaskjölun 10 8043 35183 2026-06-14T16:53:57Z MyraMidnight 2947 Uppýsingaskjölun sniðið, fyrst en.wikibooks.org notar snið og documentation líka, og það vantaði alveg hér 35183 wikitext text/x-wiki {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude> </noinclude> tobzr0oju95p9dhr6eqyqgrr8jp1vjc Snið:Upplýsingaskjölun/doc 10 8044 35184 2026-06-14T17:07:00Z MyraMidnight 2947 Upplýsingar um upplýsingaskjölun 35184 wikitext text/x-wiki Þetta snið er gert til þess að halda utan um upplýsingar um notkun sniðs í gegnum <code>/doc</code> undirsíðu sem heldur þá upplýsingunum aðskildum frá kóðanum í sniðinu. Þetta auðveldar fólki að bæta upplýsingum um notkun sniðs án þess að hafa áhyggjur af því að mögulega brjóta sjálft sniðið. Það ætti alltaf að vera <code>{{tl|Upplýsingaskjölun}}</code> í öllum sniðum, jafnvel ef þau eru lítil og án stillinga. == Notkun == Þegar nýtt snið er búið til, þá ætti alltaf að skella þessu neðst. '''Upplýsingaskjölunar''' sniðið á að vera fyrir innan <code><nowiki><noinclude>...</nocinlude></nowiki></code> sem á að vera neðst á síðunni. <syntaxhighlight lang="wikitext" style="overflow: auto;"> <!-- Seinasta línan í snið-kóðanum --><noinclude> {{Upplýsingaskjölun}} <!-- Bætið flokkum og öðrum upplýsingum í /doc undirsíðuna , ekki hérna --> </noinclude></syntaxhighlight> === Endurnýting á upplýsingum === Það er hægt að láta '''Upplýsingaskjölun''' endurnýta upplýsingar frá örðum sniðum á eftirfarandi hátt: <syntaxhighlight lang="wikitext" style="overflow: auto;"> <!-- Seinasta línan í snið-kóðanum --><noinclude> {{Upplýsingaskjölun|Snið:Eitthvað/doc}} </noinclude> </syntaxhighlight> === Upplýsingar án undirsíðu === Þetta er henntug fyrir snið sem hafa engar breytur eða eru endurtekning á öðru sniði (þá væri nóg að vísa í grunnsniðið fyrir nánari upplýsingar). Þetta birtir upplýsingarnar án þess að setja upp <code>/doc</code> undirsíðu. <syntaxhighlight lang="wikitext" style="overflow: auto;"> <!-- Seinasta línan í snið-kóðanum --><noinclude> {{Upplýsingaskjölun | content = <!-- upplýsingar um sniðið --> }}</noinclude> </syntaxhighlight> == Aðrar Undirsíður == Neðst í upplýsingakassanum er hægt að finna undirsíður sniðsins, og auðvelda leið til að finna eða búa til meðfylgjandi '''sandkassa''' eða '''dæmasíðu'''. Alveg óþarfi að skapa þessar undirsíður, en þetta verður þarna neðst ef þörf er á. Það er alltaf hægt að finna allar undirsíður sem tengjast sniðinu með því að fylgja hlekknum „undirsíður sniðs“. === Sandkassar <code>/sandkassi</code> === Sandkassar eru hugsaðir til þess að prófa snið og fikta, hver og einn notandi hefur sinn eiginn persónulega sandkassa, en þessi sandkassi tilheyrir tilteknu sniði og ætti þess vegna ekki að innihalda neitt sem tengist ekkert sniðinu. Endilega verið ekki feimin að nota sandkassana áður en farið er í að bæta einhverju inn á raunverulega síðu, en '''alltaf muna að forskoða''' í staðinn fyrir að gefa út breytingar, til að sjá hvernig það kemur út. === Dæmasíður <code>/dæmasíða</code>=== Sum snið eru flókin og margt hægt að gera, svo það er tilvalið að setja upp sýnidæmi á meðfylgjandi dæmasíðu í staðinn fyrir að setja of mikið í <code>/doc</code>. Neðst á síðunni er hægt að finna hlekk til að finna eða búa til þessa dæmasíðu == Tengt efni == * [[:Flokkur:Snið]] * [[Module:Documentation]] <includeonly> [[Flokkur:Upplýsingasnið]] </includeonly> hsvbvi0hnab44inbzhjkv3qsfygnils Snið:NotandaUpplýs/doc 10 8045 35185 2026-06-14T17:13:45Z MyraMidnight 2947 Upplýsingar í /doc 35185 wikitext text/x-wiki ==Sniðmátsgögn == <templatedata> { "params": { "1": { "label": "Mynd", "description": "Myndin sem þú vilt að birtist", "type": "wiki-file-name" }, "2": { "label": "Notendanafn", "description": "Hvað er notendanafnið þitt á wikibooks/wikipedia", "type": "line" }, "3": { "label": "Fullt nafn", "description": "Hvað heitir þú?", "type": "line" }, "4": { "label": "Fæðingardagur", "description": "Hvenær fæddist þú?", "example": "13. júlí 2000", "type": "date" }, "5": { "label": "Staður", "description": "Hvar ertu staðsett/ur?", "example": "Reykjavík", "type": "line" }, "6": { "label": "Glósur", "description": "Eitthvað smávegis meira um þig? Titill? Starfsheiti?" } } } </templatedata> [[Flokkur:Notendakassar]] [[Flokkur:Upplýsingasnið]] r26uowd3ge374lnq4v47p8rbffshnqz 35187 35185 2026-06-14T17:14:55Z MyraMidnight 2947 includeonly 35187 wikitext text/x-wiki ==Sniðmátsgögn == <templatedata> { "params": { "1": { "label": "Mynd", "description": "Myndin sem þú vilt að birtist", "type": "wiki-file-name" }, "2": { "label": "Notendanafn", "description": "Hvað er notendanafnið þitt á wikibooks/wikipedia", "type": "line" }, "3": { "label": "Fullt nafn", "description": "Hvað heitir þú?", "type": "line" }, "4": { "label": "Fæðingardagur", "description": "Hvenær fæddist þú?", "example": "13. júlí 2000", "type": "date" }, "5": { "label": "Staður", "description": "Hvar ertu staðsett/ur?", "example": "Reykjavík", "type": "line" }, "6": { "label": "Glósur", "description": "Eitthvað smávegis meira um þig? Titill? Starfsheiti?" } } } </templatedata> <includeonly> [[Flokkur:Notendakassar]] [[Flokkur:Upplýsingasnið]] </includeonly> 26jgpzhrg2tp3r5p6twji7o3c84pa6s Snið:Documentation 10 8046 35188 2026-06-14T17:17:59Z MyraMidnight 2947 Tilvísun á [[Snið:Upplýsingaskjölun]] 35188 wikitext text/x-wiki #tilvísun [[Snið:Upplýsingaskjölun]] 724a8b2s8uevhzjga969lxyx2ps5ukh Snið:Tilvitnun/doc 10 8047 35189 2026-06-14T17:21:30Z MyraMidnight 2947 Upplýsingaskjölun 35189 wikitext text/x-wiki ==Notkun== <nowiki>{{</nowiki>Tilvitnun|''Texti''|''Höfundur''|''Samhengi''<nowiki>}}</nowiki> <includeonly> [[Flokkur:Heimildasnið]] [[en:Template:Cquote]] [[es:Plantilla:Cita]] [[pt:Predefinição:Quote2]] [[ru:Шаблон:Цитатник]] [[sv:Mal:Citat]] </includeonly> r1nr03blc4mw9ndz6650p4ckbvuq1wo 35191 35189 2026-06-14T17:26:46Z MyraMidnight 2947 Upplýsingar um tilvitnanir sniðið 35191 wikitext text/x-wiki ==Notkun== <nowiki>{{</nowiki>Tilvitnun|''Texti''|''Höfundur''|''Samhengi''<nowiki>}}</nowiki> == Sniðmátsgögn == <templatedata> { "params": { "1": { "label": "Texti", "description": "Innihald tilvitnunar", "type": "content", "required": true }, "2": { "label": "Höfundur", "description": "Hver er höfundur tilvitnunarinnar?", "type": "line" }, "3": { "label": "Samhengi", "type": "line" } } } </templatedata> <includeonly> [[Flokkur:Heimildasnið]] [[en:Template:Cquote]] [[es:Plantilla:Cita]] [[pt:Predefinição:Quote2]] [[ru:Шаблон:Цитатник]] [[sv:Mal:Citat]] </includeonly> fzdd2f5he51o9invb915dlp9gv3khak Module:Documentation/doc 828 8048 35192 2026-06-14T17:27:11Z MyraMidnight 2947 Bjó til síðu með „* [[Module:Documentation/config]] * [[Module:Documentation/styles.css]] * [[Module:Documentation/doc]] * [[Snið:Upplýsingaskjölun]]“ 35192 wikitext text/x-wiki * [[Module:Documentation/config]] * [[Module:Documentation/styles.css]] * [[Module:Documentation/doc]] * [[Snið:Upplýsingaskjölun]] 8yny3r5uv54lq37gznevwtnr75awh44 Snið:Babel-X/doc 10 8049 35193 2026-06-14T17:35:30Z MyraMidnight 2947 Upplýsingar um babelsnið í /doc 35193 wikitext text/x-wiki *'''Snið:Babel-X''' – Leyfir 1–100 box. Kóði: <nowiki>{{Babel-X|<box1>|<box2>|<box3>...}}</nowiki> <includeonly> [[Flokkur:Notendakassar]] </includeonly> gsvrkvqza1u75bp12myit392ao2yf4o Notandi:MyraMidnight 2 8050 35195 2026-06-14T17:41:51Z MyraMidnight 2947 Bjó til síðu með „{{Babel|is|en-4|es-1}}“ 35195 wikitext text/x-wiki {{Babel|is|en-4|es-1}} aqazbtyrw68uydso0h14tmsnjwtym1t Module:Demo 828 8051 35196 2026-06-14T22:40:18Z MyraMidnight 2947 Sýnidæmi 35196 Scribunto text/plain local p = {} --creates a frame object that cannot access any of the parent's args --unless a table containing a list keys of not to inherit is provided function disinherit(frame, onlyTheseKeys) local parent = frame:getParent() or frame local orphan = parent:newChild{} orphan.getParent = parent.getParent --returns nil orphan.args = {} if onlyTheseKeys then local family = {parent, frame} for f = 1, 2 do for k, v in pairs(family[f] and family[f].args or {}) do orphan.args[k] = orphan.args[k] or v end end parent.args = mw.clone(orphan.args) setmetatable(orphan.args, nil) for _, k in ipairs(onlyTheseKeys) do rawset(orphan.args, k, nil) end end return orphan, parent end function getSeparator(args, default) local br = tonumber(args.br) and ('<br>'):rep(args.br) or args.br local sep = args.sep or br or default return #sep > 0 and ' ' .. sep .. ' ' or sep end function p.get(frame, arg, passArgs) local orphan, frame = disinherit(frame, passArgs and {arg or 1}) local code = frame.args[arg or 1] or '' if code:match'UNIQ%-%-nowiki' then code = mw.text.unstripNoWiki(code) :gsub('&lt;', '<') :gsub('&gt;', '>') :gsub('&quot;', '"') -- Replace `&#125;%-` with `}-` because of some server quirk leading to -- =mw.text.unstripNoWiki(mw.getCurrentFrame():preprocess('<nowiki>}-</nowiki>')) -- outputting `&#125;-` instead of `}-`, while it's ok with `<nowiki>} -</nowiki>` :gsub('&#125;%-', '}-') -- The same with `-&#123;` :gsub('%-&#123;', '-{') end local kill_categories = frame.args.demo_kill_categories or frame.args.nocat return { source = code, output = orphan:preprocess(code):gsub(kill_categories and '%[%[Flokkur.-%]%]' or '', ''), frame = frame } end function p.main(frame, demoTable) local show = demoTable or p.get(frame) local args = show.frame.args if show[args.result_arg] then return show[args.result_arg] end local yesno = require('Module:Yesno') args.reverse = yesno(args.reverse, false) args.sep = getSeparator(args, '') local source = frame:extensionTag{ name = 'syntaxhighlight', args = { lang = 'wikitext', style = args.style }, content = show.source } return args.reverse and show.output .. args.sep .. source or source .. args.sep .. show.output end -- Alternate function to return an inline result function p.inline(frame, demoTable) local show = demoTable or p.get(frame) local args = show.frame.args if show[args.result_arg] then return show[args.result_arg] end local yesno = require('Module:Yesno') args.reverse = yesno(args.reverse, false) args.sep = getSeparator(args, args.reverse and '←' or '→') local source = frame:extensionTag{ name = 'syntaxhighlight', args = { lang = 'wikitext', inline = true, style = args.style }, content = show.source } return args.reverse and show.output .. args.sep .. source or source .. args.sep .. show.output end --passing of args into other module without preprocessing function p.module(frame) local orphan, frame = disinherit(frame, { 'demo_template', 'demo_module', 'demo_module_func', 'demo_main', 'demo_sep', 'demo_br', 'demo_result_arg', 'demo_kill_categories', 'nocat' }) local template = frame.args.demo_template and 'Snið:'..frame.args.demo_template local demoFunc = frame.args.demo_module_func or 'main\n' local demoModule = require('Module:' .. frame.args.demo_module)[demoFunc:match('^%s*(.-)%s*$')] frame.args.br, frame.args.result_arg = frame.args.demo_sep or frame.args.demo_br, frame.args.demo_result_arg local kill_categories = frame.args.demo_kill_categories or frame.args.nocat if demoModule then local named = {insert = function(self, ...) table.insert(self, ...) return self end} local source = {insert = named.insert, '{{', frame.args.demo_template or frame.args.demo_module, '\n'} if not template then source:insert(2, '#invoke:'):insert(4, '|'):insert(5, demoFunc) end local insertNamed = #source + 1 for k, v in pairs(orphan.args) do local nan, insert = type(k) ~= 'number', {v} local target = nan and named or source target:insert'|' if nan then target:insert(k):insert'=':insert'\n' table.insert(insert, 1, #target) end target:insert(unpack(insert)) local nowiki = v:match('nowiki') if nowiki or v:match('{{.-}}') then orphan.args[k] = frame:preprocess(nowiki and mw.text.unstripNoWiki(v) or v) end end source:insert'}}' table.insert(source, insertNamed, table.concat(named)) return p.main(orphan, { source = table.concat(source), "<>'|=~", output = tostring(demoModule(orphan)):gsub(kill_categories and '%[%[Flokkur.-%]%]' or '', ''), frame = frame }) else return "ERROR: Invalid module function: "..demoFunc end end return p oo4uc4o3xx8wmc45ps409uriftr3b5c Snið:Sýnidæmi 10 8052 35197 2026-06-14T22:42:22Z MyraMidnight 2947 Sýnidæmi 35197 wikitext text/x-wiki {{#invoke:Demo|main}}<noinclude>{{upplýsingaskjölun}}</noinclude> mabfwnlar648wr9rx124hiwxib9gt5b Module:Demo/doc 828 8053 35198 2026-06-14T22:44:18Z MyraMidnight 2947 Bjó til síðu með „* [[Snið:Sýnidæmi]]“ 35198 wikitext text/x-wiki * [[Snið:Sýnidæmi]] 27jtkjz8du2dovdajrzra819nmawef0 Snið:Sýnidæmi/doc 10 8054 35199 2026-06-14T22:47:48Z MyraMidnight 2947 Upplýsingar um sýnidæmi 35199 wikitext text/x-wiki __NOEDITSECTION__ <!--{{Documentation subpage}}{{Lua|Module:Demo}}--> :Nánari upplýsingar um notkun á '''Sýnidæmi''' er hægt að finna á [[w:Template:Demo|Template:Demo]] Þetta er snið sem einfaldlega setur sniðkóðann (eða hvaða kóða sem er) inn í <code><nowiki><syntaxhighlight lang="wikitext">...</syntaxhighlight></nowiki></code> merkingar sem litarkóðar sýniskóðann og setur sýnidæmi af því fyrir neðan. == Notkun með sniðum == <syntaxhighlight lang="wikitext"> {{Sýnidæmi|<nowiki>{{Sniðkóðinn þinn}}</nowiki>}} </syntaxhighlight> {{skilaboð|gerð=alvarlegt|texti=Það verður að nota <code><nowiki><nowiki>...</nowiki></nowiki></code> merkingarnar utan um innihald sýnidæmis, annars getur það valdið villum!}} === Dæmi um villur === <syntaxhighlight lang="wikitext"> {{Sýnidæmi|{{Ambox}}}} </syntaxhighlight> Það framkallar: {{Sýnidæmi|{{Ambox}}}} == Fleirri valmöguleikar == === Bæta stíl === Stíll bætir CSS útliti á <code><nowiki><syntaxhighlight></nowiki></code> kóðakassanum. <syntaxhighlight lang="wikitext">{{Sýnidæmi|style=margin-left:2em;|<nowiki>{{Ambox}}</nowiki>}}</syntaxhighlight> Það framkallar: {{Sýnidæmi|style=margin-left:2em;|<nowiki>{{Ambox}}</nowiki>}} === Bil (e. seperator) === Þú getur breytt hvað er notað á milli sýnikóðans og úttaksins með því að nota <code>sep=</code> breytuna. <syntaxhighlight lang="wikitext">{{Sýnidæmi|sep=Úttak:|<nowiki>{{Ambox}}</nowiki>}}</syntaxhighlight> Það framkallar: {{Sýnidæmi|sep=Úttak:|<nowiki>{{Ambox}}</nowiki>}} Þú gætir notað þetta til að koma sýnidæminu inn í töflu með <code><nowiki>sep=<td></nowiki></code> <syntaxhighlight lang="wikitext"> {|border=1 |{{Sýnidæmi|sep=<td>|<nowiki>{{Ambox}}</nowiki>}} |}</syntaxhighlight> {|border=1 |{{Sýnidæmi|sep=<td>|<nowiki>{{Ambox}}</nowiki>}} |} === Fjarlægja flokka === Fyrir snið sem bæta flokkum þegar það er notað, þá er hægt að fjarlægja flokkana til þess að sýnidæmið sé ekki að flokka neitt. Þá er hægt að nota breyturnar <code>nocat=yes</code> eða <code>demo_kill_categories=yes</code> til að ná fjarlægja flokka. <syntaxhighlight lang="wikitext">{{Sýnidæmi|nocat=yes|<nowiki>{{Eyða|Sýnidæmi um eyðingu sem flokkar ekki}}</nowiki>}}</syntaxhighlight> Það framkallar: {{Sýnidæmi|nocat=yes|<nowiki>{{Eyða|Sýnidæmi um eyðingu sem flokkar ekki}}</nowiki>}} ctvf78v2hxs0lenskkmnpr6owomnlkm