Skip to content

Commit e258bb1

Browse files
authored
Update landing page buttons (#571)
Use the same button style for home, about, instructions and details page.
1 parent 9c07200 commit e258bb1

4 files changed

Lines changed: 77 additions & 27 deletions

File tree

about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ <h1 class="section-header">About Speedometer</h1>
9292
</li>
9393
</ul>
9494
</div>
95-
<div class="buttons section-footer">
95+
<div class="buttons section-footer fixed-footer">
9696
<div class="button-row">
9797
<a class="button" href="./" title="Show main section.">Home</a>
9898
<a class="button" href="instructions.html" title="Show test instructions.">Test Instructions</a>

index.html

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,26 @@
1515
<img srcset="resources/logo@2x.png 2x" src="resources/logo.png" alt="Speedometer" />
1616
<div class="version next">next</div>
1717
</a>
18-
<div class="content">
19-
<p>Speedometer is a browser benchmark that measures the responsiveness of Web applications. It uses demo web applications to simulate user actions such as adding to-do items.</p>
20-
<p id="screen-size-warning">
21-
<strong>
22-
Your browser window is too small. For most accurate results, please make the view port size at least <span id="min-screen-width">850px</span> by <span id="min-screen-height">650px</span>.<br />
23-
It's currently <span id="screen-size"></span>.
24-
</strong>
25-
</p>
26-
</div>
27-
<div class="buttons">
28-
<div class="button-row">
29-
<button class="start-tests-button">Start Test</button>
18+
<div class="section-grid">
19+
<div class="section-content content">
20+
<p class="top-row">Speedometer is a browser benchmark that measures the responsiveness of Web applications. It uses demo web applications to simulate user actions such as adding to-do items.</p>
21+
<p id="screen-size-warning">
22+
<strong>
23+
Your browser window is too small. For most accurate results, please make the view port size at least <span id="min-screen-width">850px</span> by <span id="min-screen-height">650px</span>.<br />
24+
It's currently <span id="screen-size"></span>.
25+
</strong>
26+
</p>
3027
</div>
31-
<div class="button-row">
32-
<a href="about.html">About Speedometer</a>
33-
<a href="instructions.html">Test Instructions</a>
28+
<div class="buttons">
29+
<div class="button-row">
30+
<button class="start-tests-button primary-button">Start Test</button>
31+
</div>
32+
</div>
33+
<div class="buttons section-footer fixed-footer">
34+
<div class="button-row">
35+
<a class="button" href="about.html">About Speedometer</a>
36+
<a class="button" href="instructions.html">Test Instructions</a>
37+
</div>
3438
</div>
3539
</div>
3640
</section>
@@ -68,7 +72,7 @@ <h1>Score</h1>
6872
</div>
6973
<div class="buttons">
7074
<div class="button-row">
71-
<a class="button" href="#details" id="show-details" title="Show detailed results data.">Details</a>
75+
<a class="button primary-button" href="#details" id="show-details" title="Show detailed results data.">Details</a>
7276
</div>
7377
</div>
7478
</section>

instructions.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ <h1 class="section-header">Speedometer General Instructions</h1>
2929
<li>Some devices might need time to cool down between consecutive runs.</li>
3030
</ul>
3131
</div>
32-
<div class="buttons section-footer">
32+
<div class="buttons section-footer fixed-footer">
3333
<div class="button-row">
3434
<a class="button" href="./" title="Show main section.">Home</a>
3535
<a class="button" href="about.html" title="Show about section.">About</a>

resources/main.css

Lines changed: 55 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -194,25 +194,36 @@ button,
194194
.buttons button,
195195
.buttons .button {
196196
appearance: none;
197+
border: 2px solid var(--foreground);
198+
border-radius: 8px;
199+
min-width: 160px;
200+
padding: 6px 15px;
201+
margin: 0 10px;
202+
font-size: 16px;
203+
color: var(--foreground);
204+
background-color: transparent;
205+
cursor: pointer;
206+
user-select: none;
207+
}
208+
209+
.primary-button {
197210
border: 3px solid var(--foreground);
198211
border-radius: 10px;
199212
min-width: 200px;
200213
padding: 5px 0px;
201214
margin: 0 20px;
202215
font-size: 25px;
203-
color: var(--foreground);
204-
background-color: transparent;
205-
cursor: pointer;
206-
user-select: none;
207216
}
208217

209-
.buttons button:active {
218+
.buttons button:active,
219+
.buttons .button:active {
210220
background-color: var(--foreground);
211221
color: var(--background);
212222
border-color: var(--foreground) !important;
213223
}
214224

215-
.buttons button:focus {
225+
.buttons button:focus,
226+
.buttons .button:focus {
216227
outline: none;
217228
border-color: var(--highlight);
218229
}
@@ -417,6 +428,40 @@ section#home .content {
417428
text-align: center;
418429
}
419430

431+
.fixed-footer {
432+
position: absolute;
433+
bottom: var(--padding-width);
434+
left: var(--padding-width);
435+
width: var(--viewport-width);
436+
box-sizing: border-box;
437+
margin: 0;
438+
padding: 15px 20px;
439+
display: flex;
440+
justify-content: space-around;
441+
align-items: center;
442+
background-color: var(--background);
443+
z-index: 10;
444+
}
445+
446+
.fixed-footer .button-row {
447+
align-items: center;
448+
width: 100%;
449+
margin: 0;
450+
}
451+
452+
section#about .section-content,
453+
section#instructions .section-content {
454+
padding-bottom: 70px;
455+
}
456+
457+
section#home .buttons:not(.section-footer) {
458+
position: absolute;
459+
top: 50%;
460+
left: 50%;
461+
transform: translate(-50%, -50%);
462+
margin: 0;
463+
}
464+
420465
button.show-about {
421466
margin-top: 100px;
422467
font-size: 16px;
@@ -534,12 +579,13 @@ section#details .results-table {
534579
width: 50%;
535580
}
536581

537-
section#details .export-buttons {
582+
.export-buttons {
538583
justify-content: center;
539584
margin-bottom: 0;
540585
}
541-
section#details .export-buttons button,
542-
section#details .export-buttons .button {
586+
587+
.export-buttons button,
588+
.export-buttons .button {
543589
padding: 5px 10px;
544590
min-width: auto;
545591
font-size: 14px;

0 commit comments

Comments
 (0)