added media view to edit page

This commit is contained in:
2017-06-24 16:56:33 -07:00
parent e959b41f2c
commit 733594be70
2 changed files with 46 additions and 9 deletions
+16 -4
View File
@@ -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 {