aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorps-george <george.punter15@imperial.ac.uk>2018-03-23 12:05:57 +0000
committerGitHub <noreply@github.com>2018-03-23 12:05:57 +0000
commitce0aa6dce32bb530c7ff31da76cd08c9c5cff034 (patch)
tree8109401683ac4efff3d32eb21e2227fe1a714549
parent44175b8b32bd3f828590ec8a7a0379acabbe8a3d (diff)
downloadFMark-ce0aa6dce32bb530c7ff31da76cd08c9c5cff034.tar.gz
FMark-ce0aa6dce32bb530c7ff31da76cd08c9c5cff034.zip
Example (#172)
* moving macro from included file to main file. removing TOC depth, fixing heading 6 * removing file
-rw-r--r--examples/example.fmark33
-rw-r--r--examples/macros.fmark23
2 files changed, 29 insertions, 27 deletions
diff --git a/examples/example.fmark b/examples/example.fmark
index 5c87c5f..8472c97 100644
--- a/examples/example.fmark
+++ b/examples/example.fmark
@@ -1,16 +1,41 @@
# FMark Example
-{{ include ./macros.fmark }}
-
## Table of contents
<!-- Relative links do not work in VS code, use Create HTML File. -->
-%%TOC depth=3
+%%TOC
## Macros
+### Macro Example 1
+<script type="text/javascript">
+
+ function loadCSS(filename){
+ var file = document.createElement("link");
+ file.setAttribute("rel", "stylesheet");
+ file.setAttribute("type", "text/css");
+ file.setAttribute("href", filename);
+ document.head.appendChild(file);
+
+ }
+
+</script>
+
+{% macro input(text)
+
+<form action="/html/tags/html_form_tag_action.cfm" method="post">
+<textarea name="comments" id="comments" style="width:92%;height:140px;padding:2%;font-size:1.2em;border:12px outset #6DB72C;">
+{{text}}
+</textarea><br>
+<input type="submit" value="Submit">
+</form>
+
+%}
+
{{ input(This is the text to be inputted into the Textbox) }}
+
+### Macro Example 2
{% macro make_table(00;01;02;10;11;12;20;21;22)
|{{00}}|{{01}}|{{02}}|
@@ -61,7 +86,7 @@ Note: _underscores_ must have a space on either side.
##### Heading 5
-##### Heading 6
+###### Heading 6
### Lists
diff --git a/examples/macros.fmark b/examples/macros.fmark
deleted file mode 100644
index 6868b15..0000000
--- a/examples/macros.fmark
+++ /dev/null
@@ -1,23 +0,0 @@
-<script type="text/javascript">
-
- function loadCSS(filename){
- var file = document.createElement("link");
- file.setAttribute("rel", "stylesheet");
- file.setAttribute("type", "text/css");
- file.setAttribute("href", filename);
- document.head.appendChild(file);
-
- }
-
-</script>
-
-{% macro input(text)
-
-<form action="/html/tags/html_form_tag_action.cfm" method="post">
-<textarea name="comments" id="comments" style="width:92%;height:140px;padding:2%;font-size:1.2em;border:12px outset #6DB72C;">
-{{text}}
-</textarea><br>
-<input type="submit" value="Submit">
-</form>
-
-%} \ No newline at end of file