Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 24 additions & 11 deletions source/_static/scss/includes/_search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
.header {
.search__dropdown {
position: absolute;
top: 100%;
left: 0;
width: 100%;
top: calc(100% - 1rem);
left: 0.1rem;
width: calc(100% - 0.2rem);
}

.search--focused {
Expand Down Expand Up @@ -71,6 +71,11 @@
.search__reset {
display: grid;
}

#search-box {
position: relative;
z-index: 11;
}
}

.search__form {
Expand Down Expand Up @@ -105,7 +110,9 @@
border-radius: $border-radius;
cursor: pointer;
display: none;
margin-right: 0.75rem;
position: absolute;
right: 0.75rem;
top: 0.6rem;

&:focus,
&:hover {
Expand All @@ -127,7 +134,7 @@
}

.search__powered-by {
padding: 0.6rem 1rem;
padding: 0.3rem 0.7rem;
display: inline-flex;
align-items: center;
color: var(--text-muted-color);
Expand Down Expand Up @@ -190,7 +197,7 @@
border: 1px solid var(--is-refine-list-border-color);
border-radius: $border-radius;
line-height: 100%;
padding: 0.35rem 0.5rem;
padding: 0.35rem 0.6rem;
font-weight: $font-weight-medium;
font-size: $font-size-xs;
}
Expand All @@ -217,6 +224,7 @@
.search__hits__list {
list-style: none;
margin: 0;
padding: 0;
text-align: left;
}

Expand All @@ -234,6 +242,10 @@
&:focus,
&:hover {
background-color: var(--is-highlight-color);

.search__hits__icon {
background-color: $white;
}
}
}
}
Expand Down Expand Up @@ -292,7 +304,7 @@
flex-shrink: 0;
margin-right: 0.75rem;
border-radius: $border-radius;
background-color: var(--is-search-bg);
background-color: var(--theme-light-bg);
display: grid;
fill: var(--text-muted-color);
place-content: center;
Expand All @@ -312,13 +324,13 @@


.search__hits--empty {
display: grid;
place-content: center;
margin: 0;
padding: 0;
text-align: center;
font-size: $font-size-sm;
color: var(--text-muted-color);

svg {
& > svg {
margin-bottom: 1rem;
}

Expand Down Expand Up @@ -403,6 +415,7 @@
flex-direction: column;
border-radius: $border-radius-lg;
display: none;
padding-top: 1.5rem;
max-height: 24.5rem;
box-shadow: 0px 7px 10px #00000036;
}
Expand Down Expand Up @@ -431,7 +444,7 @@
}

.search__hits__list {
padding: 1rem;
padding: 0.75rem;
}
}

Expand Down
6 changes: 3 additions & 3 deletions source/_static/scss/includes/_theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ $theme-properties: (
--docs-nav-group-border-color: $light-300 $dark-300,

// Scrollbar
--scrollbar-bg: $light-500 $dark-200,
--scrollbar-hover-bg: darken($light-500, 5%) $dark-300,
--scrollbar-bg: $light-300 $dark-200,
--scrollbar-hover-bg: $light-400 $dark-300,

// Table
--table-border-color: $light-300 $dark-200,
Expand Down Expand Up @@ -120,7 +120,7 @@ $theme-properties: (
// Search
--is-dropdown-bg: #edf1f3 #1c232d,
--is-container-background: rgba($black, 0.25) rgba(16, 21, 28, 0.851),
--is-highlight-color: rgba(120, 133, 152, 0.125) rgba(16, 21, 28, 0.3),
--is-highlight-color: $light-100 rgba(16, 21, 28, 0.3),
--is-search-focus-shadow: rgba($white, 0.15) #1b232f,
--is-hit-icon-color: $black $light-500,
--is-search-bg: $white $dark-100,
Expand Down
20 changes: 11 additions & 9 deletions source/_templates/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,18 @@

<h2 class="header__title hidden-rm">Documentation</h2>

<div class="docs-menu-wrapper overflow-x-auto hide-scrollbar mb-20 text-center">
<nav class="docs-menu bg-white/75 inline-flex items-center rounded-lg font-heading border p-0.5 border-theme-neutral-subtle">
{% for doc in docs %}
{% set current_name = doc.name if doc.current == True %}
<a target="{% if doc.external == True %}_blank{% endif %}" class="{% if doc.current == True %}active{% endif %} flex-1 rounded-md shrink-0 h-14 border border-transparent font-bold transition-all duration-300 hover:text-theme-red [&.active]:text-theme-red [&.active]:border-theme-red" href="{{ doc.url }}">
{% if docs %}
<div class="docs-menu-wrapper overflow-x-auto hide-scrollbar mb-20 text-center">
<nav class="docs-menu bg-white/75 inline-flex items-center rounded-lg font-heading border p-0.5 border-theme-neutral-subtle">
{% for doc in docs %}
{% set current_name = doc.name if doc.current == True %}
<a target="{% if doc.external == True %}_blank{% endif %}" class="{% if doc.current == True %}active{% endif %} flex-1 rounded-md shrink-0 h-14 border border-transparent font-bold transition-all duration-300 hover:text-theme-red [&.active]:text-theme-red [&.active]:border-theme-red" href="{{ doc.url }}">
{{ doc.name }}
</a>
{% endfor %}
</nav>
</div>
</a>
{% endfor %}
</nav>
</div>
{% endif %}

{%- include "platform-navigation.html" %}

Expand Down