Clean up some html (to php) and class code in header.php.

This commit is contained in:
Retro_Guy 2024-11-05 04:15:36 -07:00
parent 33b9da5883
commit 90941226da
2 changed files with 29 additions and 22 deletions

View File

@ -5,7 +5,7 @@ if (basename(getcwd()) == 'mods') {
$rootdir = "../";
}
include ($rootdir . 'common/config.inc.php');
include($rootdir . 'common/config.inc.php');
global $OVERRIDES;
$CONFIG = include $config_file;
@ -17,12 +17,12 @@ echo '<meta charset="utf-8">';
// Set tzo if possible
?>
<script>
if (navigator.cookieEnabled)
document.cookie = "tzo="+ (- new Date().getTimezoneOffset())+"; path=/";
var tzid = new Intl.DateTimeFormat().resolvedOptions().timeZone;
document.cookie = "tzid=" + tzid + "; path=/";
</script>
<script>
if (navigator.cookieEnabled)
document.cookie = "tzo=" + (-new Date().getTimezoneOffset()) + "; path=/";
var tzid = new Intl.DateTimeFormat().resolvedOptions().timeZone;
document.cookie = "tzid=" + tzid + "; path=/";
</script>
<?php
if (isset($_COOKIE['mail_name']) && isset($_COOKIE['pkey'])) {
@ -52,18 +52,17 @@ if ((isset($_SESSION['theme'])) && file_exists($rootdir . '/common/themes/' . $d
}
echo '</head><body>';
?>
<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"
class="responsive_image"></a></td>
<td class="header_page_title_top">
<?php echo $CONFIG['rslight_title']; ?>
</td>
<td class="header_links_text">
<?php
echo '<table class="np_header_table_top">';
echo '<tr class="np_header_bar_top">';
echo '<td class="np_td_header_bar_logo_image"><a href="' . $CONFIG['default_content'] . '">';
echo '<img src="' . $header_image . '" alt="Rocksolid Light"';
echo ' class="responsive_image"></a></td>';
echo '<td class="header_page_title_top">';
echo $CONFIG['rslight_title'];
echo '</td>';
echo '<td class="header_links_text">';
if (isset($user) && $user && check_unread_mail() == true) {
$unread = true;
} else {
@ -95,7 +94,7 @@ echo '</a>';
echo '</td></tr>';
echo '</table>';
include ($config_dir . '/fortunes.conf');
include($config_dir . '/fortunes.conf');
// If $config_dir/motd.txt is not blank, show it
if (file_exists($config_dir . '/motd.txt')) {
@ -196,4 +195,4 @@ function head_mail_db_open($database, $table = 'messages')
from_hide TEXT,
to_hide TEXT)");
return ($dbh);
}
}

View File

@ -259,11 +259,19 @@
font-size: 0.6em;
}
.np_header_bar_top {
.np_header_table_top {
background: var(--color-header-background);
padding: 0px;
padding-top: 0px;
margin-bottom: 0px;
color: black;
width: 100%;
vertical-align: middle;
}
.np_header_bar_top {
background: var(--color-header-background);
padding-top: 0px;
margin-bottom: 0px;
font-size: 0.5em;
width: 100%;
vertical-align: middle;