325 captures
12 Apr 2013 - 21 Jan 2026
Aug SEP Oct
06
2014 2015 2016
success
fail

About this capture

COLLECTED BY

Organization: Internet Archive

The Internet Archive discovers and captures web pages through many different web crawls. At any given time several distinct crawls are running, some for months, and some every day or longer. View the web archive through the Wayback Machine.

Collection: Wide Crawl Number 13

Web Wide Crawl Number 13
TIMESTAMPS

The Wayback Machine - http://web.archive.org/web/20150906001334/https://en.wikipedia.org/wiki/Module:Navbar
 





Permanently protected module

Module:Navbar



From Wikipedia, the free encyclopedia


Jump to: navigation, search  

Documentation icon Module documentation[view] [edit] [history] [purge]

This is a Lua implementation of {{navbar}}. It is used in Module:Navbox.

local p = {}

local getArgs

function p._navbar(args)
 local titleArg = 1

 if args.collapsible then
  titleArg = 2
  if not args.plain then
   args.mini = 1
  end
  if args.fontcolor then
   args.fontstyle = 'color:' .. args.fontcolor .. ';'
  end
  args.style = 'float:left; text-align:left; width:6em;'
 end

 local titleText = args[titleArg] or (':' .. mw.getCurrentFrame():getParent():getTitle())
 local title = mw.title.new(mw.text.trim(titleText), 'Template');

 if not title then
  error('Invalid title ' .. titleText)
 end

 local talkpage = title.talkPageTitle and title.talkPageTitle.fullText or '';

 local div = mw.html.create():tag('div')
 div
  :addClass('plainlinks')
  :addClass('hlist')
  :addClass('navbar')
  :cssText(args.style)

 if args.mini then div:addClass('mini') end

 if not (args.mini or args.plain) then
  div
   :tag('span')
    :css('word-spacing', 0)
    :cssText(args.fontstyle)
    :wikitext(args.text or 'This box:')
    :wikitext(' ')
 end

 if args.brackets then
  div
   :tag('span')
    :css('margin-right', '-0.125em')
    :cssText(args.fontstyle)
    :wikitext('[')
    :newline();
 end

 local ul = div:tag('ul');

 ul
  :tag('li')
   :addClass('nv-view')
   :wikitext('[[' .. title.fullText .. '|')
   :tag('span')
    :attr('title', 'View this template')
    :cssText(args.fontstyle)
    :wikitext(args.mini and 'v' or 'view')
    :done()
   :wikitext(']]')
   :done()
  :tag('li')
   :addClass('nv-talk')
   :wikitext('[[' .. talkpage .. '|')
   :tag('span')
    :attr('title', 'Discuss this template')
    :cssText(args.fontstyle)
    :wikitext(args.mini and 't' or 'talk')
    :done()
   :wikitext(']]');

 if not args.noedit then
  ul
   :tag('li')
    :addClass('nv-edit')
    :wikitext('[' .. title:fullUrl('action=edit') .. ' ')
    :tag('span')
     :attr('title', 'Edit this template')
     :cssText(args.fontstyle)
     :wikitext(args.mini and 'e' or 'edit')
     :done()
    :wikitext(']');
 end

 if args.brackets then
  div
   :tag('span')
    :css('margin-left', '-0.125em')
    :cssText(args.fontstyle)
    :wikitext(']')
    :newline();
 end

 if args.collapsible then
  div
   :done()
  :tag('span')
   :css('font-size', '110%')
   :cssText(args.fontstyle)
   :wikitext(args[1])
 end

 return tostring(div:done())
end

function p.navbar(frame)
 if not getArgs then
  getArgs = require('Module:Arguments').getArgs
 end
 return p._navbar(getArgs(frame))
end

return p
Retrieved from "https://en.wikipedia.org/w/index.php?title=Module:Navbar&oldid=636080316" 

Categories: 
Modules subject to page protection
Hidden categories: 
Wikipedia protected modules




Navigation menu



Personal tools



Create account
Log in
 



Namespaces



Module

Talk
 


Variants  









Views



Read

View source

View history
 


More







 







Navigation




Main page
Contents
Featured content
Current events
Random article
Donate to Wikipedia
Wikipedia store
 



Interaction




Help
About Wikipedia
Community portal
Recent changes
Contact page
 



Tools




What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Wikidata item
 



Languages




Afrikaans
العربية
Asturianu
Azərbaycanca

Bân-lâm-gú
Basa Banyumasan
Беларуская
Беларуская (тарашкевіца)

Bikol Central
Български
Bosanski
Català
Cebuano
ChiShona
Cymraeg
Dansk
Eesti
Ελληνικά
Euskara
فارسی
Fiji Hindi
Føroyskt
Galego

/Hak-kâ-ngî

Hawai`i
Հայերեն
ि
Ido
Ilokano
Bahasa Indonesia
Íslenska
Basa Jawa

Kiswahili
Kongo
Latgaļu
Latviešu
Magyar

مصرى

ि
Македонски

Bahasa Melayu
Baso Minangkabau
Монгол


Norsk bokmål
Norsk nynorsk
ି

پنجابی
Português
Română
Саха тыла
Scots

Slovenčina
Slovenščina
کوردیی ناوەندی
Српски / srpski
Srpskohrvatski / српскохрватски
Suomi
Tagalog
ி
Татарча/tatarça

Українська
اردو
Tiếng Vit


Yorùbá

Zazaki

 

Edit links
 






This page was last modified on 30 November 2014, at 21:51.

Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.
 


Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Developers

Mobile view
 


Wikimedia Foundation
Powered by MediaWiki