From 2eb744b341a5fdfcab9d2f0c77e2571c5628ab1d Mon Sep 17 00:00:00 2001 From: Chuck Dries Date: Mon, 20 Mar 2017 20:21:30 -0700 Subject: [PATCH] preview of code generated easier to copy generated code now --- roboticchuck.html | 50 +++++++++++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/roboticchuck.html b/roboticchuck.html index e1c63ec..42bb39d 100644 --- a/roboticchuck.html +++ b/roboticchuck.html @@ -7,16 +7,23 @@ Robotic Chuck @@ -38,32 +45,41 @@ tstring = tstring + formatter.join(""); tstring = tstring + "" outBox.innerText = tstring; + outBox.style.minHeight = (formatter.length + 9) + "em"; + document.getElementById("preview").innerHTML = tstring; } - +

- Title of box:
- Description text:
-

Enter the links to generate according to this format:

-
[
+    Title of box: 
Description text: +
+

Enter the links to generate according to this format:

+
[
     {
-        "headline": "A beautiful headline!",
+        "headline": "A Beautiful Headline!",
         "url": "this-is-a-sample-url"
     },
+    {
+        "headline": "A Second Beautiful Headline!",
+        "url": "second-sample-url"
+    },
     {
         "headline": "Yet Another Headline",
         "url": "yet-another-url"
     }
 ]
 
- -

click to generate

-

Paste the following code into a safeembed

-

-    
-

Don't forget: For each page you embed on, add the following bit of code just before the </h4> at the end of the line on the line that corresponds to the current page. -

<span class="here">(You are here)</span>
-
+

This format is known as JSON, it's an internet standard that's supposed to be easy for humans and computers to read. Note how commas are used to separate multiple items but are never used after the last item in a set. This is important, it will not work if you include a trailing comma where there should not be one.

+ +

click to generate

+

Paste the following code into a safeembed

+ +

Don't forget: For each page you embed on, add the following bit of code just before the </h4> at the end of the line on the line that corresponds to the current page. +

<span class="here">(You are here)</span>
+

The code generated will look roughly like this:

+
+

Gryphon overrides certain styles by default, so make sure to test on your article.