Template:Eyecatch3/doc: Difference between revisions

From AniDB
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 26: Line 26:
==Real-world Examples==
==Real-world Examples==
''Real-world test of the code, issue '''empty line''' before <tt>eycatch</tt>:''
''Real-world test of the code, issue '''empty line''' before <tt>eycatch</tt>:''
===Test 0 - Old code, if "info" = 2, it would indent by 2===
'''<span style="color:red">No longer an issue!</span>'''<br>
{{eyecatch3|2|'''Special case<nowiki>{{eyecatch3|2|blah}}</nowiki>''' - Not all groups provide CRC checksums for their files. This means that this status has no meaning and will have the value "not checked against official CRC".}}


===Test 1 - Empty line before and after eyecatch3===
===Test 1 - Empty line before and after eyecatch3===

Revision as of 11:31, 28 April 2009

1111

Category Ecchi & hentai only!
Category Ecchi & hentai only!
Category Ecchi & hentai only!
Category Ecchi & hentai only!
Category Ecchi & hentai only!
Category Ecchi & hentai only!
Category Ecchi & hentai only!
Category Ecchi & hentai only!
Category Ecchi & hentai only!

2222

Category Ecchi & hentai only!
Category Ecchi & hentai only!
Category Ecchi & hentai only!
Category Ecchi & hentai only!
Category Ecchi & hentai only!
Category Ecchi & hentai only!

Real-world Examples

Real-world test of the code, issue empty line before eycatch:

Test 0 - Old code, if "info" = 2, it would indent by 2

No longer an issue!

Category Ecchi & hentai only!

Test 1 - Empty line before and after eyecatch3

Spacing below and above box is OK, space above box shows one "empty line" too much. VERY UGLY! FIXED!
Indicates whether the file entry in AniDB represents a perfect copy of the original file or not. You may request a change of the CRC Status if its not checked yet.

Category Ecchi & hentai only!

Read more about file verification if you are unfamiliar with this subject.

Test 2 - Empty line before and after eyecatch3, indent 1

Spacing below box is OK, space above box shows one "empty line" too much. VERY UGLY!
Indicates whether the file entry in AniDB represents a perfect copy of the original file or not. You may request a change of the CRC Status if its not checked yet.

Category Ecchi & hentai only!

Read more about file verification if you are unfamiliar with this subject.

Category Ecchi & hentai only!

Text text and even more text to test the code. Text text and even more text to test the code. Text text and even more text to test the code.

Test 3 - NO Empty line before and after eyecatch3

Spacing above and below the box looks OK.
Indicates whether the file entry in AniDB represents a perfect copy of the original file or not. You may request a change of the CRC Status if its not checked yet.

Category Ecchi & hentai only!

Read more about file verification if you are unfamiliar with this subject.

Test 4 - NO Empty line before and after eyecatch3, indent 1

Spacing above and below the box looks OK.
Indicates whether the file entry in AniDB represents a perfect copy of the original file or not. You may request a change of the CRC Status if its not checked yet.

Category Ecchi & hentai only!

Read more about file verification if you are unfamiliar with this subject.

Test 5 - Two eyecatch3 blocks, no empty lines

Spacing above and below the boxes looks OK. IMO it would be better to have a slight space between the two eyecatch3 boxes for the normal un-indented eyecatch3 usage.
AniDB stores the name and short name of the group/person that produced and released a file. The short name is usually found as tags in file names, for example "[AonE]".

Category Ecchi & hentai only!
Category Ecchi & hentai only!

Please note that not all groups registered in AniDB are listed with the tag they actually use, as AniDB can only have one distinctive tag for each group.

Test 6 - Two eyecatch3 blocks, indent 1, no empty lines

The slight space above, below and between the two eyecatch3 boxes looks fine, when NOT using extra empty lines in-text. But only for the indented eyecatch3!
AniDB stores the name and short name of the group/person that produced and released a file. The short name is usually found as tags in file names, for example "[AonE]".

Category Ecchi & hentai only!
Category Ecchi & hentai only!

Please note that not all groups registered in AniDB are listed with the tag they actually use, as AniDB can only have one distinctive tag for each group.

Results

  • {{eyecatch3|0|Note|blah}} works exactly the same as {{eyecatch3|Note|blah}}
  • Empty or wrong entries (e.g. xyz) in # field, yields default eyecatch3 without an indent.
    e.g. {{eyecatch3||Note|blah}} or {{eyecatch3|xyz|Note|blah}}
    -> seems to be fool proof.


Solution

Basically the code works better than the original old version, i.e. the spacing above and below the the eyecatch3 boxes *now* looks really nice.

So, *never* add an empty line above the eyecatch3 box!

A empty line below the eyecatch3 box is ignored!





Documentation for this template

This template creates an eye-catcher bar that can be indented up to 6 times via parameter value, letting the user better customize his "Note"s.

Alternative names

  • {{eyecatch3|#|info|text}}
  • {{Eyecatch3|#|info|text}} alternate spelling of template

Syntax

{{eyecatch3|#|info|text}}
   #  =  Number 0 (min) to 6 (max), defines indentation level.
info  =  The info to highlight, i.e. Note or Important.
text  =  The descriptive text for the info.
Category Ecchi & hentai only!

Examples

{{eyecatch3|0|Note|'''No''' indentation, just like the normal <tt>eyecatch</tt>.}} 
Category Ecchi & hentai only!
{{eyecatch3|1|Another note|'''One''' indentation, just like <tt>eyecatch2</tt>.}} 
Category Ecchi & hentai only!
{{eyecatch3|2|Important|Level '''two''' indentation!}} 
Category Ecchi & hentai only!
{{eyecatch3|6|Very important|Maximum indentation level of '''six'''!}} 
Category Ecchi & hentai only!