Skip to content

Commit

Permalink
Merge pull request #541 from 47degrees/fix/search-styling-tweaks
Browse files Browse the repository at this point in the history
Search styling tweaks
  • Loading branch information
sloshy committed Jan 28, 2021
2 parents 0bbca51 + 32a2030 commit a526739
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
6 changes: 6 additions & 0 deletions src/main/resources/_sass/light-style/_light-docs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@
padding: 0;
margin: 0;

.search-nav {
@include bp(small) {
display: none !important;
}
}

li {
list-style: none;
display: inline-block;
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/_sass/light-style/_navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@
display: inline-block;
}
}

.search-nav {
@include bp(medium) {
display: none;
}
}
}
}
}
4 changes: 2 additions & 2 deletions src/main/resources/_sass/light-style/_variables_style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ $state-danger-bg: #f2dede;
$line-height-base: 1.428571429;
$body-bg: $white-color;
// Breakpoint
$bp-small: 480px;
$bp-medium: 768px;
$bp-small: 530px;
$bp-medium: 868px;
$bp-large: 992px;
$bp-xlarge: 1130px;
9 changes: 6 additions & 3 deletions src/main/scala/microsites/layouts/DocsLayout.scala
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ class DocsLayout(config: MicrositeSettings) extends Layout(config) {
} else Seq.empty
}

val maybeSearch =
if (config.visualSettings.theme != "pattern" && config.searchSettings.searchEnabled) {
Seq(siteSearch)
} else Seq.empty

val sidebar =
if (config.visualSettings.theme == "pattern") buildSidebar else buildLightSidebar

Expand All @@ -121,10 +126,8 @@ class DocsLayout(config: MicrositeSettings) extends Layout(config) {
div(cls := "action-menu pull-left clearfix",
a(href := "#menu-toggle", id := "menu-toggle", i(cls := "fa fa-bars", aria.hidden := "true"))
),
ul(cls := "pull-left",
siteSearch
),
ul(cls := "pull-right",
maybeSearch,
githubLinks,
shareOnSocial
)
Expand Down

0 comments on commit a526739

Please sign in to comment.