From 355a64ae181affb42357caf4731b40cf8416905e Mon Sep 17 00:00:00 2001 From: Mahdi Mohammadi Date: Sun, 4 Jun 2017 11:03:46 +0100 Subject: [PATCH 1/9] some theming --- css/main.css | 35 ++++++++++++++++++++++++++++++++++- type.html | 1 + 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/css/main.css b/css/main.css index 5075517..d85d34e 100644 --- a/css/main.css +++ b/css/main.css @@ -43,9 +43,38 @@ } #content { - margin-top: 33px; + margin-top: 50px; + margin-left: auto; + margin-right: auto; + width: 80%; + border: 1px solid; } +button { + background-color:#4a6ca8; + -moz-border-radius:7px; + -webkit-border-radius:7px; + border-radius:7px; + border:1px solid #4e6096; + display:inline-block; + cursor:pointer; + color:#ffffff; + font-family:Arial; + font-size:17px; + padding:6px 16px; + text-decoration:none; + text-shadow:0px 1px 0px #283966; +} +button:hover { + background-color:#476e9e; +} +button:active { + position:relative; + top:1px; +} + + + #content.paused > .CodeMirror { opacity: 0.5; } @@ -71,3 +100,7 @@ text-decoration: none; color: blue; } + +body { +font-family: "Open Sans"; +} diff --git a/type.html b/type.html index fb55aec..732f273 100644 --- a/type.html +++ b/type.html @@ -5,6 +5,7 @@ Type + From 77048e3df3640ee8c8e8e38a1490dcac4eb37df3 Mon Sep 17 00:00:00 2001 From: Mahdi Mohammadi Date: Sun, 4 Jun 2017 11:23:21 +0100 Subject: [PATCH 2/9] ignore invalid and let him proceed --- js/type.js | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/js/type.js b/js/type.js index 1c144fb..8d72817 100644 --- a/js/type.js +++ b/js/type.js @@ -101,8 +101,6 @@ function setup(data, mime) { readOnly: true, autofocus: true, extraKeys: { - Up: () => {}, - Down: () => {}, Left: () => {}, Right: () => {} } @@ -274,24 +272,25 @@ function moveToEndOfPreviousLine() { } function isComplete() { +console.log('isComplete'); if (!areAllNextLinesEmpty()) { if (incompleteMark.lines.length != 0) { return false; } } - for (var i = 0; i < invalids.length; i++) { - let arr = invalids[i]; - if (arr) { - for (var j = 0; j < arr.length; j++) { - // invalid marks are sometimes cleared but not removed - // this can be checked by checking mark.lines.length != 0 - if (arr[j] && arr[j].lines.length != 0) { - return false; - } - } - } - } + // for (var i = 0; i < invalids.length; i++) { + // let arr = invalids[i]; + // if (arr) { + // for (var j = 0; j < arr.length; j++) { + // // invalid marks are sometimes cleared but not removed + // // this can be checked by checking mark.lines.length != 0 + // if (arr[j] && arr[j].lines.length != 0) { + // return false; + // } + // } + // } + // } return true; } From 2cace5fac0f34dff4bd075cf9b907e1b0e1a2ac9 Mon Sep 17 00:00:00 2001 From: Mahdi Mohammadi Date: Sun, 4 Jun 2017 11:55:27 +0100 Subject: [PATCH 3/9] Relative path --- about.html | 28 ++++++++++++++-------------- complete.html | 2 +- index.html | 4 ++-- repo.html | 2 +- type.html | 6 +++--- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/about.html b/about.html index 0ca3844..64a19c2 100644 --- a/about.html +++ b/about.html @@ -21,38 +21,38 @@

C

C++

C#

Java

JavaScript

Python

Swift

