modified: s/item.tpl.html

modified:   s/style.css
	modified:   src/main.js
This commit is contained in:
Flummi 2016-08-17 09:52:17 +02:00
parent 34d0765662
commit 165a298188
3 changed files with 6 additions and 3 deletions

View File

@ -16,7 +16,7 @@
<audio controls src="{{ dest }}" type="audio/mp3" autoplay></audio>
{% endif %}
{% if item == "image" %}
<img src="{{ dest }}" style="max-width: 1024px" />
<a href="{{ dest }}" target="_blank"><img src="{{ dest }}" style="max-width: 1024px" /></a>
{% endif %}
</div>
<div class="controls">{% if next != null %}<a id="next" href="/{{ next }}"><<-</a> | {% endif %} <a id="random" href="/random" title="Random">random</a> {% if prev != null %} | <a id="prev" href="/{{ prev }}">->></a>{% endif %}</div><br />

View File

@ -3,7 +3,7 @@ body {
color: #fff;
font-family: Monospace;
}
a > img {
.mrhankyisteinneger > a > img {
max-height: 128px;
max-width: 128px;
border: 2px solid #4c4a4a;

View File

@ -204,7 +204,8 @@ http.createServer((req, res) => {
'.mp3': 'audio/mpeg',
'.mp4': 'video/mp4',
'.webm': 'video/webm',
'.css': 'text/css'
'.css': 'text/css',
'.ogg': 'audio/ogg'
};
if(filePath == "./index.html") { // mainpage
var tpl = swig.compile(templates.index);
@ -246,6 +247,7 @@ http.createServer((req, res) => {
data.item = 'video';
break;
case "audio/mpeg":
case "audio/ogg":
data.item = 'audio';
break;
}
@ -304,6 +306,7 @@ http.createServer((req, res) => {
case "video/webm":
case "video/mp4":
case "audio/mpeg":
case "audio/ogg":
var start = 0;
var end = 0;
var range = req.headers['range'];