6 Commits

Author SHA1 Message Date
7ae15005de Apply card formatting to hosts table 2025-09-03 23:03:20 -04:00
be17edd6ac Create single column card stack view
Apply to comments viewer, syndication, series, and series episodes pages.
2025-09-03 21:57:28 -04:00
3454bb717e Tweak responsive display of main page lane buttons 2025-09-01 00:24:44 -04:00
7118a3da0a Add maximum content width
Help with readability of the website on large screens.
2025-08-31 23:42:44 -04:00
a8f4eea501 Change secondary background color
Match the color of the main HPR logo acronym.
2025-08-28 22:33:50 -04:00
edf64b668c Tweak search page layout 2025-08-28 22:31:52 -04:00
8 changed files with 177 additions and 68 deletions

View File

@@ -30,7 +30,8 @@ https://creativecommons.org/publicdomain/
--text-primary: #4d4d4d; /* HPR Grey */
--banner-text-primary: #000000;
--banner-background-color: #40a5b9;
--background-secondary: #4d4d4d;
/* --background-secondary: #4d4d4d; */
--background-secondary: #00003e;
--text-secondary: #dfdfdf;
--link-primary: #004852 /*#154a60*/;
--link-primary-hover: #b54c08/*#f8961e*/;
@@ -49,6 +50,9 @@ https://creativecommons.org/publicdomain/
--shadow-main-header-color: hsl(190deg 48% 49% / 0.2);
--shadow-secondary-color: hsl(0, 0%, 30.2%);
--shadow-cards: var(--shadow-secondary-color);
--content-max-width: 1080pt;
/* screen breakpoints */
--for-phone-only: 599px;
--for-tablet-portrait-up: 600px;
@@ -116,21 +120,26 @@ body {
padding: 0.25rem 0;
}
body > header {
display: flex;
flex-direction: row;
flex-flow: wrap;
justify-content: space-between;
padding: clamp(0.5rem, -0.25rem + 3vw, 1rem) 0.25rem;
background-color: var(--banner-background-color);
background-image: url("/images/hpr-splatter-logo.svg"), url("/images/main-header-background.png");
background-size: 59%, cover;
background-repeat: no-repeat, no-repeat;
background-position: right -15px top -20px, left top;
background-image: url("/images/main-header-background.png");
background-size: cover;
background-repeat: no-repeat;
background-position: left top;
color: var(--banner-text-primary);
align-items: center;
border-top: var(--background-secondary) solid 1rem;
}
body > header > * {
body > header .bounding-box {
background: none;
display: flex;
flex-direction: row;
flex-flow: wrap;
justify-content: space-between;
max-width: var(--content-max-width);
margin: 0 auto;
}
body > header .bounding-box > * {
margin: 0;
padding: 0;
flex: 1 1 auto;
@@ -140,6 +149,9 @@ body > header > * {
body > main {
flex: 1 0 auto;
padding: 0.25rem;
max-width: var(--content-max-width);
margin-left: auto;
margin-right: auto;
}
body > footer {
flex: 0 1 auto;
@@ -150,6 +162,10 @@ body > footer {
text-align: center;
line-height: 1.25;
}
body > footer #copyright {
max-width: var(--content-max-width);
margin: 0 auto;
}
body > footer a {
color: var(--link-secondary);
}
@@ -285,15 +301,20 @@ article > p,
gap: 1.0rem;
justify-content: space-around;
}
.lane.syndication {
.lane.stack {
flex-direction: column;
justify-content: flex-start;
}
.lane.stack > * {
flex: 1 0 100%;
}
#podcast_lane > .lane,
#project_lane > .lane,
#latest_lane.lane {
justify-content: flex-between;
}
.lane > article {
.lane > article,
#hosts tr {
/* Add shadows to create the "card" effect */
border-top: thin solid var(--shadow-cards);
border-left: thin solid var(--shadow-cards);
@@ -306,7 +327,8 @@ article > p,
overflow-x: scroll;
padding-bottom: 1rem;
}
.lane > article:hover {
.lane > article:hover,
#hosts tr:hover {
box-shadow:
4px 8px 8px var(--shadow-cards),
8px 16px 16px var(--shadow-cards);
@@ -315,7 +337,8 @@ article > p,
margin-left: 1rem;
margin-right: 1rem;
}
.lane > article > header {
.lane > article > header,
.lane > article > h3 {
background: var(--background-secondary);
padding: 1.5rem 1rem 1rem 1rem;
margin: 0;
@@ -323,17 +346,19 @@ article > p,
font-size: 1.45rem;
color: var(--background-primary);
}
.lane > article > header a {
.lane > article > header a,
.lane > article > h3 a {
color: var(--link-secondary);
}
.lane > article > header a:hover {
.lane > article > header a:hover,
.lane > article > h3:hover {
color: var(--link-secondary-hover);
}
.lane.syndication > article > header * {
.lane.stack> * > header * {
margin-top: 0;
margin-bottom: 0;
}
.lane.syndication > article > header p {
.lane.stack > * > header p {
font-size: var(--default-header-4-font-size);
margin-left: 22px;
}
@@ -341,7 +366,7 @@ a.lane-button {
display: flex;
flex-direction: column;
justify-content: center;
margin: 0.5rem var(--link-spacing-horizontal);
margin: 0.5rem;
padding: 0.5rem;
border-width: 5px;
border-color: var(--lane-button-border);
@@ -371,6 +396,14 @@ a.lane-button img {
#title * {
margin: 0;
padding: 0;
flex: 1 1 auto;
background: none;
}
#title {
background-image: url("/images/hpr-splatter-logo.svg");
background-repeat: no-repeat;
background-size: 15rem;
background-position: left 8.5em top -2em;
}
#title a {
color: var(--link-title-color);
@@ -383,6 +416,7 @@ a.lane-button img {
letter-spacing: -0.65rem;
line-height: 0.75;
margin-bottom: 0.25rem;
color: transparent;
}
#title #site_acronym a {
text-decoration: none;
@@ -474,20 +508,35 @@ fieldset > table td input[type="radio"] {
#search form {
flex: 1 1 auto
}
#search fieldset {
padding-top: 1rem;
}
#search fieldset > legend {
font-weight: var(--default-header-x-font-weight);
}
#search fieldset > input {
width: initial;
width: 94%;
}
#search fieldset > input[type="submit"] {
background-color: var(--background-secondary);
color: var(--text-secondary);
width: 100%;
}
#search fieldset > input[type="submit"]:hover {
background-color: var(--link-secondary);
color: var(--background-secondary);
background-color: var(--link-primary-hover);
color: var(--background-primary);
}
#search fieldset > p {
margin-top: 0.5rem;
margin-bottom: 0.5rem;
}
.no-css {
display: none;
}
#tags .date {
margin:0;
font-size: 1rem;
}
#tags #tag_initial_letter_index {
columns: 3 auto;
}
@@ -502,6 +551,49 @@ fieldset > table td input[type="radio"] {
#tags .index-link {
text-align: right;
}
#comments > article > .show-meta {
font-size: smaller;
}
#hosts tr {
gap: 0;
justify-content: flex-start;
}
#hosts td {
display: inline-block;
}
#hosts td:nth-child(-n+2) {
background: var(--background-secondary);
color: var(--background-primary);
}
#hosts td:nth-child(-n+2) a {
color: var(--link-secondary);
}
#hosts td:nth-child(-n+2) a:hover {
color: var(--link-secondary-hover);
}
#hosts td:nth-child(2) {
padding: 0.25rem 0 0 8px;
width: calc(100% - 90px);
}
#hosts td:nth-last-child(-n+2) {
padding: 0.5rem 0 0 95px;
}
#hosts td:nth-last-child(2)::before {
content: ;
content: "License: ";
}
#hosts td:nth-last-child(1)::before {
content: "Last Show: ";
}
#hosts td > img {
border-radius: 0.25rem;
}
.series-description {
margin: 0;
padding: 0;
font-style: italic;
}
.sr-only {
position: absolute;
width: 1px;
@@ -513,9 +605,7 @@ fieldset > table td input[type="radio"] {
border: 0;
}
@media (min-width: 600px) {
body > header {
background-size: 200pt, cover;
background-position: left 128pt top -12pt, left top;
body > header .bounding-box {
justify-content: space-between;
}
#tag_line {
@@ -586,28 +676,39 @@ fieldset > table td input[type="radio"] {
margin-bottom: 1.0rem;
width: 100%;
}
#search fieldset > input {
width: 55%;
}
#search fieldset > input[type="submit"] {
width: 40%;
}
body > main {
padding: 0.25rem 2rem;
}
.lane > article {
max-height: 40vw;
overflow-y: scroll
}
#podcast_lane > .lane,
#project_lane > .lane,
#latest_lane.lane {
justify-content: flex-start;
}
#latest_lane.lane section > ul {
margin: 0.5rem 3rem 0 1rem;
}
#hosts tbody.lane.stack {
flex-direction: row;
justify-content: space-between;
gap: 1rem
}
#hosts tr {
flex: 1 1 45%;
max-width: 45%;
}
}
@media (min-width: 900px) {
.lane > article {
flex-basis: 32%;
max-width: 32%;
#podcast_lane > .lane,
#project_lane > .lane {
justify-content: flex-start;
gap: 2rem;
}
#latest_lane.lane section {
flex: 1;
}
#hosts tr {
flex: 1 1 30%;
max-width: 30%;
}
}

