Add DOCTYPE header and clean up more html/css.

This commit is contained in:
Retro_Guy 2024-10-30 09:52:17 -07:00
parent 3f4b7da1fb
commit 8c9784ab61
5 changed files with 85 additions and 36 deletions

View File

@ -53,7 +53,7 @@ if ((isset($_SESSION['theme'])) && file_exists($rootdir . '/common/themes/' . $d
echo '</head><body>';
?>
<table class="np_header_bar_top" valign="middle">
<table class="np_header_bar_top">
<tr>
<td class="np_td_header_bar_logo_image"><a href="<?php echo $CONFIG['default_content'];?>"><img
src="<?php echo $header_image ?>" alt="Rocksolid Light"
@ -127,14 +127,13 @@ $config_name = basename(getcwd());
if (!isset($OVERRIDES['disable_msgid_search']) || $OVERRIDES['disable_msgid_search'] == false) {
if ($config_name != "common" && $config_name != 'spoolnews') {
echo '<form name="form1" method="get" action="article-flat.php">';
echo '<table align="right">';
echo '<table class="header_message_id_search">';
echo '<tr>';
echo '<td>Message-ID: ';
echo '<td class="header_message_id_search_prompt">Message-ID: ';
echo '<input name="id" type="text" id="id" size="40" maxlength="120">&nbsp;';
echo '<input type="submit" name="Submit" value="Lookup">';
echo '</td></tr></table>';
echo '</form>';
echo '<br>';
}
}

View File

@ -248,13 +248,24 @@
text-align:right
}
.header_message_id_search {
width: auto;
margin-left: auto;
margin-right: 0px;
}
.header_message_id_search_prompt {
font-size: 0.6em;
}
.np_header_bar_top {
background: var(--color-header-background);
padding: 1px;
padding: 0px;
margin-bottom: 0px;
color: black;
font-size: 0.5em;
width: 100%;
vertical-align: middle;
}
.np_header_bar_large {
@ -535,10 +546,9 @@ input[id^=trigger_headers]:checked+.display_headers_on {
/* Attribution below Subject */
.thread_start_author_info {
float: left;
margin-top: 5;
box-sizing: border-box;
padding: 6px;
margin-bottom: 0;
margin-right: 10;
margin-left: 10;
text-decoration: none;
color: var(--color-highlight);
text-align: left;
@ -881,6 +891,34 @@ tr.np_thread_head, td.np_thread_head {
margin: 0px;
}
td.np_thread_head_date {
color: var(--color-visited);
background: var(--color-light);
margin: 0px;
width: 1%;
}
td.np_thread_head_threadsize {
color: var(--color-visited);
background: var(--color-light);
margin: 0px;
width: 70px;
}
td.np_thread_head_lastmessage {
color: var(--color-visited);
background: var(--color-light);
margin: 0px;
width: 15%;
}
td.np_thread_head_author {
color: var(--color-visited);
background: var(--color-light);
margin: 0px;
width: 15%;
}
/* Even line numbers in the thread */
tr.np_thread_line1, td.np_thread_line1 {
padding-left: 3px;
@ -891,6 +929,9 @@ tr.np_thread_line1, td.np_thread_line1 {
border-bottom: 1px solid var(--color-row-border);
border-right: 1px solid var(--color-row-border);
margin: 0px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* Odd line numbers in the thread */
@ -904,13 +945,19 @@ tr.np_thread_line2, td.np_thread_line2 {
border-bottom: 1px solid var(--color-row-border);
border-right: 1px solid var(--color-row-border);
margin: 0px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* Text inside a Line */
span.np_thread_line_text {
span.np_thread_line_text, td.np_thread_line_text {
font-size: 1em;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* The small images, a thread consists of */
@ -1102,9 +1149,9 @@ table.np_results_table {
/* display motd (fortunes) */
.np_display_motd {
margin-top: 10;
margin-bottom: 10;
margin-right: 10;
box-sizing: border-box;
padding-top: 10px;
padding-bottom: 10px;
text-decoration: none;
font-weight: bold;
color: var(--color-highlight);
@ -1115,9 +1162,9 @@ table.np_results_table {
/* display motd (new mail) */
.np_display_motd_new_mail {
margin-top: 10;
margin-bottom: 10;
margin-right: 10;
box-sizing: border-box;
padding-top: 10px;
padding-bottom: 10px;
text-decoration: none;
font-weight: bold;
color: var(--color-highlight);
@ -1248,6 +1295,8 @@ a.np_button {
.np_pages {
color: var(--color-visited);
width: 100%;
text-align: right;
}
.np_pages_selected {

View File

@ -10,6 +10,7 @@ $client_device = get_client_user_agent_info();
throttle_hits($client_device);
write_access_log();
echo '<!DOCTYPE html>';
echo '<html><head>';
echo '<title>' . htmlspecialchars($title) . '</title>';
echo '<meta name="viewport" content="width=device-width, initial-scale=1.0">';
@ -27,4 +28,4 @@ if (isset($frames_on) && $frames_on === false) {
include "../common/header.php";
}
}
echo '<hr>';
echo '<hr>';

View File

@ -855,7 +855,7 @@ function thread_format_lastmessage($c, $group = '')
} else {
$return = '<span class=np_posted_date_left>' . get_date_interval(date("D, j M Y H:i T", $c->date_thread)) . '</span>';
}
$return .= '<span class=np_posted_date_left>By: ' . create_name_link($poster_name, $name_from) . '</span>';
$return .= '<span class=np_posted_date_left><br>By: ' . create_name_link($poster_name, $name_from) . '</span>';
return ($return);
}
@ -925,10 +925,10 @@ function thread_show_recursive(&$headers, &$liste, $depth, $tree, $group, $artic
$output .= '<td><span class="np_thread_line_text">' . thread_format_date($c) . ' </span></td>';
}
if ($thread_show["subject"]) {
$output .= '<td nowrap="nowrap">' . '<span class="np_thread_line_text">' . thread_format_subject($c, $group, $highlight) . '</span></td>';
$output .= '<td class="np_thread_line_text"">' . '<span class="np_thread_line_text">' . thread_format_subject($c, $group, $highlight) . '</span></td>';
}
if ($thread_show["author"]) {
$output .= '<td></td>' . '<td nowrap="nowrap">' . '<span class="np_thread_line_text">' . thread_format_author($c, $group, $lastmessage) . '</span></td>';
$output .= '<td></td>' . '<td class="np_thread_line_text">' . '<span class="np_thread_line_text">' . thread_format_author($c, $group, $lastmessage) . '</span></td>';
}
$output .= "</tr>\n";
break;
@ -954,12 +954,12 @@ function thread_show_recursive(&$headers, &$liste, $depth, $tree, $group, $artic
$output .= '</span></tt></nobr><br>';
break;
case 5: // thread, graphic
$output .= '<table cellspacing="0"><tr>';
$output .= '<table><tr>';
if ($thread_show["date"])
$output .= '<td nowrap="nowrap">' . '<span class="np_thread_line_text">' . thread_format_date($c) . ' </span></td>';
$output .= '<td class="np_thread_line_text">' . '<span class="np_thread_line_text">' . thread_format_date($c) . ' </span></td>';
$output .= '<td><span class="np_thread_line_text">' . thread_show_treegraphic($newtree) . '</span></td>';
if ($thread_show["subject"])
$output .= '<td nowrap="nowrap">' . '<span class="np_thread_line_text">&nbsp;' . thread_format_subject($c, $group, $highlight) . " ";
$output .= '<td class="np_thread_line_text">' . '<span class="np_thread_line_text">&nbsp;' . thread_format_subject($c, $group, $highlight) . " ";
if ($thread_show["author"])
$output .= '(' . thread_format_author($c, $group, $lastmessage) . ')</span></td>';
$output .= "</tr></table>";
@ -967,21 +967,21 @@ function thread_show_recursive(&$headers, &$liste, $depth, $tree, $group, $artic
case 6: // thread, table
$output .= "<tr>";
if ($thread_show["date"])
$output .= '<td nowrap="nowrap"><tt>' . '<span class="np_thread_line_text">' . thread_format_date($c) . ' </span></tt></td>';
$output .= '<td nowrap="nowrap"><tt>' . '<span class="np_thread_line_text">' . formatTreeText($newtree) . " ";
$output .= '<td class="np_thread_line_text"><tt>' . '<span class="np_thread_line_text">' . thread_format_date($c) . ' </span></tt></td>';
$output .= '<td class="np_thread_line_text"><tt>' . '<span class="np_thread_line_text">' . formatTreeText($newtree) . " ";
if ($thread_show["subject"]) {
$output .= thread_format_subject($c, $group, $highlight) . "</span></tt></td>";
$output .= "<td></td>";
}
if ($thread_show["author"])
$output .= '<td nowrap="nowrap"><tt>' . '<span class="np_thread_line_text">' . thread_format_author($c, $group, $lastmessage) . '</span></tt></td>';
$output .= '<td class="np_thread_line_text"><tt>' . '<span class="np_thread_line_text">' . thread_format_author($c, $group, $lastmessage) . '</span></tt></td>';
$output .= "</tr>";
break;
case 7: // thread, table, graphic
$output .= '<tr class="' . $lineclass;
$output .= '">';
if ($thread_show["date"])
$output .= '<td class="' . $lineclass . '" nowrap="nowrap">' . '<span class="np_thread_line_text">' . thread_format_date($c) . " " . '</span></td>';
$output .= '<td class="' . $lineclass . '">' . '<span class="np_thread_line_text">' . thread_format_date($c) . " " . '</span></td>';
$output .= '<td class="' . $lineclass . '">';
$output .= thread_show_treegraphic($newtree);
if ($thread_show["subject"]) {
@ -990,7 +990,7 @@ function thread_show_recursive(&$headers, &$liste, $depth, $tree, $group, $artic
$output .= '</td>';
if ($thread_show["threadsize"]) {
$replies_count = $c->threadsize - 1;
$output .= '<td class="' . $lineclass . '" nowrap="nowrap">' . $replies_count . '</td>';
$output .= '<td class="' . $lineclass . '">' . $replies_count . '</td>';
}
if ($thread_show["author"])
$output .= '<td class="' . $lineclass . '">' . '<span class="np_thread_line_text">' . thread_format_author($c, $group, $lastmessage) . '</span></td>';
@ -1026,19 +1026,19 @@ function thread_show_head($lastmessage = 1)
global $thread_show, $thread_showTable;
global $text_thread, $thread_treestyle;
if (($thread_treestyle == 2) || ($thread_treestyle == 6) || ($thread_treestyle == 7)) {
echo '<table cellspacing="0" class="np_thread_table">';
echo '<table class="np_thread_table">';
echo '<tr class="np_thread_head">' . "\n";
if ($thread_show["date"])
echo '<td width="1%" class="np_thread_head">' . $text_thread["date"] . "&nbsp;</td>";
echo '<td class="np_thread_head_date">' . $text_thread["date"] . "&nbsp;</td>";
if ($thread_show["subject"])
echo '<td class="np_thread_head">' . $text_thread["subject"] . "</td>";
if ($thread_show["threadsize"])
echo '<td width="70em" class="np_thread_head">' . $text_thread["threadsize"] . "</td>";
echo '<td class="np_thread_head_threadsize">' . $text_thread["threadsize"] . "</td>";
if ($thread_show["author"]) {
if ($lastmessage == 1) {
echo '<td width="15%" class="np_thread_head">' . $text_thread["lastmessage"] . "</td>\n";
echo '<td class="np_thread_head_lastmessage">' . $text_thread["lastmessage"] . "</td>\n";
} else {
echo '<td width="15%" class="np_thread_head">' . $text_thread["author"] . "</td>\n";
echo '<td class="np_thread_head_author">' . $text_thread["author"] . "</td>\n";
}
}
echo "</tr>\n";

View File

@ -80,7 +80,7 @@ if ((! function_exists("npreg_group_has_read_access") || npreg_group_has_read_ac
echo '<a href="' . $file_index . '" target=' . $frame['menu'] . '>' . basename(getcwd()) . '</a> / ';
echo htmlspecialchars(group_display_name($group)) . '</h1>';
echo '<table cellpadding="0" cellspacing="0" width="100%" class="np_buttonbar"><tr>';
echo '<table class="np_buttonbar"><tr>';
// View Latest button
if (isset($overboard) && ($overboard == true)) {
echo '<td>';
@ -130,7 +130,7 @@ if ((! function_exists("npreg_group_has_read_access") || npreg_group_has_read_ac
$last = $article_count;
}
}
echo '<td class="np_pages" width="100%" align="right">';
echo '<td class="np_pages">';
// Show the replies to an article in the thread view?
if ($thread_show["replies"]) {
// yes, so the counting of the shown articles is very easy
@ -154,8 +154,8 @@ if ((! function_exists("npreg_group_has_read_access") || npreg_group_has_read_ac
}
echo '</tr></table>';
thread_show($headers, $group, $first, $last);
echo '<table cellpadding="0" cellspacing="0" width="100%" class="np_buttonbar"><tr>';
echo '<td class="np_pages" width="100%" align="right">';
echo '<table class="np_buttonbar"><tr>';
echo '<td class="np_pages">';
thread_pageselect($group, $pagecount, $first);
echo '</td></tr></table>';
} else {