Template:Player Character: Difference between revisions

Template page
No edit summary
m (testing chaos)
Line 196: Line 196:
{{#if:{{{hexcolor|}}}|
{{#if:{{{hexcolor|}}}|
! style="padding-left: 5px; padding-right: 5px; {{#if:{{{bg_color|}}}|color:#{{PaletteDarkText|{{{bg_color|}}}}}|}}; background-color:#{{#if:{{{bg_color|}}}|{{PaletteDark|{{{bg_color|}}}}}|{{PaletteDark|PC}}}};" {{!}} Color (Hex)
! style="padding-left: 5px; padding-right: 5px; {{#if:{{{bg_color|}}}|color:#{{PaletteDarkText|{{{bg_color|}}}}}|}}; background-color:#{{#if:{{{bg_color|}}}|{{PaletteDark|{{{bg_color|}}}}}|{{PaletteDark|PC}}}};" {{!}} Color (Hex)
{{!}} {{{hexcolor|}}}
{{!}} {{{hexcolor|}}} <input type="text" value="{{{hexcolor|}}}" id="playerCharacterHexColor">
<!-- The button used to copy the text -->
<style>
.tooltip {
  position: relative;
  display: inline-block;
}
 
.tooltip .tooltiptext {
  visibility: hidden;
  width: 140px;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 150%;
  left: 50%;
  margin-left: -75px;
  opacity: 0;
  transition: opacity 0.3s;
}
 
.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #555 transparent transparent transparent;
}
 
.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}
</style>
<div class="tooltip">
<button onclick="getPlayerCharacterHexColor()" onmouseout="outOfToolTipFunc()">
  <span class="tooltiptext" id="playerCharacterToolTip">Copy to clipboard</span>
  Copy BBCode to clipboard
  </button>
</div>
<button onclick="getPlayerCharacterHexColor()">Copy BBCode to clipboard</button>
<script>
function getPlayerCharacterHexColor() {
  var copyText = document.getElementById("playerCharacterHexColor");
  copyText.select();
  copyText.setSelectionRange(0, 99999);
  navigator.clipboard.writeText(copyText.value);
 
  var tooltip = document.getElementById("myTooltip");
  tooltip.innerHTML = "Copied: " + copyText.value;
}
 
function outOfToolTipFunc() {
  var tooltip = document.getElementById("playerCharacterToolTip");
  tooltip.innerHTML = "Copy to clipboard";
}
</script>
{{!}}-
{{!}}-
! style="padding-left: 5px; padding-right: 5px; {{#if:{{{bg_color|}}}|color:#{{PaletteDarkText|{{{bg_color|}}}}}|}}; background-color:#{{#if:{{{bg_color|}}}|{{PaletteDark|{{{bg_color|}}}}}|{{PaletteDark|PC}}}};" {{!}} Color Preview
! style="padding-left: 5px; padding-right: 5px; {{#if:{{{bg_color|}}}|color:#{{PaletteDarkText|{{{bg_color|}}}}}|}}; background-color:#{{#if:{{{bg_color|}}}|{{PaletteDark|{{{bg_color|}}}}}|{{PaletteDark|PC}}}};" {{!}} Color Preview

Revision as of 08:49, 29 November 2021

Player Character
Wiki unknown image grey.png







Usage

{{Player Character
| bg_color            =
| name                =
| image               =
| caption             =
| rpg                 =
| rpgManualLink       =
| type                =

| nicknames           =
| aliases             =
| titles              =

| element             =
| elementManualLink   =
| species             =
| speciesManualLink   =
| gender              =
| genderManualLink    =
| pronouns            =
| sexuality           =

| kanohi              =
| native              =
| mutation            =
| power               =
| family              =
| abilities           =
| disciplines         =
| weapon              =
| appearance          =

| alignment           =
| alignmentManualLink =
| likes               =
| hates               =

| faction             =
| guild               =
| group               =
| affiliation         =
| allegiance          =
| occupations         =
| rank                =

| status              =
| creator             =
| pronunciation       =
| hexcolor            = 
}}

The only required parameter is the name. Any others which are unknown or inapplicable should be left blank. Fields marked with "Unknown" blank automatically.

The parameters `rpg`, `species`, `gender`, `alignment`, and `element` will automatically add the character to the respective categories and create a link to the pages for each, so DO NOT make a link with `[[ ]]` when inputting these parameters. That will be done automatically.

If you want to make a custom link and/or not auto-categorize, use the `rpgManualLink` and so on. `rpg` will still be used for auto-categorization, but `rpgManualLink` will be displayed in the infobox, so mix and match to your leisure