mirror of
https://github.com/tildeclub/site.git
synced 2026-01-23 21:40:18 +00:00
Set opacity steps to 5% and emphasize hover
This commit is contained in:
@@ -239,11 +239,14 @@ if (isset($_GET['notice'])) {
|
||||
$monthsOld = floor(($now - $age) / 2592000);
|
||||
if ($monthsOld > 50) $monthsOld = 50;
|
||||
|
||||
// Minimum is 15% opacity
|
||||
// Set opacity in steps of 5
|
||||
$opacity = 100 - 2 * $monthsOld;
|
||||
$opacity = ceil($opacity / 5) * 5;
|
||||
|
||||
// Minimum is 15% opacity
|
||||
if ($opacity < 15) $opacity = 15;
|
||||
|
||||
$homepagesOutput .= '<a style="opacity:'.$opacity.'%" href="/~'.$user.'/">~'.$user.'</a>';
|
||||
$homepagesOutput .= '<a data-op="'.$opacity.'" href="/~'.$user.'/">'.$user.'</a>';
|
||||
}
|
||||
|
||||
$homepagesOutput .= '</div>';
|
||||
|
||||
Reference in New Issue
Block a user