Unfinished Projects
0) echo "$title
"; } // Todo: Faded background in the same colour! function showLink() { if (func_num_args() == 0) return; if (func_num_args() > 0) $title = func_get_arg(0); if (func_num_args() > 1) $url = func_get_arg(1); if (func_num_args() > 2) $colour = func_get_arg(2); if (func_num_args() > 3) $description = func_get_arg(3); if (func_num_args() > 4) $image = func_get_arg(4); $darker = darken($colour,0.25); echo ""; echo ""; } function darken($color, $percentage){ $color = str_replace('#', '', $color); if (strlen($color) != 6) { return '#000000'; } $rgb = ''; for ($x=0;$x<3;$x++){ $c = hexdec(substr($color,(2*$x),2)); $c *= $percentage; // -$dif; $c = ($c < 0) ? 0 : dechex($c); $rgb .= (strlen($c) < 2) ? '0'.$c : $c; } return '#'.$rgb; } ?>