add links section
This commit is contained in:
@@ -1,20 +1,22 @@
|
||||
<?php
|
||||
function buildContact($title, $color, $username, $url) {
|
||||
|
||||
if (!$url) {
|
||||
echo "<div class=contact style=\"background-color: $color; opacity: 0.9;\">";
|
||||
} else {
|
||||
echo "<div class=contact style=\"background-color: $color;\">";
|
||||
}
|
||||
function buildLink($type, $title, $color, $text, $url) {
|
||||
|
||||
$opacity = $url ? "" : "0.9";
|
||||
|
||||
echo "<div class=$type style=\"background-color: $color; opacity: $opacity;\">";
|
||||
echo "<h3>$title</h3>";
|
||||
|
||||
if (strlen($username) > 15) {
|
||||
echo "<p style=\"font-size: 0.8em;\">$username</p>";
|
||||
} else {
|
||||
echo "<p>$username</p>";
|
||||
switch ($type) {
|
||||
case "link":
|
||||
$fontsize = "0.9em";
|
||||
break;
|
||||
case "contact":
|
||||
$fontsize = (strlen($text) > 15) ? "0.8em" : "1em";
|
||||
break;
|
||||
}
|
||||
|
||||
echo "<p style=\"font-size: $fontsize;\">$text</p>";
|
||||
|
||||
if ($url) {
|
||||
echo "<a title=\"$title\" href=\"$url\"></a>";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user