Template:User page: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(Added frame; See the Template Doc for info)
Line 16: Line 16:


-->
-->
{{#if:{{{frame|}}}|<div style="background:{{{frame bg|{{#switch:{{{theme|}}}| dark = #0a0a0a | #default = #1f1f1f }}}}}; box-shadow:0 5px 10px rgba(0,0,0,.5); border-radius:{{{radius frame cover|{{#switch:{{{style|}}}|1=6px|1em}}}}}; ; display:flow-root; padding:{{{padding frame cover|{{#switch:{{{style|}}}|1=0.5px|1em}}}}}; ">|}}
<div style="display:flex; justify-content:center; align-items:center; height:256px; {{#if:{{{cover gradient|}}}|background-image:{{{cover gradient}}};|}} background-color:{{#switch:{{{theme}}}
<div style="display:flex; justify-content:center; align-items:center; height:256px; {{#if:{{{cover gradient|}}}|background-image:{{{cover gradient}}};|}} background-color:{{#switch:{{{theme}}}
| custom  = {{{theme|}}}
| dark    = #181818
| dark    = #181818
| #default = #404040
| #default = #404040
}}; border-radius:6px; overflow: hidden; user-select:none; position:relative; z-index:1; margin-top:{{#ifeq:{{FULLPAGENAME}}|Template:User page|0|-30px}}"><!--
}}; border-radius:6px; overflow: hidden; user-select:none; position:relative; z-index:1; margin-top:{{#ifeq:{{FULLPAGENAME}}|Template:User page|0|0px}}"><!--
-->{{#if:{{PROTECTIONEXPIRY:edit|File:UserCover-{{PAGENAME}}.png}}
-->{{#if:{{PROTECTIONEXPIRY:edit|File:UserCover-{{PAGENAME}}.png}}
|[[File:UserCover-{{PAGENAME}}.png|link=]]
|[[File:UserCover-{{PAGENAME}}.png|link=]]
Line 26: Line 28:
|{{#if:{{{cover gradient|}}}||<span style="opacity:.6">[[File:Icon-panorama-filled.png|80px|{{User page/strings|AddCover}}|link=File:UserCover-{{ROOTPAGENAME}}.png]]</span>}}}}}}
|{{#if:{{{cover gradient|}}}||<span style="opacity:.6">[[File:Icon-panorama-filled.png|80px|{{User page/strings|AddCover}}|link=File:UserCover-{{ROOTPAGENAME}}.png]]</span>}}}}}}
</div>
</div>
{{#if:{{{frame|}}}|</div>|}}


<div style="display:flex; align-items:center; position:relative; z-index:3; padding: 0 clamp(8px, 2vw, 30px); margin-top:-64px; margin-bottom:20px">
<!-- INFO: the first line centers the frame with the background, the second once centers it without the frame -->
{{#if:{{{frame|}}}|<div style="display:flex; align-items:center; position:relative; z-index:3; padding: 0 clamp(8px, 2vw, 30px); margin-top:-84px; margin-bottom:20px">|<div style="display:flex; align-items:center; position:relative; z-index:3; padding: 0 clamp(8px, 2vw, 30px); margin-top:-94px; margin-bottom:20px">}}
<!-- End of INFO -->
<!--
<!--


Line 33: Line 38:


-->
-->
{{#if:{{{frame|}}}|<div style="background:{{{frame bg|{{#switch:{{{theme|}}}| dark = #0a0a0a | #default = #1f1f1f }}}}}; box-shadow:0 5px 10px rgba(0,0,0,.5); border-radius:{{{radius frame avatar|{{#switch:{{{style|}}}|1=6px|10em}}}}};  display:flow-root; padding:{{{padding frame avatar|{{#switch:{{{style|}}}|1=0.5px|1em}}}}}; ">|}}
<div style="display:flex; justify-content:center; align-items:center; min-width: 128px; width:128px; height:128px; background-color: {{#switch:{{{theme}}}
<div style="display:flex; justify-content:center; align-items:center; min-width: 128px; width:128px; height:128px; background-color: {{#switch:{{{theme}}}
| dark    = #212121
| dark    = #212121
Line 46: Line 54:
|<div style="width:224px; height:224px; transform:scale(.7); display:flex; align-items:center; justify-content:center; overflow:hidden; user-select:none; position:absolute">[[File:UserAvatarFrame{{#switch:{{{event|}}}|xmas=XMAS|}}-{{PAGENAME}}.png|{{Settings|user={{PAGENAME}}|avatar frame size|ifempty=}}|link=]]</div>|}}
|<div style="width:224px; height:224px; transform:scale(.7); display:flex; align-items:center; justify-content:center; overflow:hidden; user-select:none; position:absolute">[[File:UserAvatarFrame{{#switch:{{{event|}}}|xmas=XMAS|}}-{{PAGENAME}}.png|{{Settings|user={{PAGENAME}}|avatar frame size|ifempty=}}|link=]]</div>|}}
</div>
</div>
{{#if:{{{frame|}}}|</div>|}}
<!--
<!--


Line 51: Line 60:


-->
-->
{{#if:{{{frame|}}}|<div style="background:{{{frame bg|{{#switch:{{{theme|}}}| dark = #0a0a0a | #default = #1f1f1f }}}}}; box-shadow:0 5px 10px rgba(0,0,0,.5); border-radius:{{{radius frame username|{{#switch:{{{style|}}}|1=6px|.6em}}}}}; ; display:flow-root; padding:{{{padding frame username|{{#switch:{{{style|}}}|1=0.5px|1em}}}}}; margin:0 16px">|}}
<div style="background-color: {{#switch:{{{theme}}}
<div style="background-color: {{#switch:{{{theme}}}
| dark    = #212121
| dark    = #212121
| #default = #303030
| #default = #303030
}}; border-radius:6px; font-size: 32px; line-height:24px; color: #FFFFFF; padding:10px; margin:0 16px">{{Settings|user={{PAGENAME}}|username|ifempty={{PAGENAME}}}}<span style="user-select:none"></span></div>
}}; border-radius:6px; font-size: 32px; line-height:24px; color: #FFFFFF; padding:10px; margin:0 16px">{{Settings|user={{PAGENAME}}|username|ifempty={{PAGENAME}}}}<span style="user-select:none"></span>
</div>
{{#if:{{{frame|}}}|</div>|}}
<!--
<!--


Line 60: Line 72:


-->
-->
{{#if:{{{frame|}}}|<div style="background:{{{frame buttons|{{#switch:{{{theme|}}}| dark = #0a0a0a | #default = #1f1f1f }}}}}; box-shadow:0 5px 10px rgba(0,0,0,.5); border-radius:{{{radius frame buttons|{{#switch:{{{style|}}}|1=6px|1em}}}}}; ; display:flow-root; padding:{{{padding|{{#switch:{{{style|}}}|1=0.5px|1em}}}}}; margin-left:auto;">|}}
<div style="display:flex; align-items:center; gap:20px; background:{{#switch:{{{theme}}}
<div style="display:flex; align-items:center; gap:20px; background:{{#switch:{{{theme}}}
| dark    = #212121
| dark    = #212121
Line 67: Line 80:
-->[[File:Icon-settings_account_box-outlined.png|24px|link={{#ifexist:{{FULLPAGENAME}}/Settings|{{FULLPAGENAME}}/Settings|{{fullurl:{{FULLPAGENAME}}/Settings|action=edit&preload={{urlencode:Template:User settings page/preload}}}}}}|{{User page/strings|UserSettings}}]]</div>
-->[[File:Icon-settings_account_box-outlined.png|24px|link={{#ifexist:{{FULLPAGENAME}}/Settings|{{FULLPAGENAME}}/Settings|{{fullurl:{{FULLPAGENAME}}/Settings|action=edit&preload={{urlencode:Template:User settings page/preload}}}}}}|{{User page/strings|UserSettings}}]]</div>
</div>
</div>
{{#if:{{{frame|}}}|</div>|}}
<!--
<!--



Revision as of 17:31, 26 March 2024

Todo: 
  • Someday complete work on this template, thereby standardizing non-stylized user pages.
  • This template should become the second {{MultiPage}}, but for user pages.
  • Animated avatar.
Note.pngNote:It's not hard to do.
PlacementTip.pngWorkaround:to make it, you should to upload .gif, like .png/.jpg... But you should to configure them (just renaming format .gif to .png/.jpg not works)
  • The {{{discord}}} parameter should be changed to accept a user link, e.g.: discordapp.com/users/{{{discord}}}
  • Scrolling in {{User page}}
English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Curly brackets white.pngTemplate Documentation [view] [edit]
Icon-translate.png Available doc translations
View
Page history
Icon-translate.png
This template uses a strings subpage
Please follow the format on this subpage(s) to add translations.

This template is intended for use on user pages as a means of standardizing them and making them look better. It will automatically search and attempt to load these images UserAvatar-YOURNAME UserAvatarFrame-YOURNAME or UserCover-YOURNAME. If any of the applicable images are available, then they will replace their correspondent placeholder counterparts.

Another thing to note. If your user page has a subpage called "Achievements", and it has the {{Wikichievements}} template transcluded into it, then this template will detect that and load a box to the right of your userpage titled "Achievements". If you have any achievements defined in {{Wikichievements/Data}} then they will load in the aforementioned box.

Translations

The used strings are on strings subpage. Please follow the format to add translations for them.

Images

Supported formats: JPG, PNG (PNG only for avatar and avatar frame).

Recommended avatar resolution: 128x128 pixels.

Recommended cover resolution: 2560x256 pixels.

Recommended avatar frame resolution: 224x224 pixels.

Copy and Paste

{{User page | website = | facebook = | gamebanana = | github = | gitlab = | patreon = | reddit = | lambdageneration = | soundcloud = | gamemaps = | moddb = | twhl = | gamerlab = | steam = | twitter = | bluesky = | youtube = | twitch = | discord id = }}

Frame style

| align = | frame bg = | frame = | radius frame cover = | radius frame username = | radius frame buttons = | padding frame cover = | padding frame username = | padding frame avatar = | padding frame buttons =

Parameters and Examples

Note.pngNote:All these parameters are optional. For the template to work properly, it is enough to use it without any parameters.

Used Categories

Users

Preview

Add a cover (PNG or JPG)



Add an avatar (PNG or JPG)


User page


User SandboxUser Settings
Add a cover (PNG or JPG)



Add an avatar (PNG or JPG)


User page


User SandboxUser Settings

Frames

Add a cover (PNG or JPG)
Add an avatar (PNG or JPG)
User page
User SandboxUser Settings
Add a cover (PNG or JPG)
Add an avatar (PNG or JPG)
User page
User SandboxUser Settings

Frame Background colors

Add a cover (PNG or JPG)
Add an avatar (PNG or JPG)
User page
User SandboxUser Settings
Add a cover (PNG or JPG)
Add an avatar (PNG or JPG)
User page
User SandboxUser Settings