mirror of https://github.com/shadowfacts/type.git
More toolbars/back buttons
This commit is contained in:
parent
27e7357e52
commit
c4a32aeb42
|
@ -6,8 +6,14 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<p id="congrats"></p>
|
<div id="toolbar">
|
||||||
<p>Return to <a id="repo">repo</a> or <a href="/">start</a>.</p>
|
<button id="back">‹ Back</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
<p id="congrats"></p>
|
||||||
|
<p>Return to <a id="repo">repo</a> or <a href="/">start</a>.</p>
|
||||||
|
</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/jquery/3.1.1/jquery.min.js"></script>
|
||||||
<script src="js/complete.js"></script>
|
<script src="js/complete.js"></script>
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
height: 20px;
|
height: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.CodeMirror {
|
#content {
|
||||||
margin-top: 33px;
|
margin-top: 33px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,3 +8,7 @@ let file = hashBits[hashBits.length - 1];
|
||||||
$("#congrats").html(`Congratulations, you've completed <code>${file}</code> in <code>${repoName}</code>!`);
|
$("#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}`;
|
||||||
|
});
|
||||||
|
|
|
@ -23,3 +23,7 @@ $("#form").submit((event) => {
|
||||||
let file = $("#file").val();
|
let file = $("#file").val();
|
||||||
window.location.href = `/type.html#${repo}/${file}`;
|
window.location.href = `/type.html#${repo}/${file}`;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#back").click(() => {
|
||||||
|
window.location.href = "/";
|
||||||
|
});
|
||||||
|
|
42
repo.html
42
repo.html
|
@ -6,27 +6,33 @@
|
||||||
<link rel="stylesheet" href="/css/main.css">
|
<link rel="stylesheet" href="/css/main.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<noscript>
|
|
||||||
<div class="error">
|
|
||||||
JavaScript must be enabled.
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
</noscript>
|
|
||||||
|
|
||||||
<h1 id="repo"></h1>
|
<div id="toolbar">
|
||||||
|
<button id="back">‹ Back</button>
|
||||||
<h2>Previous Files</h2>
|
|
||||||
<div>
|
|
||||||
<ul class="prev-list" id="prev-files"></ul>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>New File</h2>
|
<div id="content">
|
||||||
<form id="form">
|
<noscript>
|
||||||
<input type="text" id="file" placeholder="path/to/file.js" required="true">
|
<div class="error">
|
||||||
<br>
|
JavaScript must be enabled.
|
||||||
<input type="submit" value="Type">
|
</div>
|
||||||
</form>
|
<br>
|
||||||
|
</noscript>
|
||||||
|
|
||||||
|
<h1 id="repo"></h1>
|
||||||
|
|
||||||
|
<h2>Previous Files</h2>
|
||||||
|
<div>
|
||||||
|
<ul class="prev-list" id="prev-files"></ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<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">
|
||||||
|
</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/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="https://cdnjs.cloudflare.com/ajax/libs/localforage/1.4.2/localforage.min.js"></script>
|
||||||
|
|
|
@ -72,7 +72,9 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<textarea id="editor"></textarea>
|
<div id="content">
|
||||||
|
<textarea id="editor"></textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.19.0/codemirror.min.js"></script>
|
<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/jquery/3.1.1/jquery.min.js"></script>
|
||||||
|
|
Loading…
Reference in New Issue