Browse Source

Several changes based on user comments.

master
Trey Del Bonis 4 years ago
parent
commit
3c6ad0f37c
3 changed files with 14 additions and 10 deletions
  1. 5
    2
      www/index.html
  2. 7
    6
      www/main.js
  3. 2
    2
      www/style.css

+ 5
- 2
www/index.html View File

@@ -16,8 +16,11 @@
<div id="content">
<div id="heading">
<h1>Bitcoin Block Halving Countdown!</h1>
<h2><span id="blocksleft">...</span> blocks left</h2>
<h2><span id="timeleft">... remaining</span></h2>
<h3><span id="blocksleft">...</span> blocks left</h3>
<h3><span id="timeleft">... remaining</span></h3>
<p>
Click/tap on the rows for more statistics.
</p>
</div>

<div id="blocklist">

+ 7
- 6
www/main.js View File

@@ -220,19 +220,20 @@ function makeBlockElem(block, prevBlock) {
linksElem.appendChild(blockstreamLink);

// Thing to close the details.
let closeElem = document.createElement("div");
closeElem.classList.add("closebtn");
closeElem.innerHTML = "close";
closeElem.onclick = function() {
//let closeElem = document.createElement("div");
//closeElem.classList.add("closebtn");
//closeElem.innerHTML = "close";
linksElem.onclick = function() {
console.log("foobar");
// This is such a hack but it works. We have to do this because the
// onclick for the entry we're removing it from here *still gets run*
// when we pick up the click here. This just defers removing it until
// we're about to render the next frame, so we're sure we remove it.
window.requestAnimationFrame(function() {
entry.classList.remove("blbselected");
entry.classList.add("blbselected");
});
};
detailElem.appendChild(closeElem);
//detailElem.appendChild(closeElem);

/* ===== Finalize ===== */


+ 2
- 2
www/style.css View File

@@ -1,6 +1,5 @@
body {
font-family: Helvetica, Arial, sans-serif;
background-color: #F3CA40;
}

#heading {
@@ -38,7 +37,7 @@ a {
border-radius: 4px 4px 4px 4px;
padding: 12pt;

box-shadow: 8px 8px #ddaa00;
box-shadow: 8px 8px #ddd;
}

.blbselected .entryinner {
@@ -87,6 +86,7 @@ a {

font-size: 12pt;
font-family: monospace;
overflow-wrap: break-word;

vertical-align: middle;
}

Loading…
Cancel
Save