abyss/templates/files.html

109 lines
2.6 KiB
HTML
Raw Normal View History

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
2024-10-16 22:02:08 -03:00
<title>abyss paste</title>
<style>
body {
margin: 0;
padding: 0;
2024-10-16 22:02:08 -03:00
background-color: #1d1f21;
color: #c5c6c7;
font-family: "Arial", sans-serif;
display: flex;
flex-direction: column;
height: 100vh;
}
2024-10-16 22:17:17 -03:00
header,
footer {
background-color: #2e2e2e;
text-align: center;
font-size: 1rem;
font-weight: bold;
position: sticky;
top: 0;
z-index: 10;
padding: 10px;
}
.content {
flex-grow: 1;
display: flex;
justify-content: center;
align-items: center;
padding: 20px;
}
img,
video,
embed,
iframe {
max-width: 100%;
max-height: 100%;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
video {
background-color: #000;
}
.pdf-embed {
width: 100%;
height: 100%;
border: none;
}
2024-10-16 22:02:08 -03:00
pre {
white-space: pre;
font-family: monospace;
font-size: 1rem;
2024-10-16 22:02:08 -03:00
background-color: #2e2e2e;
padding: 20px;
border-radius: 8px;
overflow: auto;
scrollbar-width: thin;
scrollbar-color: #686868 #2e2e2e;
}
2024-10-16 22:02:08 -03:00
pre::-webkit-scrollbar {
width: 12px;
}
2024-10-16 22:02:08 -03:00
pre::-webkit-scrollbar-track {
background: #2e2e2e;
border-radius: 10px;
}
pre::-webkit-scrollbar-thumb {
background-color: #686868;
border-radius: 10px;
border: 3px solid #2e2e2e;
}
</style>
</head>
<body>
<header>{{.Path}}</header>
<div class="content">
2024-10-16 22:02:08 -03:00
{{if eq .Type "text"}}
<pre>{{.Content}}</pre>
{{else if eq .Type "image"}}
<img src="{{.Name}}" alt="Image" />
{{else if eq .Type "pdf"}}
<embed src="{{.Name}}" type="application/pdf" class="pdf-embed" />
{{else if eq .Type "video"}}
<video controls>
<source src="{{.Name}}" type="video/mp4" />
Your browser does not support the video tag.
</video>
{{end}}
</div>
2024-10-16 22:17:17 -03:00
<footer>file uploaded in {{.TimeUploaded}}</footer>
</body>
</html>