Template:Language/archives/Page: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly><onlyinclude>{{DISPLAYTITLE:{{{name|{{#if:{{NAMESPACE}}|{{NAMESPACE}}:}}{{#titleparts: {{PAGENAME}} || 2 }}}}}}}<indicator name="Page-Toolbar"><!--
<noinclude>{{APH}}
 
// Wrap the entire template with special tags with certain ids and classes in order for mw-customtoggle to work
 
--><div id="bodyContent" class="mw-body-content" style="user-select:none; pointer-events:none; position:absolute; top:-19px; inset-inline-start:-100vw; width:100vw; height:32px"><div id="mw-content-text" style="display:grid; grid-template-columns:repeat(auto-fill, minmax(clamp((100% / 2) - 1rem, 491px, 100%), 1fr)); justify-items:end; line-height:10px"><!--
 
// Special span for correct template alignment when the site width is less than 982 pixels
 
--><span style="height:2px"></span><!--
 
// The beginning of the block with all the elements (buttons, icons, etc.)
 
--><div style="display:inline-flex; gap:4px; width:max-content">
{{#if:{{{icons|}}}|<div style="pointer-events:auto; display:inline-flex; align-items:center; gap:4px">{{{icons}}}</div><div></div>}}
<div style="pointer-events:auto; display:inline-flex; align-items:center; gap:4px; margin:6px 0">
 
<div style="position:relative; display:flex; justify-content:flex-end">
<div class="mw-customtoggle-Lang-Select-Menu" style="display:inline-flex; gap:4px; align-items:center; line-height:10px; padding:4px; border:1px solid #65635F; border-radius:3px; background:rgba(255 255 255 / 4%)" title="{{String|en=Selected language|ru=Выбранный язык}}">[[File:Flag-{{Pagelang}}.png|link=|16px]]<span>{{ucfirst:{{#language:{{Pagelang}}}}}}</span><span style="font-size:.6em">&#x25BC;</span></div>
 
<div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-Lang-Select-Menu" style="display:none; user-select:text; overflow:hidden; position:absolute; top:24px; z-index:1001; border:1px solid #65635F; border-radius:4px; box-shadow:0 10px 20px rgb(0,0,0,.3); width:max-content"><div style="scrollbar-color:#717171 #2B2B2B; overflow-y:auto; padding:2px 4px; max-height:191px; line-height:16px; background:rgb(56 56 56 / 95%)">
 
<div>[[File:Flag-en.png|link=|16px]] [[en/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:en}}]]</div>
<div>[[File:Flag-ca.png|link=|16px]] [[ca/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:ca}}]]</div>
<div>[[File:Flag-cs.png|link=|16px]] [[cs/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:cs}}]]</div>
<div>[[File:Flag-de.png|link=|16px]] [[de/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:de}}]]</div>
<div>[[File:Flag-el.png|link=|16px]] [[el/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:el}}]]</div>
<div>[[File:Flag-eo.png|link=|16px]] [[eo/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:eo}}]]</div>
<div>[[File:Flag-et.png|link=|16px]] [[et/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:et}}]]</div>
<div>[[File:Flag-fr.png|link=|16px]] [[fr/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:fr}}]]</div>
<div>[[File:Flag-fi.png|link=|16px]] [[fi/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:fi}}]]</div>
<div>[[File:Flag-he.png|link=|16px]] [[he/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:he}}]]</div>
<div>[[File:Flag-hi.png|link=|16px]] [[hi/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:hi}}]]</div>
<div>[[File:Flag-hr.png|link=|16px]] [[hr/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:hr}}]]</div>
<div>[[File:Flag-hu.png|link=|16px]] [[hu/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:hu}}]]</div>
<div>[[File:Flag-it.png|link=|16px]] [[it/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:it}}]]</div>
<div>[[File:Flag-ja.png|link=|16px]] [[ja/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:ja}}]]</div>
<div>[[File:Flag-ka.png|link=|16px]] [[ka/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:ka}}]]</div>
<div>[[File:Flag-km.png|link=|16px]] [[km/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:km}}]]</div>
<div>[[File:Flag-ko.png|link=|16px]] [[ko/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:ko}}]]</div>
<div>[[File:Flag-ms.png|link=|16px]] [[ms/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:ms}}]]</div>
<div>[[File:Flag-nl.png|link=|16px]] [[nl/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:nl}}]]</div>
<div>[[File:Flag-no.png|link=|16px]] [[no/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:no}}]]</div>
<div>[[File:Flag-pl.png|link=|16px]] [[pl/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:pl}}]]</div>
<div>[[File:Flag-pt.png|link=|16px]] [[pt/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:pt}}]]</div>
<div>[[File:Flag-pt-br.png|link=|16px]] [[pt-br/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:pt-br}}]]</div>
<div>[[File:Flag-ru.png|link=|16px]] [[ru/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:ru}}]]</div>
<div>[[File:Flag-es.png|link=|16px]] [[es/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:es}}]]</div>
<div>[[File:Flag-sv.png|link=|16px]] [[sv/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:sv}}]]</div>
<div>[[File:Flag-uk.png|link=|16px]] [[uk/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:uk}}]]</div>
<div>[[File:Flag-tr.png|link=|16px]] [[tr/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:tr}}]]</div>
<div>[[File:Flag-vi.png|link=|16px]] [[vi/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:vi}}]]</div>
<div>[[File:Flag-zh.png|link=|16px]] [[zh/{{#titleparts:{{PAGENAME}}|| 2 }}|{{#language:zh}}]]</div>
<div>[[File:Flag-zh-tw.png|link=|16px]] [[zh-tw/{{#titleparts:{{PAGENAME}} || 2 }}|{{#language:zh-tw}}]]</div>
 
</div></div>
</div>
 
<div style="line-height:13px; border:1px solid #65635F; border-radius:3px; padding:3px 5px; background:rgba(255 255 255 / 4%)">'''[[Special:PrefixIndex/{{FULLPAGENAME}}/|<span style="color:white" title="{{String|en=Subpages|ru=Подстраницы}}">/..</span>]]'''</div>
 
<div style="border:1px solid #65635F; border-radius:3px; padding:3px 4px 3px 3px; background:rgba(255 255 255 / 4%)" title="{{String|en=Purge this Page|ru=Очистить кэш}}">[[File:Icon-deblur.png|link={{fullurl:{{FULLPAGENAME}}}}?action=purge|12px]]</div>
 
</div>
 
</div>
 
</div></div></indicator><span></span></onlyinclude></includeonly>
{{Wip|type=wip2|[[User:Max34|Max34]]|Designed for the new page format.}}
 
{{Todo|1=
☐ Add an icon for the subpage button instead of {{Code|/..}}.
 
☐ Either modify the maintenance templates to make it easier to work with this template, or embed the maintenance templates directly into this template (which will give more options to the maintenance templates).
 
(For copying: ☐ <span style="color:green">☑</span> <span style="color:orange">☑</span>)
}}
 
This template adds a panel at the top of the article (at the header level), which consists of a drop-down list for selecting the language in which the page will be displayed, a button for showing all sub-pages of this page, and a button for Purging the page.
 
== Usage ==
Default template usage.
 
{{Code|<nowiki>{{Page}}</nowiki>}}
 
An area for adding icons or other small elements. Maximum available height: 31 pixels. If the content of this parameter exceeds this height, the entire panel will begin to slide down and the content will begin to overlap the line and below. Preferred icon size: 24 pixels.
 
{{Code|<nowiki>{{Page|icons=[[File:ESRB E10 Rating.png|link=|24px]] [[File:Hl2-16px.png|link=|24px]]}}</nowiki>}}

Latest revision as of 15:59, 8 September 2024

Note.pngNote:Archived page history
Icon-Important.pngImportant:These pages are linked often from page history logs so Special:WhatLinksHere will not show anything.