Skip to content

Commit

Permalink
Adjust stream display for better readability
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Morris committed Aug 31, 2024
1 parent 460a0e0 commit b3f0537
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
15 changes: 6 additions & 9 deletions app/Views/stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,22 @@

<div class="wrap">
<div class="full">
<ul class="links">
<ol class="links show">
<?php foreach ($build as $row) :?>
<li class="stream">
<span class="stream__source">
<a href="/sites/<?= $row->site_slug; ?>" ><?= htmlspecialchars_decode($row->site_name ?? ''); ?></a>
</span>
<span class="ago--muted"><?php
$time = Time::createFromFormat('Y-m-d H:i:s', $row->story_date, 'America/New_York');
echo $time->humanize();
?></span>
<span class="stream__title">
<a href="<?= $row->story_permalink; ?>" rel="noopener noreferrer" data-outgoing="<?= $row->story_hash; ?>"><?= htmlspecialchars_decode($row->story_title ?? '');
if (htmlspecialchars_decode($row->story_title ?? '') === '') {
echo '[missing title]';
} ?></a>
</span>
<span class="ago--muted"><?php
$time = Time::createFromFormat('Y-m-d H:i:s', $row->story_date, 'America/New_York');
echo $time->humanize();
?> on <?= htmlspecialchars_decode($row->site_name ?? ''); ?></span>
</li>
<?php endforeach; ?>
</ul>
</ol>
</div>
</div>
</main>
Expand Down
9 changes: 7 additions & 2 deletions public/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,11 @@ footer .ago--muted {
margin-bottom: 0.5rem;
}

.show {
list-style-type: decimal;
padding-left: 1rem;
}

.stream {
margin-bottom: 0.75rem;
}
Expand All @@ -270,9 +275,9 @@ footer .ago--muted {
text-decoration: none;
}

.stream__title {
/* .stream__title {
display: block;
}
} */

.stream .ago {
padding-bottom: 0.15rem;
Expand Down

0 comments on commit b3f0537

Please sign in to comment.