Skip to content

Commit

Permalink
Header render Fixes (#1962)
Browse files Browse the repository at this point in the history
* Switch header buttons to use HTML button element for better UX
* Adjust styling to restoring honoring header button text color
* Improve header button layout on <768px display
  • Loading branch information
GregoryPost authored Dec 12, 2024
1 parent 6d09b1d commit 06dd159
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 13 deletions.
2 changes: 1 addition & 1 deletion config/symbbase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
header('X-Frame-Options: DENY');
header('Cache-control: private'); // IE 6 FIX
date_default_timezone_set('America/Phoenix');
$CODE_VERSION = '3.1.5';
$CODE_VERSION = '3.1.5.1';

set_include_path(get_include_path() . PATH_SEPARATOR . $SERVER_ROOT . PATH_SEPARATOR . $SERVER_ROOT.'/config/' . PATH_SEPARATOR . $SERVER_ROOT.'/classes/');

Expand Down
12 changes: 9 additions & 3 deletions css/symbiota/header.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,22 @@ header {
margin-right: 0.4rem;
}

#login {
float: right;

nav.top-login > span > form{
display: inline;
margin: 0;
padding: 0;

}

#contactUs {
#profile, #contactUs{
float: left;
}

#login, #logout {
float: right;
}

.top-brand {
/* align a and brand-name */
clear: both;
Expand Down
1 change: 1 addition & 0 deletions css/symbiota/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ button.inverse-color {

.button-secondary {
background-color: var(--bright-color);
color: var(--darkest-color);
}

.button-secondary > a {
Expand Down
20 changes: 11 additions & 9 deletions includes/header_template.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,26 @@
<div class="welcome-text bottom-breathing-room-rel">
<?= $LANG['H_WELCOME'] . ' ' . $USER_DISPLAY_NAME ?>!
</div>
<span style="white-space: nowrap;" class="button button-tertiary bottom-breathing-room-rel">
<a href="<?= $CLIENT_ROOT ?>/profile/viewprofile.php"><?= $LANG['H_MY_PROFILE'] ?></a>
<span id="profile">
<form name="profileForm" method="post" action="<?= $CLIENT_ROOT . '/profile/viewprofile.php' ?>">
<button class="button button-tertiary bottom-breathing-room-rel left-breathing-room-rel" name="profileButton" type="submit"><?= $LANG['H_MY_PROFILE'] ?></button>
</form>
</span>
<span style="white-space: nowrap;" class="button button-secondary bottom-breathing-room-rel">
<a href="<?= $CLIENT_ROOT ?>/profile/index.php?submit=logout"><?= $LANG['H_LOGOUT'] ?></a>
<span id="logout">
<form name="logoutForm" method="post" action="<?= $CLIENT_ROOT ?>/profile/index.php?submit=logout">
<button class="button button-secondary bottom-breathing-room-rel left-breathing-room-rel" name="logoutButton" type="submit"><?= $LANG['H_LOGOUT'] ?></button>
</form>
</span>
<?php
} else {
?>
<span class="button button-tertiary" id="contactUs">
<a onclick="window.location.href='#'">
<?= $LANG['H_CONTACT_US'] ?>
</a>
<span id="contactUs">
<button class="button button-tertiary bottom-breathing-room-rel left-breathing-room-rel" onclick="window.location.href='#'"><?= $LANG['H_CONTACT_US'] ?></button>
</span>
<span id="login">
<form name="loginForm" method="post" action="<?= $CLIENT_ROOT . "/profile/index.php" ?>">
<input name="refurl" type="hidden" value="<?= htmlspecialchars($_SERVER['SCRIPT_NAME'], ENT_COMPAT | ENT_HTML401 | ENT_SUBSTITUTE) . "?" . htmlspecialchars($_SERVER['QUERY_STRING'], ENT_QUOTES) ?>">
<button class="button button-secondary" name="loginButton" type="submit"><?= $LANG['H_LOGIN'] ?></button>
<button class="button button-secondary bottom-breathing-room-rel left-breathing-room-rel" name="loginButton" type="submit"><?= $LANG['H_LOGIN'] ?></button>
</form>
</span>
<?php
Expand Down

0 comments on commit 06dd159

Please sign in to comment.