remove the git category
that's enough web dev for a few years
This commit is contained in:
parent
33a7bfdee5
commit
c47cfb0a27
3 changed files with 67 additions and 80 deletions
42
dynamic.php
Normal file
42
dynamic.php
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
<?php
|
||||||
|
function recent_blogs() {
|
||||||
|
$path = "blog";
|
||||||
|
$limit = isset($_GET['all_blog']) ? false : 5;
|
||||||
|
|
||||||
|
$files = scandir($path."/");
|
||||||
|
$entries = [];
|
||||||
|
$i = 0;
|
||||||
|
|
||||||
|
/* get all the files */
|
||||||
|
foreach ($files as $file) {
|
||||||
|
if (is_dir($path.'/'.$file) && $file[0] != ".") {
|
||||||
|
$tags = get_meta_tags($path.'/'.$file.'/index.html');
|
||||||
|
$entries[$i][0] = preg_replace("/\//", "", $tags["date"]);
|
||||||
|
$entries[$i][1] = $file;
|
||||||
|
$entries[$i][2] = $tags["date"];
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* reverse the list */
|
||||||
|
rsort($entries);
|
||||||
|
|
||||||
|
/* print the blogs out */
|
||||||
|
printf('<table id="bloglist">');
|
||||||
|
$i = 0;
|
||||||
|
for (; $i < count($entries); $i++) {
|
||||||
|
if ($limit && $i > $limit - 1) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$file = $entries[$i][1];
|
||||||
|
$age = $entries[$i][2];
|
||||||
|
printf('<tr><td><a href=/%s/%s>%s</a></td><td class="date">%s</td></tr>',
|
||||||
|
$path, $file, str_replace("-", " ", $file),
|
||||||
|
$age ? $age : "¯\_(ツ)_/¯");
|
||||||
|
}
|
||||||
|
printf('<tr><td><a href=%s>%s</a></td></tr>',
|
||||||
|
isset($_GET['all_blog']) ? "/" : "/?all_blog",
|
||||||
|
isset($_GET['all_blog']) ? "...less" : "more...");
|
||||||
|
printf('</table>');
|
||||||
|
}
|
||||||
|
?>
|
||||||
85
index.php
85
index.php
|
|
@ -18,86 +18,37 @@
|
||||||
Welcome to my website. I do a bunch of coding, I try to lean towards
|
Welcome to my website. I do a bunch of coding, I try to lean towards
|
||||||
lower level languages (mostly C) as I find it more fun when there's a
|
lower level languages (mostly C) as I find it more fun when there's a
|
||||||
challenge. As for the content of this website: I put blog posts up
|
challenge. As for the content of this website: I put blog posts up
|
||||||
when I've got something interesting to talk about. In addition to my
|
when I've got something interesting to talk about. In addition to my
|
||||||
blog I host my own git server with stuff I make (you can find links
|
blog I host my own git server with stuff I make (you can find links
|
||||||
to the things I'm proud of below).
|
to the things I'm proud of below).
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Thank you for visiting, if you've got something you wanna say to me,
|
Thank you for visiting, if you've got something you wanna say to me,
|
||||||
feel free to contact me somewhere below:
|
feel free to contact me somewhere below:
|
||||||
<ul>
|
</p>
|
||||||
<li><a href="mailto:me@zacharyscheiman.com">email</a></li>
|
<ul>
|
||||||
<li><a href="https://github.com/squibid">github.com</a></li>
|
<li><a href="mailto:me@zacharyscheiman.com">email</a></li>
|
||||||
<li><a href="https://codeberg.org/squibid">codeberg.org</a></li>
|
<li><a href="https://github.com/squibid">github.com</a></li>
|
||||||
</ul>
|
<li><a href="https://codeberg.org/squibid">codeberg.org</a></li>
|
||||||
|
</ul>
|
||||||
|
<p>
|
||||||
|
If you wanna see the vast majority of my code you can find it at my
|
||||||
|
very own <a href="https://git.squi.bid/squibid">forgejo instance</a>.
|
||||||
|
The rest is just commits in other people's repos, which mostly happens
|
||||||
|
github.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="group"> <!-- Git Section -->
|
|
||||||
<h2 id="font", style="margin-bottom: 0;">Pinned Git Repos</h2>
|
|
||||||
<p>My best projects:</p>
|
|
||||||
<ul>
|
|
||||||
<li><a href="https://git.squi.bid/squibid/wiz">wiz</a> - An idle event
|
|
||||||
manager for Wayland. Written in C!</li>
|
|
||||||
<!-- <li><a href="https://git.squi.bid/squibid/eat-it">eat it</a> - -->
|
|
||||||
<!-- Eat It is a <a href="https://mpv.io", title="Mpv's Website">Mpv</a> -->
|
|
||||||
<!-- package manager written in <a href="https://lua.org", -->
|
|
||||||
<!-- title="Lua's Website">Lua</a> with the intent of making Mpv -->
|
|
||||||
<!-- scripts easier to update and use.</li> -->
|
|
||||||
</ul>
|
|
||||||
<p><a href="https://git.squi.bid/squibid">more...</a></p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="group"> <!-- Blog Section -->
|
<div id="group"> <!-- Blog Section -->
|
||||||
<hgroup>
|
<hgroup>
|
||||||
<h2 id="font", style="margin-bottom: 0;">My Blog</h2>
|
<h2 id="font" style="margin-bottom: 0;">My Blog</h2>
|
||||||
<a href="/blog/rss.xml", title="rss">(rss btw)</a>
|
<a href="/blog/rss.xml" title="rss">(rss btw)</a>
|
||||||
</hgroup>
|
</hgroup>
|
||||||
<br>
|
<br>
|
||||||
<?php
|
<?php include_once("dynamic.php"); recent_blogs(); ?>
|
||||||
$path = "blog";
|
|
||||||
$limit = isset($_GET['all_blog']) ? false : 5;
|
|
||||||
|
|
||||||
$files = scandir($path."/");
|
|
||||||
$entries = [];
|
|
||||||
$i = 0;
|
|
||||||
|
|
||||||
/* get all the files */
|
|
||||||
foreach ($files as $file) {
|
|
||||||
if (is_dir($path.'/'.$file) && $file[0] != ".") {
|
|
||||||
$tags = get_meta_tags($path.'/'.$file.'/index.html');
|
|
||||||
$entries[$i][0] = preg_replace("/\//", "", $tags["date"]);
|
|
||||||
$entries[$i][1] = $file;
|
|
||||||
$entries[$i][2] = $tags["date"];
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* reverse the list */
|
|
||||||
rsort($entries);
|
|
||||||
|
|
||||||
/* print the blogs out */
|
|
||||||
printf('<table id="bloglist">');
|
|
||||||
$i = 0;
|
|
||||||
for (; $i < count($entries); $i++) {
|
|
||||||
if ($limit && $i > $limit - 1) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
$file = $entries[$i][1];
|
|
||||||
$age = $entries[$i][2];
|
|
||||||
printf('<tr><td><a href=/%s/%s>%s</a></td><td class="date">%s</td></tr>',
|
|
||||||
$path, $file, str_replace("-", " ", $file),
|
|
||||||
$age ? $age : "¯\_(ツ)_/¯");
|
|
||||||
}
|
|
||||||
printf('<tr><td><a href=%s>%s</a></td></tr>',
|
|
||||||
isset($_GET['all_blog']) ? "/" : "/?all_blog",
|
|
||||||
isset($_GET['all_blog']) ? "...less" : "more...");
|
|
||||||
printf('</table>');
|
|
||||||
?>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="group"> <!-- People Section -->
|
<div id="group"> <!-- People Section -->
|
||||||
<hgroup>
|
<hgroup>
|
||||||
<h2 id="font", style="margin-bottom: 0;">Interesting People</h2>
|
<h2 id="font" style="margin-bottom: 0;">Interesting People</h2>
|
||||||
<p style="margin-top: 0;">
|
<p style="margin-top: 0;">
|
||||||
(nvim users)
|
(nvim users)
|
||||||
</p>
|
</p>
|
||||||
|
|
|
||||||
20
style.css
20
style.css
|
|
@ -35,15 +35,15 @@
|
||||||
html, body {
|
html, body {
|
||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
background-color: var(--site-bg);
|
background-color: var(--site-bg);
|
||||||
max-width: 80ch;
|
max-width: 80ch;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (orientation: portrait) {
|
@media (orientation: portrait) {
|
||||||
html, body {
|
html, body {
|
||||||
max-width: 100% !important;
|
max-width: 100% !important;
|
||||||
padding: 5px !important;
|
padding: 5px !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#font, p, ul, ol, h1, h2, h3, h4, h5, table {
|
#font, p, ul, ol, h1, h2, h3, h4, h5, table {
|
||||||
|
|
@ -51,20 +51,14 @@ html, body {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
pre {
|
pre {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
h1 {
|
h1 {
|
||||||
font-size: 3em;
|
font-size: 3em;
|
||||||
}
|
}
|
||||||
iframe[src="/blog"] {
|
|
||||||
width: 100%;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
table#bloglist {
|
table#bloglist {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
td.date {
|
td.date { text-align: right; }
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
a {
|
a {
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue