diff options
author | pmichaud <pmichaud@524c5546-5005-0410-9a3e-e25e191bd360> | 2006-03-12 17:23:57 +0000 |
---|---|---|
committer | pmichaud <pmichaud@524c5546-5005-0410-9a3e-e25e191bd360> | 2006-03-12 17:23:57 +0000 |
commit | 91c30d347ad9173d626ccc821b94e4b0c21fd916 (patch) | |
tree | dc67dd7917df124afc257a23a03796428061a679 /wikilib.d/PmWiki.WikiStyleExamples | |
parent | 73738b89d01820148eb0b8b4b9e7ab803977ec21 (diff) | |
download | pmwiki.svn-91c30d347ad9173d626ccc821b94e4b0c21fd916.tar.bz2 |
Doc updates.
git-svn-id: svn://pmwiki.org/pmwiki/trunk@1362 524c5546-5005-0410-9a3e-e25e191bd360
Diffstat (limited to 'wikilib.d/PmWiki.WikiStyleExamples')
-rw-r--r-- | wikilib.d/PmWiki.WikiStyleExamples | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/wikilib.d/PmWiki.WikiStyleExamples b/wikilib.d/PmWiki.WikiStyleExamples index 9c6f4ff4..fa92d4ea 100644 --- a/wikilib.d/PmWiki.WikiStyleExamples +++ b/wikilib.d/PmWiki.WikiStyleExamples @@ -1,9 +1,10 @@ -version=pmwiki-2.0.6 ordered=1 urlencoded=1 -agent=Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3 -author=Russ Fink -host=130.85.24.91 +version=pmwiki-2.1.beta38 ordered=1 urlencoded=1 +agent=Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8) Gecko/20051128 SUSE/1.5-0.1 Firefox/1.5 +author=Pm +csum=updated notes, di link +host=24.1.26.255 name=PmWiki.WikiStyleExamples -rev=151 -targets=PmWiki.WikiStyles,PmWiki.PmWiki,PmWiki.DocumentationIndex,PmWiki.PageDirectives -text=PmWiki continues to use [[WikiStyles]] as a mechanism for styling text with color and other attributes. However, PmWiki 2.0 introduces the ability to control the styling further and to even place styles on blocks.%0a%0aThe basics of [[WikiStyles]] are the same as before--essentially a style is specified within a pair of %25-signs and styles the text that follows, as in:%0a%0a(:markup:) [=%0aThis text is %25color=red%25 red, %25color=blue%25 blue, %25%25 and normal (black).%0a=]%0a%0aThere are a wide number of available style properties, borrowed primarily from HTML and CSS. In addition, an author can define a style "shortcut" by using the [@define=@] property. For example, to define a style of [@%25red%25@], one can use:%0a%0a(:markup:) [=%0a%25color=red define=mystyle%25%0aHere is some %25mystyle%25 red text created using a style shortcut.%0a=]%0a%0aShortcuts can be combined with other styles, including other shortcuts:%0a%0a(:markup:) [=%0a%25color=red define=lovelyred%25%0a%25bgcolor=yellow define=likegrapefruit%25%0a%0a%25red%25 This text is red, %25red bgcolor=#ccc%25 red on a grey background, and %25lovelyred likegrapefruit%25 red on a yellow background. %0a=]%0a%0aSo far, this is all basically the same as what was available in PmWiki 1.0. PmWiki 2.0 includes the capability to style blocks, by using the [@apply=@] style property. Specifying [@apply=block@] in a `WikiStyle will cause that style to be applied to the entire block, instead of just the text that follows:%0a%0a(:markup:) [=%0aThis entire block %25apply=block bgcolor=yellow%25 has a yellow background, even though the `WikiStyle appears in the middle of the line. %25bgcolor=pink%25 Other inline (non-block) WikiStyles can appear in the middle of the line,%25%25 as before.%0a=]%0a%0aThis means it's now possible to do right-aligned and centered text:%0a%0a(:markup:) [=%0a%25block text-align=right%25 The text of this paragraph is right-aligned. %0a%0a%25block text-align=center%25 The text of this paragraph is centered. %0a=]%0a%0a%0aIn fact, PmWiki predefines [@%25right%25@] and [@%25center%25@] style shortcuts so that you can do this more simply:%0a%0a(:markup:) [=%0a%25right%25 This is right-aligned.%0a%0a%25center%25 This is centered.%0a=]%0a%0aAuthors can define their own custom styles:%0a%0a(:markup:) [=%0a%25block bgcolor=#fdf define=Pm%25%0a%25center bgcolor=#dfd border='3px dotted green' define=goofy%25%0a%25right bgcolor=#ffffcc border='1px dotted red' padding=5px define=rediguana%25%0a%25define=strike text-decoration=line-through%25%0a%0a%25Pm%25 Any text that is on a light purple background is a comment from [[~Pm]].%0a%0a%25goofy%25 Here's some text from Goofy.%0a%0a%25rediguana%25 bla bla by rediguana!%0a%0a%25goofy%25Hello, I am %25strike%25upset%25%25 %25strike%25disheartened%25%25 happy to meet you.%0a=]%0a%0aStyles can be applied to almost any kind of block:%0a%0a(:markup:) [=%0a* %25block bgcolor=yellow%25 Here is a list item%0a* Here's another list item%0a%0a* Here's more of a list%0a%0a# A new list%0a=]%0a%0aIn particular, this means that outlines are now possible using the predefined [@%25ROMAN%25@], [@%25roman%25@], [@%25ALPHA%25@], and [@%25alpha%25@] list-block styles. The style has to be specified on the first item in the list (and we may develop an alternate syntax for this sort of ordered list):%0a%0a(:markup:) [=%0a# %25ROMAN%25 Top level%0a## %25ALPHA%25 second-level%0a## second-level%0a## second-level%0a### third-level%0a### third-level%0a## second-level%0a### third-level%0a#### %25alpha%25 fourth-level%0a##### %25roman%25 fifth-level%0a##### fifth-level%0a#### fourth-level%0a# top-level%0a# top-level%0a=]%0a%0a[[WikiStyles]] can be combined with CSS stylesheets to do this automatically -- see [[Cookbook:OutlineLists]].%0a%0a%0a!! Q & A%0a%0a'''How do I get a block of preformatted text with a colored background and a border?'''%0a%0aUse something similar to this:%0a%0a(:markup:)%0a%25block bgcolor=#f0f9ff border='1px solid gray' padding=5px%25[@%0aip access-list extended example-acl%0aremark ** This is an example acl **%0adeny ip any host 10.0.0.1%0apermit ip any any%0a@]%0a(:markupend:)%0a%0aUsing the above example is there anyway to avoid it from making long paragraphs going off the side of the page (width wise) when it is not contained in a visable and defined box, such that I can have a long piece of text in one colour and can make amendments in another? (without it making the webpage really wide and losing easy access to edit, recent history etc) %0a%0aAlso I am using custom styles defined in my config.php. There is an example that uses this above but because it is using a markup box it seemes to stop it from scrolling off page. without it it does the same thing i'm experiancing. I've also noticed it seems to stop url turning into links as well. Please help!%0a%0a%25trail%25 %3c%3c|[[PmWiki.DocumentationIndex]]|>> -time=1127483917 +rev=158 +targets=Profiles.Pm,PmWiki.WikiStyles,PmWiki.DocumentationIndex +text=PmWiki uses [[WikiStyles]] for styling text with color and other attributes. PmWiki 2.0 introduced the ability to control the styling further and to even place styles on blocks.%0a%0aA style is specified within a pair of %25-signs and styles the text that follows, as in:%0a%0a(:markup:) [=%0aThis text is %25color=red%25 red, %25color=blue%25 blue, %25%25 and normal (black).%0a=]%0a%0aThere are a wide number of available style properties, borrowed primarily from HTML and CSS. In addition, an author can define a style "shortcut" by using the [@define=@] property. For example, to define a style of [@%25red%25@], one can use:%0a%0a(:markup:) [=%0a%25color=red define=mystyle%25%0aHere is some %25mystyle%25 red text created using a style shortcut.%0a=]%0a%0aShortcuts can be combined with other styles, including other shortcuts:%0a%0a(:markup:) [=%0a%25color=red define=lovelyred%25%0a%25bgcolor=yellow define=likegrapefruit%25%0a%0a%25red%25 This text is red, %25red bgcolor=#ccc%25 red on a grey background, and %25lovelyred likegrapefruit%25 red on a yellow background. %0a=]%0a%0aSo far, this is all basically the same as what was available in PmWiki 1.0. PmWiki 2.0 includes the capability to style blocks, by using the [@apply=@] style property. Specifying [@apply=block@] in a `WikiStyle will cause that style to be applied to the entire block, instead of just the text that follows:%0a%0a(:markup:) [=%0aThis entire block %25apply=block bgcolor=yellow%25 has a yellow background, even though the `WikiStyle appears in the middle of the line. %25bgcolor=pink%25 Other inline (non-block) WikiStyles can appear in the middle of the line,%25%25 as before.%0a=]%0a%0aThis means it's now possible to do right-aligned and centered text:%0a%0a(:markup:) [=%0a%25block text-align=right%25 The text of this paragraph is right-aligned. %0a%0a%25block text-align=center%25 The text of this paragraph is centered. %0a=]%0a%0a%0aIn fact, PmWiki predefines [@%25right%25@] and [@%25center%25@] style shortcuts so that you can do this more simply:%0a%0a(:markup:) [=%0a%25right%25 This is right-aligned.%0a%0a%25center%25 This is centered.%0a=]%0a%0aAuthors can define their own custom styles:%0a%0a(:markup:) [=%0a%25block bgcolor=#fdf define=Pm%25%0a%25center bgcolor=#dfd border='3px dotted green' define=goofy%25%0a%25right bgcolor=#ffffcc border='1px dotted red' padding=5px define=rediguana%25%0a%25define=strike text-decoration=line-through%25%0a%0a%25Pm%25 Any text that is on a light purple background is a comment from [[~Pm]].%0a%0a%25goofy%25 Here's some text from Goofy.%0a%0a%25rediguana%25 bla bla by rediguana!%0a%0a%25goofy%25Hello, I am %25strike%25upset%25%25 %25strike%25disheartened%25%25 happy to meet you.%0a=]%0a%0aStyles can be applied to almost any kind of block:%0a%0a(:markup:) [=%0a* %25block bgcolor=yellow%25 Here is a list item%0a* Here's another list item%0a%0a* Here's more of a list%0a%0a# A new list%0a=]%0a%0aIn particular, this means that outlines are now possible using the predefined [@%25ROMAN%25@], [@%25roman%25@], [@%25ALPHA%25@], and [@%25alpha%25@] list-block styles. The style has to be specified on the first item in the list (and we may develop an alternate syntax for this sort of ordered list):%0a%0a(:markup:) [=%0a# %25ROMAN%25 Top level%0a## %25ALPHA%25 second-level%0a## second-level%0a## second-level%0a### third-level%0a### third-level%0a## second-level%0a### third-level%0a#### %25alpha%25 fourth-level%0a##### %25roman%25 fifth-level%0a##### fifth-level%0a#### fourth-level%0a# top-level%0a# top-level%0a=]%0a%0a[[WikiStyles]] can be combined with CSS stylesheets to do this automatically -- see [[Cookbook:OutlineLists]].%0a%0a%0a!! Q & A%0a%0a'''How do I get a block of preformatted text with a colored background and a border?'''%0a%0aUse something similar to this:%0a%0a(:markup:)%0a%25block bgcolor=#f0f9ff border='1px solid gray' padding=5px%25[@%0aip access-list extended example-acl%0aremark ** This is an example acl **%0adeny ip any host 10.0.0.1%0apermit ip any any%0a@]%0a(:markupend:)%0a%0a%25trail%25 %3c%3c|[[Documentation Index]]|>> +time=1142184034 |