Πρότυπο:Rating bar

From protonation
Jump to navigation Jump to search


Template properties [edit]
Ontology: MyMDb
Template: Movie
Template category: Templates that define CSS
Required extensions
{{
i
}} Template documentation [edit]


A general purpose animated rating bar

Usage

{{rating bar
| rating     =
| width      =
| height     =
| color      =
| background = 
}}

Parameters

  • rating: any value between 0% and 100% (unit % is essential). Mandatory. If not set, it prints an error message
  • width: any CSS acceptable unit such as 100%, 200px, 10em. Default: 100%
  • height: any CSS acceptable unit except %. Default: 20px
  • color: any CSS acceptable color such as Red, #333, rgb(20,10,30). Default: Grey
  • background: any CSS acceptable color. Default: LightGrey

Multiple bars in the same page

In this case, extra parameter class suffix must be used with a unique word for each bar otherwise all animations will have the exact same progression.

Examples

{{rating bar | rating = 65% }}

Result:


{{rating bar
| rating     = 40%
| width      = 200px
| height     = 10px
| color      = Green
| background = Yellow
}}

Result: