fix some paths to be relative

This commit is contained in:
Mahdi Mohammadi 2017-06-04 12:02:37 +01:00
parent 2cace5fac0
commit ed75a73032
4 changed files with 7 additions and 7 deletions

View File

@ -29,7 +29,7 @@
<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>

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

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