mirror of
https://github.com/osmarks/website
synced 2025-05-09 10:54:08 +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",
|
"experiment": "Experiments",
|
||||||
"mycorrhiza": "Documentation"
|
"mycorrhiza": "Documentation"
|
||||||
}
|
}
|
||||||
|
const hues = {
|
||||||
|
"blog": "210",
|
||||||
|
"microblog": "290",
|
||||||
|
"mycorrhiza": "30",
|
||||||
|
"experiment": "120"
|
||||||
|
}
|
||||||
|
|
||||||
const closeOverlay = () => {
|
const closeOverlay = () => {
|
||||||
if (document.querySelector(".search-overlay")) {
|
if (document.querySelector(".search-overlay")) {
|
||||||
@ -637,8 +643,8 @@ loginButton.onclick = async ev => {
|
|||||||
if (result.description) {
|
if (result.description) {
|
||||||
e("description", item, result.description)
|
e("description", item, result.description)
|
||||||
}
|
}
|
||||||
item.style.border = `${colHash(result.sourceType)} solid 4px`
|
item.style.border = `hsl(${hues[result.sourceType]}deg, 100%, 70%) solid 4px`
|
||||||
item.style.background = `${colHash(result.sourceType, 50, 10)}`
|
item.style.background = `hsl(${hues[result.sourceType]}deg, 50%, 10%)`
|
||||||
}
|
}
|
||||||
overlay.appendChild(resultsEl)
|
overlay.appendChild(resultsEl)
|
||||||
}
|
}
|
||||||
|
@ -383,6 +383,7 @@ table
|
|||||||
color: white
|
color: white
|
||||||
.search-results
|
.search-results
|
||||||
width: 100%
|
width: 100%
|
||||||
|
max-width: $content-width
|
||||||
.search-result
|
.search-result
|
||||||
padding: 0.5em
|
padding: 0.5em
|
||||||
margin: 0.5em
|
margin: 0.5em
|
||||||
|
Loading…
x
Reference in New Issue
Block a user