Skip to content

Commit 5fd7740

Browse files
committed
Fixed navbar styling
1 parent 421081c commit 5fd7740

File tree

5 files changed

+47
-22
lines changed

5 files changed

+47
-22
lines changed

pages/+Page.module.sass

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,20 @@
33

44
.site-header
55
z-index: 1000
6+
position: relative
67

78
.main-title
89
--macrostrat-logo-size: 100px
9-
--macrostrat-wordmark-size: 3em
10-
justify-content: start
10+
--macrostrat-wordmark-size: 3.5rem
11+
justify-content: center
12+
13+
.subtitle
14+
font-size: 1.2rem
15+
margin-top: 0.25rem
16+
color: var(--secondary-color)
17+
margin-bottom: 0.5rem
18+
19+
gap: 1rem !important
1120

1221
.site-navbar
1322
:global(.navbar-title)

pages/+Page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export function Page() {
1414
return h("div.page-main", [
1515
h("header.site-header", [
1616
h(SiteTitle, { className: "main-title" }, [
17-
//h("h2.subtitle", "The data system for the crust"),
17+
h("h2.subtitle", "The data system for the crust"),
1818
]),
1919
]),
2020
h(Navbar, { className: "site-navbar" }),

pages/dev/lexicon/+Page.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { PageHeader } from "~/components";
2-
import { PageBreadcrumbs } from "~/components";
31
import "./main.styl";
42
import { Image } from "./index";
53
import { MacrostratIcon } from "~/components";

pages/map/map-interface/components/navbar/index.ts

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ import { PanelSubhead } from "@macrostrat/map-interface";
1313
import classNames from "classnames";
1414
import { navigate } from "vike/client/router";
1515
import { MacrostratIcon } from "~/components/macrostrat-icon";
16-
import { useAdmoinshments } from "#/map/map-interface/components/filter-panel/admonishments";
16+
import { useAdmoinshments } from "../filter-panel/admonishments";
17+
import { MacrostatLogoLink } from "~/components/general";
18+
import { useInDarkMode } from "@macrostrat/ui-components";
1719

1820
const h = hyper.styled(styles);
1921

@@ -146,22 +148,26 @@ function Searchbar({ className }) {
146148
filterPanelElement = h(FilterPanel, { filters, admonishments });
147149
}
148150

149-
return h(FloatingNavbar, { statusElement: filterPanelElement }, [
150-
h(MacrostratIcon, {
151-
size: 36,
152-
onClick() {
153-
navigate("/");
154-
},
155-
}),
156-
h(InputGroup, {
157-
large: true,
158-
onChange: handleSearchInput,
159-
onClick: gainInputFocus,
160-
rightElement: h(MenuButton),
161-
placeholder: "Search Macrostrat...",
162-
value: term,
163-
}),
164-
]);
151+
return h(
152+
FloatingNavbar,
153+
{ statusElement: filterPanelElement, className: "map-navbar" },
154+
[
155+
h("div.navbar-link-container", [
156+
h(MacrostatLogoLink, {
157+
logoStyle: "frameless-simple",
158+
className: "navbar-logo",
159+
}),
160+
]),
161+
h(InputGroup, {
162+
large: true,
163+
onChange: handleSearchInput,
164+
onClick: gainInputFocus,
165+
rightElement: h(MenuButton),
166+
placeholder: "Search Macrostrat...",
167+
value: term,
168+
}),
169+
]
170+
);
165171
}
166172

167173
function SearchGuidance() {

pages/map/map-interface/components/navbar/navbar.module.sass

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,15 @@
4545
content: ''
4646
position: absolute
4747
left: -1em
48+
49+
.map-navbar :global(.bp5-navbar)
50+
overflow: hidden
51+
52+
.navbar-logo
53+
//margin: -8px -15px -8px -15px
54+
//margin-right: -10px
55+
border: 1px solid var(--panel-rule-color)
56+
--macrostrat-logo-size: 50px
57+
58+
.navbar-link-container
59+
margin-left: -10px

0 commit comments

Comments
 (0)