mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Read sidebar togglestate from cookie, conditonally load linkquality.js
This commit is contained in:
parent
f9b9329182
commit
7ca6a859ef
@ -45,9 +45,12 @@ if (!isset($_COOKIE['theme'])) {
|
|||||||
} else {
|
} else {
|
||||||
$theme = $_COOKIE['theme'];
|
$theme = $_COOKIE['theme'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$theme_url = 'app/css/'.htmlspecialchars($theme, ENT_QUOTES);
|
$theme_url = 'app/css/'.htmlspecialchars($theme, ENT_QUOTES);
|
||||||
|
|
||||||
|
if ($_COOKIE['sidebar'] == 'true' ) {
|
||||||
|
$toggleState = "toggled";
|
||||||
|
}
|
||||||
|
|
||||||
?><!DOCTYPE html>
|
?><!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
@ -99,7 +102,7 @@ $theme_url = 'app/css/'.htmlspecialchars($theme, ENT_QUOTES);
|
|||||||
<!-- Page Wrapper -->
|
<!-- Page Wrapper -->
|
||||||
<div id="wrapper">
|
<div id="wrapper">
|
||||||
<!-- Sidebar -->
|
<!-- Sidebar -->
|
||||||
<ul class="navbar-nav sidebar sidebar-light d-none d-md-block accordion" id="accordionSidebar">
|
<ul class="navbar-nav sidebar sidebar-light d-none d-md-block accordion <?php echo $toggleState; ?>" id="accordionSidebar">
|
||||||
<!-- Sidebar - Brand -->
|
<!-- Sidebar - Brand -->
|
||||||
<a class="sidebar-brand d-flex align-items-center justify-content-center" href="index.php?page=wlan0_info">
|
<a class="sidebar-brand d-flex align-items-center justify-content-center" href="index.php?page=wlan0_info">
|
||||||
<div class="sidebar-brand-icon">
|
<div class="sidebar-brand-icon">
|
||||||
@ -288,8 +291,10 @@ $theme_url = 'app/css/'.htmlspecialchars($theme, ENT_QUOTES);
|
|||||||
<!-- Custom RaspAP JS -->
|
<!-- Custom RaspAP JS -->
|
||||||
<script src="app/js/custom.js"></script>
|
<script src="app/js/custom.js"></script>
|
||||||
|
|
||||||
|
<?php if ($page == "wlan0_info") { ?>
|
||||||
<!-- Link Quality Chart -->
|
<!-- Link Quality Chart -->
|
||||||
<script src="app/js/linkquality.js"></script>
|
<script src="app/js/linkquality.js"></script>
|
||||||
|
<?php }; ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
// Load non default JS/ECMAScript in footer.
|
// Load non default JS/ECMAScript in footer.
|
||||||
|
Loading…
Reference in New Issue
Block a user