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> <audio controls src="{{ dest }}" type="audio/mp3" autoplay></audio>
{% endif %} {% endif %}
{% if item == "image" %} {% if item == "image" %}
<img src="{{ dest }}" style="max-width: 1024px" /> <a href="{{ dest }}" target="_blank"><img src="{{ dest }}" style="max-width: 1024px" /></a>
{% endif %} {% endif %}
</div> </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 /> <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; color: #fff;
font-family: Monospace; font-family: Monospace;
} }
a > img { .mrhankyisteinneger > a > img {
max-height: 128px; max-height: 128px;
max-width: 128px; max-width: 128px;
border: 2px solid #4c4a4a; border: 2px solid #4c4a4a;

View File

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