diff --git a/bootstrap.js b/bootstrap.js index aa899da..063c717 100755 --- a/bootstrap.js +++ b/bootstrap.js @@ -1,3 +1,3 @@ // This file is generated automatically, all changes made here will be lost. -var Bootstrap = {"Templates":{"text":"

\r\nXXX Genereal template description...\r\n

\r\n\r\n\r\n\t
\r\n\t

\r\n\t\t@source(./path)\r\n\t

\r\n\t

\r\n\t\t

@quote(./raw)
\r\n\t

\r\n
\r\n\r\n\r\n\r\n"},"WikiMacros":{"text":"## Syntax\r\n\r\nAny macro can be used in any of the two forms, either _inline_ or _HTML-like_.\r\n\r\nInline:\r\n```\r\n@macro-name(arg)\r\n```\r\n\r\nHTML-style:\r\n```\r\n\r\n\r\n\r\n ...text...\r\n\r\n```\r\n\r\nThe two forms are almost identical, with the only difference being that the \r\ninline form does not support body text (note that some macros may provide\r\nthis functionality as an argument, namely `slot`).\r\n\r\nThe two forms exist to fill two distinct functions:\r\n- inline: compatible with attribute values and short\r\n- html-like: element-like, simpler when dealing with html\r\n\r\n\r\n## Macros\r\n\r\n### filter (name)\r\n\r\nEnable or disable a page filter.\r\n\r\nA filter is a way to transform the page source.\r\n\r\nArguments:\r\n- `name` -- filter name. If name is preceded with a '-' then it \r\nwill be forced off. This is useful for disabling _default_ filters, or \r\nfilters added previously in templates.\r\n\r\nFilters:\r\n- wikiword (default)\r\n- markdown\r\n\r\nExample:\r\n- `[./_edit]` -- see the macro at the end of the page.\r\n\r\n\r\n### include (src text)\r\n\r\nInclude a page. The included page is rendered independently from current\r\npage and is inserted as-is in macro body.\r\n\r\nNote that this will produce a `include` tag in the code that contains \r\nthe included page, this makes this tag not suitable for use anywhere \r\nbut an html element body.\r\n\r\nArguments:\r\n- `src` -- path to source page.\r\n- `text` -- is used when recursive include is detected and ignored otherwise.\r\n\r\n### source (src) / quote (src)\r\n\r\nInsert a page without rendering. This is similar to include but will not\r\nrender the page. \r\n\r\nThe difference between `source` and `quote` is:\r\n- _source_ includes the page as-is\r\n- _quotes_ escapes the page (i.e. _quotes_ it's source) for its code to \r\n display in the rendered HTML correctly.\r\n\r\nArguments:\r\n- `src` -- path to source page.\r\n\r\n\r\n\r\n### slot (name text)\r\n\r\nDefine or fill a slot.\r\n\r\nFirst occurrence of a `name` will _define_ a slot and fill it with `text`.\r\nEach new occurrence of a name will change slot content.\r\n\r\n\r\n### macro (name src text) / else ()\r\n\r\nApply macro to source page and include the result.\r\n\r\nThis is similar to include but does not require a separate page.\r\n\r\nBoth `name` and `src` are optional.\r\n\r\nIf `name` is given a _named macro_ is defined. This macro can be later \r\nreferenced (used) by name. A named macro can be redefined/overridden.\r\n\r\nIf `src` is given a macro is applied to a specific page or range of pages\r\n(see: WikiPath).\r\n\r\nFor a macro to be useful it must have a body (`text`), either defined as\r\na named macro or in the current macro.\r\n\r\nArguments:\r\n- `name` -- macro name (optional).\r\n- `src` -- path to source page (optional).\r\n\r\n\r\n`else` macro is applicable inside `macro`. it is used when the `src` path\r\nof `macro` matches no pages.\r\n\r\n\r\n\r\n\r\n"},"WikiPath":{"text":""},"System/settings":{"text":"/**********************************************************************\r\n* !EXPERIMENTAL!\r\n*\r\n* These filters are required for .code to be JSON compatible: \r\n* @filter(json) @filter(-wikiword)\r\n*\r\n* NOTE: currently inline editing may mess this up.\r\n* NOTE: all the comments will be removed before parsing.\r\n*\r\n**********************************************************************/\r\n\r\n// The actual root data to be parsed...\r\n{\r\n // Wiki config...\r\n \"HomePage\": \"WikiHome\",\r\n \"ShowSystemPages\": false,\r\n \"ShowBasePages\": true,\r\n // NOTE: setting this to true will effectively allow pages to control\r\n // your wiki. This is a potential threat if you allow untrusted\r\n // content on your wiki...\r\n // You are doing this at your own risk!\r\n \"AllowScripts\": false,\r\n\r\n // PeerJS API key...\r\n \"PeerJS-API-key\": \"XXX\",\r\n // PeerJS server URL (leave blank for default)...\r\n \"PeerJS-Server\": null,\r\n\r\n // XXX\r\n \"CouchDB-Server\": null\r\n}\r\n\r\n\r\n/*********************************************************************/\r\n"},"System/style":{"text":".raw,\r\n.text {\r\n display: block;\r\n}\r\n\r\n.item.checked {\r\n\topacity: 0.3;\r\n}\r\n.item.checked:hover {\r\n\topacity: 0.8;\r\n}\r\n.item.checked .item-content * {\r\n\ttext-decoration: line-through;\r\n}\r\n\r\n.button {\r\n\ttext-decoration: none;\r\n}\r\n.button:last-child {\r\n\tmargin-right: 5px;\r\n}\r\n\r\n.separator~* {\r\n\tfloat: right;\r\n}\r\n\r\n.item:hover {\r\n\tbackground-color: rgba(0, 0, 0, 0.05);\r\n}\r\n.item .button {\r\n\tdisplay: none;\r\n}\r\n.item:hover .button {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.sort-handle {\r\n\topacity: 0.1;\r\n\tpadding-left: 5px;\r\n\tpadding-right: 5px;\r\n\tcursor: pointer;\r\n\ttext-decoration: none;\r\n}\r\n.item:hover .sort-handle {\r\n\topacity: 0.3;\r\n}\r\n.sort-placeholder {\r\n\tdisplay: block;\r\n}\r\n\r\n/* vim:set ts=4 sw=4 ft=css : */\r\n"},"Templates/all_pages":{"text":"\r\n\t
\r\n\t\t[@source(./path)]\r\n\t\t\r\n\t\t×\r\n\t
\r\n
\r\n\r\n\r\n"},"Templates/EmptyOutline":{"text":"@include(./outline)\r\n"},"Templates/EmptyPage":{"text":"\r\n\r\nPage @include(./path) is empty.

