Skip to content

Commit

Permalink
Merge pull request #1648 from WPO-Foundation/remove-compact-mode
Browse files Browse the repository at this point in the history
feat(design): removing compact mode
  • Loading branch information
jefflembeck authored Dec 20, 2021
2 parents 9e6a12e + 4a7bf0e commit b724c99
Show file tree
Hide file tree
Showing 46 changed files with 45 additions and 96 deletions.
2 changes: 1 addition & 1 deletion www/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<?php $gaTemplate = 'About'; include ('head.inc'); ?>
</head>
<body <?php if ($COMPACT_MODE) {echo 'class="compact"';} ?>>
<body>
<?php
$tab = 'About';
include 'header.inc';
Expand Down
2 changes: 1 addition & 1 deletion www/admin_header.inc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function header_link($url, $title) {
} ?>

</head>
<body <?php if ($COMPACT_MODE) {echo 'class="compact"';} ?>>
<body>
<div id="wrap">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
Expand Down
2 changes: 1 addition & 1 deletion www/blocked.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<title>WebPageTest - Access Denied</title>
<?php $gaTemplate = 'Blocked'; include ('head.inc'); ?>
</head>
<body <?php if ($COMPACT_MODE) {echo 'class="compact"';} ?>>
<body>
<div class="page">
<?php
include 'header.inc';
Expand Down
2 changes: 1 addition & 1 deletion www/breakdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<title><?php echo $page_title; ?> - WebPageTest Content Breakdown</title>
<?php $gaTemplate = 'Content Breakdown'; include ('head.inc'); ?>
</head>
<body <?php if ($COMPACT_MODE) {echo 'class="compact"';} ?>>
<body>
<?php
$tab = 'Test Result';
$subtab = 'Content';
Expand Down
2 changes: 1 addition & 1 deletion www/breakdownTimeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<?php $gaTemplate = 'Content Breakdown'; include ('head.inc'); ?>

</head>
<body <?php if ($COMPACT_MODE) {echo 'class="compact"';} ?>>
<body>
<?php
$tab = 'Test Result';
$subtab = 'Processing';
Expand Down
18 changes: 0 additions & 18 deletions www/common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -71,24 +71,6 @@ if (GetSetting('host', '') != 'www.webpagetest.org') {
header('X-Robots-Tag: noindex');
}

// Compact-mode UI
$COMPACT_MODE = false;
if (isset($_REQUEST['compact'])) {
if ($_REQUEST['compact']) {
setcookie('compact', '1', time()+60*60*24*365, '/');
$COMPACT_MODE = true;
} else {
setcookie('compact', '0', time()+60*60*24*365, '/');
}
} elseif (isset($_COOKIE['compact'])) {
if ($_COOKIE['compact']) {
setcookie('compact', '1', time()+60*60*24*365, '/');
$COMPACT_MODE = true;
} else {
setcookie('compact', '0', time()+60*60*24*365, '/');
}
}

