4 Commits

Author SHA1 Message Date
181c9fbad9 Cardify the correspondent pages 2025-09-05 23:08:10 -04:00
a2fb6b1f6a Fix arrangement and layout of external search forms
Move DuckDuckGo to top of list and make forms equal size
for all window sizes.
2025-09-05 21:00:42 -04:00
5e48d9e064 Merge branch 'newsite' of repo.anhonesthost.net:HPR/hpr_generator into newsite 2025-09-05 20:27:49 -04:00
454d548ce7 Clean up font usage
Remove unused fonts. Add woff2 types for smaller downloads.
Offer woff2, woff, truetype/opentype versions of the font files.
2025-09-04 23:28:34 -04:00
3 changed files with 105 additions and 71 deletions

View File

@@ -18,8 +18,8 @@ https://creativecommons.org/publicdomain/
font-family: "BebasNeue"; font-family: "BebasNeue";
src: src:
local("BEBAS NEUE"), local("BEBAS NEUE"),
url("/css/bebas/BebasNeue.woff2") format("woff2"); url("/css/bebas/BebasNeue.woff2") format("woff2"),
url("/css/bebas/BebasNeue.woff") format("woff"); url("/css/bebas/BebasNeue.woff") format("woff"),
url("/css/bebas/BebasNeue.otf") format("opentype"); url("/css/bebas/BebasNeue.otf") format("opentype");
} }
@font-face { @font-face {
@@ -27,7 +27,7 @@ https://creativecommons.org/publicdomain/
src: src:
local("Patrick Hand"), local("Patrick Hand"),
url("/css/patrickhand/PatrickHand-Regular.woff2") format("woff2"), url("/css/patrickhand/PatrickHand-Regular.woff2") format("woff2"),
url("/css/patrickhand/PatrickHand-Regular.woff") format("woff"); url("/css/patrickhand/PatrickHand-Regular.woff") format("woff"),
url("/css/patrickhand/PatrickHand-Regular.ttf") format("truetype"); url("/css/patrickhand/PatrickHand-Regular.ttf") format("truetype");
} }
:root { :root {
@@ -43,6 +43,7 @@ https://creativecommons.org/publicdomain/
--link-secondary: #a8f8ff; --link-secondary: #a8f8ff;
--link-secondary-hover: #f9e9c2; --link-secondary-hover: #f9e9c2;
--link-title-color: #00003e; --link-title-color: #00003e;
--primary-content-line-height: 1.45;
--font-family-hpr: Verdana, Arial, Helvetica, sans-serif; /* 1em/1.5 OpenDyslexic, */; --font-family-hpr: Verdana, Arial, Helvetica, sans-serif; /* 1em/1.5 OpenDyslexic, */;
--font-size-default: clamp(1rem, 15px + 0.3vw, 1.07rem); --font-size-default: clamp(1rem, 15px + 0.3vw, 1.07rem);
@@ -307,7 +308,7 @@ p.meta span label {
article > p, article > p,
#main_content > p, #main_content > p,
#main_content > section > p { #main_content > section > p {
line-height: 1.45; line-height: var(--primary-content-line-height);
} }
.lane { .lane {
display: flex; display: flex;
@@ -573,7 +574,7 @@ fieldset > table td input[type="radio"] {
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
} }
#search form { #search form {
flex: 1 1 auto flex: 1 1 100%;
} }
#search fieldset { #search fieldset {
padding-top: 1rem; padding-top: 1rem;
@@ -656,6 +657,28 @@ fieldset > table td input[type="radio"] {
#hosts td > img { #hosts td > img {
border-radius: 0.25rem; border-radius: 0.25rem;
} }
#host {
justify-content: flex-start;
align-items: end;
gap: 0;
}
#host_id img {
border-radius: 0.25rem;
}
#host_meta {
flex: 1;
padding: 0 0 0.75rem 0;
}
#host_meta > div,
#host_meta > p {
margin: 0.25rem 0;
line-height: var(--primary-content-line-height);
}
#host_meta > div > p {
display: inline-block;
margin: 0;
padding: 0;
}
.series-description { .series-description {
margin: 0; margin: 0;
padding: 0; padding: 0;
@@ -764,6 +787,9 @@ fieldset > table td input[type="radio"] {
flex: 1 1 45%; flex: 1 1 45%;
max-width: 45%; max-width: 45%;
} }
#host {
gap: 1rem;
}
} }
@media (min-width: 900px) { @media (min-width: 900px) {
#podcast_lane > .lane, #podcast_lane > .lane,

View File

@@ -4,22 +4,22 @@
<!--% PROCESS "queries-correspondent.tpl.html" %--> <!--% PROCESS "queries-correspondent.tpl.html" %-->
<!--% USE DBI(constants.driver) %--> <!--% USE DBI(constants.driver) %-->
<!--% results_hpr_shows = DBI.prepare(query_hpr_shows) <!--% results_hpr_shows = DBI.prepare(query_hpr_shows)
%--> %-->
<!--% results_hpr_show_count = DBI.prepare(query_hpr_show_count) %--> <!--% results_hpr_show_count = DBI.prepare(query_hpr_show_count) %-->
<!--% hpr_shows_to_count = results_hpr_show_count.execute(id); %--> <!--% hpr_shows_to_count = results_hpr_show_count.execute(id); %-->
<!--% hpr_shows = results_hpr_shows.execute(id); %--> <!--% hpr_shows = results_hpr_shows.execute(id); %-->
<!--% hpr_show_count = 0 %--> <!--% hpr_show_count = 0 %-->
<!--% FOREACH show IN hpr_shows_to_count %--> <!--% FOREACH show IN hpr_shows_to_count %-->
<!--% hpr_show_count = hpr_show_count +1; %--> <!--% hpr_show_count = hpr_show_count +1; %-->
<!--% END %--> <!--% END %-->
<!--% query_twat_show_count = DBI.prepare(' <!--% query_twat_show_count = DBI.prepare('
SELECT id SELECT id
FROM twat_eps AS eps FROM twat_eps AS eps
WHERE eps.hostid = ? WHERE eps.hostid = ?
') ')
%--> %-->
<!--% query_twat_shows = DBI.prepare(' <!--% query_twat_shows = DBI.prepare('
SELECT SELECT
eps.id, eps.id,
CASE eps.explicit WHEN 1 THEN \'Explicit\' ELSE \'Clean\' END AS explicit , CASE eps.explicit WHEN 1 THEN \'Explicit\' ELSE \'Clean\' END AS explicit ,
@@ -36,35 +36,43 @@
WHERE hosts.hostid = ? WHERE hosts.hostid = ?
ORDER BY eps.id DESC ORDER BY eps.id DESC
') ')
%--> %-->
<!--% twat_shows_to_count = query_twat_show_count.execute(id); %--> <!--% twat_shows_to_count = query_twat_show_count.execute(id); %-->
<!--% twat_shows = query_twat_shows.execute(id); %--> <!--% twat_shows = query_twat_shows.execute(id); %-->
<!--% twat_show_count = 0 %--> <!--% twat_show_count = 0 %-->
<!--% FOREACH show IN twat_shows_to_count %--> <!--% FOREACH show IN twat_shows_to_count %-->
<!--% twat_show_count = twat_show_count +1; %--> <!--% twat_show_count = twat_show_count +1; %-->
<!--% END %--> <!--% END %-->
<!--% hosts = DBI.tie('hosts', 'hostid') %--> <!--% hosts = DBI.tie('hosts', 'hostid') %-->
<article>
<!--% this_host = hosts.$id %--> <!--% this_host = hosts.$id %-->
<h2 class="title">Correspondent</h2> <h2 class="title">Correspondent</h2>
<div id="host" class="lane">
<div id="host_id">
<h2><!--% this_host.host %--></h2> <h2><!--% this_host.host %--></h2>
<p><!--% get_avatar(this_host.hostid, this_host.host) %--><br> <p><!--% get_avatar(this_host.hostid, this_host.host) %--><br>
<label>Host ID</label>: <!--% this_host.hostid %--><br><br> <label>Host ID</label>: <!--% this_host.hostid %--></p>
<label>email:</label> <u><!--% this_host.email %--></u><br> </div>
<label>profile:</label> <!--% this_host.profile %--><br><br> <div id="host_meta">
<label>episodes:</label> <strong><!--% hpr_show_count + twat_show_count %--></strong> <p><label>email:</label> <u><!--% this_host.email %--></u></p>
</p> <div><label>profile:</label> <!--% this_host.profile %--></div>
<p><label>episodes:</label> <strong><!--% hpr_show_count + twat_show_count %--></strong></p>
</div>
</div>
<div class="lane stack">
<!--% FOREACH hpr_show IN hpr_shows; %--> <!--% FOREACH hpr_show IN hpr_shows; %-->
<article>
<!--% show_summary(hpr_show, 'hide_host') %--> <!--% show_summary(hpr_show, 'hide_host') %-->
<p class="listen-in"><!--% display_listen_in(hpr_show.id) %--></p> <p class="listen-in"><!--% display_listen_in(hpr_show.id) %--></p>
</article>
<!--% END %--> <!--% END %-->
<!--% FOREACH twat_show IN twat_shows; %--> <!--% FOREACH twat_show IN twat_shows; %-->
<article>
<!--% twat_show_summary(twat_show, 'hide_host') %--> <!--% twat_show_summary(twat_show, 'hide_host') %-->
<p class="listen-in"><!--% display_listen_in(twat_show.id,"twat") %--></p> <p class="listen-in"><!--% display_listen_in(twat_show.id,"twat") %--></p>
<!--% END %-->
</article> </article>
<!--% END %-->
</div>
<p><a href="<!--% absolute_url(baseurl) %-->about.html#so_you_want_to_record_a_podcast">Become a Correspondent</a></p> <p><a href="<!--% absolute_url(baseurl) %-->about.html#so_you_want_to_record_a_podcast">Become a Correspondent</a></p>

View File

@@ -3,16 +3,6 @@
<h1>Search HPR.</h1> <h1>Search HPR.</h1>
</header> </header>
<div class="lane"> <div class="lane">
<form name="google-search" method="get" action="https://www.google.com/search">
<fieldset><legend>Google</legend>
<input type="hidden" name="sitesearch" value="https://www.hackerpublicradio.org/" />
<input name="q" type="text" placeholder="Search HPR with Google"/>
<input type="submit" name="sa" value="Search HPR with Google" />
<p>
<a href="https://www.google.com/policies/privacy/">privacy policy</a>
</p>
</fieldset>
</form>
<form method="get" id="search" action="https://duckduckgo.com/"> <form method="get" id="search" action="https://duckduckgo.com/">
<fieldset><legend>DuckDuckGo</legend> <fieldset><legend>DuckDuckGo</legend>
<input type="hidden" name="sites" value="https://www.hackerpublicradio.org/"/> <input type="hidden" name="sites" value="https://www.hackerpublicradio.org/"/>
@@ -26,6 +16,16 @@
</p> </p>
</fieldset> </fieldset>
</form> </form>
<form name="google-search" method="get" action="https://www.google.com/search">
<fieldset><legend>Google</legend>
<input type="hidden" name="sitesearch" value="https://www.hackerpublicradio.org/" />
<input name="q" type="text" placeholder="Search HPR with Google"/>
<input type="submit" name="sa" value="Search HPR with Google" />
<p>
<a href="https://www.google.com/policies/privacy/">privacy policy</a>
</p>
</fieldset>
</form>
<form method="get" action="https://www.bing.com/search"> <form method="get" action="https://www.bing.com/search">
<fieldset><legend>Bing</legend> <fieldset><legend>Bing</legend>
<input type="hidden" name="cp" value="utf-8" /> <input type="hidden" name="cp" value="utf-8" />