This commit is contained in:
Mahdi Mohammadinasab 2017-07-03 09:30:56 +00:00 committed by GitHub
commit eae9b38c67
10 changed files with 98 additions and 51 deletions

2
CNAME
View File

@ -1 +1 @@
type.shadowfacts.net
type.mahdix.com

View File

@ -21,38 +21,38 @@
<h3>C</h3>
<ul>
<li><a href="/type.html#torvalds/linux/master/fs/ioctl.c">torvalds/linux: ioctl.c</a></li>
<li><a href="/type.html#antirez/redis/unstable/src/pubsub.c">antirez/redis: pubsub.c</a></li>
<li><a href="./type.html#torvalds/linux/master/fs/ioctl.c">torvalds/linux: ioctl.c</a></li>
<li><a href="./type.html#antirez/redis/unstable/src/pubsub.c">antirez/redis: pubsub.c</a></li>
</ul>
<h3>C++</h3>
<ul>
<li><a href="/type.html#qt/qt/4.8/src/gui/text/qstatictext.cpp">qt/qt: qstatictext.cpp</a></li>
<li><a href="/type.html#googlecartographer/cartographer/master/cartographer/mapping/trajectory_connectivity.cc">googlecartographer/cartographer: trajector_connectivity.cc</a></li>
<li><a href="./type.html#qt/qt/4.8/src/gui/text/qstatictext.cpp">qt/qt: qstatictext.cpp</a></li>
<li><a href="./type.html#googlecartographer/cartographer/master/cartographer/mapping/trajectory_connectivity.cc">googlecartographer/cartographer: trajector_connectivity.cc</a></li>
</ul>
<h3>C#</h3>
<ul>
<li><a href="/type.html#mxgmn/WaveFunctionCollapse/master/Model.cs">mxgmn/WaveFunctionCollapse: Model.cs</a></li>
<li><a href="/type.html#markrendle/Simple.Data/master/Simple.Data/DynamicTable.cs">markrendle/Simple.Data: DynamicTable.cs</a></li>
<li><a href="./type.html#mxgmn/WaveFunctionCollapse/master/Model.cs">mxgmn/WaveFunctionCollapse: Model.cs</a></li>
<li><a href="./type.html#markrendle/Simple.Data/master/Simple.Data/DynamicTable.cs">markrendle/Simple.Data: DynamicTable.cs</a></li>
</ul>
<h3>Java</h3>
<ul>
<li><a href="/type.html#google/guava/master/guava/src/com/google/common/eventbus/EventBus.java">google/guava: EventBus.java</a></li>
<li><a href="/type.html#JetBrains/intellij-community/master/java/java-psi-impl/src/com/intellij/psi/impl/JavaPsiFacadeImpl.java">JetBrains/intellij-community: JavaPsiFacadeImpl.java</a></li>
<li><a href="./type.html#google/guava/master/guava/src/com/google/common/eventbus/EventBus.java">google/guava: EventBus.java</a></li>
<li><a href="./type.html#JetBrains/intellij-community/master/java/java-psi-impl/src/com/intellij/psi/impl/JavaPsiFacadeImpl.java">JetBrains/intellij-community: JavaPsiFacadeImpl.java</a></li>
</ul>
<h3>JavaScript</h3>
<ul>
<li><a href="/type.html#jquery/jquery/master/src/core.js">jquery/jquery: core.js</a></li>
<li><a href="/type.html#nodejs/node/master/lib/_http_server.js">nodejs/node: _http_server.js</a></li>
<li><a href="./type.html#jquery/jquery/master/src/core.js">jquery/jquery: core.js</a></li>
<li><a href="./type.html#nodejs/node/master/lib/_http_server.js">nodejs/node: _http_server.js</a></li>
</ul>
<h3>Python</h3>
<ul>
<li><a href="/type.html#python/cpython/master/Lib/netrc.py">python/cpython: netrc.py</a></li>
<li><a href="/type.html#django/django/master/django/dispatch/dispatcher.py">django/django: dispatcher.py</a></li>
<li><a href="./type.html#python/cpython/master/Lib/netrc.py">python/cpython: netrc.py</a></li>
<li><a href="./type.html#django/django/master/django/dispatch/dispatcher.py">django/django: dispatcher.py</a></li>
</ul>
<h3>Swift</h3>
<ul>
<li><a href="/type.html#apple/swift/master/stdlib/public/core/FlatMap.swift">apple/swift: FlatMap.swift</a></li>
<li><a href="/type.html#raywenderlich/swift-algorithm-club/master/Linked%20List/LinkedList.swift">raywenderlich/swift-algorithm-club: LinkedList.swift</a></li>
<li><a href="./type.html#apple/swift/master/stdlib/public/core/FlatMap.swift">apple/swift: FlatMap.swift</a></li>
<li><a href="./type.html#raywenderlich/swift-algorithm-club/master/Linked%20List/LinkedList.swift">raywenderlich/swift-algorithm-club: LinkedList.swift</a></li>
</ul>
</body>

View File

@ -16,6 +16,6 @@
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="js/complete.js"></script>
<script src="./js/complete.js"></script>
</body>
</html>

View File

@ -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;
}

View File

@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<title>Type</title>
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="./css/main.css">
</head>
<body>
@ -29,10 +29,10 @@
<input type="submit" value="Type">
</form>
<p><a href="/about.html">About Type</a></p>
<p><a href="./about.html">About Type</a></p>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/localforage/1.4.2/localforage.min.js"></script>
<script src="/js/index.js"></script>
<script src="./js/index.js"></script>
</body>
</html>

View File

@ -10,7 +10,7 @@ localforage.keys()
repos.forEach((el) => {
let li = $("<li></li>");
let a = $("<a></a>");
a.attr("href", `/repo.html#${el}`);
a.attr("href", `./repo.html#${el}`);
let div = $("<div></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;

View File

@ -7,7 +7,7 @@ localforage.getItem(repo)
for (var f in val) {
let li = $("<li></li>");
let a = $("<a></a>");
a.attr("href", `/type.html#${repo}/${f}`);
a.attr("href", `./type.html#${repo}/${f}`);
let div = $("<div></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 = "./";
});

View File

@ -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;
}

View File

@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<title>Type</title>
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="./css/main.css">
</head>
<body>
@ -28,14 +28,14 @@
<h2>New File</h2>
<form id="form">
<input type="text" id="file" placeholder="path/to/file.js" required="true">
<br>
<input type="submit" value="Type">
<input type="text" id="file" placeholder="path/to/file.java" required="true">
<br /><br />
<button type="submit">Type</button>
</form>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/localforage/1.4.2/localforage.min.js"></script>
<script src="/js/repo.js"></script>
<script src="./js/repo.js"></script>
</body>
</html>

View File

@ -5,6 +5,8 @@
<title>Type</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.19.0/codemirror.min.css">
<link rel="stylesheet" href="/css/main.css">
<link href='//fonts.googleapis.com/css?family=PT+Sans|Ubuntu+Mono' rel=stylesheet type='text/css'>
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
</head>
<body>
@ -83,7 +85,7 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.19.0/codemirror.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/localforage/1.4.2/localforage.min.js"></script>
<script src="/js/languages.js"></script>
<script src="/js/type.js"></script>
<script src="./js/languages.js"></script>
<script src="./js/type.js"></script>
</body>
</html>