|
|
@@ -13,7 +13,7 @@ func getPageHeader(pathname string) string {
|
|
|
return `<!DOCTYPE HTML>
|
|
|
<html>
|
|
|
<head>
|
|
|
- <meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=0.8" />
|
|
|
<title>Index of ` + pathname + `</title>
|
|
|
<style>
|
|
|
body{
|
|
|
@@ -30,6 +30,9 @@ func getPageHeader(pathname string) string {
|
|
|
td{
|
|
|
padding-left: 8px;
|
|
|
border-left: 1px solid #dbdbdb;
|
|
|
+ word-wrap: break-word;
|
|
|
+ overflow-wrap: break-word;
|
|
|
+ max-width: 25vw;
|
|
|
}
|
|
|
|
|
|
td.fx{
|
|
|
@@ -57,14 +60,14 @@ func getPageHeader(pathname string) string {
|
|
|
}
|
|
|
|
|
|
func getItemHTML(displayText string, link string, isDir bool, modTime string, size string) string {
|
|
|
- icon := "🗋"
|
|
|
+ icon := "📄"
|
|
|
downloadBtn := ""
|
|
|
hidden := ""
|
|
|
if isDir {
|
|
|
- icon = "🗀"
|
|
|
+ icon = "📁"
|
|
|
if strings.HasPrefix(displayText, ".") {
|
|
|
//Hidden folder
|
|
|
- icon = "🖿"
|
|
|
+ icon = "📁"
|
|
|
hidden = "filter: alpha(opacity=50); opacity: 0.5; zoom: 1;"
|
|
|
}
|
|
|
|
|
|
@@ -76,9 +79,9 @@ func getItemHTML(displayText string, link string, isDir bool, modTime string, si
|
|
|
} else if strings.HasPrefix(fileMime, "video/") {
|
|
|
icon = "🎞"
|
|
|
} else if strings.HasPrefix(fileMime, "image/") {
|
|
|
- icon = "🖻"
|
|
|
+ icon = "🖼️"
|
|
|
} else if strings.HasPrefix(fileMime, "text/") {
|
|
|
- icon = "🗎"
|
|
|
+ icon = "📝"
|
|
|
}
|
|
|
//fmt.Println(fileMime, filepath.Ext(displayText))
|
|
|
|