2023-01-09 21:30:45 +00:00
<! DOCTYPE html >
< html lang = " en " >
< head >
< meta charset = " utf-8 " >
2023-02-24 11:05:27 +00:00
< meta name = " viewport " content = " width=device-width, initial-scale=1 " >
2023-01-09 21:30:45 +00:00
< title > Blog </ title >
< link href = " ../style.css " rel = " stylesheet " type = " text/css " media = " all " >
2023-02-26 11:22:38 +00:00
< style >
2023-02-03 10:00:55 +00:00
ul #articles {
2023-01-09 21:30:45 +00:00
margin : 0 ;
2023-02-16 17:02:43 +00:00
margin - top : 1 rem ;
2023-01-09 21:30:45 +00:00
display : flex ;
flex - direction : column ;
padding - left : 0 ;
list - style : none ;
}
2023-09-23 23:55:08 +00:00
. blogentry {
2024-07-08 09:20:49 +00:00
max - width : 100 % ;
2023-01-09 21:30:45 +00:00
list - style : none ;
display : inline - block ;
2024-07-08 09:20:49 +00:00
margin : calc ( var ( -- stdpadding ) / 2 ) 0 ;
padding : var ( -- stdpadding );
border - left : var ( -- stdaccentborder );
background : linear - gradient ( var ( -- blockbghover ) 0 0 ) 0 / var ( -- bgpos , 0 ) no - repeat ;
transition : background . 3 s , border . 3 s ;
}
. blogentry : hover {
-- bgpos : 100 % ;
2023-01-09 21:30:45 +00:00
}
2023-02-03 10:00:55 +00:00
ul #articles h2 {
2024-07-08 09:20:49 +00:00
margin : calc ( var ( -- stdpadding ) / 2 ) 0 ;
2023-01-09 21:30:45 +00:00
}
/* ul h2 : first - of - type :: before {
content : " Articles - "
} */
article img , article video , article iframe {
filter : drop - shadow ( var ( -- stddropshadow ));
}
2023-09-23 23:55:08 +00:00
. blogentry > * {
2023-02-16 17:02:43 +00:00
display : block ;
margin : 0.1 rem 0 ;
2024-07-08 09:20:49 +00:00
box - sizing : border - box ;
2023-02-16 17:02:43 +00:00
}
2023-09-23 23:55:08 +00:00
. entrysummary {
2023-02-16 17:02:43 +00:00
font - size : . 9 em ;
color : gainsboro ;
}
2023-09-23 23:55:08 +00:00
. entrytag {
font - size : . 9 em ;
color : #bbbbbb;
font - style : italic ;
display : inline - block ;
margin - right : 1 ch ;
}
. entrydate {
2023-02-16 17:02:43 +00:00
font - weight : bold ;
}
2024-07-08 09:20:49 +00:00
. entrytitle {
padding - left : initial ;
border - left : initial ;
}
2023-02-16 17:02:43 +00:00
article : first - of - type h2 :: before {
content : 'Journal - ' ;
}
2023-01-09 21:30:45 +00:00
</ style >
< ? php include ( $_SERVER [ 'DOCUMENT_ROOT' ] . '/seasonal.php' ); ?>
</ head >
< body >
< ? php include ( $_SERVER [ 'DOCUMENT_ROOT' ] . '/nav.php' ); ?>
2024-07-08 09:20:49 +00:00
< h1 > isoblog </ h1 >
2023-01-09 21:30:45 +00:00
< h2 id = " caption " > inane ramblings </ h2 >
< nav >
2024-07-08 09:20:49 +00:00
< a href = " blog.atom " > atom feed </ a >
< ? php
$content = simplexml_load_file ( " blog.atom " );
$year = " -69420 " ;
$yc = 0 ;
foreach ( $content -> entry as $entry ) {
$nyr = substr ( $entry -> published , 0 , 4 );
if ( $nyr != $year ) {
$year = $nyr ;
echo " <a href='# $year '> $year </a> " ;
}
}
?>
2023-01-09 21:30:45 +00:00
</ nav >
< ? php
$username = " niceopod " ; // Your username here!
$ch = curl_init ( " https://status.cafe/users/ $username /status.json " );
curl_setopt ( $ch , CURLOPT_RETURNTRANSFER , true );
curl_setopt ( $ch , CURLOPT_HEADER , 0 );
$str = curl_exec ( $ch );
if ( curl_error ( $ch )) {
//echo curl_error($ch);
$str = " " ;
}
curl_close ( $ch );
$status_data = json_decode ( $str , true );
2024-07-08 09:20:49 +00:00
$status_content = $status_data [ " content " ];
2023-01-09 21:30:45 +00:00
$face = $status_data [ " face " ];
$timeago = $status_data [ " timeAgo " ];
2024-07-08 09:20:49 +00:00
if ( strlen ( $status_content ) < 1 ) {
$status_content = " Something's gone wrong server side... " ;
2023-01-09 21:30:45 +00:00
}
2024-07-08 09:20:49 +00:00
echo " <div id='statuscafe'><div id='statuscafe-username'><a href='https://status.cafe/users/ $username ' target='_blank'>status</a> $face $timeago </div><div id='statuscafe-content'> $status_content </div></div> " ;
2023-01-09 21:30:45 +00:00
?>
2023-02-16 16:32:26 +00:00
< ? php
2023-09-23 23:55:08 +00:00
$stag = $_GET [ " tag " ];
$nostag = empty ( $stag );
if ( ! $nostag ) {
echo " <a style='display: block; margin-top: 1rem; margin-bottom: 1rem;' href='.'>All articles</a> " ;
}
2023-02-16 16:32:26 +00:00
echo " <ul id='articles'> " ;
$year = " -69420 " ;
2023-02-16 17:02:43 +00:00
$yc = 0 ;
2023-02-16 16:32:26 +00:00
foreach ( $content -> entry as $entry ) {
2023-09-23 23:55:08 +00:00
$pfilt = false ;
if ( ! $nostag ) {
foreach ( $entry -> category as $cat ) {
$term = $cat [ " term " ];
if ( $stag == $term ) {
$pfilt = true ;
}
}
2023-02-16 16:32:26 +00:00
}
2023-09-23 23:55:08 +00:00
if ( $pfilt or $nostag ) {
$nyr = substr ( $entry -> published , 0 , 4 );
if ( $nyr != $year ) {
$year = $nyr ;
echo " <li><h2 id=' $year '> $year </h2></li> " ;
}
$dt = substr ( $entry -> published , 0 , 10 );
$ti = $entry -> title ;
$wn = " " ;
if ( preg_match ( '/2022-0(5|4)-(21|25|13)/' , $dt )) {
$wn = " title= \" This post is on the archived v2 version of the site. It will not load if you don't have Javascript enabled, and expect jank if viewing on mobile. You have been warned. \" " ;
}
$cats = " " ;
foreach ( $entry -> category as $cat ) {
$term = $cat [ " term " ];
$cats = $cats . " <a class='entrytag' href='?tag= " . $term . " '> " . $term . " </a> " ;
}
echo " <li class='blogentry'><time class='entrydate'> " . $dt . " </time><h4 class='entrytitle'><a " . $wn . " href=' " . $entry -> link [ " href " ] . " '> " . $ti . " </h4></a><span class='entrysummary'> " . $entry -> summary . " </span><span> " . $cats . " </span></li> " ;
2023-02-26 11:22:38 +00:00
}
2023-02-16 16:32:26 +00:00
}
echo " </ul> " ;
?>
2023-01-09 21:30:45 +00:00
< div class = " buttons " style = " margin-bottom: 1rem; " >
2023-09-19 07:36:15 +00:00
< a href = " https://status.cafe/ " >< img src = " media/banner-statuscafe.png " alt = " Status Cafe " ></ a >
2023-01-09 21:30:45 +00:00
</ div >
2024-07-08 09:20:49 +00:00
< div id = " rightsidebg " style = " background-image: url(bg.jxl), url(bg.jpg); " ></ div >
2023-08-02 04:55:01 +00:00
2023-01-09 21:30:45 +00:00
</ body >
</ html >