Skip to content

Commit

Permalink
add repository link and improve button styles in default index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Nov 9, 2019
1 parent cb00574 commit e337320
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions default_index_html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const DEFAULT_INDEX_HTML = String.raw`<!DOCTYPE html>
}
body {
color: #4a4a4a;
border: 8px;
font-size: 1em;
font-weight: 400;
}
Expand All @@ -25,6 +26,27 @@ export const DEFAULT_INDEX_HTML = String.raw`<!DOCTYPE html>
display: flex;
flex-direction: column;
}
a {
color: #3273dc;
cursor: pointer;
text-decoration: none;
}
a:hover {
color: #000;
}
button {
color: #fff;
background-color: #3298dc;
border-color: transparent;
cursor: pointer;
text-align: center;
}
button:hover {
background-color: #2793da;
}
footer {
margin-top: 16px;
}
.header-label {
margin-right: 4px;
}
Expand Down Expand Up @@ -55,6 +77,10 @@ export const DEFAULT_INDEX_HTML = String.raw`<!DOCTYPE html>
<strong class="header-label">Last Update:</strong>
<span id="last-update"></span>
</div>
<div class="header-item">
<strong class="header-label">Repository:</strong>
<a id="repository-link" rel="noopener"></a>
</div>
</header>
<main id="main"></main>
<footer id="footer"></footer>
Expand All @@ -71,6 +97,9 @@ export const DEFAULT_INDEX_HTML = String.raw`<!DOCTYPE html>
const data = window.BENCHMARK_DATA;
document.getElementById('last-update').textContent = new Date(data.lastUpdate).toString();
const repoLink = document.getElementById('repository-link');
repoLink.href = data.repoUrl;
repoLink.textContent = data.repoUrl;
function collectBenchesPerTestCase(entries) {
const map = new Map();
Expand Down

0 comments on commit e337320

Please sign in to comment.