147 lines
2.6 KiB
HTML
147 lines
2.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="es">
|
|
<head>
|
|
<title>danoloan.es: ver imagen</title>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link rel=stylesheet href="/static/style.css">
|
|
<style>
|
|
body {
|
|
max-width: 75vw;
|
|
}
|
|
|
|
main {
|
|
margin: 0.5em;
|
|
margin-top: 0;
|
|
text-align: center;
|
|
}
|
|
|
|
main > img, main > video {
|
|
{{if gt .Len 1 }}
|
|
max-height: 55vh;
|
|
{{ else }}
|
|
max-height: 82vh;
|
|
{{ end }}
|
|
max-width: 100%;
|
|
width: auto;
|
|
}
|
|
|
|
nav {
|
|
margin: 0.5em;
|
|
}
|
|
|
|
header {
|
|
margin: 0.25em 0.5em;
|
|
border-bottom: #b5b5b5 solid 1px;
|
|
padding-bottom: 0.5em;
|
|
}
|
|
|
|
#date {
|
|
margin-top: 0.25em;
|
|
font-size: 50%;
|
|
}
|
|
|
|
div.count {
|
|
margin-bottom: 0.25em;
|
|
}
|
|
|
|
span.count > img {
|
|
margin: auto 0.25em;
|
|
max-height: 1em;
|
|
vertical-align: middle;
|
|
}
|
|
span.count {
|
|
margin: 10px 0.5em;
|
|
font-size: 1.5em;
|
|
}
|
|
|
|
@media screen and (max-width: 680px) {
|
|
body {
|
|
max-width: 680px;
|
|
padding-left: 0px;
|
|
padding-right: 0px;
|
|
}
|
|
#desc {
|
|
font-size: 90%;
|
|
}
|
|
}
|
|
</style>
|
|
<script src="static/view.js"></script>
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<a href=".">« ir atrás</a>
|
|
<div id="desc">
|
|
{{ .Description }}
|
|
</div>
|
|
<div id="date">
|
|
{{ .Date }}
|
|
</div>
|
|
<script>
|
|
;
|
|
document.getElementById("date").innerText =
|
|
new Date({{ .Date.Unix }} * 1000)
|
|
.toLocaleString(window.navigator.language, {
|
|
weekday: "long",
|
|
year: "numeric",
|
|
month:"long",
|
|
day:"numeric"
|
|
})
|
|
</script>
|
|
</header>
|
|
<main>
|
|
{{ if gt .Len 1 }}
|
|
<div class="count">
|
|
{{ if .Count.GraphImage}}
|
|
<span class="count">
|
|
{{ .Count.GraphImage }}
|
|
<img src="static/image.png" alt="imágenes">
|
|
</span>
|
|
{{ end }}
|
|
{{ if .Count.GraphVideo }}
|
|
<span class="count">
|
|
{{ .Count.GraphVideo }}
|
|
<img src="static/video.png" alt="vídeos">
|
|
</span>
|
|
{{ end }}
|
|
</div>
|
|
{{ end }}
|
|
<nav>
|
|
{{ if .Next }}
|
|
<span class="prev">
|
|
<a href="view?uuid={{ .Next.Post }}">« siguiente</a>
|
|
</span>
|
|
{{ end }}
|
|
{{ if .Prev }}
|
|
<span class="next">
|
|
<a href="view?uuid={{ .Prev.Post }}">anterior »</a>
|
|
</span>
|
|
{{ end }}
|
|
</nav>
|
|
{{ $post := .Post }}
|
|
{{ range .Media }}
|
|
{{ if eq .Type "GraphImage" }}
|
|
<img src="img/{{ $post }}/{{ .File }}" alt="imagen"/>
|
|
{{ end }}
|
|
{{ if eq .Type "GraphVideo" }}
|
|
<video src="img/{{ $post }}/{{ .File }}" controls/></video>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ if gt .Len 1 }}
|
|
<nav>
|
|
{{ if .Next }}
|
|
<span class="prev">
|
|
<a href="view?uuid={{ .Next.Post }}">« siguiente</a>
|
|
</span>
|
|
{{ end }}
|
|
{{ if .Prev }}
|
|
<span class="next">
|
|
<a href="view?uuid={{ .Prev.Post }}">anterior »</a>
|
|
</span>
|
|
{{ end }}
|
|
</nav>
|
|
{{ end }}
|
|
</main>
|
|
</body>
|
|
</html>
|