
<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ain">
	<id>https://wiki.aynu.org:443/index.php?action=history&amp;feed=atom&amp;title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB%3ANavbar</id>
	<title>モジュール:Navbar - werson huskoanpe</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.aynu.org:443/index.php?action=history&amp;feed=atom&amp;title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB%3ANavbar"/>
	<link rel="alternate" type="text/html" href="https://wiki.aynu.org:443/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:Navbar&amp;action=history"/>
	<updated>2026-04-11T19:20:35Z</updated>
	<subtitle>Tan wikiの tan sosに関する変更huskoanpe</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.aynu.org:443/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:Navbar&amp;diff=168&amp;oldid=prev</id>
		<title>Mkpoli: 1版 をインポートしました</title>
		<link rel="alternate" type="text/html" href="https://wiki.aynu.org:443/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:Navbar&amp;diff=168&amp;oldid=prev"/>
		<updated>2024-03-04T04:39:18Z</updated>

		<summary type="html">&lt;p&gt;1版 をインポートしました&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ain&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 古いwerson&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2024 ppm 3 2024-03-04T13:39:18+00:00up 4 312024 (Kun.) 13:39時点におけるwerson&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ain&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(相違点なし)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Mkpoli</name></author>
	</entry>
	<entry>
		<id>https://wiki.aynu.org:443/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:Navbar&amp;diff=167&amp;oldid=prev</id>
		<title>wpja&gt;Dragoniez: モジュール:Navbar/sandboxの2023-08-15T08:37:29Z版より複製 (スクリプトによる) : WP:AN/PE</title>
		<link rel="alternate" type="text/html" href="https://wiki.aynu.org:443/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:Navbar&amp;diff=167&amp;oldid=prev"/>
		<updated>2023-09-01T04:36:01Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:Navbar/sandbox&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;“モジュール:Navbar/sandbox” (存在しないsos)&quot;&gt;モジュール:Navbar/sandbox&lt;/a&gt;の&lt;a href=&quot;/index.php?title=%E7%89%B9%E5%88%A5:%E5%9B%BA%E5%AE%9A%E3%83%AA%E3%83%B3%E3%82%AF/96555944&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;“特別:固定リンク/96555944” (存在しないsos)&quot;&gt;2023-08-15T08:37:29Z版&lt;/a&gt;より複製 (&lt;a href=&quot;/index.php?title=H:FAP&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;“H:FAP” (存在しないsos)&quot;&gt;スクリプト&lt;/a&gt;による) : &lt;a href=&quot;/wiki/Sisakpe:%E5%9B%BA%E5%AE%9A%E3%83%AA%E3%83%B3%E3%82%AF/96767457#Template:Tnavbar関連_20230831&quot; title=&quot;Sisakpe:固定リンク/96767457&quot;&gt;WP:AN/PE&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Asir sos&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
