Allow some adjustments to the public view using URL arguments for embedding
This commit is contained in:
parent
3c15438925
commit
d418681d49
@ -19,6 +19,19 @@ require_once __DIR__ . "/../lib/required_public.php";
|
||||
<link href="../static/css/material-color/material-color.min.css" rel="stylesheet">
|
||||
<link href="../static/css/fontawesome-all.min.css" rel="stylesheet">
|
||||
|
||||
<?php
|
||||
// Allow setting the page background to match the style of a parent frame
|
||||
if (isset($_GET["backgroundcolor"]) && !empty($_GET["backgroundcolor"]) && preg_match("/^[a-z0-9#\-]+$/i", $_GET["backgroundcolor"])) {
|
||||
?>
|
||||
<style>
|
||||
html,body {
|
||||
background-color: <?php echo $_GET["backgroundcolor"]; ?>
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="container mt-4">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-12 col-md-8">
|
||||
@ -224,7 +237,7 @@ require_once __DIR__ . "/../lib/required_public.php";
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php /* Hide this box if we're embedded in another page */ if (!defined($_GET["embed"])) { ?>
|
||||
<div class="card-body">
|
||||
<p>
|
||||
Look up another machine:
|
||||
@ -234,6 +247,7 @@ require_once __DIR__ . "/../lib/required_public.php";
|
||||
<button type="submit" class="btn btn-primary btn-block mt-2">Get Info</button>
|
||||
</form>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user