blog_name
2013-09-01 13:26 | Lable: Blog Func() |
minicode manual

minicode manual



[tit] @= <span style="font-size: 20pt; font-weight: bold;">
[/tit] @= </span>
[h1] @= <span style="font-size: 16pt; color: green;">
[/h1] @= </span>
[title1] @= <span style="font-size: 20pt; text-shadow: 0px 0px 3px #FF0000;">
[/title1] @= </span>
[hello1][/hello1] @= Just say hello.
[bracket1][/bracket1] @= <
[span_fake1] @= lt;span
[span_fake2] @= lt;/span&
minicode

Introduction:

Similar to BBCode.
The tags are indicated by square brackets [ ] surrounding a keyword.
It is designed for Blog, thus let through unsafe HTML like <script>.

Syntax:
  1. The minicode cannot nest:
    [url]http://goo.gl/[/url] OK
    [b][url]http://goo.gl/[/url][/b] This expression is ERROR!!!
    
    Because nest will be complex. In this situation, you can use HTML directly or use [lead_define].

  2. Difference between minicode and BBCode:
    [url]http://php.net/docs.php[PHP Manual[/url]
    [color]#B22222]FireBrick[/color]
    
    Note the tag option is close to the [tag] with a sigle square bracket:
    [tag]option]...[/tag], or [tag]...[option[/tag]
    Position of tag option depends on the implemented HTML sentence.
    Do not add newline in the tag option of a minicode, it will be failed.
Keywords and Usage:
  1. [code]
    while (ivec.size() != ivec.capacity())
    	ivec.push_back(0);
    [/code]
    # Preformatted text for code:
    while (ivec.size() != ivec.capacity())
    	ivec.push_back(0);
    

  2. [output]Reply from 74.125.128.100: bytes=32 time=266ms TTL=37[/output]
    # Preformatted text for code with output style:
    Reply from 74.125.128.100: bytes=32 time=266ms TTL=37

  3. [img]http://bits.wikimedia.org/images/wikimedia-button.png[/img]
    [img]twitter-bird]http://www.w3.org/2008/site/images/twitter-bird[/img]
    # To insert an image:
    wikimedia-button
    twitter-bird

    # The first expression omited the parameter for alt attribute.
    # It will be automatically converted to second expression with filename, or you can manually add.

  4. [url]http://www.w3school.com.cn/[/url]
    [url]http://www.w3school.com.cn/[W3School[/url]
    # A link to one page:
    http://www.w3school.com.cn/
    W3School

    # The second expression assigned a description text.

  5. [color]orange]Its name from the orange fruit.[/color]
    [color]#6495ED]Cornflower blue, a shade of azure[/color]
    [b]Bolded Text[/b]
    [small]Small Text[/small]
    # Color a part of a text or change font:
    Its name from the orange fruit.
    Cornflower blue, a shade of azure
    Bolded Text
    Small Text

  6. [last][/last]
    # Last modified date:
    Last modified: 2020-06-09 12:21:32

    # This page initially completed on 2013-09-02.

  7. [html]
    <script type="text/javascript">
    document.write("Test!");
    </script><br/>Newline here!
    [/html]
    # HTML retain:

    Newline here!

    # This expression will retain all HTML tags and javascript.
    # But one except: <br />, <br /> will be losted by second edit because of PHP function nl2br().
    # To retain newline tag, use <br/> instead.

  8. [h]h4]This is heading 4[/h]y[h]sup]4[/h]
    C[h]sub]hex[/h], ...
    # For some plain symmetrical HTML tags:

    This is heading 4

    y4
    Chex, ...

  9. [lead_define]
    [title] @= <span style="font-size: 20pt; text-shadow: 0px 0px 3px #FF0000;">
    [/title] @= </span>
    [hello][/hello] @= Just say hello.
    [/lead_define][title]My Title[/title]
    [hello][/hello]
    
    # Define hot minicode in a post.
    # You can define several minicode, but all need to be in one [lead_define].

    My Title
    Just say hello.

  10. [abst][/abst]
    # Indicate the end of abstract:
    # miniroll can not generate an abstract automatically.
    # You need use this tag that make a front part of a journal become an abstract.
Typesetting Guild:
  1. [html]
    <img style="float: left; margin-right: 10px; margin-bottom: 10px;"
    src="http://www.ietf.org/images/isoc_logo.gif" alt="" />
    [/html]The quick brown fox jumps over the lazy dog. ...
    # Image float left:
    The quick brown fox jumps over the lazy dog.
    The quick brown fox jumps over the lazy dog.

  2. [html]<div style="float: left; margin-right: 10px; margin-bottom: 10px;">
    [/html][img]http://tools.ietf.org/images/ietflogo3h.png[/img]
    [html]<a class="m4_style" style="font-size: 12px;" target="_blank"
    href="http://tools.ietf.org/tools/rfcmarkup/">Rfcmarkup Tool</a></div>[/html]...
    # Div float left with Link:
    The quick brown fox jumps over the lazy dog.
    The quick brown fox jumps over the lazy dog.
    The quick brown fox jumps over the lazy dog.

Note:
  1. If the sentences are too complex, check them by W3C Markup Validator.
  2. Block elements or margin may cause line spacing too large, delete a newline according to the situation.
Comments: 0

-
.
评论功能已禁用 |

Previous | Next page | 0-0
0