Skip to content

Commit

Permalink
Update index.php
Browse files Browse the repository at this point in the history
  • Loading branch information
mwlistscom committed Nov 16, 2024
1 parent c8fabb0 commit 91e39e4
Showing 1 changed file with 29 additions and 18 deletions.
47 changes: 29 additions & 18 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Server Dashboard Script
* HomeSplash
*
* This script generates a server dashboard with configurable settings and links.
*
Expand Down Expand Up @@ -269,6 +269,7 @@
]));
}

//Circumference of the SVG circle used to create the circular progress indicators (or "rings") for displaying resource usage metrics like disk usage, memory usage, swap usage, and CPU usage.
$ringBase = 339.292;
?>
<!doctype html>
Expand All @@ -280,27 +281,34 @@
<link rel="stylesheet" type="text/css" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<style type="text/css">
body {
height: 60vh;
height: 100vh;
padding: 0;
margin: 0;
display: flex;
flex-direction: column;
font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
background: <?php echo $color_bg; ?>;
overflow: hidden;
}
.main, .footer {
padding-left: 15%;
padding-right: 15%;
}

.main {
flex: 1;
display: flex;
flex-direction: column;
justify-content: start;
padding-top: 6.5rem;
overflow-y: auto;
}
/* '.content' class to handle scrolling */
.content {
flex: 1;
overflow-y: auto; /* Enable vertical scrolling */
padding-left: 15%;
padding-right: 15%;
}

.main h1 {
font-size: 4rem;
font-weight: 300;
Expand Down Expand Up @@ -371,19 +379,9 @@
font-size: 0.85rem;
}

.overlay {
z-index: 1;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: black;
opacity: 0.3;
}
.details {
z-index: 2;
position: absolute;
position: fixed; /* Change from 'absolute' to 'fixed' */
box-sizing: border-box;
padding: 1em 15%;
bottom: 0;
Expand All @@ -410,6 +408,16 @@
margin: 0;
line-height: 1.3;
}
.overlay {
z-index: 1;
position: fixed; /* Change from 'absolute' to 'fixed' */
top: 0;
left: 0;
width: 100%;
height: 100%; /* Ensure it covers the entire viewport */
background-color: black;
opacity: 0.3;
}

/* Begin: Custom CSS */
<?php echo $custom_css; ?>
Expand Down Expand Up @@ -460,7 +468,7 @@
<h1><?php echo $server_name; ?></h1>
<p><?php echo $server_desc; ?></p>
</main>

<div class="content">
<?php
// Load JSON from the links.json file
$json = file_get_contents('links.json');
Expand Down Expand Up @@ -492,7 +500,7 @@
echo '</div>';
}
?>

</div>
<footer class="footer">
<?php if (!$windows && !empty($uptime)) { ?>
<div>Uptime: <span id="uptime"><?php echo $uptime; ?></span></div>
Expand Down Expand Up @@ -828,4 +836,7 @@ function saveTableData() {
}
}
});
});
});
</script>
</body>
</html>

0 comments on commit 91e39e4

Please sign in to comment.