Commit d18f42a9 authored by Eric - kg6wxc's avatar Eric - kg6wxc
Browse files

Merge branch 'map_page_scaling' into 'master'

bugfix: attempt to fix the map page scaling.

Closes #9

See merge request !3
parents 002653c8 7712b0b8
/*** background color of the overall page ***/ /*** background color of the overall page ***/
body { body {
background-color: #dddddd; background-color: #dddddd;
padding: 0;
margin: 0;
border: 0;
outline: 0;
} }
/*** This will change the size of the top left corner logo ***/ /*** This will change the size of the top left corner logo ***/
#pageLogo { #pageLogo {
width: 50px; width: 50px;
vertical-align: middle; vertical-align: middle;
} }
#headerText {
margin: 0;
}
/*** This will change the size of the map "container" ***/ /*** This will change the size of the map "container" ***/
/*** it should be left to default of 100%/100% of the window ***/
#meshmap { #meshmap {
height: 700px; /*height: 700px;*/
margin: 5px auto; /*margin: 5px auto;*/
width: 100%; /*width: 100%;*/
} }
/*** this is the size of the map itself ***/ /*** this is the size of the map itself ***/
#mapid { #mapid {
width: 100%; /*width: 100vh;*/
height: 100%; height: 100vh;
} }
h1 { h1 {
color: navy; color: navy;
...@@ -87,21 +95,21 @@ tr:nth-child(odd) { ...@@ -87,21 +95,21 @@ tr:nth-child(odd) {
MapTitle { MapTitle {
color: Black; color: Black;
font-weight:bold; font-weight:bold;
font-size: 200%; font-size: 2em;
vertical-align: middle; vertical-align: middle;
} }
Warning_MSG { Warning_MSG {
color: Red; color: Red;
font-weight:bold; font-weight:bold;
font-size: 150%; font-size: 1.5em;
text-align: center; text-align: center;
} }
Welcome_MSG { Welcome_MSG {
/* color: Blue; */ /* color: Blue; */
font-weight:bold; font-weight:bold;
font-size: 150%; font-size: 1.5em;
text-align: center; text-align: center;
display: inline; display: inline;
} }
...@@ -117,13 +125,13 @@ Welcome_MSG2 { ...@@ -117,13 +125,13 @@ Welcome_MSG2 {
Internet_MSG { Internet_MSG {
color: Purple; color: Purple;
font-weight:bold; font-weight:bold;
font-size: 100%; font-size: 1em;
text-align: center; text-align: center;
} }
Mesh_MSG { Mesh_MSG {
color: Orange; color: Orange;
font-weight:bold; font-weight:bold;
font-size: 100%; font-size: 1em;
text-align: center; text-align: center;
} }
NodeTitle { NodeTitle {
...@@ -169,21 +177,21 @@ Link_Infinite { ...@@ -169,21 +177,21 @@ Link_Infinite {
MAP_DETAILS { MAP_DETAILS {
color: Black; color: Black;
font-weight:bold; font-weight:bold;
font-size: 125%; font-size: 1.25em;
} }
/*NEW ADDITIONS*/ /*NEW ADDITIONS*/
.maptitle { .maptitle {
color: Black; color: Black;
font-weight:bold; font-weight:bold;
font-size: 200%; font-size: 2em;
vertical-align: middle; vertical-align: middle;
display: inline; display: inline;
} }
.welcomeMsg { .welcomeMsg {
/* color: Blue; */ /* color: Blue; */
font-weight:bold; font-weight:bold;
font-size: 150%; font-size: 1.5em;
text-align: center; text-align: center;
display: inline; display: inline;
} }
...@@ -196,7 +204,7 @@ MAP_DETAILS { ...@@ -196,7 +204,7 @@ MAP_DETAILS {
.warningMsg { .warningMsg {
color: Red; color: Red;
font-weight:bold; font-weight:bold;
font-size: 150%; font-size: 1.5em;
text-align: center; text-align: center;
display: inline; display: inline;
} }
...@@ -299,6 +299,9 @@ if (isset($USER_SETTINGS['map_iFrame_Enabled']) && ($USER_SETTINGS['map_iFrame_E ...@@ -299,6 +299,9 @@ if (isset($USER_SETTINGS['map_iFrame_Enabled']) && ($USER_SETTINGS['map_iFrame_E
} }
}else { }else {
echo "<div id='meshmap'>\n"; // Closing tag at end of primary routine echo "<div id='meshmap'>\n"; // Closing tag at end of primary routine
echo "<div id='mapHeader'>\n";
if (isset($USER_SETTINGS['pageLogo'])) { if (isset($USER_SETTINGS['pageLogo'])) {
//echo "<MapTitle>"; //echo "<MapTitle>";
echo "<img class='maptitle' id='pageLogo' src='" . $USER_SETTINGS['pageLogo'] . "' alt='The Logo'>"; echo "<img class='maptitle' id='pageLogo' src='" . $USER_SETTINGS['pageLogo'] . "' alt='The Logo'>";
...@@ -330,6 +333,8 @@ if (isset($USER_SETTINGS['map_iFrame_Enabled']) && ($USER_SETTINGS['map_iFrame_E ...@@ -330,6 +333,8 @@ if (isset($USER_SETTINGS['map_iFrame_Enabled']) && ($USER_SETTINGS['map_iFrame_E
//echo "</Warning_MSG>"; //echo "</Warning_MSG>";
echo "<br>"; echo "<br>";
} }
echo "</div>\n"; // end of mapHeader <div>
} }
if (isset($GLOBALS['hide_admin'])) { if (isset($GLOBALS['hide_admin'])) {
...@@ -506,7 +511,9 @@ $Content .= <<< EOD ...@@ -506,7 +511,9 @@ $Content .= <<< EOD
L.control.autoRefresh().addTo(map); L.control.autoRefresh().addTo(map);
</script> </script>
EOD; EOD;
} }
$Content .= "</div>\n"; // Closing tag $Content .= "</div>\n"; // Closing tag
...@@ -514,21 +521,27 @@ $Content .= "</div>\n"; // Closing tag ...@@ -514,21 +521,27 @@ $Content .= "</div>\n"; // Closing tag
// Display Page // Display Page
echo $Content; echo $Content;
// the final scaling of the map div
// kinda hacky but it works well enough for now.
$scaling = <<<EOD
<script>
var userAgent = window.navigator.userAgent;
var map = document.getElementById("mapid");
var header = document.getElementById("mapHeader");
if(header) {
var offset = header.offsetHeight;
var search4FF = /Firefox/;
if(search4FF.test(userAgent) {
offset = offset + 14;
}
str = "calc(100vh - " + offset + "px)";
}
</script>
//if (is_connected() && $USER_SETTINGS['inetServerText']) EOD;
//{
// echo "<Internet_MSG>";
// echo sprintf($USER_SETTINGS['inetServerText'], $USER_SETTINGS['inetServerHostname']);
// echo "<br>";
// echo "</Internet_MSG>";
//}
//echo "</div>\n"; // End division meshmap echo $scaling;
echo "</body>\n"; echo "</body>\n";
echo "</html>\n"; echo "</html>\n";
/*
* End of primary display
********************************************************************************************************************/
?> ?>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment