Browse Source

Separate the most recent log entry from the rest; darken older text slightly

tags/v0.1.3
Fen Dweller 5 years ago
parent
commit
a919b98331
2 changed files with 15 additions and 3 deletions
  1. +10
    -1
      satiate.css
  2. +5
    -2
      satiate.js

+ 10
- 1
satiate.css View File

@@ -195,6 +195,15 @@ a:hover {
overflow: auto; overflow: auto;
} }


#log > div:not(last-child) {
color: #ddd;
}

#log > div:last-child {
margin-top: 16pt;
color: #fff;
}

.sidebar { .sidebar {
background: rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.1);
padding: 25px; padding: 25px;
@@ -289,7 +298,7 @@ a:hover {
background-color: #888; background-color: #888;
color: #eee; color: #eee;
margin: 5px; margin: 5px;
font-size: 24px;
font-size: 16pt;
} }






+ 5
- 2
satiate.js View File

@@ -49,15 +49,18 @@ const tags = {
}; };


function print(lines) { function print(lines) {
(lines.concat([newline])).forEach(line => {
const bigDiv = document.createElement("div");
([newline].concat(lines)).forEach(line => {
const log = document.querySelector("#log"); const log = document.querySelector("#log");
const div = document.createElement("div"); const div = document.createElement("div");


div.textContent = line; div.textContent = line;


log.appendChild(div);
bigDiv.appendChild(div);
}); });


log.appendChild(bigDiv);

log.scrollTop = log.scrollHeight; log.scrollTop = log.scrollHeight;
} }




Loading…
Cancel
Save