tilde/links.php

61 lines
1.4 KiB
PHP
Raw Permalink Normal View History

2018-07-23 00:28:25 +00:00
<?php
function faclass($icon) {
return "fa fa-fw fa-$icon";
}
$links = [
"email" => [
"href" => "mailto:ben@tilde.team",
"icon" => "envelope"
],
2020-09-29 19:29:20 +00:00
"xmpp" => [
"href" => "xmpp:ben@hmm.st",
"icon" => "xmpp"
],
2018-07-23 00:28:25 +00:00
"pgp pubkey" => [
2018-08-01 03:51:07 +00:00
"href" => "benharri.asc",
2018-07-23 00:28:25 +00:00
"icon" => "lock"
],
"github" => [
"href" => "https://github.com/benharri",
"icon" => "github"
],
"tildegit" => [
2018-09-20 22:37:39 +00:00
"href" => "https://tildegit.org/ben",
2020-09-29 19:29:20 +00:00
"icon" => "gitea"
2018-07-23 00:28:25 +00:00
],
2019-01-25 14:42:40 +00:00
"srht" => [
"href" => "https://git.sr.ht/~benharri",
"icon" => "circle-o"
],
2018-07-23 00:28:25 +00:00
"stack overflow" => [
"href" => "https://stackoverflow.com/users/6352706/ben-harris",
"icon" => "stack-overflow"
],
"keybase" => [
"href" => "https://keybase.io/bharris",
"icon" => "key"
],
2018-07-23 00:28:25 +00:00
"my personal site" => [
"href" => "https://benharr.is",
"icon" => "globe"
],
"mastodon" => [
"href" => "https://tilde.zone/~ben",
2018-10-31 22:13:40 +00:00
"icon" => "mastodon-alt",
"extra_attrs" => 'rel="me"'
2018-07-23 00:28:25 +00:00
],
2020-02-17 19:33:31 +00:00
"pleroma" => [
"href" => "https://pleroma.tilde.zone/ben",
"icon" => "pleroma",
],
2018-07-23 00:28:25 +00:00
];
2020-02-04 01:51:37 +00:00
?>
2018-07-23 00:28:25 +00:00
2020-02-04 01:51:37 +00:00
<?php foreach ($links as $name => $link): ?>
-&gt; <a <?=$link["extra_attrs"] ?? ""?> href="<?=$link["href"]?>">
<i class="<?=faclass($link["icon"])?>"></i> <?=$name?>
</a>
<br>
<?php endforeach; ?>
2018-07-23 00:28:25 +00:00