slight css change for simplewebpage

This commit is contained in:
ville rantanen
2021-11-16 10:26:58 +02:00
parent c886b59bfa
commit b282598b05
5 changed files with 26 additions and 7 deletions

View File

@@ -22,7 +22,7 @@ try:
except ImportError:
MARKDOWN_AVAILABLE = False
VERSION = "20211115"
VERSION = "20211116"
IMAGE_EXTENSIONS = ["png", "gif", "jpg", "jpeg", "tif", "tiff"]
AUDIO_EXTENSIONS = ["wav", "mp3", "ogg"]
VIDEO_EXTENSIONS = ["mp4", "ogg", "webm"]
@@ -314,7 +314,7 @@ def get_filelink(path, fname, images=False, media=False):
if media and is_videofile(fname):
fname_media = get_videostr(fname)
return (
'<tr class="row_file"><td><a class="link_file" href="%s">&nbsp;&nbsp;%s</a>%s<td class="right">%s</td><td class="right bytes">%s</td><td class="right">%s</td></tr>\n'
'<tr class="row_file"><td><a class="link_file" href="%s">%s</a>%s<td class="right">%s</td><td class="right bytes">%s</td><td class="right">%s</td></tr>\n'
% (urllib.parse.quote(fname), fname_str, fname_media, fsstr, fsstrb, fdstr)
)
@@ -331,20 +331,20 @@ def get_download_lines(files, recursive=False):
def get_imagestr(fname):
return '<br><img class=image src="%s" title="%s"/>' % (
return '<img class=image src="%s" title="%s"/>' % (
urllib.parse.quote(fname),
fname,
)
def get_audiostr(fname):
return '<br><audio src="%s" controls class=audio></audio>' % (
return '<audio src="%s" controls class=audio></audio>' % (
urllib.parse.quote(fname),
)
def get_videostr(fname):
return '<br><video class=video controls><source src="%s"></video>' % (
return '<video class=video controls><source src="%s"></video>' % (
urllib.parse.quote(fname),
)
@@ -877,15 +877,20 @@ function alternate(table) {
color: #EB6000;
text-decoration: none;
}
a:visited {
color: #AB2000;
}
td a {
color: #EB6000;
display: block;
padding: 5px 10px;
}
td a.link_dir {
font-weight: bold;
}
td a.link_file {
margin-left: 2ex;
}
th a {
padding-left: 0
}
@@ -898,6 +903,9 @@ function alternate(table) {
tr:nth-of-type(odd) {
background-color: #e1e1e1;
}
tr:nth-of-type(even) {
background-color: #f1f1f1;
}
tr.row_dir:hover td {
background-color: #fbe6b3;
}