Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,27 @@
.noprint { display:none; }
}

.icon1 {
margin: 0px;
padding: 2px;
background: white;
color: white;
max-height: 26px;
text-align: center;
float: inline-start;
}

.icon2 {
margin: 0px;
padding: 0px;
background: white;
color: white;
max-height: 15px;
text-align: center;
vertical-align: middle;
float: none;
}

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be factorized. Also class names should be semantic: what is icon1? Which use?

</style>
</head>
<body>
Expand All @@ -177,6 +198,7 @@
echo '<input type="hidden" name="token" value="'.$token.'" />';
}
?>
<img class="icon1" src="pictures/magnifying-glass-tilted-left-svgrepo-com.svg">
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use "img" for images, as they are not "pictures" (like photos) but icons

<input name="s" value="<?php echo $sv ?>" />
<input type="submit" value="Cherche !"/>
Tri par <select name="t">
Expand Down Expand Up @@ -308,8 +330,8 @@ function tri_par_completion($a, $b) {return tri_ligne($a, $b, 'completion');}
echo $c;
if($i==0)
{
echo ' [<a href="http://www.youtube.com/results?search_query='.urlencode($c.', '.$l[$i+1].', '.$l[$i+2]).'">youtube</a>]';
echo ' [<a href="http://musicainfo.net/quiksrch.php?vol='.urlencode($c).'">musicainfo</a>]';
echo ' [<a href="http://www.youtube.com/results?search_query='.urlencode($c.', '.$l[$i+1].', '.$l[$i+2]).'"><img class="icon2" src="pictures/youtube-svgrepo-com.svg" alt="youtube-logo"> youtube</a>]';
echo ' [<a href="http://musicainfo.net/quiksrch.php?vol='.urlencode($c).'"><img class="icon2" src="pictures/web-svgrepo-com.svg" alt="web-logo">musicainfo</a>]';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alt attribute should be used to aid visual impaired people.
So you might add a real description, like "youtube logo" rather than an ID.

Can't we use musicainfo logo rather than a generic web one?

It should be checked, but if the image is only used for decoration, I think we can use an empty alt=""

}
echo '</td>';
//if(!$lv)
Expand All @@ -335,7 +357,7 @@ function tri_par_completion($a, $b) {return tri_ligne($a, $b, 'completion');}
*/
if($token_ok && is_dir($arv_config['docs_dir'].'/'.$l[3]))
{
echo '<td><a href="list.php?ref='.$l[3].'&token='.$_GET['token'].'">Documents</a></td>';
echo '<td><a href="list.php?ref='.$l[3].'&token='.$_GET['token'].'"><img class="icon2" src="pictures/directory-documents-svgrepo-com.svg" alt="directory-logo">Documents</a></td>';
}
else
{
Expand Down
10 changes: 10 additions & 0 deletions pictures/directory-documents-svgrepo-com.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions pictures/directory-documents-svgrepo-com.svg:Zone.Identifier
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[ZoneTransfer]
ZoneId=3
ReferrerUrl=https://www.svgrepo.com/svg/366083/directory-documents
HostUrl=https://www.svgrepo.com/download/366083/directory-documents.svg
2 changes: 2 additions & 0 deletions pictures/download-alt-4-svgrepo-com.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions pictures/download-alt-4-svgrepo-com.svg:Zone.Identifier
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[ZoneTransfer]
ZoneId=3
ReferrerUrl=https://www.svgrepo.com/svg/468699/download-alt-4
HostUrl=https://www.svgrepo.com/download/468699/download-alt-4.svg
15 changes: 15 additions & 0 deletions pictures/eye-svgrepo-com.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions pictures/eye-svgrepo-com.svg:Zone.Identifier
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[ZoneTransfer]
ZoneId=3
ReferrerUrl=https://www.svgrepo.com/svg/16606/eye
HostUrl=https://www.svgrepo.com/download/16606/eye.svg
3 changes: 3 additions & 0 deletions pictures/info.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SVG logo taken from website https://www.svgrepo.com.

According to this site, those svg logo are open-licensed and can be reused.
2 changes: 2 additions & 0 deletions pictures/magnifying-glass-tilted-left-svgrepo-com.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[ZoneTransfer]
ZoneId=3
ReferrerUrl=https://www.svgrepo.com/svg/396962/magnifying-glass-tilted-left
HostUrl=https://www.svgrepo.com/download/396962/magnifying-glass-tilted-left.svg
6 changes: 6 additions & 0 deletions pictures/web-svgrepo-com.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions pictures/web-svgrepo-com.svg:Zone.Identifier
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[ZoneTransfer]
ZoneId=3
ReferrerUrl=https://www.svgrepo.com/svg/501060/web
HostUrl=https://www.svgrepo.com/download/501060/web.svg
2 changes: 2 additions & 0 deletions pictures/youtube-svgrepo-com.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions pictures/youtube-svgrepo-com.svg:Zone.Identifier
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[ZoneTransfer]
ZoneId=3
ReferrerUrl=https://www.svgrepo.com/svg/448261/youtube
HostUrl=https://www.svgrepo.com/download/448261/youtube.svg
4 changes: 2 additions & 2 deletions util.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,15 @@ function listing_render_list($listing, $token, $ref, $config, $base='.', $fileba
'token='.$token.
'&amp;ref='.$ref.
'&amp;file='.urlencode($filebase.$k).
'">téléchargement</a>';
'"><img class="icon2" src="pictures/download-alt-4-svgrepo-com.svg" alt="download-logo">téléchargement</a>';
echo ' ('.round(filesize($config['docs_dir'].'/'.$ref.'/'.$filebase.$k)/1024).'Ko)';
echo ' | ';
echo '<a href="'.$base.'/dl.php?'.
'token='.$token.
'&amp;ref='.$ref.
'&amp;file='.urlencode($filebase.$k).
'&amp;inline'.
'">voir en ligne</a>';
'"><img class="icon2" src="pictures/eye-svgrepo-com.svg" alt="eye-logo">voir en ligne</a>';
}
}
else
Expand Down