2022-11-23 20:56:06 +00:00
|
|
|
<!DOCTYPE html>
|
2022-11-26 04:40:11 +00:00
|
|
|
<html lang="en">
|
2022-11-23 20:56:06 +00:00
|
|
|
<head>
|
|
|
|
<?php include 'common/include.php' ?>
|
2022-12-02 19:23:35 +00:00
|
|
|
<?php include 'common/git.php' ?>
|
2022-12-23 20:58:54 +00:00
|
|
|
<?php include 'common/article.php' ?>
|
2022-12-02 19:23:35 +00:00
|
|
|
|
2022-11-23 20:56:06 +00:00
|
|
|
<title>Tyler Perkins - Home</title>
|
2022-11-26 01:33:57 +00:00
|
|
|
<link rel="stylesheet" href="index.css">
|
2022-11-23 20:56:06 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<?php include 'common/header.php' ?>
|
|
|
|
|
2022-12-23 23:23:33 +00:00
|
|
|
<div class="centered top-fade dashed-bottom">
|
2022-12-01 22:56:59 +00:00
|
|
|
<!--<a class="clickable-div" href="about.php"> -->
|
|
|
|
<div class="index-item single-column tagline-link">
|
|
|
|
<h1>Hi, I'm Tyler</h1>
|
|
|
|
<p>I'm a software developer and tinkerer</p>
|
|
|
|
<?php
|
|
|
|
$remote_addr = $_SERVER['REMOTE_ADDR'];
|
|
|
|
$forwarded_addr = $_SERVER['REMOTE_ADDR'];
|
|
|
|
|
|
|
|
$home_addr = gethostbyname("gluttony.clortox.com");
|
|
|
|
if($remote_addr == $home_addr)
|
|
|
|
echo "<p>Hello from within the home network!</p>"
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
<!--</a>-->
|
2022-11-26 01:33:57 +00:00
|
|
|
</div>
|
|
|
|
<div class="centered">
|
|
|
|
<div class="index-item soft-background articles-box">
|
2022-12-02 19:23:35 +00:00
|
|
|
<div class="index-column">
|
|
|
|
<h3>Projects</h3>
|
|
|
|
<div>
|
|
|
|
<?php
|
2022-12-23 01:08:33 +00:00
|
|
|
$giteaClient = new Gitea(getenv("GITEA_TOKEN"));
|
|
|
|
$result = $giteaClient->getRecentProjects();
|
2022-12-02 19:23:35 +00:00
|
|
|
array_splice($result, 6, -1);
|
|
|
|
foreach($result as $item){
|
|
|
|
if($item["private"])
|
|
|
|
continue;
|
|
|
|
|
|
|
|
$name = $item["name"];
|
|
|
|
$url = $item["html_url"];
|
|
|
|
$lang = $item["language"];
|
|
|
|
$description = $item["description"];
|
|
|
|
|
|
|
|
//build out the html
|
2022-12-23 20:58:54 +00:00
|
|
|
echo '<a class="list-clickable-div" href="' . $url . '">';
|
2022-12-02 19:23:35 +00:00
|
|
|
echo '<p>' . $name . ' - ' . $description . '</p>';
|
|
|
|
echo '</a>';
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</div>
|
2022-11-26 01:33:57 +00:00
|
|
|
</div>
|
2022-12-02 19:23:35 +00:00
|
|
|
<div class="index-column">
|
|
|
|
<h3>Articles</h3>
|
2022-12-23 20:58:54 +00:00
|
|
|
<div>
|
|
|
|
<?php
|
|
|
|
$articleClient = Article::makeNewClient();
|
|
|
|
$posts = $articleClient->getMostRecentPosts(5);
|
|
|
|
|
|
|
|
foreach($posts as $post){
|
|
|
|
if($post == null)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
$id = $post[0];
|
|
|
|
$author = $post[1];
|
|
|
|
$title = $post[3];
|
|
|
|
|
|
|
|
echo '<a class="list-clickable-div" href="/posts/?id=' . $id . '">';
|
|
|
|
echo '<p>(' . $author . ') ' . $title . '</p>';
|
|
|
|
echo '</a>';
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</div>
|
2022-11-26 01:33:57 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-11-23 20:56:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
<?php include 'common/footer.php' ?>
|
|
|
|
</body>
|
|
|
|
|
|
|
|
|
|
|
|
</html>
|