Modul:Breadcrumb: Unterschied zwischen den Versionen
Aus Stadtsprachen
Nöth (Diskussion | Beiträge) Die Seite wurde neu angelegt: „local p = {} function p.breadcrumb(frame) local args = frame.args local categoryLink = args["CategoryLink"] or "" local categoryName = args["CategoryName"] or "" local pageName = args["PAGENAME"] or "" local html = [[ <div aria-label="breadcrumb"> <ol class="breadcrumb bg-transparent p-0 m-0 d-flex align-items-center" style="list-style: none;"> <li class="breadcrumb-item d-flex align-items-center border-0 p-0"> <a href="/…“ |
Nöth (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
||
| Zeile 7: | Zeile 7: | ||
local pageName = args["PAGENAME"] or "" | local pageName = args["PAGENAME"] or "" | ||
local html = [[ | local html = [[<html> | ||
<div aria-label="breadcrumb"> | <div aria-label="breadcrumb"> | ||
<ol class="breadcrumb bg-transparent p-0 m-0 d-flex align-items-center" style="list-style: none;"> | <ol class="breadcrumb bg-transparent p-0 m-0 d-flex align-items-center" style="list-style: none;"> | ||
| Zeile 31: | Zeile 31: | ||
</li> | </li> | ||
</ol> | </ol> | ||
</div> | </div></html> | ||
]] | ]] | ||
Version vom 5. November 2024, 09:05 Uhr
Die Dokumentation für dieses Modul kann unter Modul:Breadcrumb/Doku erstellt werden
local p = {}
function p.breadcrumb(frame)
local args = frame.args
local categoryLink = args["CategoryLink"] or ""
local categoryName = args["CategoryName"] or ""
local pageName = args["PAGENAME"] or ""
local html = [[<html>
<div aria-label="breadcrumb">
<ol class="breadcrumb bg-transparent p-0 m-0 d-flex align-items-center" style="list-style: none;">
<li class="breadcrumb-item d-flex align-items-center border-0 p-0">
<a href="/Hauptseite" class="text-secondary d-flex align-items-center" style="text-decoration: none; font-size: 0.875rem;">
<svg style="width: 0.75rem; height: 0.75rem;" class="mr-2" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
<path d="m19.707 9.293-2-2-7-7a1 1 0 0 0-1.414 0l-7 7-2 2a1 1 0 0 0 1.414 1.414L2 10.414V18a2 2 0 0 0 2 2h3a1 1 0 0 0 1-1v-4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v4a1 1 0 0 0 1 1h3a2 2 0 0 0 2-2v-7.586l.293.293a1 1 0 0 0 1.414-1.414Z"/>
</svg>
Hauptseite
</a>
</li>
<li class="breadcrumb-item d-flex align-items-center border-0 p-0">
<svg style="width: 0.75rem; height: 0.75rem; margin: 0 0.5rem;" class="text-muted" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 6 10">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 9 4-4-4-4"/>
</svg>
<a href="]] .. categoryLink .. [[" class="text-secondary" style="text-decoration: none; font-size: 0.875rem;">]] .. categoryName .. [[</a>
</li>
<li class="breadcrumb-item d-flex align-items-center border-0 p-0" aria-current="page">
<svg style="width: 0.75rem; height: 0.75rem; margin: 0 0.5rem;" class="text-muted" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 6 10">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 9 4-4-4-4"/>
</svg>
<span class="text-muted" style="font-size: 0.875rem;">]] .. pageName .. [[</span>
</li>
</ol>
</div></html>
]]
return html
end
return p