Browse Source

Improve mobile app compatibility

master
Skylar Ittner 1 year ago
parent
commit
eefa7ab00f
5 changed files with 22 additions and 12 deletions
  1. 9
    11
      app.php
  2. 2
    1
      lang/en_us.php
  3. 5
    0
      pages.php
  4. 1
    0
      pages/test.php
  5. 5
    0
      static/css/app.css

+ 9
- 11
app.php View File

@@ -88,23 +88,21 @@ END;
<?php
// Adjust as needed
$navbar_breakpoint = "sm";

// For mobile app
echo "<script nonce=\"$SECURE_NONCE\">var navbar_breakpoint = \"$navbar_breakpoint\";</script>"
?>
<nav class="navbar navbar-expand-<?php echo $navbar_breakpoint; ?> navbar-dark bg-dark fixed-top">
<button class="navbar-toggler my-0 py-0" type="button" data-toggle="collapse" data-target="#collapse" aria-controls="collapse" aria-expanded="false" aria-label="Toggle navigation">
<i class="fas fa-bars"></i>
<button class="navbar-toggler my-0 py-0" type="button" data-toggle="collapse" data-target="#navbar-collapse" aria-controls="navbar-collapse" aria-expanded="false" aria-label="Toggle navigation">
<!--<i class="fas fa-bars"></i>-->
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand py-0 mr-auto" href="app.php">
<?php
$src = "static/img/logo.png";
if ($pageid != "home") {
$src = "static/img/up-arrow-white.png";
}
?>
<img src="<?php echo $src; ?>" alt="" class="d-inline brand-img py-0" />
<img src="static/img/logo.svg" alt="" class="d-inline brand-img py-0" />
<?php echo SITE_TITLE; ?>
</a>

<div class="collapse navbar-collapse py-0" id="collapse">
<div class="collapse navbar-collapse py-0" id="navbar-collapse">
<div class="navbar-nav mr-auto py-0">
<?php
$curpagefound = false;
@@ -135,7 +133,7 @@ END;
}
?>
</div>
<div class="navbar-nav ml-auto py-0">
<div class="navbar-nav ml-auto py-0" id="navbar-right">
<span class="nav-item py-<?php echo $navbar_breakpoint; ?>-0">
<a class="nav-link py-<?php echo $navbar_breakpoint; ?>-0" href="<?php echo PORTAL_URL; ?>">
<i class="fas fa-user fa-fw"></i><span>&nbsp;<?php echo $_SESSION['realname'] ?></span>

+ 2
- 1
lang/en_us.php View File

@@ -25,5 +25,6 @@ define("STRINGS", [
"login server user data error" => "The login server refused to provide account information. Try again or contact technical support.",
"captcha error" => "There was a problem with the CAPTCHA (robot test). Try again.",
"home" => "Home",
"more" => "More"
"more" => "More",
"test" => "Test"
]);

+ 5
- 0
pages.php View File

@@ -7,6 +7,11 @@ define("PAGES", [
"navbar" => true,
"icon" => "fas fa-home"
],
"test" => [
"title" => "test",
"navbar" => true,
"icon" => "fas fa-terminal"
],
"404" => [
"title" => "404 error"
]

+ 1
- 0
pages/test.php View File

@@ -0,0 +1 @@
<h1>Test Page</h1>

+ 5
- 0
static/css/app.css View File

@@ -16,6 +16,11 @@ body {
padding-right: 1.5rem;
}

.navbar-toggler-icon {
padding: 0px;
margin: 0px;
}

.navbar-brand {
font-size: 120%;
padding-right: 1rem;

Loading…
Cancel
Save