\r\n\r\nLinks to this page:
\r\n@include(./links)

\r\n\r\n\r\n"},"Templates/EmptyToDo":{"text":"@include(./todo)\r\n"},"Templates/outline":{"text":"\r\n\r\n\r\n\t\r\n\r\n\r\n\r\n\t×\r\n\r\n\r\n\r\n
\r\n\t\r\n\t\t+\r\n\t\r\n
\r\n
\r\n\t\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t\r\n\t\t\t
\r\n\t\t
\r\n\t
\r\n
\r\n\r\n\r\n"},"Templates/pages":{"text":"\r\n\t
\r\n\t\t[@source(./path)]\r\n\t\t\r\n\t\t×\r\n\t
\r\n
\r\n\r\n\r\n"},"Templates/todo":{"text":"\r\n\t\r\n\r\n\r\n\r\n\r\n\r\n"},"Templates/tree":{"text":"
\r\n\t\r\n\t\t
\r\n\t\t\t \r\n\t\t\t@source(./title)\r\n\t\t\t\r\n\t\t\t×\r\n\t\t
\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
\r\n\r\n\r\n"},"Templates/_css":{"text":"\r\n"},"Templates/_edit":{"text":"\r\n\r\n\r\n\r\n(view)\r\n\r\n@source(../title)\r\n\r\n\r\n\t
\r\n
\r\n\r\n\r\n"},"Templates/_outline":{"text":"\r\n\r\n@source(../title)\r\n\r\n\r\n\t@include(../outline)\r\n\r\n\r\n\r\n"},"Templates/_raw":{"text":"@source(..)\r\n"},"Templates/_todo":{"text":"\r\n\r\n@source(../title)\r\n\r\n\r\n\t@include(../todo)\r\n\r\n\r\n\r\n"},"Templates/_view":{"text":"\r\n@include(style/_css)\r\n\r\n
\r\n\t \r\n\r\n\t[@source(../path)]\r\n\r\n\t (edit) \r\n\r\n\t\r\n\r\n\t+\r\n
\r\n\r\n
\r\n\t

