m (ChaoticShadow moved page Template:LyricsHead/doc to Template:Lyrics head/doc without leaving a redirect) |
mNo edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{documentation subpage}} |
{{documentation subpage}} |
||
{{Lua|Module:Lyrics}} |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
** Defines the columns and their orders |
|||
** Adds a hidden HTML tag for the lyrics option fieldset to attach to |
|||
⚫ | |||
⚫ | |||
⚫ | |||
<templatedata> |
<templatedata> |
||
{ |
{ |
||
"params": { |
"params": { |
||
" |
"id": { |
||
"label": " |
"label": "Table ID", |
||
"description": " |
"description": "Give each lyrics table a unique ID, allowing the lyrics option JavaScript to target the correct table.", |
||
"example": " |
"example": "1", |
||
"type": "string" |
|||
}, |
|||
"columns": { |
|||
"label": "Columns", |
|||
"description": "Defines the columns for the table, separated by commas. The order in the list defines the display order from left to right. The names of each columns become the parameter names for this template to define column headers the parameter names for the \"Lyrics line\" template to define cell content.", |
|||
"example": "japanese, romaji, english", |
|||
"type": "string", |
"type": "string", |
||
"required": true |
|||
"default": "English Translation" |
|||
} |
} |
||
} |
}, |
||
"paramOrder": [ |
|||
"id", |
|||
"columns" |
|||
], |
|||
"description": "Template for the header section for lyrics tables. Defines the columns for the table.", |
|||
"format": "block" |
|||
} |
} |
||
</templatedata> |
</templatedata> |
||
==Usage== |
== Usage == |
||
<pre> |
<pre> |
||
{{Lyrics head |
|||
{{LyricsHead}} |
|||
| id = |
|||
{{LyricsLine |
|||
| |
| column = |
||
|romaji = |
|||
⚫ | |||
}} |
}} |
||
{{ |
{{Lyrics line}} |
||
{{Lyrics tail}} |
|||
</pre> |
</pre> |
||
After the "column" parameter is defined, the columns need headers. This is defined by using the column names as the parameter names for this template. |
|||
⚫ | |||
{{LyricsHead}} |
|||
⚫ | |||
{{LyricsLine |
|||
Below is a simple example of how to use the collection of lyrics templates. For a more detailed guide, see [[Help:Adding song lyrics]]. |
|||
⚫ | |||
⚫ | |||
{{Lyrics head |
|||
⚫ | |||
| columns = japanese,romaji,english |
|||
| japanese = Japanese lyrics |
|||
| romaji = Romanized lyrics |
|||
| english = English translation |
|||
}} |
}} |
||
{{Lyrics line |
|||
{{LyricsLine |
|||
|japanese = |
| japanese = 形のない気持ち忘れないように |
||
|romaji = |
| romaji = katachi no nai kimochi wasurenai you ni |
||
|english = |
| english = Not to forget the intangible feelings |
||
}} |
}} |
||
{{Lyrics line |
|||
⚫ | |||
| japanese = 決まりきったレイアウトを消した |
|||
| romaji = kimari kitta LAYOUT wo keshita |
|||
⚫ | |||
}} |
|||
⚫ | |||
<pre> |
<pre> |
||
{{Lyrics head |
|||
{{LyricsHead}} |
|||
| columns = japanese,romaji,english |
|||
{{LyricsLine |
|||
|japanese = |
| japanese = Japanese lyrics |
||
| romaji = Romanized lyrics |
|||
|romaji = katachi no nai kimochi wasurenai you ni |
|||
|english |
| english = English translation |
||
}} |
|||
{{Lyrics line |
|||
⚫ | |||
⚫ | |||
⚫ | |||
}} |
}} |
||
{{Lyrics line |
|||
{{LyricsLine |
|||
|japanese = 決まりきったレイアウトを消した |
| japanese = 決まりきったレイアウトを消した |
||
|romaji = kimari kitta LAYOUT wo keshita |
| romaji = kimari kitta LAYOUT wo keshita |
||
|english = |
| english = |
||
}} |
}} |
||
{{ |
{{Lyrics tail|Footer}} |
||
</pre> |
</pre> |
Latest revision as of 02:39, 15 April 2023
This is a documentation subpage for Template:Lyrics head. It contains usage information, categories and other content that is not part of the original template page. |
This template uses Lua: |
The Lyrics templates are used to list the lyrics in a song. Three templates are used to form the lyrics table:
- {{Lyrics head}} - Contains table headers for the top of the lyrics table
- Defines the columns and their orders
- Adds a hidden HTML tag for the lyrics option fieldset to attach to
- {{Lyrics line}} - Template for all the individual lyrics lines, for each verse in a song
- {{Lyrics tail}} - Contains table footer for the bottom of the lyrics table
Parameters[edit source]
Template for the header section for lyrics tables. Defines the columns for the table.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Table ID | id | Give each lyrics table a unique ID, allowing the lyrics option JavaScript to target the correct table.
| String | optional |
Columns | columns | Defines the columns for the table, separated by commas. The order in the list defines the display order from left to right. The names of each columns become the parameter names for this template to define column headers the parameter names for the "Lyrics line" template to define cell content.
| String | required |
Usage[edit source]
{{Lyrics head | id = | column = }} {{Lyrics line}} {{Lyrics tail}}
After the "column" parameter is defined, the columns need headers. This is defined by using the column names as the parameter names for this template.
Example[edit source]
Below is a simple example of how to use the collection of lyrics templates. For a more detailed guide, see Help:Adding song lyrics.
Japanese lyrics | Romanized lyrics | English translation |
---|---|---|
形のない気持ち忘れないように | katachi no nai kimochi wasurenai you ni | Not to forget the intangible feelings |
決まりきったレイアウトを消した | kimari kitta LAYOUT wo keshita | |
Footer |
{{Lyrics head | columns = japanese,romaji,english | japanese = Japanese lyrics | romaji = Romanized lyrics | english = English translation }} {{Lyrics line | japanese = 形のない気持ち忘れないように | romaji = katachi no nai kimochi wasurenai you ni | english = Not to forget the intangible feelings }} {{Lyrics line | japanese = 決まりきったレイアウトを消した | romaji = kimari kitta LAYOUT wo keshita | english = }} {{Lyrics tail|Footer}}