// set up a global curl context that can be used for keep-alive connections (particularly when doing bulk relays)
if (function_exists('curl_init')) {
$CURL_CONTEXT = curl_init();
Expand Down
2 changes: 1 addition & 1 deletion www/construction.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<title>WebPageTest - Under Construction</title>
<?php $gaTemplate = 'Construction'; include ('head.inc'); ?>
</head>
<body <?php if ($COMPACT_MODE) {echo 'class="compact"';} ?>>
<body>
<div class="page">
<?php
$tab = 'Home';
Expand Down
2 changes: 1 addition & 1 deletion www/customWaterfall.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<title>WebPageTest Custom Waterfall<?php echo $testLabel; ?></title>
<?php $gaTemplate = 'Custom Waterfall'; include ('head.inc'); ?>
</head>
<body id="custom-waterfall" <?php if ($COMPACT_MODE) {echo 'class="compact"';} ?>>
<body id="custom-waterfall">
<?php
$tab = null;
include 'header.inc';
Expand Down
2 changes: 1 addition & 1 deletion www/custom_browsers.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<meta name="author" content="Patrick Meenan">
<?php include ('head.inc'); ?>
</head>
<body <?php if ($COMPACT_MODE) {echo 'class="compact"';} ?>>
<body>
<div class="page">
<?php
$tab = 'custom';
Expand Down
2 changes: 1 addition & 1 deletion www/custom_metrics.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<meta name="author" content="Patrick Meenan">
<?php include ('head.inc'); ?>
</head>
<body id="custom-metrics" <?php if ($COMPACT_MODE) {echo 'class="compact"';} ?>>
<body id="custom-metrics">
<?php
$tab = 'Test Result';
include 'header.inc';
Expand Down
2 changes: 1 addition & 1 deletion www/details.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function createForm($formName, $btnText, $callback, $id, $owner, $secret, $siteK

<?php $gaTemplate = 'Details'; include ('head.inc'); ?>
</head>
<body <?php if ($COMPACT_MODE) {echo 'class="compact"';} ?>>
<body>
<?php
$tab = 'Test Result';
$subtab = 'Details';
Expand Down
2 changes: 1 addition & 1 deletion www/domains.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<title><?php echo $page_title; ?> - WebPageTest Domain Breakdown</title>
<?php $gaTemplate = 'Domain Breakdown'; include ('head.inc'); ?>
</head>
<body <?php if ($COMPACT_MODE) {echo 'class="compact"';} ?>>
<body>
<?php
$tab = 'Test Result';
$subtab = 'Domains';
Expand Down
2 changes: 1 addition & 1 deletion www/easy.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<title>WebPageTest - Website Performance and Optimization Test</title>
<?php $gaTemplate = 'Main'; include ('head.inc'); ?>
</head>
<body class="home<?php if ($COMPACT_MODE) {echo ' compact';} ?>">
<body class="home">
<?php
$siteKey = GetSetting("recaptcha_site_key", "");
if (!isset($uid) && !isset($user) && !isset($USER_EMAIL) && strlen($siteKey)) {
Expand Down
2 changes: 1 addition & 1 deletion www/graph_page_data.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
}
</style>
</head>
<body <?php if ($COMPACT_MODE) {echo 'class="compact"';} ?>>
<body>
<?php
if (count($testsId) == 1) {
$tab = 'Test Result';
Expand Down
2 changes: 1 addition & 1 deletion www/http2_dependencies.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ function drawChart() {
}
</script>
</head>
<body <?php if ($COMPACT_MODE) {echo 'class="compact"';} ?>>
<body>
<div id="chart_div"></div>
</body>
</html>
2 changes: 1 addition & 1 deletion www/import.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
input[type="file"] {color:#FFF;}
</style>
</head>
<body <?php if ($COMPACT_MODE) {echo 'class="compact"';} ?>>
<body>
<div class="page">
<?php
$tab = 'Import';
Expand Down
2 changes: 1 addition & 1 deletion www/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<title>WebPageTest - Website Performance and Optimization Test</title>
<?php $gaTemplate = 'Main'; include ('head.inc'); ?>
</head>
<body class="home<?php if ($COMPACT_MODE) {echo ' compact';} ?>">
<body class="home">
<?php
$tab = 'Home';
include 'header.inc';
Expand Down
2 changes: 1 addition & 1 deletion www/install/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
}
</style>
</head>
<body <?php if ($COMPACT_MODE) {echo 'class="compact"';} ?>>
<body>
<h1>WebPageTest <?php echo VER_WEBPAGETEST; ?> Installation Check</h1>
<h2>PHP</h2><ul>
<?php CheckPHP(); ?>
Expand Down
2 changes: 1 addition & 1 deletion www/jpeginfo/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en-us">
<head>
</head>
<body <?php if ($COMPACT_MODE) {echo 'class="compact"';} ?>>
<body>
<h1>JPEG Information</h1>
<h1>Submit by URL</h1>
<form name="form" action="jpeginfo.php" method="GET">
Expand Down
2 changes: 1 addition & 1 deletion www/lighthouse_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#description { min-height: 2em; padding-left: 170px; width:380px;}
</style>
</head>
<body class="home<?php if ($COMPACT_MODE) {echo ' compact';} ?>">
<body class="home">
<?php
$siteKey = GetSetting("recaptcha_site_key", "");
if (!isset($uid) && !isset($user) && !isset($USER_EMAIL) && strlen($siteKey)) {
Expand Down
2 changes: 1 addition & 1 deletion www/pageimages.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<title>WebPageTest Page Images<?php echo $testLabel; ?></title>
<?php $gaTemplate = 'Page Images'; include ('head.inc'); ?>
</head>
<body id="page-images" <?php if ($COMPACT_MODE) {echo 'class="compact"';} ?>>
<body id="page-images">
<?php
$tab = 'Test Result';
$subtab = null;
Expand Down
32 changes: 0 additions & 32 deletions www/pagestyle2.css
Original file line number Diff line number Diff line change
Expand Up @@ -210,19 +210,9 @@ h6 {
.test_results-content h4 {
margin-top: 1.5em;
}
body.compact h2,
body.compact h3,
body.compact h4,
body.compact h5,
body.compact h6 {
padding: 0.4em 0;
}
p {
margin: 0 0 1em;
}
body.compact p {
margin: 0 0 0.25em;
}
ul {
list-style: none;
margin: 0;
Expand Down Expand Up @@ -877,9 +867,6 @@ nav a:hover {
margin: auto;
width: 100%;
}
body.compact #main {
padding: 0.5em 0;
}
@media screen and (min-width: 75em) {
#main {
grid-column: 2 / 12;
Expand Down Expand Up @@ -1013,10 +1000,6 @@ h1.attention {
line-height: 1.4;
padding: 0 1rem;
}
body.compact h1.attention {
font-size: 2.5em;
margin: .4em auto 1em;
}
@media (min-width: 40em) {
h1.attention {
font-size: 3.125em;
Expand Down Expand Up @@ -1201,9 +1184,6 @@ form[name=filterLog] .history_filter input[type=text] {
box-shadow: 0 0 30px rgba(47, 128, 237, .5);
margin-bottom: 8em;
}
body.compact #test_box-container {
box-shadow: none;
}
@media (min-width: 35em) {
#test_box-container {
border-radius: 10px;
Expand Down Expand Up @@ -1337,9 +1317,6 @@ body.compact #test_box-container {
.test_box {
padding: 5.625em 2.5em 2.5em;
}
body.compact .test_box {
padding: 2.5em 2.5em 2.5em;
}
#advanced_settings {
color: #F9D856;
font-size: 1.15em;
Expand Down Expand Up @@ -1500,9 +1477,6 @@ body.compact .test_box {
border-radius: 4px;
margin-top: 0;
}
body.compact #url {
margin-bottom: 0em;
}
@media screen and (min-width: 50em) {
#url {
width: 75%;
Expand Down Expand Up @@ -1751,9 +1725,6 @@ a.btn-primary-compact {
margin: 1em 0;
padding-bottom: 2em;
}
body.compact .box {
margin-bottom: 0.5em;
}
.about h1,
.common h1 {
margin-left: 3rem;
Expand Down Expand Up @@ -1853,9 +1824,6 @@ body.compact .box {
font-weight: 500;
font-size: .9em;
}
body.compact #header_container {
padding: 0 1.5em;
}
#header_container {
display: flex;
flex-flow: column;
Expand Down
2 changes: 1 addition & 1 deletion www/performance_optimization.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<title><?php echo "$page_title - WebPageTest Optimization Check Results"; ?></title>
<?php $gaTemplate = 'Optimization Check'; include ('head.inc'); ?>
</head>
<body <?php if ($COMPACT_MODE) {echo 'class="compact"';} ?>>
<body>
<?php
$tab = 'Test Result';
$subtab = 'Performance';
Expand Down
2 changes: 1 addition & 1 deletion www/publish.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<title>WebPageTest - Publish</title>
<?php $gaTemplate = 'Publish'; include ('head.inc'); ?>
</head>
<body <?php if ($COMPACT_MODE) {echo 'class="compact"';} ?>>
<body>
<div class="page">
<?php
include 'header.inc';
Expand Down
2 changes: 1 addition & 1 deletion www/result.inc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ $page_description = "Website performance test result$testLabel.";
<?php } ?>
<?php $gaTemplate = 'Test Result'; include ('head.inc'); ?>
</head>
<body <?php if ($COMPACT_MODE) {echo 'class="compact"';} ?>>
<body>
<?php
$tab = 'Test Result';
$subtab = 'Summary';
Expand Down
2 changes: 1 addition & 1 deletion www/resultBatch.inc
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ else
</style>
</style>
</head>
<body <?php if ($COMPACT_MODE) {echo 'class="compact"';} ?>>
<body>
<?php
$tab = 'Test Result';
include 'header.inc';
Expand Down
2 changes: 1 addition & 1 deletion www/resultSpam.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<title>WebPageTest - Test Blocked</title>
<?php $gaTemplate = 'Blocked'; include ('head.inc'); ?>
</head>
<body <?php if ($COMPACT_MODE) {echo 'class="compact"';} ?>>
<body>
<?php
include 'header.inc';
?>
Expand Down
2 changes: 1 addition & 1 deletion www/resultTraceroute.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
require_once('testStatus.inc');
?>
</head>
<body <?php if ($COMPACT_MODE) {echo 'class="compact"';} ?>>
<body>
<?php
$tab = 'Test Result';
$nosubheader = true;
Expand Down
2 changes: 1 addition & 1 deletion www/running.inc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
include ('head.inc');
?>
</head>
<body class="common <?php if ($COMPACT_MODE) {echo ' compact';} ?>">
<body class="common">
<?php
require_once('testStatus.inc');
$tab = 'Test Result';
Expand Down
2 changes: 1 addition & 1 deletion www/screen_shot.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
}
</style>
</head>
<body <?php if ($COMPACT_MODE) {echo 'class="compact"';} ?>>
<body>
<?php
$tab = 'Test Result';
$subtab = 'Screenshot';
Expand Down
2 changes: 1 addition & 1 deletion www/ssdiff.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<title>WebPageTest - Screenshot Diff</title>
<?php include ('head.inc'); ?>
</head>
<body <?php if ($COMPACT_MODE) {echo 'class="compact"';} ?>>
<body>
<div class="page">
<?php
$tab = 'Test Result';
Expand Down
2 changes: 1 addition & 1 deletion www/survey.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</style>
<?php $gaTemplate = 'About'; include ('head.inc'); ?>
</head>
<body <?php if ($COMPACT_MODE) {echo 'class="compact"';} ?>>
<body>
<div class="page">
<?php
include 'header.inc';
Expand Down
Loading

0 comments on commit b724c99

Please sign in to comment.