forked from rho_n/hpr_generator
31fed34212
public_html/css/hpr.css: Commented out the 'font-size: 75%;' in the CSS definition for '#maincontent footer p'. It was this that shrank the lower "step navigation" list in comparison to the upper one. The upper is in a '<header>' block and the lower in a '<footer>' block. templates/content-episode.tpl.html: Fixed a typo. templates/content-theme.tpl.html: Changed "This can be added" to "This is automatically added" templates/queries-episode-sqlite.tpl.html: Fixed a transcription error from the 'mysql' version templates/shared-utils.tpl.html: Modified the layout of the 'step_navigation' macro to remove tabs which are being copied to the HTML. Just a minor cosmetic issue. Added a Vim modeline to the file to help with this.
52 lines
1.6 KiB
HTML
52 lines
1.6 KiB
HTML
<!--% query_episode_maxmin = '
|
|
WITH episode_maxmin AS (
|
|
SELECT MAX(id) AS \'latest\', MIN(id) AS \'earliest\', ? AS \'id\'
|
|
FROM eps
|
|
WHERE eps.date <= date(\'now\')
|
|
),
|
|
episode_date AS (
|
|
SELECT eps.date
|
|
FROM eps
|
|
WHERE eps.id = ?
|
|
),
|
|
episode_previous AS (
|
|
SELECT MAX(id) AS \'previous\', ? AS \'id\'
|
|
FROM eps
|
|
INNER JOIN episode_date
|
|
ON eps.date < episode_date.date
|
|
WHERE eps.id > 1
|
|
),
|
|
episode_next AS (
|
|
SELECT MIN(id) AS \'next\', ? AS \'id\'
|
|
FROM eps
|
|
INNER JOIN episode_date
|
|
ON eps.date > episode_date.date
|
|
WHERE eps.date <= date(\'now\')
|
|
),
|
|
comment_tallies AS (
|
|
SELECT
|
|
eps_id,
|
|
COUNT(eps_id) AS eps_tally
|
|
FROM comments
|
|
GROUP BY eps_id
|
|
)
|
|
SELECT eps.id, eps.date, eps.title, eps.duration,
|
|
eps.summary, eps.notes, eps.explicit, eps.license,
|
|
eps.tags, eps.version, eps.downloads, eps.valid,
|
|
episode_maxmin.latest, episode_maxmin.earliest,
|
|
episode_previous.previous, episode_next.next,
|
|
hosts.hostid, hosts.host,
|
|
miniseries.name AS \'series\', miniseries.id AS \'seriesid\',
|
|
miniseries.description AS \'series_description\',
|
|
COALESCE (comment_tallies.eps_tally, 0) AS eps_tally
|
|
FROM eps
|
|
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
|
INNER JOIN miniseries ON eps.series = miniseries.id
|
|
INNER JOIN episode_maxmin ON eps.id = episode_maxmin.id
|
|
INNER JOIN episode_previous ON eps.id = episode_previous.id
|
|
INNER JOIN episode_next ON eps.id = episode_next.id
|
|
LEFT JOIN comment_tallies ON eps.id = comment_tallies.eps_id
|
|
WHERE eps.id = ?
|
|
'
|
|
%-->
|