Skip to content

Commit 9276bba

Browse files
committed
Format all code with sift
1 parent 7a9c024 commit 9276bba

File tree

7 files changed

+73
-75
lines changed

7 files changed

+73
-75
lines changed

packages/sift/src/css/styles.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
@import url("https://fonts.googleapis.com/css?family=Maven+Pro&text=macrostrat");
22

33
.sift-root {
4-
54
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
65
margin: 0;
76

@@ -1243,5 +1242,4 @@
12431242
background-position: 0 0;
12441243
background-size: 65px 20px;
12451244
}
1246-
12471245
}

pages/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,5 @@ export function SearchBar({ onChange, placeholder = "Search..." }) {
8585
placeholder,
8686
onChange: (e) => onChange(e.target.value),
8787
}),
88-
])
88+
]);
8989
}

pages/lex/strat-name-concepts/+Page.client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ import { StratPage } from "../strat-names/+Page.client";
22

33
export function Page() {
44
return StratPage({ show: true });
5-
}
5+
}

pages/lex/strat-name-concepts/@id/+Page.client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ export function Page() {
55
const pageContext = usePageContext();
66
const id = parseInt(pageContext.urlParsed.pathname.split("/")[3]);
77
return IndividualPage(id, "concept_id", "strat_name_concepts");
8-
}
8+
}

pages/lex/strat-names/+Page.client.ts

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
import h from "./main.module.scss";
2-
import {
3-
useAPIResult,
4-
} from "@macrostrat/ui-components";
2+
import { useAPIResult } from "@macrostrat/ui-components";
53
import { SETTINGS } from "@macrostrat-web/settings";
6-
import {
7-
StickyHeader,
8-
LinkCard,
9-
PageBreadcrumbs,
10-
} from "~/components";
4+
import { StickyHeader, LinkCard, PageBreadcrumbs } from "~/components";
115
import { Card, Switch, Spinner } from "@blueprintjs/core";
126
import { useState, useEffect, useRef } from "react";
137
import { ContentPage } from "~/layouts";
@@ -17,7 +11,7 @@ export function Page() {
1711
return StratPage({ show: false });
1812
}
1913

20-
export function StratPage({show}) {
14+
export function StratPage({ show }) {
2115
const [input, setInput] = useState("");
2216
const [showConcepts, setShowConcepts] = useState(show ?? false);
2317
const [lastID, setLastID] = useState(0);
@@ -29,14 +23,14 @@ export function StratPage({show}) {
2923
item_route: "/strat-names/",
3024
data_route: "strat_names",
3125
like: "strat_name_like",
32-
}
26+
};
3327

3428
const concept_vars = {
3529
title: "Strat Name Concepts",
3630
item_route: "/strat-name-concepts/",
3731
data_route: "strat_name_concepts",
3832
like: "concept_like",
39-
}
33+
};
4034

4135
const vars = showConcepts ? concept_vars : strat_name_vars;
4236

@@ -62,16 +56,19 @@ export function StratPage({show}) {
6256
};
6357

6458
return h(ContentPage, [
65-
h(StickyHeader, {className: "header"}, [
59+
h(StickyHeader, { className: "header" }, [
6660
h(PageBreadcrumbs, { title }),
6761
h("div.header-description", [
6862
h("p", [
69-
h('strong', "Strat Names: "),
70-
h('span', "names of rock units, organized hierarchically")
63+
h("strong", "Strat Names: "),
64+
h("span", "names of rock units, organized hierarchically"),
7165
]),
7266
h("p", [
73-
h('strong', "Strat Concepts: "),
74-
h('span', "capture relationships between differently-named rock units")
67+
h("strong", "Strat Concepts: "),
68+
h(
69+
"span",
70+
"capture relationships between differently-named rock units"
71+
),
7572
]),
7673
]),
7774
h(Card, { className: "filter" }, [
@@ -84,9 +81,9 @@ export function StratPage({show}) {
8481
checked: showConcepts,
8582
onChange: (e) => {
8683
setShowConcepts(e.target.checked);
87-
}
84+
},
8885
}),
89-
])
86+
]),
9087
]),
9188
h(
9289
"div.strat-list",
@@ -102,11 +99,15 @@ export function StratPage({show}) {
10299
function StratItem({ data, item_route }) {
103100
const { name, concept_id, strat_name, strat_name_id } = data;
104101

105-
return h(LinkCard, { href: `/lex/${item_route}/` + (concept_id ?? strat_name_id) }, name ?? strat_name ?? "Unnamed");
102+
return h(
103+
LinkCard,
104+
{ href: `/lex/${item_route}/` + (concept_id ?? strat_name_id) },
105+
name ?? strat_name ?? "Unnamed"
106+
);
106107
}
107108

108109
function useStratData(lastID, input, pageSize, data_route, like) {
109-
const url = `${SETTINGS.apiV2Prefix}/defs/${data_route}?page_size=${pageSize}&last_id=${lastID}&${like}=${input}`
110+
const url = `${SETTINGS.apiV2Prefix}/defs/${data_route}?page_size=${pageSize}&last_id=${lastID}&${like}=${input}`;
110111

111112
const result = useAPIResult(url);
112113
return result?.success?.data;

pages/lex/strat-names/main.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,4 @@
8484
align-items: flex-end;
8585
gap: 5px;
8686
}
87-
}
87+
}

