mirror of
https://github.com/osmarks/website
synced 2025-01-10 17:30:28 +00:00
Adjust colors in search
This commit is contained in:
parent
ed9b8cd382
commit
4cb1cba03e
10
src/page.js
10
src/page.js
@ -597,6 +597,12 @@ const nameMappings = {
|
||||
"experiment": "Experiments",
|
||||
"mycorrhiza": "Documentation"
|
||||
}
|
||||
const hues = {
|
||||
"blog": "210",
|
||||
"microblog": "290",
|
||||
"mycorrhiza": "30",
|
||||
"experiment": "120"
|
||||
}
|
||||
|
||||
const closeOverlay = () => {
|
||||
if (document.querySelector(".search-overlay")) {
|
||||
@ -637,8 +643,8 @@ loginButton.onclick = async ev => {
|
||||
if (result.description) {
|
||||
e("description", item, result.description)
|
||||
}
|
||||
item.style.border = `${colHash(result.sourceType)} solid 4px`
|
||||
item.style.background = `${colHash(result.sourceType, 50, 10)}`
|
||||
item.style.border = `hsl(${hues[result.sourceType]}deg, 100%, 70%) solid 4px`
|
||||
item.style.background = `hsl(${hues[result.sourceType]}deg, 50%, 10%)`
|
||||
}
|
||||
overlay.appendChild(resultsEl)
|
||||
}
|
||||
|
@ -383,6 +383,7 @@ table
|
||||
color: white
|
||||
.search-results
|
||||
width: 100%
|
||||
max-width: $content-width
|
||||
.search-result
|
||||
padding: 0.5em
|
||||
margin: 0.5em
|
||||
|
Loading…
Reference in New Issue
Block a user