feat: add error handling
This commit is contained in:
parent
8e4943d5ae
commit
18b264f0d2
@ -14,7 +14,7 @@ type Entry struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func FileListPage(req string, entries []Entry) string {
|
func FileListPage(req string, entries []Entry) string {
|
||||||
header := `
|
header := fmt.Sprintf(`
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
@ -76,17 +76,17 @@ func FileListPage(req string, entries []Entry) string {
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<!-- Title Element-->
|
<!-- Title Element-->
|
||||||
<title>home | leech.ontake.dev</title>
|
<title>%s | leech.ontake.dev</title>
|
||||||
<!-- Icon-->
|
<!-- Icon-->
|
||||||
<link rel="icon" type="image/webp" href="/assets/images/leech.png" />
|
<link rel="icon" type="image/webp" href="/assets/images/leech.png" />
|
||||||
<!-- Metadata-->
|
<!-- Metadata-->
|
||||||
<meta property="og:type" content="website" />
|
<meta property="og:type" content="website" />
|
||||||
<meta property="og:url" content="https://leech.ontake.dev" />
|
<meta property="og:url" content="https://leech.ontake.dev" />
|
||||||
<meta property="og:title" content="home | leech.ontake.dev" />
|
<meta property="og:title" content="%s | leech.ontake.dev" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=0.1" />
|
<meta name="viewport" content="width=device-width, initial-scale=0.1" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="content"><img src="/assets/images/leech.png" id="leech"></img>`
|
<div id="content"><img src="/assets/images/leech.png" id="leech"></img>`, req, req)
|
||||||
|
|
||||||
footer := `</div><div id="footer">powered by leech. ontake. 2024.</div></body></html>`
|
footer := `</div><div id="footer">powered by leech. ontake. 2024.</div></body></html>`
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user