Шаблон:Admin: различия между версиями

imported>San7890
Updates the template to allow for mixing Icons and Ranks to allow for those fancy persons with both a rank in the codebase and an admin rank to be specially denoted. I believe background should be standard with the admin color scheme, and the icon should be the special demarkation of the codebase role.
Полностью удалено содержимое страницы
Метка: очистка
 
(не показаны 3 промежуточные версии 1 участника)
Строка 1: Строка 1:
<span style="{{#switch: {{{Rank}}}
| Maintainer = color: #FFF; background: #31b626;
| Spritetainer = color: #FFF; background: #5ba769;
| Maptainer = color: #FFF; background: #5ba75b;
| AdminObserver = color: #FFF; background: #3498db;
| TrialAdmin = color: #FFF; background: #d05995;
| GameAdmin = color: #FFF; background: #9b59b6;
| AdminTrainer = color: #FFF; background: #9570c0;
| GameMaster = color: #000; background: #d9b733;
| HeadAdmin = color: #000; background: #ffa500;
| HeadCoder = color: #FFF; background: #31b626;
| Host = color: #FFF; background: #A00;
| #default = color: #9b59b6;
}} font-weight: bold; padding: 2px 3px; border-radius: 3px;">
{{#switch: {{{Icon}}}
| Maintainer = [[File:Font Awesome 5 solid code.svg|16px]]
| Spritetainer = [[File:Font Awesome 5 solid pen.svg|16px]]
| Maptainer = [[File:LocationLogo.png|16px]]
| AdminObserver = [[File:Font_Awesome_5_solid_binoculars.svg|16px]]
| TrialAdmin = [[File:Font Awesome 5 solid gavel.svg|16px]]
| GameAdmin = [[File:Font Awesome 5 solid asterisk.svg|16px]]
| AdminTrainer = [[File:Font Awesome 5 solid book-open.svg|16px]]
| GameMaster = [[File:Font Awesome 5 solid dungeon.svg|16px]]
| HeadAdmin = [[File:Font Awesome 5 solid star.svg|16px]]
| HeadCoder = [[File:Font Awesome 5 solid star.svg|16px]]
| Host = [[File:Font Awesome 5 solid server.svg|16px]]
| #default = [[File:Font Awesome 5 solid star.svg|16px]]
}}
{{{Name|No name provided}}}</span> • {{#ifeq: {{{Rank}}} | {{{Icon}}} | {{{Rank|GameAdmin}}} | {{{Rank}}} + {{{Icon}}}}} {{#if: {{{Feedback|}}} | • [{{{Feedback}}} Feedback Thread]}} {{#if: {{{Note|}}} | • ''{{{Note}}}''}}


<noinclude>This template is meant as a way to quickly list an administrator and relevant links.
==Usage==
<pre>{{Admin
|Name=Hornygranny
|Rank=head
|Feedback=https://tgstation13.org/phpBB/viewtopic.php?f=37&t=244}}</pre>
...yields:
{{Admin
|Name=Hornygranny
|Rank=head
|Feedback=https://tgstation13.org/phpBB/viewtopic.php?f=37&t=244}}
<pre>{{Admin
|Name=JoeAdmin
|Rank=GameAdmin
|Icon=GameAdmin
|Feedback=https://tgstation13.org/phpBB/viewtopic.php?f=37&t=244}}</pre>
...yields:
{{Admin
|Name=JoeAdmin
|Rank=GameAdmin
|Icon=GameAdmin
|Feedback=https://tgstation13.org/phpBB/viewtopic.php?f=37&t=244}}
Having a different Icon and Rank is handled by the template itself. If both fields are true like you saw above, the rank will autogenerate to have just that one title. However, if you mix the two like such:
<pre>
{{Admin
|Name=san7890
|Rank=GameMaster
|Icon=Maptainer
|Feedback=https://tgstation13.org/phpBB/viewtopic.php?t=30403
}}</pre>
...yields:
{{Admin
|Name=san7890
|Rank=GameMaster
|Icon=Maptainer
|Feedback=https://tgstation13.org/phpBB/viewtopic.php?t=30403
}}
Note that the Rank field should ''not'' be "GameMaster + Maptainer", the template will automatically generate the rank if the two fields mis-match.
And default rank:
<pre>{{Admin
|Name=Shaps
|Feedback=https://tgstation13.org/phpBB/viewtopic.php?f=37&t=4603}}</pre>
...yields:
{{Admin
|Name=Shaps
|Feedback=https://tgstation13.org/phpBB/viewtopic.php?f=37&t=4603}}
===List of ranks with auto-formatting===
{{Admin
|Name=Maintainer
|Rank=Maintainer
|Icon=Maintainer
}}
{{Admin
|Name=Spritetainer
|Rank=Spritetainer
|Icon=Spritetainer
}}
{{Admin
|Name=Maptainer
|Rank=Maptainer
|Icon=Maptainer
}}
{{Admin
|Name=AdminObserver
|Rank=AdminObserver
|Icon=AdminObserver
}}
{{Admin
|Name=TrialAdmin
|Rank=TrialAdmin
|Icon=TrialAdmin
}}
{{Admin
|Name=GameAdmin
|Rank=GameAdmin
|Icon=GameAdmin
}}
{{Admin
|Name=AdminTrainer
|Rank=AdminTrainer
|Icon=AdminTrainer
}}
{{Admin
|Name=GameMaster
|Rank=GameMaster
|Icon=GameMaster
}}
{{Admin
|Name=HeadAdmin
|Rank=HeadAdmin
|Icon=HeadAdmin
}}
{{Admin
|Name=HeadCoder
|Rank=HeadCoder
|Icon=HeadCoder
}}
{{Admin
|Name=Host
|Rank=Host
|Icon=Host
}}
[[Category:Templates]]
</noinclude>

Текущая версия от 15:23, 14 июля 2026