Commit 20386d9a authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

SuperSize: Separate index.html css from viewer CSS.

The two pages are independent, and it's confusing that they shared CSS.

Bug: 1001775
Change-Id: I3999e7e641650c98af2246c16b8199829696187d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1810770Reviewed-by: default avatarEric Stevenson <estevenson@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697767}
parent 55474752
...@@ -11,22 +11,102 @@ ...@@ -11,22 +11,102 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="theme-color" content="#4285f4"> <meta name="theme-color" content="#4285f4">
<link href="https://fonts.googleapis.com/css?family=Google+Sans:400,500|Roboto:400,500" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Google+Sans:400,500|Roboto:400,500" rel="stylesheet">
<link rel="stylesheet" href="main.css">
<link rel="stylesheet" href="options.css">
<style> <style>
body { body {
grid-template-columns: auto; display: grid;
grid-template-rows: 64px 1fr;
grid-template-areas: "appbar" "select"; grid-template-areas: "appbar" "select";
color: #3c4043;
font-family: "Roboto", sans-serif;
} }
form { form {
grid-area: 'select'; grid-area: 'select';
margin: auto; margin: auto;
}
.appbar {
grid-area: appbar;
padding: 0 66px 0 48px;
}
.appbar-inner {
height: 100%;
padding: 0 66px 0 48px;
display: flex;
align-items: center;
}
.headline {
margin: 0;
font-family: "Google Sans", Arial, sans-serif;
color: #202124;
font-size: 22px;
flex: 1;
}
.select-wrapper {
position: relative;
}
.sel-big {
-webkit-appearance: none;
-moz-appearance: none;
font: inherit;
background: transparent;
border: 0;
padding: 20px 12px 13px;
width: 100%;
caret-color: #1a73e8;
}
.select-label {
position: absolute;
z-index: -1;
top: 0;
left: 0;
right: 0;
height: 52px;
line-height: 20px;
padding: 0 12px;
font-size: 12px;
color: #5f6368;
border-bottom: 1px solid currentColor;
background: rgba(0, 0, 0, 0.04);
}
.select-label::after {
content: '';
position: absolute;
top: calc(50% - 5px);
right: 4px;
margin: 5px 7px 5px 8px;
border-style: solid;
border-width: 5px 5px 0 5px;
border-color: currentColor transparent transparent transparent;
transition: transform 0.2s ease-out;
}
.sel-big:focus + .select-label {
color: #1a73e8;
bottom: -2px;
border-width: 2px;
}
.text-button {
padding: 0 8px;
height: 36px;
border-radius: 4px;
font-family: 'Google Sans', Arial, sans-serif;
font-weight: 500;
font-size: 14px;
background: #1a73e8;
color: white;
}
.text-button:hover {
background: #287ae6;
box-shadow: 0 1px 2px #3c40434d, 0 1px 3px 1px #3c404326;
}
.text-button:hover:focus {
background: #d2e3fc;
}
.text-button:focus,
.text-button:active {
background: #d2e3fce6;
} }
</style> </style>
<link rel="icon" href="favicon.ico" sizes="16x16 32x32 256x256" type="image/x-icon"> <link rel="icon" href="favicon.ico" sizes="16x16 32x32 256x256" type="image/x-icon">
<script> <script>
const DO_NOT_DIFF = "Don't diff"; const DO_NOT_DIFF = "Don't diff";
/** /**
...@@ -104,7 +184,6 @@ function setSubmitListener(form, fetchDataUrl) { ...@@ -104,7 +184,6 @@ function setSubmitListener(form, fetchDataUrl) {
const selVersion1 = form.elements.namedItem('version1'); const selVersion1 = form.elements.namedItem('version1');
const selVersion2 = form.elements.namedItem('version2'); const selVersion2 = form.elements.namedItem('version2');
const btnOpen = form.querySelector('button[type="submit"]'); const btnOpen = form.querySelector('button[type="submit"]');
const msgBadCompare = form.querySelector('.msg-bad-compare');
function channelIsMilestone() { function channelIsMilestone() {
// Returns: Whether channel is set to stable/beta (i.e. is a milestone) // Returns: Whether channel is set to stable/beta (i.e. is a milestone)
...@@ -146,9 +225,9 @@ function setSubmitListener(form, fetchDataUrl) { ...@@ -146,9 +225,9 @@ function setSubmitListener(form, fetchDataUrl) {
function updateSubmitButton() { function updateSubmitButton() {
if (channelIsMilestone()) { if (channelIsMilestone()) {
submitButton.textContent = 'Open Official Build Report';
} else {
submitButton.textContent = 'Open Milestone Report'; submitButton.textContent = 'Open Milestone Report';
} else {
submitButton.textContent = 'Open Canary Report';
} }
} }
...@@ -232,19 +311,18 @@ function setSubmitListener(form, fetchDataUrl) { ...@@ -232,19 +311,18 @@ function setSubmitListener(form, fetchDataUrl) {
</head> </head>
<body> <body>
<div class="scrim toggle-options" hidden></div>
<header class="appbar"> <header class="appbar">
<div class="appbar-inner"> <div class="appbar-inner">
<h1 class="headline">Super Size Tiger View</h1> <h1 class="headline">Super Size Tiger View</h1>
</div> </div>
</header> </header>
<table class="table center-text"> <table style="margin:auto; text-align: center">
<tr> <tr>
<td class="form"> <td style="width: 40%">
<form id="select-form"> <form id="select-form">
<h2 class="subhead">Channel: <h2 style="font-size: 16px">Channel:
<label><input type="radio" name="mode" value="canary" checked> canary</label> <label><input type="radio" name="mode" value="stable/beta" checked> Stable/Beta</label>
<label><input type="radio" name="mode" value="stable/beta"> stable/beta</label> <label><input type="radio" name="mode" value="canary"> Canary</label>
</h2> </h2>
<p class="select-wrapper"> <p class="select-wrapper">
<select id="apk" class="sel-big" name="apk"></select> <select id="apk" class="sel-big" name="apk"></select>
...@@ -262,11 +340,10 @@ function setSubmitListener(form, fetchDataUrl) { ...@@ -262,11 +340,10 @@ function setSubmitListener(form, fetchDataUrl) {
</p> </p>
<p class="select-wrapper"> <p class="select-wrapper">
<button type="submit" class="text-button filled-button" id="submit-button"> <button type="submit" class="text-button" id="submit-button">
Open Milestone Report Open Milestone Report
</button> </button>
</p> </p>
<div class="msg-bad-compare">Version 1 must be older than Version 2</div>
<div style="margin:20pt 0 10pt"> <div style="margin:20pt 0 10pt">
<b>Note:</b> AndroidWebview.apk size information exists only for M71 and above.<br> <b>Note:</b> AndroidWebview.apk size information exists only for M71 and above.<br>
</div> </div>
...@@ -274,11 +351,10 @@ function setSubmitListener(form, fetchDataUrl) { ...@@ -274,11 +351,10 @@ function setSubmitListener(form, fetchDataUrl) {
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="center-text" colspan=3> <td style="text-align: center" colspan=3>
<p>To upload your own .ndjson file, use the upload button within <a href="viewer.html">the viewer</a>.</p> <p>To upload your own .ndjson file, use the upload button within <a href="viewer.html">the viewer</a>.</p>
</td> </td>
</tr> </tr>
</table> </table>
</body> </body>
</html> </html>
...@@ -25,11 +25,6 @@ ...@@ -25,11 +25,6 @@
background: #00000050; background: #00000050;
} }
/** Fix height to prevent vertical shift on view mode change. */
#select-form {
min-height: 380px;
}
/** Options side panel */ /** Options side panel */
.options { .options {
z-index: 5; /* Side panel layer */ z-index: 5; /* Side panel layer */
...@@ -238,9 +233,11 @@ select.sel-big:focus + .select-label::after { ...@@ -238,9 +233,11 @@ select.sel-big:focus + .select-label::after {
/** <input type='checkbox' or 'radio'> elements */ /** <input type='checkbox' or 'radio'> elements */
input[type='checkbox'], input[type='checkbox'],
input[type='radio'] { input[type='radio'] {
margin: 4px 0; position: absolute;
margin: 0;
height: 18px; height: 18px;
width: 18px; width: 18px;
opacity: 0;
} }
.checkbox-wrapper, .checkbox-wrapper,
.radio-wrapper { .radio-wrapper {
...@@ -318,16 +315,6 @@ input[type='file'] { ...@@ -318,16 +315,6 @@ input[type='file'] {
opacity: 0; opacity: 0;
} }
#select-form .msg-bad-compare {
color: #f00;
font-size: 0.7em;
margin-top: 5px;
visibility: hidden;
}
#select-form .msg-bad-compare.visible {
visibility: visible;
}
/** Tweaks for smaller screen sizes */ /** Tweaks for smaller screen sizes */
@media (max-width: 700px) { @media (max-width: 700px) {
.show-options { .show-options {
......
Markdown is supported
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