Overhaul layout of the article list
I think I'll need to reorganize the blog as a whole soon. This article list got way too tall fast.
This commit is contained in:
parent
164a3a8f0b
commit
73173da854
|
@ -7,21 +7,17 @@
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
ul#articles {
|
ul#articles {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
margin-top: 2rem;
|
margin-top: 1rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
/*height: 6.4rem;
|
|
||||||
overflow-x: scroll;
|
|
||||||
flex-wrap: wrap;*/
|
|
||||||
}
|
}
|
||||||
ul#articles li {
|
ul#articles li {
|
||||||
width: fit-content;
|
width: 100%;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
height: calc(100% / 3);
|
margin: .4rem 0;
|
||||||
margin-right: 2rem;
|
|
||||||
}
|
}
|
||||||
ul#articles h2 {
|
ul#articles h2 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
@ -32,6 +28,26 @@
|
||||||
article img, article video, article iframe {
|
article img, article video, article iframe {
|
||||||
filter:drop-shadow(var(--stddropshadow));
|
filter:drop-shadow(var(--stddropshadow));
|
||||||
}
|
}
|
||||||
|
ul#articles li > a {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
ul#articles li > a > * {
|
||||||
|
display: block;
|
||||||
|
margin: 0.1rem 0;
|
||||||
|
}
|
||||||
|
ul#articles li a h4 {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
ul#articles li a time, ul#articles li a span {
|
||||||
|
font-size: .9em;
|
||||||
|
color: gainsboro;
|
||||||
|
}
|
||||||
|
ul#articles li a time {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
article:first-of-type h2::before {
|
||||||
|
content: 'Journal - ';
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/seasonal.php'); ?>
|
<?php include($_SERVER['DOCUMENT_ROOT'] . '/seasonal.php'); ?>
|
||||||
</head>
|
</head>
|
||||||
|
@ -69,14 +85,15 @@
|
||||||
$content = simplexml_load_file("blog.atom");
|
$content = simplexml_load_file("blog.atom");
|
||||||
echo "<ul id='articles'>";
|
echo "<ul id='articles'>";
|
||||||
$year = "-69420";
|
$year = "-69420";
|
||||||
|
$yc = 0;
|
||||||
foreach($content->entry as $entry) {
|
foreach($content->entry as $entry) {
|
||||||
|
|
||||||
$nyr = substr($entry->published, 0, 4);
|
$nyr = substr($entry->published, 0, 4);
|
||||||
if($nyr != $year) {
|
if($nyr != $year) {
|
||||||
$year = $nyr;
|
$year = $nyr;
|
||||||
echo "<li><h2>$year</h2></li>";
|
echo "<li><h2 id='$year'>$year</h2></li>";
|
||||||
}
|
}
|
||||||
echo "<li><time>".substr($entry->published, 0, 10)."</time> <a href='".$entry->link[href]."'>".$entry->title."</a></li>";
|
echo "<li><a href='".$entry->link[href]."'><time>".substr($entry->published, 0, 10)."</time><h4>".$entry->title."</h4><span>".$entry->summary."</span></a></li>";
|
||||||
|
|
||||||
}
|
}
|
||||||
echo "</ul>";
|
echo "</ul>";
|
||||||
|
|
Loading…
Reference in a new issue