zum Inhalt springen
Benutzer-Werkzeuge
Registrieren
Anmelden
Webseiten-Werkzeuge
Suche
Werkzeuge
Seite anzeigen
Ältere Versionen
Links hierher
Letzte Änderungen
Medien-Manager
Übersicht
Anmelden
Registrieren
>
Letzte Änderungen
Medien-Manager
Übersicht
Zuletzt angesehen
wiki:wrap-beispiel
<h1>Examples for the Wrap Plugin (test)</h1> <div class="level1"> <p> dsadsada </p> </div> <h2>Basic syntax</h2> <div class="level2"> <p> An uppercase <b><nowiki><WRAP></nowiki></b> (or alternatively <b><nowiki><block></nowiki></b> or <b><nowiki><div></nowiki></b>) creates a <b><code>div</code></b> and should be used for <b>"big"</b> containers, <b>surrounding</b> paragraphs, lists, tables, etc. </p> <pre class="code"><WRAP classes width :language> "big" content </WRAP> or <block classes width :language> "big" content </block> or <div classes width :language> "big" content </div> </pre><p> </p> <p> A lowercase <b><nowiki><wrap></nowiki></b> (or alternatively <b><nowiki><inline></nowiki></b> or <b><nowiki><span></nowiki></b>) creates a <b><code>span</code></b> and should be used for <b>"small"</b> containers, <b>inside</b> paragraphs, lists, tables, etc. </p> <pre class="code"><wrap classes width :language>"small" content</wrap> or <inline classes width :language>"small" content</inline> or <span classes width :language>"small" content</span> </pre><p> </p> <p> <img src="/lib/images/smileys/icon_exclaim.gif" class="icon" alt=":!:" /> Please note, some things <b>won't work with lowercase spans</b>: </p> <ul> <li class="level1"> <b>alignments</b> (including alignments generated by changing the text direction)</li> <li class="level1"> <b>multi-columns</b></li> <li class="level1"> and <b>widths</b></li> </ul> <p> if the according wrap isn't floated as well. </p> </div> <h2>Classes and Styles</h2> <div class="level2"> </div> <h3>Columns and Floats</h3> <div class="level3"> <p> You can have columns easily by adding the class <code>column</code> and a width, e.g. </p> <pre class="code"><WRAP column 30%>...content...</WRAP> </pre><p> </p> <p> <WRAP column 30%> <em><b><u>Emulated Big Headline</u></b></em> </p> <p> You can emulate a big headline with italic, bold and underlined text, e.g. </p> <pre class="code">//**__Emulated Big Headline__**// </pre><p> </p> <p> <em><b>Emulated Small Headline</b></em> </p> <p> A smaller headline uses no underlining, e.g. </p> <pre class="code">//**Emulated Small Headline**// </pre><p> </p> <p> If you need text that is bold and italic, simply use it the other way around: </p> <pre class="code">**//No Headline//** </pre><p> </p> <p> </WRAP> </p> <p> <WRAP column 30%> <em><b><u>Different Floating Options</u></b></em> </p> <p> Normally you would only need the class <code>column</code>, but for more sophisticated uses (not only for columns, but for any other classes, like <a href="#boxes_and_notes" title="wiki:wrap-beispiel ↵" class="wikilink1">boxes and notes</a> as well) you can have several kinds of "floats": </p> <ul> <li class="level1"> <b><code>column</code></b> is the same as <code>left</code> in LTR languages and the same as <code>right</code> in RTL languages</li> <li class="level1"> <b><code>left</code></b> will let you float your wrap on the left</li> <li class="level1"> <b><code>right</code></b> will let the wrap float right</li> <li class="level1"> <b><code>center</code></b> will position the wrap in the horizontal center of the page</li> </ul> <p> </WRAP> </p> <p> <WRAP column 30%> <em><b><u>Widths</u></b></em> </p> <p> You can set any valid widths (but only on divs): <code>%, px, em, ex, pt, pc, cm, mm, in</code>, but most of the time you'd only want either </p> <span class='np_break'> </span> <div class="table"><table class="inline"> <thead> <tr class="row0"> <th class="col0">type</th><th class="col1">e.g.</th><th class="col2">note</th> </tr> </thead> <tr class="row1"> <th class="col0"><code>%</code></th><td class="col1"><code>30%</code></td><td class="col2">makes sense in a liquid layout</td> </tr> <tr class="row2"> <th class="col0"><code>px</code></th><td class="col1"><code>420px</code></td><td class="col2">makes sense if your layout has a fixed pixel width or if your container contains images with a certain width</td> </tr> <tr class="row3"> <th class="col0"><code>em</code></th><td class="col1"><code>20em</code></td><td class="col2">makes sense if you like your wrap container to grow and shrink with the font size or if your layout is em-based</td> </tr> </table> <span class='np_break'> </span> </div> <p> A <b>table</b> inside a column or box will always be <b>100% wide</b>. This makes positioning and sizing tables possible. </p> <p> </WRAP> </p> <p> <wrap em>After using any of the float classes, you might come across something like this, where the following text protrudes into the space where only the floating containers should be …</wrap> </p> <p> <WRAP clear></WRAP> </p> <p> … to prevent that, you should simply add </p> <pre class="code"><WRAP clear></WRAP> </pre><p> </p> <p> after your last column. </p> <p> You <b>can</b> use the same options with spans (as each element that floats is automatically a block level element), but it probably doesn't make too much sense. <img src="/lib/images/smileys/icon_exclaim.gif" class="icon" alt=":!:" /> Widths on spans normally do not work (by design), but can make sense, when it is floating. </p> <p> <img src="/lib/images/smileys/icon_exclaim.gif" class="icon" alt=":!:" /> Attention: Widths can cause problems and will often look different and break in some browsers. If you're not a web developer, you might not understand any problems regarding the <a href="http://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug" class="urlextern" title="http://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug" rel="nofollow">box model</a>. Just try to test your columns in all major browsers and make your widths smaller than you initially think they should be. </p> <p> All of those options will also work in the <a href="#boxes_and_notes" title="wiki:wrap-beispiel ↵" class="wikilink1">boxes and notes</a> wraps (see below). </p> </div> <h4>Multi-columns</h4> <div class="level4"> <p> <WRAP col3> For modern browsers (Firefox, Chrome and Safari) you can use multi-columns. Just use <b><code><nowiki>col2</nowiki></code></b> for 2 columns, <b><code><nowiki>col3</nowiki></code></b> for 3 columns, <b><code><nowiki>col4</nowiki></code></b> for 4 columns and <b><code><nowiki>col5</nowiki></code></b> for 5 columns. </p> <p> <img src="/lib/images/smileys/icon_exclaim.gif" class="icon" alt=":!:" /> Note: Multi-columns don't make sense for spans. </WRAP> </p> </div> <h3>Alignments</h3> <div class="level3"> <p> You can use these different text alignments: </p> <ul> <li class="level1"> <code>leftalign</code></li> <li class="level1"> <code>rightalign</code></li> <li class="level1"> <code>centeralign</code></li> <li class="level1"> <code>justify</code></li> </ul> <p> <WRAP centeralign> Center aligned text … </WRAP> </p> <p> <WRAP rightalign> … and right aligned. </WRAP> </p> <pre class="code"><WRAP centeralign> Center aligned text ... </WRAP> <WRAP rightalign> ... and right aligned. </WRAP> </pre><p> </p> <p> <img src="/lib/images/smileys/icon_exclaim.gif" class="icon" alt=":!:" /> You cannot add alignments to spans. </p> </div> <h3>Boxes and Notes</h3> <div class="level3"> <p> <WRAP round box 570px center> <em><b><u>round box 570px center</u></b></em> </p> <ul> <li class="level1"> <code>box</code> creates a box around the container and uses the colours from the template's <code>style.ini</code> as default colours (<code><nowiki>__background_alt__</nowiki></code> and <code><nowiki>__text__</nowiki></code>)</li> <li class="level1"> any of the classes <code>info</code>, <code>tip</code>, <code>important</code>, <code>alert</code>, <code>help</code>, <code>download</code>, <code>todo</code> will add a special note container with a corresponding icon</li> <li class="level1"> the classes <code>danger</code>, <code>warning</code>, <code>caution</code>, <code>notice</code>, <code>safety</code> use safety colours (and no icons)</li> <li class="level1"> <code>round</code> can be added to anything with a background colour or a border and will only work in modern browsers (no Internet Explorer)</li> </ul> <p> </WRAP> </p> <p> <WRAP info 220px left> <em><b>Info</b></em> </p> <pre class="code"><WRAP info></WRAP> </pre><p> </p> <p> </WRAP> </p> <p> <WRAP tip 220px left> <em><b>Tip</b></em> </p> <pre class="code"><WRAP tip></WRAP> </pre><p> </p> <p> </WRAP> </p> <p> <WRAP important 220px left> <em><b>Important</b></em> </p> <pre class="code"><WRAP important></WRAP> </pre><p> </p> <p> </WRAP> </p> <p> <WRAP alert 220px left> <em><b>Alert</b></em> </p> <pre class="code"><WRAP alert></WRAP> </pre><p> </p> <p> </WRAP> </p> <p> <WRAP round help 220px left> <em><b>Help</b></em> </p> <pre class="code"><WRAP round help></WRAP> </pre><p> </p> <p> </WRAP> </p> <p> <WRAP download 220px left> <em><b>Download</b></em> </p> <pre class="code"><WRAP download></WRAP> </pre><p> </p> <p> </WRAP> </p> <p> <WRAP todo 220px left> <em><b>Todo</b></em> </p> <pre class="code"><WRAP todo></WRAP> </pre><p> </p> <p> </WRAP> </p> <p> <WRAP clear></WRAP> </p> <p> <b>Safety Notes:</b> </p> <p> <WRAP danger 27% left> <em><b>Danger</b></em> </p> <pre class="code"><WRAP danger></WRAP> </pre><p> </p> <p> </WRAP> </p> <p> <WRAP warning 27% left> <em><b>Warning</b></em> </p> <pre class="code"><WRAP warning></WRAP> </pre><p> </p> <p> </WRAP> </p> <p> <WRAP caution 27% left> <em><b>Caution</b></em> </p> <pre class="code"><WRAP caution></WRAP> </pre><p> </p> <p> </WRAP> </p> <p> <WRAP round notice 27% left> <em><b>Notice</b></em> </p> <pre class="code"><WRAP round notice></WRAP> </pre><p> </p> <p> </WRAP> </p> <p> <WRAP round safety 27% left> <em><b>Safety</b></em> </p> <pre class="code"><WRAP round safety></WRAP> </pre><p> </p> <p> </WRAP> </p> <p> <WRAP clear></WRAP> </p> <p> You can use notes and boxes also inside text with spans like this: <wrap info>info</wrap>, <wrap help>help</wrap>, <wrap alert>alert</wrap>, <wrap important>important</wrap>, <wrap tip>tip</wrap>, <wrap download>download</wrap>, <wrap todo>todo</wrap> and <wrap round box>round box</wrap> and <wrap danger>danger</wrap>, <wrap warning>warning</wrap>, <wrap caution>caution</wrap>, <wrap notice>notice</wrap>, <wrap safety>safety</wrap>. </p> <pre class="code"><wrap info>info</wrap>, <wrap help>help</wrap>, ... </pre><p> </p> </div> <h3>Marks</h3> <div class="level3"> <p> You can mark text as <wrap hi>highlighted</wrap>, <wrap lo>less significant</wrap> and <wrap em>especially emphasised</wrap>. </p> <pre class="code">You can mark text as <wrap hi>highlighted</wrap>, <wrap lo>less significant</wrap> and <wrap em>especially emphasised</wrap>. </pre><p> </p> <p> <img src="/lib/images/smileys/icon_exclaim.gif" class="icon" alt=":!:" /> This might look ugly in some templates and should be adjusted accordingly. </p> </div> <h3>Miscellaneous</h3> <div class="level3"> </div> <h4>Indent</h4> <div class="level4"> <p> <wrap indent>This text will appear indented.</wrap> </p> <pre class="code"><wrap indent>This text will appear indented.</wrap> </pre><p> </p> </div> <h4>Outdent</h4> <div class="level4"> <p> <wrap outdent>This text will appear "outdented".</wrap> </p> <pre class="code"><wrap outdent>This text will appear "outdented".</wrap> </pre><p> </p> </div> <h4>Prewrap</h4> <div class="level4"> <p> <WRAP prewrap 250px> </p> <pre class="code">Inside this code block the words will wrap to a new line although they are all in one line. </pre><p> </p> <p> </WRAP> </p> <pre class="code"><WRAP prewrap 250px> <code> Inside this code block the words will wrap to a new line although they are all in one line. </code> </pre><p> </p> <pre class="code"></WRAP> </pre><p> </p> </div> <h4>Spoiler</h4> <div class="level4"> <p> Here follows a spoiler: <wrap spoiler>Darth Vader is Luke's father.</wrap> </p> <pre class="code">Here follows a spoiler: <wrap spoiler>Darth Vader is Luke's father.</wrap> </pre><p> </p> <p> Just select the text in the spoiler box to be able to read its content. </p> </div> <h4>Hide</h4> <div class="level4"> <p> The following text is hidden: <wrap hide>John, please revise that sentence.</wrap> </p> <pre class="code">The following text is hidden: <wrap hide>John, please revise that sentence.</wrap> </pre><p> </p> <p> <img src="/lib/images/smileys/icon_exclaim.gif" class="icon" alt=":!:" /> Warning: The text will still appear in the source code, in non-modern browsers and is searchable. Do not hide any security risky secrets with it! </p> </div> <h4>Pagebreak</h4> <div class="level4"> <p> The following will add a pagebreak: <WRAP pagebreak></WRAP> </p> <pre class="code">The following will add a pagebreak: <WRAP pagebreak></WRAP> </pre><p> </p> <p> This has no effect on the browser screen. A <a href="http://reference.sitepoint.com/css/page-break-after" class="urlextern" title="http://reference.sitepoint.com/css/page-break-after" rel="nofollow">pagebreak</a> will force a new page in printouts. </p> </div> <h4>Nopagebreak</h4> <div class="level4"> <p> The following will try to avoid a pagebreak: <WRAP nopagebreak>much content, belonging together (like a long table)</WRAP> </p> <pre class="code">The following will try to avoid a pagebreak: <WRAP nopagebreak>much content, belonging together (like a long table)</WRAP> </pre><p> </p> <p> This also has no effect on the browser screen. It will try to <a href="http://reference.sitepoint.com/css/page-break-inside" class="urlextern" title="http://reference.sitepoint.com/css/page-break-inside" rel="nofollow">avoid a page break</a> in printouts. </p> </div> <h4>Noprint</h4> <div class="level4"> <p> <wrap noprint>This text appears on the screen, but not in print.</wrap> </p> <pre class="code"><wrap noprint>This text appears on the screen, but not in print.</wrap> </pre><p> </p> </div> <h4>Onlyprint</h4> <div class="level4"> <p> <wrap onlyprint>This text does not appear on the screen, but only in print.</wrap> </p> <pre class="code"><wrap onlyprint>This text does not appear on the screen, but only in print.</wrap> </pre><p> </p> </div> <h3>Typography</h3> <div class="level3"> <p> I advice against using the following typography classes. It's better to create semantic classes that reflect their meaning instead. </p> <ul> <li class="level1"> font family: <code>sansserif</code>, <code>serif</code>, <code>monospace</code></li> <li class="level1"> font size: <code>bigger</code>, <code>muchbigger</code>, <code>smaller</code></li> <li class="level1"> font colour: <code>fgred</code>, <code>fggreen</code>, <code>fgblue</code>, <code>fgcyan</code>, <code>fgviolet</code>, <code>fgyellow</code>, <code>fggrey</code>, <code>fgwhite</code>, <code>fgblack</code></li> <li class="level1"> background colour: <code>bgred</code>, <code>bggreen</code>, <code>bgblue</code>, <code>bgcyan</code>, <code>bgviolet</code>, <code>bgyellow</code>, <code>bggrey</code>, <code>bgwhite</code>, <code>bgblack</code></li> </ul> </div> <h3>Combining and Nesting</h3> <div class="level3"> <p> You can combine and nest all classes and types of boxes, e.g. </p> <p> <WRAP box bggreen fgblack 350px right :en> <em><b><u>Outer green box floats right</u></b></em> </p> <p> <WRAP 165px left> Inner nested box floats left and is partly <wrap em hi><u>em</u>phasized and <u>hi</u>ghlighted with nested <wrap bigger><u>bigger</u> text</wrap> inside</wrap>. </WRAP> </p> <p> Text inside outer right box, but beneath inner left box. </p> <p> <WRAP clear></WRAP> </p> <p> <WRAP round tip> Round tip box underneath, after a <code>clear</code>. </WRAP> </p> <p> </WRAP> </p> <pre class="code"><WRAP box bggreen fgblack 350px right :en> //**__Outer green box floats right__**// <WRAP 165px left> Inner nested box floats left and is partly <wrap em hi>__em__phasized and __hi__ghlighted with nested <wrap bigger>__bigger__ text</wrap> inside</wrap>. </WRAP> Text inside outer right box, but beneath inner left box. <WRAP clear></WRAP> <WRAP round tip> Round tip box underneath, after a ''clear''. </WRAP> </WRAP> </pre><p> </p> </div> <h2>Language and Text Direction</h2> <div class="level2"> <p> You can change the language and the reading direction of a wrap container by simply adding a colon followed by the language code, like this: </p> <pre class="code"><WRAP :he> זה עברית. ((<wrap :en>This means "This is Hebrew.", at least according to [[http://translate.google.com/|Google Translate]].</wrap>)) </WRAP> </pre><p> </p> <p> <WRAP :he> זה עברית. <sup><a href="#fn__1" id="fnt__1" class="fn_top">1)</a></sup> </WRAP> </p> <p> The text direction (<code>rtl</code>, right to left or <code>ltr</code>, left to right) will get inserted automatically and is solely dependent on the language. The list of currently supported languages is taken from: <a href="http://meta.wikimedia.org/wiki/Template:List_of_language_names_ordered_by_code" class="urlextern" title="http://meta.wikimedia.org/wiki/Template:List_of_language_names_ordered_by_code" rel="nofollow">http://meta.wikimedia.org/wiki/Template:List_of_language_names_ordered_by_code</a> (If you specify a language not listed there, it simply won't do anything.) </p> </div> <div class="footnotes"> <div class="fn"><sup><a href="#fnt__1" id="fn__1" class="fn_bot">1)</a></sup> <wrap :en>This means "This is Hebrew.", at least according to <a href="http://translate.google.com/" class="urlextern" title="http://translate.google.com/" rel="nofollow">Google Translate</a>.</wrap></div> </div>
[ close ]
Disable editor time-out messsages
Enable Complex Tables (
what's this?
)
Zusammenfassung:
Minor changes
wiki/wrap-beispiel.txt
· Zuletzt geändert 2014/04/01 15:34 (Externe Bearbeitung)
Seiten-Werkzeuge
Seite anzeigen
Ältere Versionen
Links hierher
Nach oben