This is a documentation for Board Game Arena: play board games online !

Wiki formatting:修订间差异

来自Board Game Arena
跳到导航 跳到搜索
→‎目的
(Seems to experiencing some bugs. I'd just change them back to English and see how to fix them.)
第962行: 第962行:
}}
}}


==Wiki模板==
==Wiki templates==


'''[https://www.mediawiki.org/wiki/Help:Templates Help:Templates]'''
'''[https://www.mediawiki.org/wiki/Help:Templates Help:Templates]'''


===信息框===
===[[:Template:InfoBox]]===
[[:Template:InfoBox]]


Customisable container(s) responsive to screen size.
Customisable container(s) responsive to screen size.
第975行: 第974行:
}}
}}
----
----
===自定义图标===
===Create your own icons===


{{infoBox |maxWidth= |color=#37c |titleAlign=left
{{infoBox |maxWidth= |color=#37c |titleAlign=left
第1,010行: 第1,009行:
See '''[[:Template:GameIcon#Examples|Examples]]'''
See '''[[:Template:GameIcon#Examples|Examples]]'''


===预设图标===
===[[:Category:GameIconTemplates]]===
[[:Category:GameIconTemplates]]


<div style="display:flex;flex-wrap:wrap;align-items:start;gap:0.5rem">
<div style="display:flex;flex-wrap:wrap;align-items:start;gap:0.5rem">
第1,102行: 第1,100行:
</div>
</div>
----
----
===预设卡牌===
===[[:Category:Card_templates]]===
[[:Category:Card_templates]]


<div style="display:flex;flex-wrap:wrap;align-items:start;gap:0.5rem">
<div style="display:flex;flex-wrap:wrap;align-items:start;gap:0.5rem">
第1,183行: 第1,180行:
</div>
</div>
----
----
===预设棋盘===
===[[:Category:GameBoardTemplates]]===
[[:Category:GameBoardTemplates]]


<div style="display:flex;flex-flow:row wrap;align-items:center;gap:0.5rem;">
<div style="display:flex;flex-flow:row wrap;align-items:center;gap:0.5rem;">

2024年3月13日 (三) 06:58的版本

目的

本页面的英文版是根据Wiki style guide 论坛帖子整合。中文版本则是完全按当前英文版进行翻译。

译按:貌似有个InfoBox的bug。可能有部分格式不适用中文wiki,这样的话本页内容也不能照着翻译……我研究下(可能会鸽)

大多数wiki (doc.BoardGameArena.com) 的格式在BoardGameArena.com上不会被保留,但是有一些解决方法。 这个页面是一些非官方的技巧集合,关于如何让wiki页面在游戏中和游戏面板上显示得更好。

请随意添加额外的问题、建议和Wiki模板 🙂

Help:Formatting

注意:Wiki页面的更改在BoardGameArena.com每日更新一次

语言

Wiki页面的内容显示顺位为:

  1. 用户language(如有)
  2. 英文(如有)

举例:一位简体中文用户在浏览Carddiceo的游戏简规时会显示英文规则en.doc.boardgamearena.com/Gamehelpcardiceo),因为中文(zh-cn.doc.boardgamearena.com/Gamehelpcardiceo)页面尚未被创建。 用户可以在已有的规则页面看到“编辑(Edit)”按钮,而尚未创建的页面会是“创建本页面(Create Page)”按钮。

Bug上报

列表项

Help:Lists

已知问题

common.css rules
li {
    list-style: none; /*removes list markers*/
}

li, ul {
    margin: 0; /*removes margin before and after lists*/
    padding: 0; /*removes list indentation*/
}

blockquote, body, code, dd, div, dl, dt, fieldset, form, h1, h2, h3, h4, h5, h6, input, legend, li, ol, p, pre, td, textarea, th, ul {
    margin: 0; /*removes inline and block margins*/
    padding: 0; /*removes list indentation*/
}

标记 (子弹点*、序号#)、 边距内边距BoardGameArena.com中不会被显示。

Bug上报

解决方法

  1. Use static markers (,-,1.).
  2. Replace with HTML + CSS.
common.css rules
ul.bulletlist li {
    list-style: disc none inside
}

.wikicontent p {
    margin-bottom: 8px;
    margin-top: 8px
}
Bullet lists
Wiki vs BoardGameArena.com list formatting
Wiki text Wiki BGA
Dynamic

marker¹ *

* A
* B
* C
  • A
  • B
  • C
  • A
  • B
  • C
Dynamic¹ +

static marker

*- A
*- B
*- C
  • - A
  • - B
  • - C
  • - A
  • - B
  • - C
static marker +

line breaks²


- A

- B

- C

- A

- B

- C

- A

- B

- C

HTML + CSS
<ul class="bulletlist" style="
    margin:1em 0;
    padding-inline-start:40px;
">
    <li>A</li>
    <li>B</li>
    <li>C</li>
</ul>
  • A
  • B
  • C
  • A
  • B
  • C
Numbered lists
Wiki vs BoardGameArena.com list formatting
Wiki text Wiki BGA
Dynamic

marker¹ #

# A
# B
# C
  1. A
  2. B
  3. C
  1. A
  2. B
  3. C
Dynamic¹ +

static marker

# 1. A
# 2. B
# 3. C
  1. 1. A
  2. 2. B
  3. 3. C
  1. 1. A
  2. 2. B
  3. 3. C
static marker +

line breaks²


1. A

2. B

3. C

1. A

2. B

3. C

1. A

2. B

3. C

HTML + CSS
<ol style="
    margin:1em 0;
    padding-inline-start:40px;
">
    <li style="list-style-type:decimal;">A</li>
    <li style="list-style-type:decimal;">B</li>
    <li style="list-style-type:decimal;">C</li>
</ol>
  1. A
  2. B
  3. C
  1. A
  2. B
  3. C
Definition lists
Wiki vs BoardGameArena.com list formatting
Wiki text Wiki BGA
Dynamic

marker¹ ; :

;A term: A detail
;B term: B detail
;C term: C detail
A term
A detail
B term
B detail
C term
C detail
A term
A detail
B term
B detail
C term
C detail
Dynamic¹ +

static marker

;'''A term''': A detail
;'''B term''': B detail
;'''C term''': C detail
A term
A detail
B term
B detail
C term
C detail
A term
A detail
B term
B detail
C term
C detail
static marker +

line breaks²


'''A term''': A detail

'''B term''': B detail

'''C term''': C detail

A term: A detail

B term: B detail

C term: C detail

A term: A detail

B term: B detail

C term: C detail

HTML + CSS
<dl>
 <dt><b>A term</b></dt>
  <dd style="margin-inline-start:1.6em;">A detail</dd>
 <dt><b>B term</b></dt>
  <dd style="margin-inline-start:1.6em;">B detail</dd>
 <dt><b>C term</b></dt>
  <dd style="margin-inline-start:1.6em;">C detail</dd>
</dl>
A term
A detail
B term
B detail
C term
C detail
A term
A detail
B term
B detail
C term
C detail

¹Dynamic markers generate HTML list structure.

²Without dynamic markers, <p>paragraphs</p> are generated which require line breaks before and after the "list" to prevent merging into surrounding paragraphs.

标题

Level 1 (h1) headings are the title of the page e.g. = Wiki formatting =, = Gamehelp[name] =, = Tips_[name] =.

已知问题

  1. In-game h2 and h3 headings are visually indistinguishable.
  2. In-game h3 headings overlap text from the previous section.
  3. h5 headings and below are visually indistinguishable from body text.
  4. Inconsistency between in-game and game panel headings.

Bug上报

解决方法

Since in-game h3 headings became indistinguishable from h2 headings:

  • Change h3 to h4 headings.
  • Use additional line breaks before h3 headings.
Wiki vs BoardGameArena.com heading formatting
Wiki text Wiki BGA game panel BGA in-game
h2
* List item

== Example h2 heading ==

* List item
  • List item
Example h2 heading
  • List item
  • List item
  • Example h2 heading
  • List item
  • List item
  • Example h2 heading
  • List item
  • h3
    * List item
    
    === Example h3 heading ===
    
    * List item
    
    • List item
    Example h3 heading
    • List item
  • List item
  • Example h3 heading
  • List item
  • List item
  • Example h3 heading
  • List item
  • h4
    * List item
    
    ==== Example h4 heading ====
    
    * List item
    
    • List item
    Example h4 heading
    • List item
  • List item
  • Example h4 heading
  • List item
  • List item
  • Example h4 heading
  • List item
  • h5
    * List item
    
    ===== Example h5 heading =====
    
    * List item
    
    • List item
    Example h5 heading
    • List item
  • List item
  • Example h5 heading
  • List item
  • List item
  • Example h5 heading
  • List item
  • {{{标题1}}}
    {{{内容1}}}
    {{{标题2}}}
    {{{内容2}}}
    {{{标题1}}}
    {{{内容1}}}
    {{{标题2}}}
    {{{内容2}}}

    链结

    Help:Links

    已知问题

    1. Links to section headings # do not work outside of the wiki (doc.BoardGameArena.com).
    2. URL is resolved to /doc instead of the current page.
    3. In-game links navigate the user away from the game.

    e.g. [[#Section_heading_link]]https://BoardGameArena.com/doc#Section_heading_link ¹.

    Bug上报

    解决方法

    1. Remove links that do not function as expected.

    图片

    Help:Images

    已知问题

    1. Resized images do not display on BoardGameArena.com.
      e.g. [[File:Marrakech_example.jpg|300px]]) because the resized image does not exist in the referenced directory.
    2. Image links do not work on BoardGameArena.com.
      e.g. [[File:Versions.png|link=https://en.doc.boardgamearena.com/images/b/b5/Factum_Rules_Summary_EN_v1.jpg]] because the link resolves to https://boardgamearena.com/dochttps://en.doc.boardgamearena.com/images/b/b5/Factum_Rules_Summary_EN_v1.jpg

    解决方法

    1. Upload YourImage with the size it will appear.
    2. Create a {{gameIcon}} with a scale factor.
      e.g. {{YourIcon|scale=0.5}} to reduce the image dimensions by ½.
    3. Replace image links with regular links.
      e.g. [[File:Versions.png]]
      [https://en.doc.boardgamearena.com/images/b/b5/Factum_Rules_Summary_EN_v1.jpg LinkText]

    建议

    1. Optionally include rollover text [[File:Marrakech_example.jpg|Example move]]

    表格

    Help:Tables

    已知问题

    common.css rules
    .wikicontent table {
        border-collapse: collapse;
        margin-left: 5px;
        margin-top: 5px;
        width: 98%;
    }
    table {
        border-collapse: collapse;
        border-spacing: 0;
    }
    caption, th {
        text-align: left;
    }
    address, caption, cite, code, dfn, em, strong, th, var {
        font-style: normal;
        font-weight: 400;
    }
    .wikicontent table td, .wikicontent table th {
        padding: 5px;
        text-align: center;
    }
    blockquote, body, code, dd, div, dl, dt, fieldset, form, h1, h2, h3, h4, h5, h6, input, legend, li, ol, p, pre, td, textarea, th, ul {
        margin: 0;
        padding: 0;
    }
    .wikicontent table td, .wikicontent table th {
        padding: 5px;
        text-align: center;
    }
    
    1. width: 98%; stretches tables across the screen on BoardGameArena.com.
    2. Borders do not display on BoardGameArena.com.

    解决方法

    1. style="width:auto;" fits column width to the contents.
    2. border="2" creates table cell borders.
    3. Replace with HTML + CSS grid.
    Wiki vs BoardGameArena.com table formatting
    Wiki text Wiki BGA
    Raw wikitable
    {|class="wikitable"
    |+Caption
    !0-90
    |⭐
    |-
    !91-110
    |⭐⭐
    |-
    !111-125
    |⭐⭐⭐
    |}
    
    Caption
    0-90
    91-110 ⭐⭐
    111-125 ⭐⭐⭐
    Caption
    0-90
    91-110 ⭐⭐
    111-125 ⭐⭐⭐
    width:auto; border="2"
    {|class="wikitable" style="width:auto;" border="2"
    |+Caption
    !0-90
    |⭐
    |-
    !91-110
    |⭐⭐
    |-
    !111-125
    |⭐⭐⭐
    |}
    
    Caption
    0-90
    91-110 ⭐⭐
    111-125 ⭐⭐⭐
    Caption
    0-90
    91-110 ⭐⭐
    111-125 ⭐⭐⭐

    Option grids

    Option grids can help visualise multiple interdependent options. Where inflexible wiki text tables fall short, HTML + CSS grid is responsive to screen size e.g. GameHelpPente:

    Training mode only
    Default
    Other
    # of players
    2
    3
    4
    Free-for-all
    Team
    All options win
    Align exactly 5 stones in a row
    Align exactly 4 stones in a row
    Overline win
    May align more than 5 stones in a row
    May align more than 4 stones in a row
    Capture win
    Make 5 captures
    Make 4 captures
    Capture three
    May capture two or three stones (Keryo Pente)
    Self-capture
    No effect: a stone may be placed in a capture position
    Self-capture: results in self-capture! (Poof Pente)
    Forbidden: a stone may not be placed in a capture position
    Overtime capture
    Break the line: may capture to break a winning line (Boat Pente)
    Capture the line: may capture an entire winning line
    Mixed capture
    Enabled: May capture stones of mixed colour
    Disabled: Captures of one colour only
    {{{标题1}}}
    {{{内容1}}}
    {{{标题2}}}
    {{{内容2}}}

    Blockquote

    已知问题

    common.css rules
    blockquote, body, code, dd, div, dl, dt, fieldset, form, h1, h2, h3, h4, h5, h6, input, legend, li, ol, p, pre, td, textarea, th, ul {
        margin: 0; /*removes inline and block margins*/
        padding: 0; /*removes list indentation*/
    }
    
    1. Margins and padding are removed on BoardGameArena.com.
    2. No left border.

    解决方法

    1. Replace with HTML + CSS.
    HTML + CSS <blockquote> formatting
    Wiki text Wiki BGA
    <blockquote style="
        margin:1em 0;
        margin-inline:40px;
        padding:8px 32px;
        border-left:4px solid #eaecf0;
    ">
    This is a <blockquote>
    </blockquote>
    

    This is a

    <blockquote>

    This is a

    <blockquote>

    Wiki templates

    Help:Templates

    Template:InfoBox

    Customisable container(s) responsive to screen size.

    Example
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

    Create your own icons

    Step 1
    Upload YourImage.png
    Step 2
    Create https://en.doc.boardgamearena.com/Template:YourIcon

    Fill in the parameters:

    {{gameIcon
    |tooltip=
    |imageFileName=
    |scale=1
    |width=
    |height=
    |x=0
    |y=0
    |={{{1|&ZeroWidthSpace;}}}
    |textColor=black
    |outlineColor=white
    }}<noinclude>
    [[Category:YourIcons]]
    <noinclude>
    
    Step 3
    Insert {{YourIcon}}

    See Examples

    Category:GameIconTemplates

    Cylinder tokens
    Wiki text Result
    {{redCylinder|1}} 模板:RedCylinder
    {{orangeCylinder|2}} 模板:OrangeCylinder
    {{yellowCylinder|3}} 模板:YellowCylinder
    {{greenCylinder|4}} 模板:GreenCylinder
    {{blueCylinder|5}} 模板:BlueCylinder
    {{purpleCylinder|6}} 模板:PurpleCylinder
    {{whiteCylinder|7}} 模板:WhiteCylinder
    {{greyCylinder|8}} 模板:GreyCylinder
    {{blackCylinder|9}} 模板:BlackCylinder
    {{creamCylinder|10}} 模板:CreamCylinder
    Meeples
    Wiki text Result
    {{meeple|red|1}} 模板:Meeple
    {{meeple|orange|2}} 模板:Meeple
    {{meeple|yellow|3}} 模板:Meeple
    {{meeple|green|4}} 模板:Meeple
    {{meeple|blue|5}} 模板:Meeple
    {{meeple|purple|6}} 模板:Meeple
    {{meeple|white|7}} 模板:Meeple
    {{meeple|grey|8}} 模板:Meeple
    {{meeple|black|9}} 模板:Meeple
    Dice
    Wiki text Result
    {{whiteDie|1}} 模板:WhiteDie
    {{yellowDie|2}} 模板:YellowDie
    {{orangeDie|3}} 模板:OrangeDie
    {{blackDie|4}} 模板:BlackDie

    Category:Card_templates

    Template:Card
    Wiki text Result
    {{card|A}} 模板:Card
    {{club|K}} 模板:Club
    {{spade|Q}} 模板:Spade
    {{heart|J}} 模板:Heart
    {{diamond|10}} 模板:Diamond
    {{cardBack}} 模板:CardBack
    {{club|color=green}} 模板:Club
    Template:Cardholder
    Wiki text Result
    {{cardholder|Alice|cards={{diamond|A}}{{club|A}}{{heart|A}}{{spade|A}} }} 模板:Cardholder

    Wiki text Result
    {{Beginner}} {{Beginner|0}} 模板:Beginner 模板:Beginner
    {{Apprentice}} {{Apprentice|1}} 模板:Apprentice 模板:Apprentice
    {{Average}} {{Average|100}} 模板:Average 模板:Average
    {{Good}} {{Good|200}} 模板:Good 模板:Good
    {{Strong}} {{Strong|300}} 模板:Strong 模板:Strong
    {{Expert}} {{Expert|500}} 模板:Expert 模板:Expert
    {{Master}} {{Master|700}} 模板:Master 模板:Master
    Wiki text Result
    {{player|2}} 模板:Player
    {{hand|4}} 模板:Hand

    Category:GameBoardTemplates