src/styles/colors.scss

Lines changed: 48 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -4,67 +4,66 @@
44
// Overrides for Macrostrat style system colors
55
$dark-background: #141a1e;
66

7-
87
$colors: (
9-
secondary-color: $gray3,
10-
secondary-background: $light-gray1,
11-
tertiary-background: $light-gray5,
12-
tertiary-color: $light-gray4,
13-
tertiary-border-color: $gray5,
14-
accent-color: $light-gray3,
15-
accent-hover-color: $light-gray1,
16-
accent-border-color: $gray5,
17-
background-color: #fff,
18-
panel-background-color: #fff,
19-
panel-secondary-background-color: #f5f8fa,
20-
translucent-panel-background-color: rgba(255, 255, 255, 0.2),
21-
panel-rule-color: #ddd,
22-
accent-secondary-color: #f5f8fa,
23-
accent-secondary-hover-color: #ebf1f5,
24-
ui-color-accent: rgb(252, 217, 250),
25-
ui-color-accent-text: rgb(143, 39, 138),
26-
box-horizontal-padding: 0.8em,
27-
text-color: #333,
28-
text-subtle-color: #555,
29-
dark-backgound: $dark-background,
30-
text-emphasized-color: #000,
31-
card-shadow-color: rgba(17, 20, 24, 0.15),
32-
error-text-color: #cd4246,
8+
secondary-color: $gray3,
9+
secondary-background: $light-gray1,
10+
tertiary-background: $light-gray5,
11+
tertiary-color: $light-gray4,
12+
tertiary-border-color: $gray5,
13+
accent-color: $light-gray3,
14+
accent-hover-color: $light-gray1,
15+
accent-border-color: $gray5,
16+
background-color: #fff,
17+
panel-background-color: #fff,
18+
panel-secondary-background-color: #f5f8fa,
19+
translucent-panel-background-color: rgba(255, 255, 255, 0.2),
20+
panel-rule-color: #ddd,
21+
accent-secondary-color: #f5f8fa,
22+
accent-secondary-hover-color: #ebf1f5,
23+
ui-color-accent: rgb(252, 217, 250),
24+
ui-color-accent-text: rgb(143, 39, 138),
25+
box-horizontal-padding: 0.8em,
26+
text-color: #333,
27+
text-subtle-color: #555,
28+
dark-backgound: $dark-background,
29+
text-emphasized-color: #000,
30+
card-shadow-color: rgba(17, 20, 24, 0.15),
31+
error-text-color: #cd4246,
3332
);
3433

3534
$accent: color.scale($dark-background, $lightness: 10%);
3635
$dark-text: $gray4;
3736

3837
$dark-colors: (
39-
dark-background: $dark-background,
40-
text-emphasized-color: #fff,
41-
text-color: $dark-text,
42-
text-subtle-color: $gray3,
43-
panel-background-color: $dark-background,
44-
background-color: $dark-background,
45-
panel-secondary-background-color:
46-
color.scale($dark-background, $lightness: 5%),
47-
translucent-panel-background-color:
48-
color.change($dark-background, $alpha: 0.6),
49-
accent-color: $accent,
38+
dark-background: $dark-background,
39+
text-emphasized-color: #fff,
40+
text-color: $dark-text,
41+
text-subtle-color: $gray3,
42+
panel-background-color: $dark-background,
43+
background-color: $dark-background,
44+
panel-secondary-background-color:
45+
color.scale($dark-background, $lightness: 5%),
46+
translucent-panel-background-color:
47+
color.change($dark-background, $alpha: 0.6),
48+
accent-color: $accent,
5049
// light gray 3,
51-
accent-secondary-color: $accent,
52-
accent-secondary-hover-color: color.adjust($accent, $lightness: 5%),
53-
panel-rule-color: #404854,
54-
secondary-color: $gray1,
50+
accent-secondary-color: $accent,
51+
accent-secondary-hover-color: color.adjust($accent, $lightness: 5%),
52+
panel-rule-color: #404854,
53+
secondary-color: $gray1,
5554
// gray3,
56-
tertiary-background: $dark-gray5,
57-
secondary-background: $dark-gray2,
55+
tertiary-background: $dark-gray5,
56+
secondary-background: $dark-gray2,
5857
// light gray 5,
59-
tertiary-color: #383e47,
58+
tertiary-color: #383e47,
6059
// light gray 4,
61-
tertiary-border-color: #5f6b7c,
60+
tertiary-border-color: #5f6b7c,
6261
// gray 5,
63-
accent-hover-color: color.adjust($accent, $lightness: 4%),
62+
accent-hover-color: color.adjust($accent, $lightness: 4%),
6463
// light gray 1,
65-
accent-border-color: #5f6b7c,
64+
accent-border-color: #5f6b7c,
6665
// gray5,
67-
card-shadow-color: color.adjust($gray1, $alpha: 0.2),
68-
ui-color-accent-text: rgb(252, 217, 250),
69-
ui-color-accent: color.adjust(rgb(143, 39, 138), $lightness: -50%),
66+
card-shadow-color: color.adjust($gray1, $alpha: 0.2),
67+
ui-color-accent-text: rgb(252, 217, 250),
68+
ui-color-accent: color.adjust(rgb(143, 39, 138), $lightness: -50%),
7069
);

0 commit comments

Comments
 (0)