Template:Columns

From Forsaken Saga Wiki
Revision as of 05:14, 26 May 2024 by Harrigton (talk | contribs) (Created page with "<includeonly>{{#if: {{{count|}}}{{{style|}}}{{{colwidth|}}} | <div style="columns:{{#if:{{{colwidth|}}}|{{{colwidth}}}}}{{#if:{{{count|}}}|<nowiki> </nowiki>{{{count}}}}}; {{{style|}}}"> {{{data|{{{content|}}}}}}</div> <!-- New line is necessary to properly render wiki markup --> | <div style="column-count:{{{1}}}; column-width:300px;"> {{{2}}}</div>}}</includeonly><noinclude> Divides list or text into columns automatically. No need to count and divide into table cells...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Divides list or text into columns automatically. No need to count and divide into table cells and then re-count and re-divide if new info is added to the list.

Usage[edit source]

{{Columns|# of columns| list or text}}

For example, if you need to break the list bellow into 2 columns:

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

Simply type:

{{Columns|2|
* 1
* 2 
* 3 
* 4 
* 5 
* 6
}}

Result:

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

Additional options[edit source]

For flexibility - e.g. a list that is 5 columns on a wide screen desktop browser, but an unspecified number of 150px columns on a narrower mobile screen - use these parameters:

{{Columns|count=# of columns|colwidth= width in px or em|style= css color/width/fonts/size etc.|data= list or text}}

Example:

{{Columns|count=5|colwidth=150px|style=background-color:#FFCCCC; border:1px solid black;|data=
[list of fruits]
}}

Result:

  • Apple
    • Crab apple
    • Rose apple
    • Star apple
  • Apricot
  • Avocado
  • Banana
    • Plantain
  • Berry
    • Blackberry
    • Cranberry
    • Blueberry
    • Boysenberry
    • Cloudberry
    • Elderberry
    • Goji berry
    • Gooseberry
    • Huckleberry
    • Juniper berry
    • Loganberry
    • Marionberry
    • Mulberry
    • Raspberry
    • Strawberry
  • Breadfruit
  • Cacao
  • Cactus pear
  • Cherimoya (Custard Apple)
  • Cherry
    • Surinam cherry
  • Citron
    • Buddha's hand (fingered citron)
  • Coconut
  • Currant
    • Blackcurrant
    • Redcurrant
    • White currant
  • Date
  • Dragonfruit
  • Durian
  • Fig
  • Grape
    • Raisin
  • Grapefruit
  • Guava
  • Jackfruit
  • Kiwifruit
  • Kumquat
  • Lemon
  • Lime
    • Finger Lime
    • Kaffir Lime
  • Lychee
  • Mango
  • Mangosteen
    • Purple mangosteen
  • Melon
    • Cantaloupe
    • Honeydew
    • Kiwano (horned melon)
    • Musk melon
    • Watermelon
  • Miracle fruit
  • Nectarine
  • Orange
    • Blood orange
    • Clementine
    • Mandarine
    • Tangerine
  • Papaya
  • Passionfruit
  • Pawpaw
  • Peach
  • Pear
  • Persimmon
  • Plum
    • Japanese plum
    • Prune (dried plum)
  • Pineapple
  • Pomegranate
  • Pomelo
  • Quince
  • Rambutan
  • Satsuma
  • Star fruit
  • Tamarillo
  • Tamarind
  • Tangelo
  • Ugli fruit
  • Yuzu

Variations[edit source]

Parameters may be excluded as needed, for example:

{{Columns|colwidth=8em|data=
[list of herbs]
}}
  • Allspice
  • Anise
    • Star Anise
  • Avocado leaf
  • Basil
  • Bay leaf
  • Borage
  • Burdock root
  • Cardamom
  • Catnip
  • Celery
  • Chicory
  • Chives
  • Cilantro
  • Cinnamon
  • Clove
  • Coriander
  • Cumin
  • Curry leaf
  • Dill
  • Dandelion
  • Fennel
  • Garlic
  • Ginger
  • Horseradish
  • Lavender
  • Lemon Balm
  • Lemon Grass
  • Licorice
  • Mace
  • Marjoram
  • Mint
    • Apple mint
    • Peppermint
    • Spearmint
  • Mustard
  • Nutmeg
  • Oregano
  • Paprika
  • Parsley
  • Pepper
    • Red pepper
    • White pepper
  • Rosemary
  • Saffron
  • Sage
  • Spring onion
  • Thyme
  • Turmeric
  • Vanilla
  • Wasabi
  • Watercress