mirror of https://github.com/ColorlibHQ/AdminLTE
Browse Source
* Update logo-switch.astro * Update README.md * convertPathToHtml bug fix * Create index.html * css-lint fixedpull/5186/head
Daniel
1 year ago
committed by
REJack
7 changed files with 131 additions and 18 deletions
@ -0,0 +1,12 @@ |
|||||||
|
<!DOCTYPE html> |
||||||
|
<html> |
||||||
|
<head> |
||||||
|
<meta charset='utf-8'> |
||||||
|
<meta http-equiv='X-UA-Compatible' content='IE=edge'> |
||||||
|
<title>AdminLTE v4</title> |
||||||
|
<meta name='viewport' content='width=device-width, initial-scale=1'> |
||||||
|
</head> |
||||||
|
<body> |
||||||
|
<script>window.location.href = './dist/pages/index.html'</script> |
||||||
|
</body> |
||||||
|
</html> |
@ -1,11 +1,28 @@ |
|||||||
function convertPathToHtml(path) { |
function convertPathToHtml(path) { |
||||||
let htmlpath = '' |
let count = 0 |
||||||
|
let htmlPath = '' |
||||||
while (path.startsWith('../')) { |
while (path.startsWith('../')) { |
||||||
|
count++ |
||||||
path = path.slice(3) |
path = path.slice(3) |
||||||
htmlpath += htmlpath.length < 2 ? '.' : '/..' |
|
||||||
} |
} |
||||||
|
|
||||||
return htmlpath |
if (count === 2) { |
||||||
|
htmlPath = '.' |
||||||
|
} |
||||||
|
|
||||||
|
if (count === 3) { |
||||||
|
htmlPath = '..' |
||||||
|
} |
||||||
|
|
||||||
|
if (count === 4) { |
||||||
|
htmlPath = '../..' |
||||||
|
} |
||||||
|
|
||||||
|
if (count === 5) { |
||||||
|
htmlPath = '../../..' |
||||||
|
} |
||||||
|
|
||||||
|
return htmlPath |
||||||
} |
} |
||||||
|
|
||||||
export { convertPathToHtml } |
export { convertPathToHtml } |
||||||
|
Loading…
Reference in new issue