Easy to use javascript plugin to draw nice boxes and arrows to your website from simple markup like (User) > (Admin)
... which will be transformed to:
(User) > (Admin)
The following examples are no screenshots - they are dynamically created by Arrows-and-boxes with the code displayed above each example ;)
jquery.js, jquery.wz_jsgraphics.js, arrowsandboxes.js
arrowsandboxes.css
Place a <pre> block around your arrows-and-boxes markup and set the class to arrows-and-boxes
:
<pre class="arrows-and-boxes"> (User) > (Admin) </pre>
Arrows-and-boxes automatically detects the code and builds nice boxes and arrows from it.
Inline arrows and nodes:
(Dennis) >likes (Food)
(Dennis) >likes (Food)
(box_title | box_subtitle)
(box_id{custom_class}: box_title | box_subtitle >arrow_label [arrow_target1, arrow_target2, ...] <arrow2_label [arrow2_target])
Nodes will be placed after each other in one line. Start a new line with "||".
(Node1) (Node1_2) || (Node2) || (Node3)
(Node1) (Node1_2) || (Node2) || (Node3)
(arrow) - (normal) || (arrow) > (one direction) || (arrow) < (other direction) || (arrow) <> (and back)
(arrow) - (normal) || (arrow) > (one direction) || (arrow) < (other direction) || (arrow) <> (and back)
Writing (node_id: My Node)
gives the node the id "node_id" (must be followed by ":"). You can use it to define a target for a link inside a node definition
(Dennis >likes [d,m]) || (d:Drinks) (m:Money)
(Dennis >likes [d,m]) || (d:Drinks) (m:Money)
>arrow_label
>arrow_label [arrow_target1, arrow_target2, ...]
Writing a "|" after your title makes the rest of the text a subtitle. If it's too large to fit the boy, hover with your mouse to make it visible. Using "|" on an arrow label will cause a line break.
(Dennis|has a subtitle) > label | new line (node)
(Dennis|has a subtitle) > label | new line (node)
(boring) > (boring) >> ((Highlighted))
(boring) > (boring) >> ((Highlighted))
Defining a node without a title (= empty node) makes it a "Dummy node". It won't be visible, but gives some space.
Dummy nodes can also have ids and arrows, so you can acutally use them as arrow-targets and -sources.
(Dennis) -likes () > (Food)
(Dennis) -likes () > (Food)
(Dennis) - (>likes[f]) || () (f:Food)
(Dennis) - (>likes[f]) || () (f:Food)
Put {{ }}
around something let's you use HTML inside node titles, subtitles and arrow labels. So you can use anything you like (images and stuff).
(Dennis) > links ({{<a href="http://www.headjump.de">headjump.de</a>}})
(Dennis) >links ({{headjump.de}})
Writing {my_class_name}
before the ":" that is used to seperate the node id from the title will add the classname to the created node. Inspect the element if you don't trust me:
({custom_class}:Custom class)
({custom_class}:Custom class)