mirror of https://github.com/shadowfacts/type.git
Merge f8943488ac
into 058828d922
This commit is contained in:
commit
c0f4e9468e
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,2 +1,8 @@
|
|||
# type
|
||||
A FOSS clone of [typing.io](https://typing.io). You can check it out at [type.shadowfacts.net](https://type.shadowfacts.net).
|
||||
A FOSS clone of [typing.io](https://typing.io). You can check it out at [daisukeokaoss/type](https://daisukeokaoss.github.io/type/).
|
||||
|
||||
You can effectively read source code by typing github source code.
|
||||
|
||||
example is here.
|
||||
|
||||
https://daisukeokaoss.github.io/type/type.html#daisukeokaoss/type/master/js/type.js
|
||||
|
|
28
about.html
28
about.html
|
@ -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>
|
||||
|
|
|
@ -12,10 +12,13 @@
|
|||
|
||||
<div id="content">
|
||||
<p id="congrats"></p>
|
||||
<p>Return to <a id="repo">repo</a> or <a href="/">start</a>.</p>
|
||||
<p>Return to <a id="repo">repo</a> or <a href="./">start</a>.</p>
|
||||
<p>download <a id="certificate">certificate</a> of completion</p>
|
||||
</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='./build/pdfmake.min.js'></script>
|
||||
<script src='./build/vfs_fonts.js'></script>
|
||||
<script src="./js/complete.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -7,8 +7,12 @@ let file = hashBits[hashBits.length - 1];
|
|||
|
||||
$("#congrats").html(`Congratulations, you've completed <code>${file}</code> in <code>${repoName}</code>!`);
|
||||
|
||||
$("#repo").attr("href", `/repo.html#${repo}`);
|
||||
$("#repo").attr("href", `./repo.html#${repo}`);
|
||||
|
||||
$("#back").click(() => {
|
||||
window.location.href = `/type.html#${hash}`;
|
||||
window.location.href = `./type.html#${hash}`;
|
||||
});
|
||||
|
||||
$("#certificate").click(() => {
|
||||
var docDefinition = { content: 'Certificate for complesion\nCongratulation! you completed!!\n https://github.com/${repoName}/${file} \n Powerd by https://github.com/daisukeokaoss/type' };
|
||||
});
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -275,7 +275,7 @@ let languages = {
|
|||
extensions: ["pl", "al", "cgi", "fcgi", "perl", "ph", "plx", "pm", "pod", "psgi", "t"]
|
||||
},
|
||||
"PHP": {
|
||||
file: "php",
|
||||
file: ["php","htmlmixed","xml","javascript","clike"],
|
||||
mime: "application/x-httpd-php",
|
||||
extensions: ["php"]
|
||||
},
|
||||
|
|
|
@ -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 = "./";
|
||||
});
|
||||
|
|
|
@ -56,7 +56,7 @@ $("#restart").click(() => {
|
|||
|
||||
// back button
|
||||
$("#back").click(() => {
|
||||
window.location.href = `/repo.html#${repo}`;
|
||||
window.location.href = `./repo.html#${repo}`;
|
||||
});
|
||||
|
||||
// fetch file and setup
|
||||
|
@ -70,7 +70,7 @@ $.get({
|
|||
console.log(`Detected language as ${lang.mime}`);
|
||||
if (Array.isArray(lang.file)) {
|
||||
if (lang.file.length != 0) {
|
||||
var req = req = $.getScript(`https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.19.0/mode/${lang.file[0]}/${lang.file[0]}.min.js`);
|
||||
var req = $.getScript(`https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.19.0/mode/${lang.file[0]}/${lang.file[0]}.min.js`);
|
||||
for (var i = 1; i < lang.file.length; i++) {
|
||||
req = req.then($.getScript(`https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.19.0/mode/${lang.file[i]}/${lang.file[i]}.min.js`));
|
||||
}
|
||||
|
@ -407,7 +407,7 @@ function goToNextChunk() {
|
|||
});
|
||||
} else {
|
||||
let hash = window.location.hash;
|
||||
window.location.href = `/complete.html${hash}`;
|
||||
window.location.href = `./complete.html${hash}`;
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
@ -36,6 +36,6 @@
|
|||
|
||||
<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>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="UTF-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 rel="stylesheet" href="./css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
@ -83,7 +83,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>
|
||||
|
|
Loading…
Reference in New Issue