View File

@@ -7,7 +7,8 @@
<h2>Comment Viewer</h2>
<p>Because of the spammers we have had to turn on comment moderation. Sorry about the delay this will cause.</p>
<p><a href="<!--% absolute_path(baseurl) %-->comments.rss">Subscribe</a> to the comment feed.</p>
<hr />
<hr class="no-css">
<section id="comments" class="lane stack">
<!--% FOREACH item IN DBI.query('
SELECT C.*,
H.host, H.hostid AS host_id,
@@ -26,18 +27,18 @@
LIMIT 30
')
%-->
<article>
<header>
<h1><!--% item.comment_author_name %--> says: <!--% item.comment_title %--></h1>
<p><small>Posted at <!--% item.comment_timestamp %--> relating to the show <a href="<!--% absolute_path(baseurl) %-->eps/hpr<!--% zero_pad_left(item.eps_id) %-->/index.html">hpr<!--% item.eps_id %--></a> which was released on <!--% item.episode_date %--> by <a href="<!--% absolute_path(baseurl) %-->correspondents/<!--% zero_pad_left(item.host_id) %-->.html"><!--% item.host %--></a> entitled <em><!--% item.episode_title %--></em></small>
</p>
</header>
<p class="comment">
<!--% item.comment_text FILTER html_line_break %-->
</p>
<footer>
Listen in <a href="<!--% media_path(item.eps_id, 'hpr', 'ogg', baseurl, media_baseurl) %-->">ogg</a>, <a href="<!--% media_path(item.eps_id, 'hpr', 'spx', baseurl, media_baseurl) %-->">spx</a>, or <a href="<!--% media_path(item.eps_id, 'hpr', 'mp3', baseurl, media_baseurl) %-->">mp3</a> format.</p></footer>
<header>
<h2><!--% item.comment_author_name %--> says: <!--% item.comment_title %--></h2>
</header>
<p class="show-meta">Posted at <!--% item.comment_timestamp %--> relating to the show <a href="<!--% absolute_path(baseurl) %-->eps/hpr<!--% zero_pad_left(item.eps_id) %-->/index.html">hpr<!--% item.eps_id %--></a> which was released on <!--% item.episode_date %--> by <a href="<!--% absolute_path(baseurl) %-->correspondents/<!--% zero_pad_left(item.host_id) %-->.html"><!--% item.host %--></a> entitled <em><!--% item.episode_title %--></em></small>
</p>
<p class="comment">
<!--% item.comment_text FILTER html_line_break %-->
</p>
<footer>
Listen in <a href="<!--% media_path(item.eps_id, 'hpr', 'ogg', baseurl, media_baseurl) %-->">ogg</a>, <a href="<!--% media_path(item.eps_id, 'hpr', 'spx', baseurl, media_baseurl) %-->">spx</a>, or <a href="<!--% media_path(item.eps_id, 'hpr', 'mp3', baseurl, media_baseurl) %-->">mp3</a> format.</p></footer>
</article>
<hr />
<hr class="no-css">
<!--% END %-->
</section>

View File

@@ -1,15 +1,17 @@
<!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS 'shared-avatar.tpl.html' %-->
<article>
<h2 class="title">Correspondents</h2>
<p>For more information on how to become a Correspondent see our <a href="<!--% absolute_url(baseurl) %-->about.html#so_you_want_to_record_a_podcast">contribute</a></center> page. To add a logo here, either email one to admin at hpr or setup your email on <a href="https://en.gravatar.com/">Gravatar</a>. To protect your browsing privacy we gather the images every hour and serve them directly from HPR.<p />
<!--% USE DBI(constants.driver) %-->
<!--% host_cnt = 0 %-->
<table class="hosts">
<th >Avatar</th>
<th >Name &amp; Host ID</th>
<th >License</th>
<th >Last Show</th>
<table id="hosts" class="hosts lane stack">
<tbody class="lane stack">
<tr class="no-css">
<th>Avatar</th>
<th>Name &amp; Host ID</th>
<th>License</th>
<th>Last Show</th>
</tr>
<!--% FOREACH host IN DBI.query(
'select h.hostid, h.host, h.license, e.date,
h.local_image
@@ -18,7 +20,7 @@
on h.hostid = e.hostid
order by h.host'
) %-->
<tr>
<tr class="lane">
<td><!--% get_avatar(host.hostid, host.host, host_cnt > 8) %--></td>
<td><strong><!--% host.host %--></strong><br>
@@ -28,6 +30,6 @@
<td><!--% host.date %--></td>
</tr><!--% host_cnt = host_cnt + 1 %-->
<!--% END %-->
</tbody>
</table>
<p><a href="<!--% absolute_url(baseurl) %-->about.html#so_you_want_to_record_a_podcast">Become a Correspondent</a></p>
</article>

View File

@@ -75,8 +75,8 @@ END %-->
<!--% all_first = ['#','&#x0002E;','/','0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] %-->
<header>
<hgroup>
<h1 class="title"><a id="TOP">Search by Tag</a></h1>
<p class="date">Page generated on <!--% date.format(date.now, format => '%Y-%m-%d at %H:%M:%S UTC', gmt => 1) %--></p>
<h1 id="TOP" class="title">Search by Tag</h1>
<p class="date">Generated on <!--% date.format(date.now, format => '%Y-%m-%d at %H:%M:%S UTC', gmt => 1) %--></p>
</hgroup>
</header>
<p>This section summarises all of the tags currently used throughout the

View File

@@ -2,8 +2,9 @@
<!--% PROCESS "queries-series.tpl.html" %-->
<!--% USE DBI(constants.driver) %-->
<h1 class="title">In-Depth Series</h1>
<div class="lane">
<div class="lane stack">
<!--% FOREACH series IN DBI.query(query_episodes) %-->
<article>
<header><a href="<!--% absolute_path(baseurl) %-->series/<!--% zero_pad_left(series.id) %-->.html"><!--% series.name %--></a></header>
<ul>
@@ -13,7 +14,7 @@
<li>Date of latest show: <!--% series.latest_show %--></li>
<li>Series RSS feeds: <a href="<!--% absolute_path(baseurl) %-->hpr_ogg_rss.php?series=<!--% series.id %-->">ogg</a>, <a href="<!--% absolute_path(baseurl) %-->hpr_spx_rss.php?series=<!--% series.id %-->">spx</a>, <a href="<!--% absolute_path(baseurl) %-->hpr_mp3_rss.php?series=<!--% series.id %-->">mp3</a></li>
</ul>
<em><!--% series.description %--></em>
<div class="series-description"><!--% series.description %--></div>
</article>
<!--% END %-->
</div>

View File

@@ -5,7 +5,6 @@
<!--% query_series = DBI.prepare(query_series_sql)
%-->
<!--% series_result = query_series.execute(id) %-->
<article>
<!--% FOREACH series IN series_result %-->
<h1 class="title">In-Depth Series: <!--% series.name %--></h1>
<ul>
@@ -15,13 +14,16 @@
<li>Date of latest show: <!--% series.latest_show %--></li>
<li>Series RSS feeds: <a href="<!--% absolute_path(baseurl) %-->hpr_ogg_rss.php?series=<!--% series.id %-->&full=1&gomax=1">ogg</a>, <a href="<!--% absolute_path(baseurl) %-->hpr_spx_rss.php?series=<!--% series.id %-->&full=1&gomax=1">spx</a>, <a href="<!--% absolute_path(baseurl) %-->hpr_mp3_rss.php?series=<!--% series.id %-->&full=1&gomax=1">mp3</a></li>
</ul>
<div><em><!--% series.description %--></em></div>
<!--% END %-->
<p><em><!--% series.description %--></em></p>
<section id="series_episodes" class="lane stack">
<!--% query_shows = DBI.prepare(query_shows_sql)
%-->
<!--% show_results = query_shows.execute(id) %-->
<!--% FOREACH show IN show_results %-->
<article>
<!--% show_summary(show) %-->
<p class="listen-in"><!--% display_listen_in(show.id) %--></p>
<!--% END %-->
<footer class="listen-in"><!--% display_listen_in(show.id) %--></footer>
</article>
<!--% END %-->
</section>
<!--% END %-->

View File

@@ -3,7 +3,7 @@
<p>
Great that you want to listen. Have a look below at the feeds that best suite your listening habits.
</p>
<div class="lane syndication">
<div class="lane stack">
<article>
<header>
<hgroup>

View File

@@ -37,6 +37,7 @@
<hr class="no-css">
</div>
<header role="banner">
<div class="bounding-box">
<hgroup id="title">
<h1 id="site_acronym"><a href="<!--% absolute_path(baseurl) %-->index.html">HPR</a></h1>
<p id="site_name">
@@ -50,6 +51,7 @@
<p id="tag2">Sharing your ideas, projects, opinions since 2005</p>
<p id="tag3">New episodes every weekday </p>
</hgroup>
</div>
</header>
<main id="main_content" role="main">
<!--% INCLUDE $content %-->