diff options
| author | Alejandro Soto <alejandro@34project.org> | 2025-09-13 15:01:06 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2025-09-13 15:01:06 -0600 |
| commit | f4fcda54638685899c730b3fa90a87d80d6dbef5 (patch) | |
| tree | 0737e627cce304c3a9c4e757bc5f6571a7456091 /sysret.org/themes/tabi-lean/sass/parts/_search.scss | |
| parent | d8b9cf1f61cc07d625f1c37ccc28adfd58918416 (diff) | |
| parent | 2c13119932765c6d788f08fb53abc244407c0d80 (diff) | |
Merge commit '6a7d3111b31e73fc66af5360149d41f690fbcaa4'
Diffstat (limited to 'sysret.org/themes/tabi-lean/sass/parts/_search.scss')
| -rw-r--r-- | sysret.org/themes/tabi-lean/sass/parts/_search.scss | 160 |
1 files changed, 160 insertions, 0 deletions
diff --git a/sysret.org/themes/tabi-lean/sass/parts/_search.scss b/sysret.org/themes/tabi-lean/sass/parts/_search.scss new file mode 100644 index 0000000..df820e4 --- /dev/null +++ b/sysret.org/themes/tabi-lean/sass/parts/_search.scss @@ -0,0 +1,160 @@ +$icon-size: 1.3rem; + +#searchModal { + background: color-mix(in srgb, var(--primary-color) 5%, transparent); + text-align: start; + + #searchContainer { + padding: 1rem; + } + + #searchBar { + display: flex; + position: relative; + justify-content: center; + align-items: center; + box-sizing: border-box; + padding: 1rem; + + .search-icon { + position: absolute; + inset-inline-start: 1rem; + width: $icon-size; + height: $icon-size; + + path { + fill: var(--text-color); + } + } + + .close-icon { + display: none; + position: absolute; + right: $icon-size; + margin-inline-start: 1rem; + margin-inline-end: 0.5rem; + width: $icon-size; + height: $icon-size; + } + + #searchInput { + flex: 1; + border: 1px solid var(--divider-color); + border-radius: 20px; + background-color: var(--input-background-color); + padding-inline: 3rem 1rem; + padding-block: 0.75rem; + width: calc(100% - 2rem); + color: var(--text-color); + font-size: 1rem; + } + } + + #results-container { + display: none; + border-top: var(--divider-color) solid 0.5px; + border-bottom-right-radius: 1rem; + border-bottom-left-radius: 1rem; + overflow: hidden; + + #results-info { + padding: 0.5rem; + color: var(--meta-color); + font-size: 0.8rem; + text-align: center; + } + + #results { + display: flex; + flex-direction: column; + max-height: 50vh; + overflow-y: auto; + + b { + font-weight: 590; + } + + a { + display: block; + + &:hover { + background-color: inherit; + } + } + + > div { + cursor: pointer; + padding-inline: 1rem; + padding-block: 0.5rem; + + &[aria-selected="true"] { + background-color: var(--primary-color); + color: var(--hover-color); + + a, + span { + color: inherit; + } + } + } + + span:first-child { + display: block; + color: var(--primary-color); + font-weight: 590; + } + + span:nth-child(2) { + color: var(--text-color); + } + } + + } +} + +.search-icon { + display: block; + position: relative; + align-self: center; + margin-inline-start: 1rem; + margin-inline-end: 0.5rem; + width: $icon-size; + height: $icon-size; +} + +.search-modal { + -webkit-backdrop-filter: blur(8px); + display: none; + position: fixed; + top: 0; + left: 0; + z-index: 1000; + backdrop-filter: blur(8px); + background-color: rgba(0, 0, 0, 0.1); + width: 100%; + height: 100%; + overflow: auto; + + #modal-content { + position: relative; + margin: 8% auto; + border: var(--divider-color) solid 0.5px; + border-radius: 1rem; + background-color: var(--background-color); + width: 80%; + max-width: 28rem; + } +} + +@media only screen and (max-width: 600px) { + .search-modal { + #modal-content { + top: 3.5rem; + width: 92%; + + #results { + max-height: 70vh; + } + } + } +} |
