From f37d1b32eef6feccb6cdc98fbc50fde152f64338 Mon Sep 17 00:00:00 2001 From: Jim McCann Date: Sat, 27 Feb 2021 14:42:37 -0500 Subject: [PATCH] Simplifying presentation of index.html page to focus attention on conversion feature. --- index.html | 387 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 239 insertions(+), 148 deletions(-) diff --git a/index.html b/index.html index 73fbe8c..74a1b55 100644 --- a/index.html +++ b/index.html @@ -8,33 +8,12 @@ body { background: #d8e6f3; color: #282a36; - margin-top: 3vh; - margin-bottom: 3vh; - margin-left: 3vw; - margin-right: 3vw; + margin:0; + padding:0; font-family: 'Source Sans Pro', sans-serif; font-size: 16px; } -#wrapper { - display: grid; - align-items: left; - justify-items: left; - grid-template-columns: 40% 60%; -} - -#column1 { - grid-column: 1; - padding-right: 1em; -} - -#column2 { - grid-column: 2; - width: 100%; - padding-left: 1em; - overflow: hidden; -} - /* dropTarget style from dat viewer */ #dropTarget { position:fixed; @@ -99,48 +78,110 @@ color: #ff1786; /* color: #7934fa; */ font-weight: 900; + margin:0 0 10px 0; + padding:0; } -input[type='file'] { - display: none; +main p { + margin:10px 5px 5px 5px; + padding:0; } -.button { - background: #e2f3bb; - color: #3383ff; - border: 1px solid #ccc; - display: inline-block; - padding: 6px 12px; - cursor: pointer; - outline: 1px solid #fff; - outline-offset: -4px; -} -.button:hover, -.button:focus { - background: #d6ff74; - text-decoration: underline; +#explaination { + padding:5px 20px 2px 20px; + background:#bdcbd9; + color:#333; + text-align:center; } -.button.inactive { - text-decoration: none; - background: #d8d8d8; - color: #a7a7a7; - outline-color: #ccc; - cursor: not-allowed; + +a.markedLink:before { + content:'🔗'; + margin:0 3px 0 10px; + font-size:90%; +} + +main { + display:flex; + flex-flow:row; + align-items:stretch; + justify-content:center; + margin:50px 10px; +} + +main > div { + background:#bbb; + border-radius:10px; + max-width:18em; + padding:10px; + margin:0 5px; +} + +main > #to { + border:none; + border-radius:0; + width:70px; + background: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="100mm" height="100mm" viewBox="0 0 100 100" version="1.1">%3Cpath style="fill:%23ff1786;stroke:none;" d="M 0,30 H 40 V 0 L 100,50 40,100 V 70 H 0 Z"/>%3C/svg>'); + background-size:contain; + background-repeat:no-repeat; + background-position:center; } -.inactive:hover, -.inactive:focus { - background: #d8d8d8; +.file { + background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="61mm" height="81mm" viewBox="9.5 9.5 61 81" version="1.1">%3Cpath style="fill:%23f2f2f2;stroke:%23000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none" d="M 10,90 V 30 L 30,10 H 70 V 90 Z" />%3Cpath style="fill:%23f9f9f9;stroke:%23000000;stroke-width:1;stroke-linejoin:bevel;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" d="M 10,30 H 30 V 10 Z" />%3C/svg>'); + background-size:contain; + background-repeat:no-repeat; + background-position:top; + box-sizing:border-box; + width:153px; + height:202px; + + display:flex; + flex-flow:column; + justify-content:center; + + padding:50px 10px 10px 10px; + text-align:center; + + margin:0 auto; +} + +.file.load { + cursor:pointer; +} +.file.load:hover { + text-decoration:underline; +} + +.file.download { + cursor:pointer; +} +.file.download:hover { + text-decoration:underline; +} + +.file.download.empty { + cursor:default; +} +.file.download.empty:before { + content:''; +} + +.file.empty { + background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="61mm" height="81mm" viewBox="9.5 9.5 61 81" version="1.1">%3Cpath style="fill:%23f2f2f288;stroke:%23000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:2,2" d="M 10,90 V 30 L 30,10 H 70 V 90 Z" />%3Cpath style="fill:none;stroke:%23000000;stroke-width:1;stroke-linejoin:bevel;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:2,2" d="M 10,30 H 30 V 10" />%3C/svg>'); } +#messagesHeader { + margin:0 0 0 5px; +} #messages { background-color:#282a36; - margin:0.5em; + margin:0; padding:0.5em 0.5em 0.5em 20px; font-size: 14px; font-family: 'Source Code Pro', monospace; color:#fff; + min-height:200px; } #messages > li { @@ -175,74 +216,158 @@ color: #ff1786; } -#output { - font-size: 14px; - font-family: 'Source Code Pro', monospace; - background-color: #282a36; - color: white; - whitespace:pre; - overflow:scroll; - resize:both; - min-height:10em; +#inFileName, #outFileName { + font-weight:bold; } -#output:empty:before { - content:'(no output yet)'; +#inFileHolder:after { + content:'(click to load a different file)'; + font-size:75%; + color:#333; } + +#inFileHolder.empty:after { + content:'Click to load a file (or drag one into the window)'; + font-size:80%; +} + +#outFileHolder:after { + content:'(click to download)'; + font-size:75%; + color:#333; +} + +#outFileHolder.empty:after { + content:''; + font-size:80%; +} +#outFileHolder.error:after { + content:'Error!'; + font-size:200%; + color:#f44; +} + -

Knitout to KCode

-

-This page will convert knitout -- a low-level knitting machine output language -- into kcode, the format used by Kniterate knitting machines. +

+This is a web version of the knitout-backend-kniterate code developed by the Carnegie Mellon Textiles Lab.
+Report bugs. +Get source code (also includes a command-line version).

- -
-
-

Knitout (input)

- or drag one into the window.
- -

Messages

-
    -
  • (none yet)
  • - -
+ + +
+
+

Knitout

+ +

+ Knitout (.k or .knitout) is an instruction-oriented and portable knitting machine language. +

+
+
+

to

-
-

KCode (output)

- Download

-
-
-
-

+	
+

KCode

+ +
+
+

+ KCode (.kc) is a pass-oriented control format used to drive Kniterate knitting machines. +

+
+ +
+

Messages

+
    +
  • (none yet)
  • + +
+