Compare commits

..

9 commits

Author SHA1 Message Date
Shy
15d914fae3 Enhance visibility of marker
All checks were successful
deployment-on-pull-request / deployment (pull_request) Successful in 1m20s
2024-05-07 22:23:47 +02:00
Shy
bf182251ec Yellow outline around search input 2024-05-07 22:23:47 +02:00
Shy
0c1a280a19 More beautiful #mapnote 2024-05-07 22:23:47 +02:00
Shy
d98342bd02 Fixed colors for #mapnote 2024-05-07 22:23:47 +02:00
ebf06fa163 Merge pull request 'Added buttons for known types.' (#5) from type-buttons into main
All checks were successful
deployment / deployment (push) Successful in 18s
Reviewed-on: #5
2024-05-07 20:31:08 +02:00
Shy
c9cda14f38 Fix indentation and use const where preferable
All checks were successful
deployment-on-pull-request / deployment (pull_request) Successful in 1m17s
2024-05-06 14:42:21 +02:00
Shy
9f95e704b9 Added buttons for known types.
All checks were successful
deployment-on-pull-request / deployment (pull_request) Successful in 2m34s
2024-05-04 18:28:09 +02:00
b9e87f09d5 Merge pull request 'Add drop shadow to map' (#4) from change-color-of-buttons into main
All checks were successful
deployment / deployment (push) Successful in 1m29s
Reviewed-on: #4
2024-05-02 20:50:07 +02:00
457af44a79 Merge pull request 'Changes colors slightly' (#3) from change-color-of-buttons into main
All checks were successful
deployment / deployment (push) Successful in 22s
Reviewed-on: #3
2024-05-01 01:10:05 +02:00
2 changed files with 31 additions and 2 deletions

View file

@ -54,6 +54,21 @@ h1, h1 a {
font-size: smaller;
}
#knowntypes button {
color: #220;
background-color: #dfaa37;
border: 1px solid #220;
border-radius: 4px;
padding: 0.2em 0.4em;
margin: 0.2em;
font-weight: bolder;
cursor: pointer;
}
#knowntypes button:hover, #knowntypes button:focus {
background-color: #f5c251;
}
.btn {
box-shadow: 0 3px 6px -1px rgba(0,0,0,0.3);
}

View file

@ -65,8 +65,22 @@ function knownTypes() {
map[i.type] = true;
}
}
let types = Object.keys(map).sort().join(', ')
document.getElementById('knowntypes').textContent = `Known types: ${types}.`;
// Get location in document.
const known_types = document.getElementById('knowntypes');
known_types.textContent = `Known types: `;
// Create a button for every known type.
for (let label of Object.keys(map).sort()) {
btn = document.createElement('button');
btn.setAttribute('type', 'button');
btn.textContent = label;
btn.addEventListener('click', function() {
document.getElementById('type').value = label;
});
known_types.appendChild(btn);
}
}
function save() {