Modul:Vorlage:Auflistung: Unterschied zwischen den Versionen

2020-11-03
(2020-11-02)
(2020-11-03)
Zeile 1: Zeile 1:
local HorizontalList = { suite  = "HorizontalList",
local HorizontalList = { suite  = "HorizontalList",
                         serial = "2020-11-02",
                         serial = "2020-11-03",
                         item  = 100938243 }
                         item  = 100938243 }
--[=[
--[=[
Zeile 15: Zeile 15:




HorizontalList.f = function ( all, ahead, altogether, apart, frame )
HorizontalList.f = function ( all, ahead, altogether, access, alien,
                              apart, frame )
     -- Generate horizontal list from wikitext
     -- Generate horizontal list from wikitext
     -- Parameter:
     -- Parameter:
Zeile 22: Zeile 23:
     --    ahead        -- string, to prefix if desired
     --    ahead        -- string, to prefix if desired
     --    altogether  -- true, if nowrap around each regular item
     --    altogether  -- true, if nowrap around each regular item
    --    access      -- string, with fragment, if desired
    --    alien        -- string, with language code, if desired
     --    apart        -- string, with separator, if desired
     --    apart        -- string, with separator, if desired
     --    frame        -- object, if available
     --    frame        -- object, if available
Zeile 54: Zeile 57:
                                         start,
                                         start,
                                         altogether,
                                         altogether,
                                        access,
                                        alien,
                                         apart,
                                         apart,
                                         frame )
                                         frame )
Zeile 72: Zeile 77:




HorizontalList.fiat = function ( all, advance, ahead,
HorizontalList.fiat = function ( all, advance, ahead, altogether,
                                 altogether, apart, frame )
                                 access, alien, apart, frame )
     -- Generate horizontal list from item sequence
     -- Generate horizontal list from item sequence
     -- Parameter:
     -- Parameter:
Zeile 81: Zeile 86:
     --    advance      -- true, if ordered list requested
     --    advance      -- true, if ordered list requested
     --    altogether  -- true, if nowrap around each item
     --    altogether  -- true, if nowrap around each item
    --    access      -- string, with fragment, if desired
    --    alien        -- string, with language code, if desired
     --    apart        -- string, with separator, if desired
     --    apart        -- string, with separator, if desired
     --    frame        -- object, if available
     --    frame        -- object, if available
Zeile 98: Zeile 105:
                 ou:addClass( v )
                 ou:addClass( v )
             end -- for k, v
             end -- for k, v
            if CSS.style then
                ou:cssText( CSS.style )
            end
            if CSS.css then
                ou:css( CSS.css )
            end
            if type( access ) == "string" then
                s = mw.text.trim( access )
                if s ~= "" then
                    ou:attr( "id", s )
                end
            end
            if alien then
                s = mw.text.trim( alien )
                if s ~= "" then
                    ou:attr( "lang", s )
                end
            end
             if type( apart ) == "string" then
             if type( apart ) == "string" then
                 es = mw.html.create( "span" )
                 es = mw.html.create( "span" )
Zeile 219: Zeile 244:
         if s  and  s:match( ".+:.+%.css$") then
         if s  and  s:match( ".+:.+%.css$") then
             CSS.styles = s
             CSS.styles = s
        end
        val = arglist.style
        s  = type( val )
        if s == "string" then
            s = mw.text.trim( val )
            if s ~= "" then
                CSS.style = s
            end
        elseif s == "table" then
            CSS.css = val
         end
         end
     end
     end
Zeile 291: Zeile 326:
                             classesBlock  = frame.args.classesBlock,
                             classesBlock  = frame.args.classesBlock,
                             classesPrefix = frame.args.classesPrefix,
                             classesPrefix = frame.args.classesPrefix,
                             classesSep    = frame.args.classesSep } )
                             classesSep    = frame.args.classesSep,
                            style        = frame.args.style } )
     return HorizontalList.f( frame.args[ 1 ],
     return HorizontalList.f( frame.args[ 1 ],
                             frame.args.prefix,
                             frame.args.prefix,
                             frame.args.nowrap == "1",
                             frame.args.nowrap == "1",
                            frame.args.id,
                            frame.args.lang,
                             frame.args.sep,
                             frame.args.sep,
                             frame )
                             frame )
Anonymer Benutzer