diff --git a/CNAME b/CNAME index b9ad933..bf77a37 100644 --- a/CNAME +++ b/CNAME @@ -1 +1 @@ -type.shadowfacts.net +type.mahdix.com \ No newline at end of file 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/css/main.css b/css/main.css index 5075517..e236b5e 100644 --- a/css/main.css +++ b/css/main.css @@ -43,8 +43,51 @@ } #content { - margin-top: 33px; + font-family: "Ubuntu Mono" !important; + margin-top: 50px; + margin-left: 25%; + width: 80%; + border: none; + word-wrap: break-word; } +.CodeMirror-cursor { + border-color: #ffc40d !important; +} + +.CodeMirror-code, .CodeMirror { + background-color: transparent !important; +} + +.CodeMirror pre { + font-family: "Ubuntu Mono" !important; + font-size:14px; + line-height: 1.3em; +} + +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:12px; + 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; @@ -57,13 +100,12 @@ } .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, @@ -71,3 +113,7 @@ text-decoration: none; color: blue; } + +body { + font-family: "Open Sans" !important; +} diff --git a/index.html b/index.html index 52c7fe5..5612804 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ Type - + @@ -29,10 +29,10 @@ -

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/js/type.js b/js/type.js index 1c144fb..85a279a 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: () => {} } @@ -213,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) { @@ -237,7 +235,7 @@ function handleEnter(event) { } else { goToNextChunk(); } - } + // } } function handleTab(event) { @@ -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; } diff --git a/repo.html b/repo.html index d7e3e26..0d9b551 100644 --- a/repo.html +++ b/repo.html @@ -3,7 +3,7 @@ Type - + @@ -28,14 +28,14 @@

    New File

    - -
    - + +

    +
    - + diff --git a/type.html b/type.html index fb55aec..d4cadea 100644 --- a/type.html +++ b/type.html @@ -5,6 +5,8 @@ Type + + @@ -83,7 +85,7 @@ - - + +