diff --git a/complete.html b/complete.html index 5d20ee3..b826e3c 100644 --- a/complete.html +++ b/complete.html @@ -16,6 +16,6 @@ - + diff --git a/index.html b/index.html index 52c7fe5..d8296f0 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ Type - + @@ -33,6 +33,6 @@ - + diff --git a/repo.html b/repo.html index d7e3e26..7f67a1c 100644 --- a/repo.html +++ b/repo.html @@ -36,6 +36,6 @@ - + diff --git a/type.html b/type.html index 732f273..a4e85c1 100644 --- a/type.html +++ b/type.html @@ -4,7 +4,7 @@ Type - + @@ -84,7 +84,7 @@ - - + + From ed75a73032ad7ad2add13679f8a0289e256c0ec3 Mon Sep 17 00:00:00 2001 From: Mahdi Mohammadi Date: Sun, 4 Jun 2017 12:02:37 +0100 Subject: [PATCH 4/9] fix some paths to be relative --- index.html | 2 +- js/index.js | 4 ++-- js/repo.js | 6 +++--- repo.html | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index d8296f0..5612804 100644 --- a/index.html +++ b/index.html @@ -29,7 +29,7 @@ -

About Type

+

About Type

diff --git a/js/index.js b/js/index.js index c200a54..9e6d29e 100644 --- a/js/index.js +++ b/js/index.js @@ -10,7 +10,7 @@ localforage.keys() repos.forEach((el) => { let li = $("
  • "); let a = $(""); - a.attr("href", `/repo.html#${el}`); + a.attr("href", `./repo.html#${el}`); let div = $("
    "); div.text(el); a.append(div); @@ -30,7 +30,7 @@ $("#form").submit((event) => { localforage.setItem(`${repo}/${branch}`, {}) .then(() => { - window.location.href = `/repo.html#${repo}/${branch}`; + window.location.href = `./repo.html#${repo}/${branch}`; }) .catch((e) => { throw e; diff --git a/js/repo.js b/js/repo.js index 0303dd1..1513a4c 100644 --- a/js/repo.js +++ b/js/repo.js @@ -7,7 +7,7 @@ localforage.getItem(repo) for (var f in val) { let li = $("
  • "); let a = $(""); - a.attr("href", `/type.html#${repo}/${f}`); + a.attr("href", `./type.html#${repo}/${f}`); let div = $("
    "); div.text(f); a.append(div); @@ -23,9 +23,9 @@ $("#form").submit((event) => { event.preventDefault(); let file = $("#file").val(); - window.location.href = `/type.html#${repo}/${file}`; + window.location.href = `./type.html#${repo}/${file}`; }); $("#back").click(() => { - window.location.href = "/"; + window.location.href = "./"; }); diff --git a/repo.html b/repo.html index 7f67a1c..2c71223 100644 --- a/repo.html +++ b/repo.html @@ -3,7 +3,7 @@ Type - + From 17b1775166848b39bbe6d8a244506f272e7a2097 Mon Sep 17 00:00:00 2001 From: Mahdi Mohammadi Date: Sun, 11 Jun 2017 22:22:52 +0000 Subject: [PATCH 5/9] change_font --- css/main.css | 1 + type.html | 1 + 2 files changed, 2 insertions(+) diff --git a/css/main.css b/css/main.css index 5075517..5f20a3d 100644 --- a/css/main.css +++ b/css/main.css @@ -44,6 +44,7 @@ #content { margin-top: 33px; + font-family: "Ubuntu Mono"; } #content.paused > .CodeMirror { diff --git a/type.html b/type.html index fb55aec..4db2201 100644 --- a/type.html +++ b/type.html @@ -5,6 +5,7 @@ Type + From 720f106608aa5f27155bced1639d6c2a9b03f7cd Mon Sep 17 00:00:00 2001 From: Mahdi Mohammadi Date: Mon, 12 Jun 2017 10:49:29 +0100 Subject: [PATCH 6/9] font --- css/main.css | 20 ++++++++++++++------ type.html | 4 ---- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/css/main.css b/css/main.css index fe31fb6..86121e8 100644 --- a/css/main.css +++ b/css/main.css @@ -43,16 +43,24 @@ } #content { -<<<<<<< HEAD - margin-top: 33px; - font-family: "Ubuntu Mono"; -======= + font-family: "Ubuntu Mono" !important; margin-top: 50px; margin-left: auto; margin-right: auto; width: 80%; - border: 1px solid; ->>>>>>> ed75a73032ad7ad2add13679f8a0289e256c0ec3 + border: none; +} +.CodeMirror-cursor { + background-color: #ffc40d !important; +} + +.CodeMirror-code, .CodeMirror { + background-color: transparent !important; +} + +.CodeMirror pre { + font-family: "Ubuntu Mono" !important; + font-size:10pt; } button { diff --git a/type.html b/type.html index af5f400..d4cadea 100644 --- a/type.html +++ b/type.html @@ -4,13 +4,9 @@ Type -<<<<<<< HEAD -======= - ->>>>>>> ed75a73032ad7ad2add13679f8a0289e256c0ec3 From 2693311cbd17d1a01ca49b69ed327a5c55912b24 Mon Sep 17 00:00:00 2001 From: Mahdi Mohammadinasab Date: Mon, 12 Jun 2017 12:41:24 +0100 Subject: [PATCH 7/9] Delete CNAME --- CNAME | 1 - 1 file changed, 1 deletion(-) delete mode 100644 CNAME diff --git a/CNAME b/CNAME deleted file mode 100644 index b9ad933..0000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -type.shadowfacts.net From 8dba800bb9062cdc9c3d7c35bb4c1a64778ff726 Mon Sep 17 00:00:00 2001 From: Mahdi Mohammadinasab Date: Mon, 12 Jun 2017 12:47:21 +0100 Subject: [PATCH 8/9] Create CNAME --- CNAME | 1 + 1 file changed, 1 insertion(+) create mode 100644 CNAME diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..bf77a37 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +type.mahdix.com \ No newline at end of file From a2b597be5acd3333647770bf672e2d2a8cdf5497 Mon Sep 17 00:00:00 2001 From: Mahdi Mohammadi Date: Mon, 12 Jun 2017 13:24:56 +0100 Subject: [PATCH 9/9] more consistent fonts, enable enter to bypass line --- css/main.css | 18 +++++++++--------- js/type.js | 4 ++-- repo.html | 6 +++--- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/css/main.css b/css/main.css index 86121e8..e236b5e 100644 --- a/css/main.css +++ b/css/main.css @@ -45,13 +45,13 @@ #content { font-family: "Ubuntu Mono" !important; margin-top: 50px; - margin-left: auto; - margin-right: auto; + margin-left: 25%; width: 80%; border: none; + word-wrap: break-word; } .CodeMirror-cursor { - background-color: #ffc40d !important; + border-color: #ffc40d !important; } .CodeMirror-code, .CodeMirror { @@ -60,7 +60,8 @@ .CodeMirror pre { font-family: "Ubuntu Mono" !important; - font-size:10pt; + font-size:14px; + line-height: 1.3em; } button { @@ -73,7 +74,7 @@ button { cursor:pointer; color:#ffffff; font-family:Arial; - font-size:17px; + font-size:12px; padding:6px 16px; text-decoration:none; text-shadow:0px 1px 0px #283966; @@ -99,13 +100,12 @@ button:active { } .prev-list > li { - display: inline-block; + display: block; width: 48%; list-style: none; margin: 5px; padding: 5px; - border: #CCC 1px solid; - border-radius: 3px; + font-family: "Ubuntu Mono" !important; } .prev-list > li > a, @@ -115,5 +115,5 @@ button:active { } body { -font-family: "Open Sans"; + font-family: "Open Sans" !important; } diff --git a/js/type.js b/js/type.js index 8d72817..85a279a 100644 --- a/js/type.js +++ b/js/type.js @@ -211,7 +211,7 @@ function handleEnter(event) { let pos = editor.getCursor(); let currentLine = editor.doc.getLine(pos.line); let trimmed = currentLine.trim(); - if (editor.getCursor().ch >= currentLine.indexOf(trimmed) + trimmed.length) { + // if (editor.getCursor().ch >= currentLine.indexOf(trimmed) + trimmed.length) { if (pos.line < editor.doc.size - 1) { var newLine = pos.line; while (true) { @@ -235,7 +235,7 @@ function handleEnter(event) { } else { goToNextChunk(); } - } + // } } function handleTab(event) { diff --git a/repo.html b/repo.html index 2c71223..0d9b551 100644 --- a/repo.html +++ b/repo.html @@ -28,9 +28,9 @@

    New File

    - -
    - + +

    +