\r\n\t\t@source(../title)\r\n\t

\r\n
\r\n\r\n\r\n\t\r\n\r\n\r\n
\r\nhome\r\n\r\n\r\n"}} \ No newline at end of file +var Bootstrap = {"Templates":{"text":"

\r\nXXX Genereal template description...\r\n

\r\n\r\n\r\n\t
\r\n\t

\r\n\t\t@source(./path)\r\n\t

\r\n\t

\r\n\t\t

@quote(./raw)
\r\n\t

\r\n
\r\n\r\n\r\n\r\n"},"WikiMacros":{"text":"## Syntax\r\n\r\nAny macro can be used in any of the two forms, either _inline_ or _HTML-like_.\r\n\r\nInline:\r\n```\r\n@macro-name(arg)\r\n```\r\n\r\nHTML-style:\r\n```\r\n\r\n\r\n\r\n ...text...\r\n\r\n```\r\n\r\nThe two forms are almost identical, with the only difference being that the \r\ninline form does not support body text (note that some macros may provide\r\nthis functionality as an argument, namely `slot`).\r\n\r\nThe two forms exist to fill two distinct functions:\r\n- inline: compatible with attribute values and short\r\n- html-like: element-like, simpler when dealing with html\r\n\r\n### Escaping macros\r\n\r\nMacros can be escaped for inclusion in the page, the two types of macros \r\nare escaped a bit differently:\r\n\r\n- inline macros -- escaped by preceding with a `\\`\r\n\r\n ```\r\n \\\\@include(SomePage)\r\n ```\r\n\r\n Displayed in page as:\r\n\r\n \\@include(SomePage)\r\n\r\n\r\n- html-like macros -- escaped _the HTML way_\r\n\r\n ```\r\n <include src=\"SomePage\"\\>\r\n ```\r\n\r\n Displayed in page as:\r\n\r\n\t <include src=\"SomePage\"\\>\r\n\r\n\r\n\r\n\r\n## Macros\r\n\r\n### filter (name)\r\n\r\nEnable or disable a page filter.\r\n\r\nA filter is a way to transform the page source.\r\n\r\nArguments:\r\n- `name` -- filter name. If name is preceded with a '-' then it \r\nwill be forced off. This is useful for disabling _default_ filters, or \r\nfilters added previously in templates.\r\n\r\nFilters:\r\n- wikiword (default)\r\n- markdown\r\n\r\nExample:\r\n- `[./_edit]` -- see the macro at the end of the page.\r\n\r\n\r\n### include (src text)\r\n\r\nInclude a page. The included page is rendered independently from current\r\npage and is inserted as-is in macro body.\r\n\r\nNote that this will produce a `include` tag in the code that contains \r\nthe included page, this makes this tag not suitable for use anywhere \r\nbut an html element body.\r\n\r\nArguments:\r\n- `src` -- path to source page.\r\n- `text` -- is used when recursive include is detected and ignored otherwise.\r\n\r\n### source (src) / quote (src)\r\n\r\nInsert a page without rendering. This is similar to include but will not\r\nrender the page. \r\n\r\nThe difference between `source` and `quote` is:\r\n- _source_ includes the page as-is\r\n- _quotes_ escapes the page (i.e. _quotes_ it's source) for its code to \r\n display in the rendered HTML correctly.\r\n\r\nArguments:\r\n- `src` -- path to source page.\r\n\r\n\r\n\r\n### slot (name text)\r\n\r\nDefine or fill a slot.\r\n\r\nFirst occurrence of a `name` will _define_ a slot and fill it with `text`.\r\nEach new occurrence of a name will change slot content.\r\n\r\n\r\n### macro (name src text) / else ()\r\n\r\nApply macro to source page and include the result.\r\n\r\nThis is similar to include but does not require a separate page.\r\n\r\nBoth `name` and `src` are optional.\r\n\r\nIf `name` is given a _named macro_ is defined. This macro can be later \r\nreferenced (used) by name. A named macro can be redefined/overridden.\r\n\r\nIf `src` is given a macro is applied to a specific page or range of pages\r\n(see: WikiPath).\r\n\r\nFor a macro to be useful it must have a body (`text`), either defined as\r\na named macro or in the current macro.\r\n\r\nArguments:\r\n- `name` -- macro name (optional).\r\n- `src` -- path to source page (optional).\r\n\r\n\r\n`else` macro is applicable inside `macro`. it is used when the `src` path\r\nof `macro` matches no pages.\r\n\r\n\r\n\r\n\r\n"},"WikiPath":{"text":""},"System/settings":{"text":"/**********************************************************************\r\n* !EXPERIMENTAL!\r\n*\r\n* These filters are required for .code to be JSON compatible: \r\n* @filter(json) @filter(-wikiword)\r\n*\r\n* NOTE: currently inline editing may mess this up.\r\n* NOTE: all the comments will be removed before parsing.\r\n*\r\n**********************************************************************/\r\n\r\n// The actual root data to be parsed...\r\n{\r\n // Wiki config...\r\n \"HomePage\": \"WikiHome\",\r\n \"ShowSystemPages\": false,\r\n \"ShowBasePages\": true,\r\n // NOTE: setting this to true will effectively allow pages to control\r\n // your wiki. This is a potential threat if you allow untrusted\r\n // content on your wiki...\r\n // You are doing this at your own risk!\r\n \"AllowScripts\": false,\r\n\r\n // PeerJS API key...\r\n \"PeerJS-API-key\": \"XXX\",\r\n // PeerJS server URL (leave blank for default)...\r\n \"PeerJS-Server\": null,\r\n\r\n // XXX\r\n \"CouchDB-Server\": null\r\n}\r\n\r\n\r\n/*********************************************************************/\r\n"},"System/style":{"text":".raw,\r\n.text {\r\n display: block;\r\n}\r\n\r\n.item.checked {\r\n\topacity: 0.3;\r\n}\r\n.item.checked:hover {\r\n\topacity: 0.8;\r\n}\r\n.item.checked .item-content * {\r\n\ttext-decoration: line-through;\r\n}\r\n\r\n.button {\r\n\ttext-decoration: none;\r\n}\r\n.button:last-child {\r\n\tmargin-right: 5px;\r\n}\r\n\r\n.separator~* {\r\n\tfloat: right;\r\n}\r\n\r\n.item:hover {\r\n\tbackground-color: rgba(0, 0, 0, 0.05);\r\n}\r\n.item .button {\r\n\tdisplay: none;\r\n}\r\n.item:hover .button {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.sort-handle {\r\n\topacity: 0.1;\r\n\tpadding-left: 5px;\r\n\tpadding-right: 5px;\r\n\tcursor: pointer;\r\n\ttext-decoration: none;\r\n}\r\n.item:hover .sort-handle {\r\n\topacity: 0.3;\r\n}\r\n.sort-placeholder {\r\n\tdisplay: block;\r\n}\r\n\r\n/* vim:set ts=4 sw=4 ft=css : */\r\n"},"Templates/all_pages":{"text":"\r\n\t
\r\n\t\t[@source(./path)]\r\n\t\t\r\n\t\t×\r\n\t
\r\n
\r\n\r\n\r\n"},"Templates/EmptyOutline":{"text":"@include(./outline)\r\n"},"Templates/EmptyPage":{"text":"\r\n\r\nPage @include(./path) is empty.