local cfg = mw.loadData('Module:Navbar/configuration')&lt;br /&gt;
&lt;br /&gt;
local function get_title_arg(is_collapsible, template)&lt;br /&gt;
	local title_arg = 1&lt;br /&gt;
	if is_collapsible then title_arg = 2 end&lt;br /&gt;
	if template then title_arg = 'template' end&lt;br /&gt;
	return title_arg&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function choose_links(template, args)&lt;br /&gt;
	-- The show table indicates the default displayed items.&lt;br /&gt;
	-- view, talk, edit, hist, move, watch&lt;br /&gt;
	-- TODO: Move to configuration.&lt;br /&gt;
	-- 日本語版独自の変更あり&lt;br /&gt;
	local show = {true, true, true, true, false, false}	--4番目(hist)をfalseからtrueに変更&lt;br /&gt;
	if template or args.viewplain then&lt;br /&gt;
		show = {true, false, false, false, false, false}&lt;br /&gt;
	end&lt;br /&gt;
	if template then&lt;br /&gt;
		local index = {t = 2, d = 2, e = 3, h = 4, m = 5, w = 6,&lt;br /&gt;
			talk = 2, edit = 3, hist = 4, move = 5, watch = 6}&lt;br /&gt;
		-- TODO: Consider removing TableTools dependency.&lt;br /&gt;
		for _, v in ipairs(require ('Module:TableTools').compressSparseArray(args)) do&lt;br /&gt;
			local num = index[v]&lt;br /&gt;
			if num then show[num] = true end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local remove_edit_link = args.noedit&lt;br /&gt;
	if remove_edit_link then show[3] = false end&lt;br /&gt;
	&lt;br /&gt;
	return show&lt;br /&gt;
	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function add_link(link_description, ul, is_mini, font_style)&lt;br /&gt;
	local l&lt;br /&gt;
	if link_description.url then&lt;br /&gt;
		l = {'[', '', ']'}&lt;br /&gt;
	else&lt;br /&gt;
		l = {'[[', '|', ']]'}&lt;br /&gt;
	end&lt;br /&gt;
	ul:tag('li')&lt;br /&gt;
		:addClass('nv-' .. link_description.html_class)	--日本語版独自: fullをhtml_classに置き換え&lt;br /&gt;
		:wikitext(l[1] .. link_description.link .. l[2])&lt;br /&gt;
		:tag(is_mini and 'abbr' or 'span')&lt;br /&gt;
			:attr('title', link_description.html_title)&lt;br /&gt;
			:cssText(font_style)&lt;br /&gt;
			:wikitext(is_mini and link_description.mini or link_description.full)&lt;br /&gt;
			:done()&lt;br /&gt;
		:wikitext(l[3])&lt;br /&gt;
		:done()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function make_list(title_text, has_brackets, displayed_links, is_mini, font_style)&lt;br /&gt;
	&lt;br /&gt;
	local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace)&lt;br /&gt;
	if not title then&lt;br /&gt;
		error(cfg.invalid_title .. title_text)&lt;br /&gt;
	end&lt;br /&gt;
	local talkpage = title.talkPageTitle and title.talkPageTitle.fullText or ''&lt;br /&gt;
	&lt;br /&gt;
	-- TODO: Get link_descriptions and show into the configuration module.&lt;br /&gt;
	-- link_descriptions should be easier...&lt;br /&gt;
	-- 日本語版独自: html_classフィールド&lt;br /&gt;
	local link_descriptions = {&lt;br /&gt;
		{ ['mini'] = '表', ['full'] = '表示', ['html_title'] = '参照先のページを表示します。',&lt;br /&gt;
			['html_class'] = 'view', ['link'] = title.fullText, ['url'] = false },&lt;br /&gt;
		{ ['mini'] = '話', ['full'] = 'ノート', ['html_title'] = '参照先のノートを表示します。',&lt;br /&gt;
			['html_class'] = 'talk', ['link'] = talkpage, ['url'] = false },&lt;br /&gt;
		{ ['mini'] = '編', ['full'] = '編集', ['html_title'] = '参照先のページを編集します。',&lt;br /&gt;
			['html_class'] = 'edit', ['link'] = title:fullUrl('action=edit'), ['url'] = true },&lt;br /&gt;
		{ ['mini'] = '歴', ['full'] = '履歴', ['html_title'] = '参照先のページの履歴を表示します。',&lt;br /&gt;
			['html_class'] = 'hist', ['link'] = title:fullUrl('action=history'), ['url'] = true },&lt;br /&gt;
		{ ['mini'] = '移', ['full'] = '移動', ['html_title'] = '参照先のページを移動します。',&lt;br /&gt;
			['html_class'] = 'move', ['link'] = mw.title.new('Special:Movepage'):fullUrl('target='..title.fullText:gsub(' ', '_')), ['url'] = true },	-- [[:en:Special:Diff/1132325259]]&lt;br /&gt;
		{ ['mini'] = 'ウ', ['full'] = 'ウォッチ', ['html_title'] = '参照先のページをウォッチリストに入れます。', &lt;br /&gt;
			['html_class'] = 'watch', ['link'] = title:fullUrl('action=watch'), ['url'] = true }&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	local ul = mw.html.create('ul')&lt;br /&gt;
	if has_brackets then&lt;br /&gt;
		ul:addClass(cfg.classes.brackets)&lt;br /&gt;
			:cssText(font_style)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	for i, _ in ipairs(displayed_links) do&lt;br /&gt;
		if displayed_links[i] then add_link(link_descriptions[i], ul, is_mini, font_style) end&lt;br /&gt;
	end&lt;br /&gt;
	return ul:done()&lt;br /&gt;
	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._navbar(args)&lt;br /&gt;
	&lt;br /&gt;
	-- TODO: We probably don't need both fontstyle and fontcolor...&lt;br /&gt;
	local font_style = args.fontstyle&lt;br /&gt;
	local font_color = args.fontcolor&lt;br /&gt;
	local is_collapsible = args.collapsible&lt;br /&gt;
	local is_mini = args.mini&lt;br /&gt;
	local is_plain = args.plain or args.viewplain	-- 日本語版独自: 暫定的にviewplainを条件式に含める&lt;br /&gt;
	&lt;br /&gt;
	local collapsible_class = nil&lt;br /&gt;
	if is_collapsible then&lt;br /&gt;
		collapsible_class = cfg.classes.collapsible&lt;br /&gt;
		if not is_plain then is_mini = 1 end&lt;br /&gt;
		if font_color then&lt;br /&gt;
			font_style = (font_style or '') .. '; color: ' .. font_color .. ';'&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local navbar_style = args.style&lt;br /&gt;
	local div = mw.html.create():tag('div')&lt;br /&gt;
	div&lt;br /&gt;
		:addClass(cfg.classes.navbar)&lt;br /&gt;
		:addClass(cfg.classes.plainlinks)&lt;br /&gt;
		:addClass(cfg.classes.horizontal_list)&lt;br /&gt;
		:addClass(collapsible_class) -- we made the determination earlier&lt;br /&gt;
		:cssText(navbar_style)&lt;br /&gt;
&lt;br /&gt;
	if is_mini then div:addClass(cfg.classes.mini) end&lt;br /&gt;
&lt;br /&gt;
	local box_text = (args.text or cfg.box_text) .. ' '&lt;br /&gt;
	 -- the concatenated space guarantees the box text is separated&lt;br /&gt;
	if not (is_mini or is_plain) then&lt;br /&gt;
		div&lt;br /&gt;
			:tag('span')&lt;br /&gt;
				:addClass(cfg.classes.box_text)&lt;br /&gt;
				:cssText(font_style)&lt;br /&gt;
				:wikitext(box_text)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local template = args.template&lt;br /&gt;
	local displayed_links = choose_links(template, args)&lt;br /&gt;
	local has_brackets = args.brackets&lt;br /&gt;
	local title_arg = get_title_arg(is_collapsible, template)&lt;br /&gt;
	local title_text = args[title_arg] or (':' .. mw.getCurrentFrame():getParent():getTitle())&lt;br /&gt;
	local list = make_list(title_text, has_brackets, displayed_links, is_mini, font_style)&lt;br /&gt;
	div:node(list)&lt;br /&gt;
&lt;br /&gt;
	if is_collapsible then&lt;br /&gt;
		local title_text_class&lt;br /&gt;
		if is_mini then&lt;br /&gt;
			title_text_class = cfg.classes.collapsible_title_mini&lt;br /&gt;
		else&lt;br /&gt;
			title_text_class = cfg.classes.collapsible_title_full&lt;br /&gt;
		end&lt;br /&gt;
		div:done()&lt;br /&gt;
			:tag('div')&lt;br /&gt;
			:addClass(title_text_class)&lt;br /&gt;
			:cssText(font_style)&lt;br /&gt;
			:wikitext(args[1])&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local frame = mw.getCurrentFrame()&lt;br /&gt;
	-- hlist -&amp;gt; navbar is best-effort to preserve old Common.css ordering.&lt;br /&gt;
	return frame:extensionTag{&lt;br /&gt;
		name = 'templatestyles', args = { src = cfg.hlist_templatestyles }&lt;br /&gt;
	} .. frame:extensionTag{&lt;br /&gt;
		name = 'templatestyles', args = { src = cfg.templatestyles }&lt;br /&gt;
	} .. tostring(div:done())&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.navbar(frame)&lt;br /&gt;
	return p._navbar(require('Module:Arguments').getArgs(frame))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>wpja&gt;Dragoniez</name></author>
	</entry>
</feed>