added media view to edit page
This commit is contained in:
@@ -222,15 +222,27 @@ func (ch *CaddyHugo) serveMediaPage(w http.ResponseWriter, r *http.Request) (int
|
||||
|
||||
io.WriteString(w, `<html>
|
||||
<head><style>
|
||||
.img { float: left; text-align: center; max-width: 19.9vw; min-height: 120px;}
|
||||
iframe { height: 100%; }
|
||||
.img { display: inline-block; text-align: center; max-width: 19.9vw; min-height: 120px;}
|
||||
.copy { cursor: pointer; }
|
||||
@media (max-width: 800px) {
|
||||
.img {
|
||||
width: 50%;
|
||||
max-width: 50%;
|
||||
}
|
||||
body {
|
||||
min-height: 300px;
|
||||
}
|
||||
}
|
||||
</style></head>
|
||||
<body>
|
||||
<div style="position: fixed; top: 0; height: 10vh; width: 100%;">
|
||||
<div style="float: left; width: 100%; height: 10vh;">
|
||||
<div style="position: fixed; top: 0; height: 10vh; width: 100%; background-color: white;">
|
||||
`)
|
||||
io.WriteString(w, UploadPage("media"))
|
||||
io.WriteString(w, "</div>")
|
||||
|
||||
io.WriteString(w, `</div>
|
||||
<div style="display: inline-block; width: 100%; height: 10vh;"></div>
|
||||
`)
|
||||
if ch.Media != nil {
|
||||
media, err := ch.Media.Walk()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user