\r\n\r\nLinks to this page:
\r\n@include(./links)

\r\n\r\n\r\n"},"Templates/EmptyToDo":{"text":"@include(./todo)\r\n"},"Templates/outline":{"text":"\r\n\r\n\r\n\t\r\n\r\n\r\n\r\n\t×\r\n\r\n\r\n\r\n
\r\n\t\r\n\t\t+\r\n\t\r\n
\r\n
\r\n\t\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t\r\n\t\t\t
\r\n\t\t
\r\n\t
\r\n
\r\n\r\n\r\n"},"Templates/pages":{"text":"\r\n\t
\r\n\t\t[@source(./path)]\r\n\t\t\r\n\t\t×\r\n\t
\r\n
\r\n\r\n\r\n"},"Templates/todo":{"text":"\r\n\t\r\n\r\n\r\n\r\n\r\n\r\n"},"Templates/tree":{"text":"
\r\n\t\r\n\t\t
\r\n\t\t\t \r\n\t\t\t@source(./title)\r\n\t\t\t\r\n\t\t\t×\r\n\t\t
\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
\r\n\r\n\r\n"},"Templates/_css":{"text":"\r\n"},"Templates/_edit":{"text":"\r\n\r\n\r\n\r\n(view)\r\n\r\n@source(../title)\r\n\r\n\r\n\t
\r\n
\r\n\r\n\r\n"},"Templates/_outline":{"text":"\r\n\r\n@source(../title)\r\n\r\n\r\n\t@include(../outline)\r\n\r\n\r\n\r\n"},"Templates/_raw":{"text":"@source(..)\r\n"},"Templates/_todo":{"text":"\r\n\r\n@source(../title)\r\n\r\n\r\n\t@include(../todo)\r\n\r\n\r\n\r\n"},"Templates/_view":{"text":"\r\n@include(style/_css)\r\n\r\n
\r\n\t \r\n\r\n\t[@source(../path)]\r\n\r\n\t (edit) \r\n\r\n\t\r\n\r\n\t+\r\n
\r\n\r\n
\r\n\t

\r\n\t\t@source(../title)\r\n\t

\r\n
\r\n\r\n\r\n\t\r\n\r\n\r\n
\r\nhome\r\n\r\n\r\n"}} \ No newline at end of file diff --git a/bootstrap/WikiMacros.md b/bootstrap/WikiMacros.md index 8b0bc5b..39aecb1 100644 --- a/bootstrap/WikiMacros.md +++ b/bootstrap/WikiMacros.md @@ -24,6 +24,34 @@ The two forms exist to fill two distinct functions: - inline: compatible with attribute values and short - html-like: element-like, simpler when dealing with html +### Escaping macros + +Macros can be escaped for inclusion in the page, the two types of macros +are escaped a bit differently: + +- inline macros -- escaped by preceding with a `\` + + ``` + \\@include(SomePage) + ``` + + Displayed in page as: + + \@include(SomePage) + + +- html-like macros -- escaped _the HTML way_ + + ``` + <include src="SomePage"\> + ``` + + Displayed in page as: + + <include src="SomePage"\> + + + ## Macros