mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:27:35 +00:00
LibWeb: Add directory entries page when visiting a local directory
This commit is contained in:
parent
e4c3a52cfa
commit
eafdb06d87
9 changed files with 163 additions and 0 deletions
51
Base/res/html/directory.html
Normal file
51
Base/res/html/directory.html
Normal file
|
@ -0,0 +1,51 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Index of @path@</title>
|
||||
<style>
|
||||
header {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
h1 {
|
||||
display: inline;
|
||||
}
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
a:focus, a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
table {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.folder, .file, .open-parent {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 5px;
|
||||
background-size: contain;
|
||||
}
|
||||
.folder {
|
||||
background-image: url('@resource_directory_url@/icons/32x32/filetype-folder.png');
|
||||
}
|
||||
.file {
|
||||
background-image: url('@resource_directory_url@/icons/32x32/filetype-unknown.png');
|
||||
}
|
||||
.open-parent {
|
||||
background-image: url('@resource_directory_url@/icons/16x16/open-parent-directory.png');
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<span class="folder" style="width: 24px; height: 24px;"></span>
|
||||
<h1>Index of @path@</h1>
|
||||
</header>
|
||||
<p><a href="file://@parent_path@"><span class="open-parent"></span>Open Parent Directory</a></p>
|
||||
<hr>
|
||||
@contents@
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue