mirror of https://github.com/shadowfacts/type.git
Use index.html for repo/file selector
This commit is contained in:
parent
1a733bac0c
commit
dbbf6d6e6c
68
index.html
68
index.html
|
@ -3,70 +3,22 @@
|
|||
<head>
|
||||
<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">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<select id="language">
|
||||
<option value="auto-detect">Auto-Detect</option>
|
||||
</select>
|
||||
<select id="theme">
|
||||
<option value="default">Default</option>
|
||||
<option value="3024-day">3024 Day</option>
|
||||
<option value="3024-night">3024 Night</option>
|
||||
<option value="abcdef">abcdef</option>
|
||||
<option value="ambiance-mobile">Ambiance Mobile</option>
|
||||
<option value="ambiance">Ambiance</option>
|
||||
<option value="base16-dark">Base16 Dark</option>
|
||||
<option value="base16-light">Base16 Light</option>
|
||||
<option value="bespin">Bespin</option>
|
||||
<option value="blackboard">Blackboard</option>
|
||||
<option value="cobalt">Cobalt</option>
|
||||
<option value="colorforth">Colorforth</option>
|
||||
<option value="dracula">Dracula</option>
|
||||
<option value="eclipse">Eclipse</option>
|
||||
<option value="elegant">Elegant</option>
|
||||
<option value="erlang-dark">Erlang Dark</option>
|
||||
<option value="hopscotch">Hopscotch</option>
|
||||
<option value="icecoder">Icecoder</option>
|
||||
<option value="isotope">Isotope</option>
|
||||
<option value="lesser-dark">Lesser Dark</option>
|
||||
<option value="liquibyte">Liquibyte</option>
|
||||
<option value="material">Material</option>
|
||||
<option value="mbo">mbo</option>
|
||||
<option value="mdn-like">MDN Like</option>
|
||||
<option value="midnight">Midnight</option>
|
||||
<option value="monokai">Monokai</option>
|
||||
<option value="neat">Neat</option>
|
||||
<option value="neo">Neo</option>
|
||||
<option value="night">Night</option>
|
||||
<option value="panda-syntax">Panda Syntax</option>
|
||||
<option value="paraiso-dark">Paraiso Dark</option>
|
||||
<option value="paraiso-light">Pairaiso Light</option>
|
||||
<option value="pastel-on-dark">Pastel on Dark</option>
|
||||
<option value="railscasts">Railscasts</option>
|
||||
<option value="rubyblue">Ruby Blue</option>
|
||||
<option value="seti">Seti</option>
|
||||
<option value="solarized">Solarized</option>
|
||||
<option value="the-matrix">The Matrix</option>
|
||||
<option value="tomorrow-night-bright">Tomorrow Night Bright</option>
|
||||
<option value="tomorrow-night-eighties">Tomorrow Night Eighties</option>
|
||||
<option value="ttcn">ttcn</option>
|
||||
<option value="twilight">Twilight</option>
|
||||
<option value="vibrant-ink">Vibrant Ink</option>
|
||||
<option value="xq-dark">XQ Dark</option>
|
||||
<option value="xq-light">XQ Light</option>
|
||||
<option value="yeti">Yeti</option>
|
||||
<option value="zenburn">Zenburn</option>
|
||||
</select>
|
||||
|
||||
<textarea id="editor"></textarea>
|
||||
<form id="form">
|
||||
<input type="text" id="repo" placeholder="owner/repo" required="true">
|
||||
<br>
|
||||
<input type="text" id="branch" value="master" placeholder="master" required="true">
|
||||
<br>
|
||||
<input type="text" id="file" placeholder="path/to/file.js" required="true">
|
||||
<br>
|
||||
<input type="submit" id="type" value="Type">
|
||||
</form>
|
||||
|
||||
<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/main.js"></script>
|
||||
<script src="/js/index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
$("#form").submit((event) => {
|
||||
event.preventDefault();
|
||||
|
||||
let repo = $("#repo").val();
|
||||
let branch = $("#branch").val();
|
||||
let file = $("#file").val();
|
||||
window.location.href = `/type.html#${repo}/${branch}/${file}`;
|
||||
});
|
|
@ -0,0 +1,72 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<select id="language">
|
||||
<option value="auto-detect">Auto-Detect</option>
|
||||
</select>
|
||||
<select id="theme">
|
||||
<option value="default">Default</option>
|
||||
<option value="3024-day">3024 Day</option>
|
||||
<option value="3024-night">3024 Night</option>
|
||||
<option value="abcdef">abcdef</option>
|
||||
<option value="ambiance-mobile">Ambiance Mobile</option>
|
||||
<option value="ambiance">Ambiance</option>
|
||||
<option value="base16-dark">Base16 Dark</option>
|
||||
<option value="base16-light">Base16 Light</option>
|
||||
<option value="bespin">Bespin</option>
|
||||
<option value="blackboard">Blackboard</option>
|
||||
<option value="cobalt">Cobalt</option>
|
||||
<option value="colorforth">Colorforth</option>
|
||||
<option value="dracula">Dracula</option>
|
||||
<option value="eclipse">Eclipse</option>
|
||||
<option value="elegant">Elegant</option>
|
||||
<option value="erlang-dark">Erlang Dark</option>
|
||||
<option value="hopscotch">Hopscotch</option>
|
||||
<option value="icecoder">Icecoder</option>
|
||||
<option value="isotope">Isotope</option>
|
||||
<option value="lesser-dark">Lesser Dark</option>
|
||||
<option value="liquibyte">Liquibyte</option>
|
||||
<option value="material">Material</option>
|
||||
<option value="mbo">mbo</option>
|
||||
<option value="mdn-like">MDN Like</option>
|
||||
<option value="midnight">Midnight</option>
|
||||
<option value="monokai">Monokai</option>
|
||||
<option value="neat">Neat</option>
|
||||
<option value="neo">Neo</option>
|
||||
<option value="night">Night</option>
|
||||
<option value="panda-syntax">Panda Syntax</option>
|
||||
<option value="paraiso-dark">Paraiso Dark</option>
|
||||
<option value="paraiso-light">Pairaiso Light</option>
|
||||
<option value="pastel-on-dark">Pastel on Dark</option>
|
||||
<option value="railscasts">Railscasts</option>
|
||||
<option value="rubyblue">Ruby Blue</option>
|
||||
<option value="seti">Seti</option>
|
||||
<option value="solarized">Solarized</option>
|
||||
<option value="the-matrix">The Matrix</option>
|
||||
<option value="tomorrow-night-bright">Tomorrow Night Bright</option>
|
||||
<option value="tomorrow-night-eighties">Tomorrow Night Eighties</option>
|
||||
<option value="ttcn">ttcn</option>
|
||||
<option value="twilight">Twilight</option>
|
||||
<option value="vibrant-ink">Vibrant Ink</option>
|
||||
<option value="xq-dark">XQ Dark</option>
|
||||
<option value="xq-light">XQ Light</option>
|
||||
<option value="yeti">Yeti</option>
|
||||
<option value="zenburn">Zenburn</option>
|
||||
</select>
|
||||
|
||||
<textarea id="editor"></textarea>
|
||||
|
||||
<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/main.js"></script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue