Déplacement des assets

This commit is contained in:
Breizh 2022-09-25 18:30:21 +02:00
parent 1708ccce0a
commit ca98831f35
2 changed files with 43 additions and 5 deletions

37
assets/default.css Normal file
View File

@ -0,0 +1,37 @@
body {
margin:40px auto;
background-color:#2d2d2d;
color: #D3D0C8;
padding:0 10px;
font-family: sans-serif;
}
h1,h2,h3 {
font-family: serif;
}
pre,code {
font-family: monospace;
}
a {
color: #F99157;
}
a:visited {
color: #F2777A;
}
a:hover, a:focus {
outline: 1px solid;
outline-offset:.3em;
text-decoration: none;
}
td,th {
height: 65px;
padding-right: 10px;
padding-left: 10px;
}
table,th,td {
border: 1px solid #393939;
border-collapse: collapse;
}

View File

@ -25,7 +25,7 @@ cat <<DELIM
<!DOCTYPE html>
<html lang=fr>
<head>
<title>Index de ${1}</title>
<title>Index de ${1:-fichiers.breizh.pm}</title>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="/.assets/default.css">
@ -70,16 +70,17 @@ DELIM
navpath="<a href=\"/\">fichiers.breizh.pm</a>/"
tmp="/"
oldIFS=$IFS
IFS=/
for folder in $webpath
do
tmp+="$folder/"
encoded_folder="${folder//\&/%26}"
encoded_folder="${encoded_folder//\?/%3F}"
tmp+="$encoded_folder/"
navpath+="<a href=\"$tmp\">$folder</a>/"
done
IFS=$oldIFS
unset IFS
# Insertion du header dans le fichier
header "$webpath" "$navpath" > index.html
@ -135,7 +136,7 @@ do
if [[ ! -f "${cache}/${thumbname}" ]] && [[ ${kbytes} -le 20480 ]]
then
# Création de la miniature
timeout 180convert -limit memory 200M "${i}" -strip -thumbnail 'x60>' "${cache}/${thumbname}"
timeout 180 convert -limit memory 200M "${i}" -strip -thumbnail 'x60>' "${cache}/${thumbname}"
fi
# Si une miniature est présente, on l'affiche