Difference between revisions of "Module:Shogi diagram/doc"

From blackwiki
Jump to navigation Jump to search
blackwiki>Ish ishwar
(→‎Usage: no space)
blackwiki>JohnBlackburne
(→‎Usage: Use working example)
Line 7: Line 7:
 
This module is called by [[Template:Shogidiagram]].
 
This module is called by [[Template:Shogidiagram]].
  
{{Template:Shogidiagram}}
+
{{Shogidiagram  
 +
| tright
 +
|
 +
|
 +
|lg|ng|sg|gg|kg|gg|sg|ng|lg
 +
|  |rg|  |  |  |  |  |bg| 
 +
|pg|pg|pg|pg|pg|pg|pg|pg|pg
 +
|  |  |  |  |  |  |  |  | 
 +
|  |  |  |  |  |  |  |  | 
 +
|  |  |  |  |  |  |  |  | 
 +
|ps|ps|ps|ps|ps|ps|ps|ps|ps
 +
|  |bs|  |  |  |  |  |rs| 
 +
|ls|ns|ss|gs|ks|gs|ss|ns|ls
 +
|
 +
|
 +
}}
  
 
As the original template used .pngs/.svgs, when many templates were used on pages, the page load times became a bit long. In order to fix this, this module instead uses text. And, text is preferable anyway since it renders very sharp edges. The drawback is that it depends on web browser for rotated text – that is, the web browser must be a modern one.
 
As the original template used .pngs/.svgs, when many templates were used on pages, the page load times became a bit long. In order to fix this, this module instead uses text. And, text is preferable anyway since it renders very sharp edges. The drawback is that it depends on web browser for rotated text – that is, the web browser must be a modern one.

Revision as of 20:32, 19 December 2016

Usage

{{#invoke:Shogi diagram|function_name}}

This module is called by Template:Shogidiagram.

Template:Shogidiagram

As the original template used .pngs/.svgs, when many templates were used on pages, the page load times became a bit long. In order to fix this, this module instead uses text. And, text is preferable anyway since it renders very sharp edges. The drawback is that it depends on web browser for rotated text – that is, the web browser must be a modern one.

It was based on Module:Chessboard.