Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CSS for HTML feed format #134

Merged
merged 3 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions include/FeedFormat/FeedFormat.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,13 @@ protected function buildContent(array $video): string
}

$html = <<<HTML
{$media}<hr/>
<span>Published: <time datetime="{$datetime}">{$published}</time></span>
<span> - Duration: <span class="duration">{$video['duration']}</span></span>
<hr/><p>{$description}</p>
{$media}
<div class="description">
<hr/>
<span>Published: <time datetime="{$datetime}">{$published}</time></span>
<span> - Duration: <span class="duration">{$video['duration']}</span></span>
<hr/><p>{$description}</p>
</div>
HTML;

return Format::minify(trim($html));
Expand Down
4 changes: 3 additions & 1 deletion include/FeedFormat/Html.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ protected function buildItems(): string
<article>
<h2 class="title"><a target="_blank" href="{$itemUrl}">{$itemTitle}</a></h2>
{$itemContent}
{$itemCategories}
<div class="categories">
{$itemCategories}
</div>
</article>
HTML;
}
Expand Down
11 changes: 10 additions & 1 deletion static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ h2 {
text-align: center;
}

a {
word-break: break-all;
}

p {
margin: 0;
margin-bottom: 10px;
Expand Down Expand Up @@ -142,6 +146,7 @@ li {
#links {
margin-top: 14px;
margin-bottom: 14px;
padding: 0px 10px;
}

.item, .viewer, .tools, article {
Expand Down Expand Up @@ -194,6 +199,10 @@ article img {
max-width: 100%;
}

article > .description, article > .categories {
margin: 0px 5px;
}

textarea.description {
width: 590px;
height: 90px;
Expand Down Expand Up @@ -269,4 +278,4 @@ select {
margin-top: 5px;
margin-left: 5px;
width: 100px;
}
}