commit d921d7108f7ea390b8f1d0f16304b15f12416d4b
parent e82943292892ebffa509360b1002549c44233a59
Author: MTRNord <mtrnord1@gmail.com>
Date: Sun, 17 Dec 2023 18:26:47 +0100
Various fixes and updates
Diffstat:
13 files changed, 135 insertions(+), 149 deletions(-)
diff --git a/package-lock.json b/package-lock.json
@@ -7,14 +7,13 @@
"": {
"version": "0.0.1",
"dependencies": {
- "@astrojs/check": "^0.3.1",
+ "@astrojs/check": "^0.3.3",
"@astrojs/lit": "^3.0.3",
- "@astrojs/node": "^7.0.0",
+ "@astrojs/node": "^7.0.1",
"@astrojs/tailwind": "^5.0.3",
- "@meilisearch/instant-meilisearch": "^0.13.6",
"@webcomponents/template-shadowroot": "^0.2.1",
- "astro": "^4.0.3",
- "diff2html": "^3.4.45",
+ "astro": "^4.0.6",
+ "diff2html": "^3.4.46",
"lit": "^2.8.0",
"marked": "^11.0.1",
"meilisearch": "^0.36.0",
@@ -47,11 +46,11 @@
}
},
"node_modules/@astrojs/check": {
- "version": "0.3.1",
- "resolved": "https://registry.npmjs.org/@astrojs/check/-/check-0.3.1.tgz",
- "integrity": "sha512-3LjEUvh7Z4v9NPokaqKMXQ0DwnSXfmtcyAuWVTjNt9yzjv54SxykobV5CTOB3TIko+Rqg59ejamJBxaJN6fvkw==",
+ "version": "0.3.3",
+ "resolved": "https://registry.npmjs.org/@astrojs/check/-/check-0.3.3.tgz",
+ "integrity": "sha512-IpglE0PNWEXmRY0y67EYuLwiyMxRUuZuG1oP+tIgqeQEy45g1pBMIWpGnNXdoVRbChHDWMSFd2kLUtgzBUHnRQ==",
"dependencies": {
- "@astrojs/language-server": "^2.5.2",
+ "@astrojs/language-server": "^2.5.4",
"chokidar": "^3.5.3",
"fast-glob": "^3.3.1",
"kleur": "^4.1.5",
@@ -65,9 +64,9 @@
}
},
"node_modules/@astrojs/compiler": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/@astrojs/compiler/-/compiler-2.3.2.tgz",
- "integrity": "sha512-jkY7bCVxl27KeZsSxIZ+pqACe+g8VQUdTiSJRj/sXYdIaZlW3ZMq4qF2M17P/oDt3LBq0zLNwQr4Cb7fSpRGxQ=="
+ "version": "2.3.4",
+ "resolved": "https://registry.npmjs.org/@astrojs/compiler/-/compiler-2.3.4.tgz",
+ "integrity": "sha512-33/YtWoBCE0cBUNy1kh78FCDXBoBANX87ShgATlAHECYbG2+buNTAgq4Xgz4t5NgnEHPN21GIBC2Mvvwisoutw=="
},
"node_modules/@astrojs/internal-helpers": {
"version": "0.2.1",
@@ -75,9 +74,9 @@
"integrity": "sha512-06DD2ZnItMwUnH81LBLco3tWjcZ1lGU9rLCCBaeUCGYe9cI0wKyY2W3kDyoW1I6GmcWgt1fu+D1CTvz+FIKf8A=="
},
"node_modules/@astrojs/language-server": {
- "version": "2.5.2",
- "resolved": "https://registry.npmjs.org/@astrojs/language-server/-/language-server-2.5.2.tgz",
- "integrity": "sha512-O5SMzoQ65wSxA1KygreI9UJYmHpgt15bSYBxceHwqX7OCDM4Ek8mr6mZn45LGDtwM3dp1uup7kp8exfRPwIFbA==",
+ "version": "2.5.4",
+ "resolved": "https://registry.npmjs.org/@astrojs/language-server/-/language-server-2.5.4.tgz",
+ "integrity": "sha512-diTs8AW5TvpO6LWEyuAMAC1ydH1tnVJmv2dRrcczklJZcfY9/eYLbGtKiC9rEQH3BwvFdnphroMUEprzCiqSMg==",
"dependencies": {
"@astrojs/compiler": "^2.2.2",
"@jridgewell/sourcemap-codec": "^1.4.15",
@@ -130,9 +129,9 @@
}
},
"node_modules/@astrojs/markdown-remark": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/@astrojs/markdown-remark/-/markdown-remark-4.0.0.tgz",
- "integrity": "sha512-JSrn49fJGuH/0S2TTGxLK7bNDspOakJWZVFHeP+IDFjWdghT4HtsTShS2EiISNx3zfOFBAwy5Cj4xT4U5BWNeA==",
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/@astrojs/markdown-remark/-/markdown-remark-4.0.1.tgz",
+ "integrity": "sha512-RU4ESnqvyLpj8WZs0n5elS6idaDdtIIm7mIpMaRNPCebpxMjfcfdwcmBwz83ktAj5d2eO5bC3z92TcGdli+lRw==",
"dependencies": {
"@astrojs/prism": "^3.0.0",
"github-slugger": "^2.0.0",
@@ -148,21 +147,18 @@
"unified": "^11.0.4",
"unist-util-visit": "^5.0.0",
"vfile": "^6.0.1"
- },
- "peerDependencies": {
- "astro": "^4.0.0-beta.0"
}
},
"node_modules/@astrojs/node": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/@astrojs/node/-/node-7.0.0.tgz",
- "integrity": "sha512-G2NXEbinFqysOCa3mL8PqsyU4yot3I1lmF1WNPJaLGyW0LvG6pbz4iTa4Pk07O2oU+lE9J6JMC5GeNjaWQ0UFA==",
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/@astrojs/node/-/node-7.0.1.tgz",
+ "integrity": "sha512-jzO5q1t/cwDZQHcPG0CakjPY0SC44kbGgDDoh4UurvzZcCDYQKLz6zzJVqzUiOtDhfSwVrgHoiKo2tNbXASlRQ==",
"dependencies": {
"send": "^0.18.0",
"server-destroy": "^1.0.1"
},
"peerDependencies": {
- "astro": "^4.0.0-beta.0"
+ "astro": "^4.0.0"
}
},
"node_modules/@astrojs/prism": {
@@ -1015,22 +1011,6 @@
"@lit-labs/ssr-dom-shim": "^1.0.0"
}
},
- "node_modules/@meilisearch/instant-meilisearch": {
- "version": "0.13.6",
- "resolved": "https://registry.npmjs.org/@meilisearch/instant-meilisearch/-/instant-meilisearch-0.13.6.tgz",
- "integrity": "sha512-olVCeOXmignmfY+ML8ExgyPCLGkr/XPXcz0n8tajRFr4afDKzomxySGMfQXVok9SoyhB+xeNH/mEMhguxCwklg==",
- "dependencies": {
- "meilisearch": "^0.35.0"
- }
- },
- "node_modules/@meilisearch/instant-meilisearch/node_modules/meilisearch": {
- "version": "0.35.1",
- "resolved": "https://registry.npmjs.org/meilisearch/-/meilisearch-0.35.1.tgz",
- "integrity": "sha512-azI7vA4eCfBpUwngDTaG/VpiuO5zAMM35QrfREVPC+KnuNBKwBrwRaTwV+Dt18JDCgk/OWZJPaONYgBHSISbNQ==",
- "dependencies": {
- "cross-fetch": "^3.1.6"
- }
- },
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@@ -1539,13 +1519,13 @@
}
},
"node_modules/astro": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/astro/-/astro-4.0.3.tgz",
- "integrity": "sha512-hrwe7CIVhSKW8/iibDs1hpqzZAtvx6Qu8TFFxjaGbooEWF720M9L+ZZtyTgrcy6K/ZHJ0xwFvZV3/X2Vvbf/LQ==",
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/astro/-/astro-4.0.6.tgz",
+ "integrity": "sha512-P7CfFqWKzkJozzF6IoOC6qoI2ONndV8P3ULhGDgMiXPL7xVkWI5haTBSpyrcjBx643tVXspIRsSV/v+Cx+CjGw==",
"dependencies": {
- "@astrojs/compiler": "^2.3.2",
+ "@astrojs/compiler": "^2.3.4",
"@astrojs/internal-helpers": "0.2.1",
- "@astrojs/markdown-remark": "4.0.0",
+ "@astrojs/markdown-remark": "4.0.1",
"@astrojs/telemetry": "3.0.4",
"@babel/core": "^7.23.3",
"@babel/generator": "^7.23.3",
@@ -2376,9 +2356,9 @@
}
},
"node_modules/diff2html": {
- "version": "3.4.45",
- "resolved": "https://registry.npmjs.org/diff2html/-/diff2html-3.4.45.tgz",
- "integrity": "sha512-1SxsjYZYbxX0GGMYJJM7gM0SpMSHqzvvG0UJVROCDpz4tylH2T+EGiinm2boDmTrMlLueVxGfKNxGNLZ9zDlkQ==",
+ "version": "3.4.46",
+ "resolved": "https://registry.npmjs.org/diff2html/-/diff2html-3.4.46.tgz",
+ "integrity": "sha512-z1SkrH7jDLfmsOYgwJmGiDTdzsbpw7p4vx084kNzeYqER+/Kqp8+v/L7lMsIWpFzlX3NaJDJna280Y/HFqel+Q==",
"dependencies": {
"diff": "5.1.0",
"hogan.js": "3.0.2"
diff --git a/package.json b/package.json
@@ -10,14 +10,13 @@
"astro": "astro"
},
"dependencies": {
- "@astrojs/check": "^0.3.1",
+ "@astrojs/check": "^0.3.3",
"@astrojs/lit": "^3.0.3",
- "@astrojs/node": "^7.0.0",
+ "@astrojs/node": "^7.0.1",
"@astrojs/tailwind": "^5.0.3",
- "@meilisearch/instant-meilisearch": "^0.13.6",
"@webcomponents/template-shadowroot": "^0.2.1",
- "astro": "^4.0.3",
- "diff2html": "^3.4.45",
+ "astro": "^4.0.6",
+ "diff2html": "^3.4.46",
"lit": "^2.8.0",
"marked": "^11.0.1",
"meilisearch": "^0.36.0",
diff --git a/scripts/indexer/package.json b/scripts/indexer/package.json
@@ -1,10 +1,12 @@
{
- "name": "indexer",
+ "name": "spec-indexer",
"type": "module",
"version": "0.1.0",
"description": "An indexer from github to meilisearch for MSCs",
"main": "dist/index.js",
- "scripts": {},
+ "scripts": {
+ "build": "tsc"
+ },
"author": "",
"license": "AGPL-3.0-or-later",
"devDependencies": {
diff --git a/scripts/indexer/src/index.ts b/scripts/indexer/src/index.ts
@@ -9,6 +9,7 @@ const INDEX = "MSC_development";
const OWNER = "matrix-org";
const REPO = "matrix-spec-proposals";
+
function wait(ms: number) {
return new Promise(function (resolve, reject) {
setTimeout(resolve, ms);
@@ -26,8 +27,6 @@ const indexingBar = multibar.create(1, 0, { name: "Indexing" });
interface Comment {
url: string;
- pull_request_review_id?: number;
- id: number;
diff_hunk: string;
path: string;
position?: number;
@@ -42,7 +41,6 @@ interface Comment {
body: string;
created_at: string;
updated_at: string;
- pull_request_url: string;
author_association: string;
_links: {
self: {
@@ -55,11 +53,6 @@ interface Comment {
href: string;
};
};
- start_line?: number;
- start_side?: "LEFT" | "RIGHT";
- line?: number;
- side?: string;
- subject_type?: "line" | "file";
reactions?: {
url: string;
total_count: number;
@@ -86,11 +79,10 @@ interface Document {
closedAt: number;
createdAt: number;
mergedAt: number;
- number: number;
+ updatedAt: number;
permalink: string;
title: string;
state: string;
- updatedAt: number;
threads?: Threads;
comments?: Comment[];
labels: { name: string; color: string; }[];
@@ -133,26 +125,32 @@ const octokit = new MyOctokit({
},
});
-//client.deleteIndex(INDEX)
+await client.deleteIndex(INDEX)
+await client.updateIndex(INDEX, { primaryKey: 'uid' });
+
await client.index(INDEX).updateDisplayedAttributes([
+ 'uid',
'author',
'author_url',
'body',
"closedAt",
"createdAt",
"mergedAt",
- "number",
+ "updatedAt",
"permalink",
"title",
"state",
- "updatedAt"
+ "threads",
+ "comments",
+ "labels",
]);
await client.index(INDEX).updateSearchableAttributes([
"title",
'author',
'body',
- "number",
- "state"
+ "state",
+ "threads",
+ "comments",
]);
const synonyms = {
@@ -168,7 +166,8 @@ await client.index(INDEX).updateFilterableAttributes([
'createdAt',
'mergedAt',
'updatedAt',
- "labels"])
+ "labels",
+])
await client.index(INDEX).updateSortableAttributes(['closedAt', 'createdAt', 'mergedAt', 'updatedAt'])
async function wait_for_rate_limit() {
@@ -218,7 +217,6 @@ async function get_documents(): Promise<Document[]> {
closedAt: closedAt,
createdAt: createdAt,
mergedAt: mergedAt,
- number: node.number,
permalink: node.url,
title: node.title,
state: node.state,
@@ -228,7 +226,6 @@ async function get_documents(): Promise<Document[]> {
}));
documents = documents.concat(new_documents.filter((x) => x.status === "fulfilled").map((x) => (x as PromiseFulfilledResult<Document>).value));
last_added = new_documents.length;
- prsBar.updateETA();
}
prsBar.increment(last_added);
@@ -237,11 +234,10 @@ async function get_documents(): Promise<Document[]> {
for (let i = 0; i < documents.length; i++) {
const document = documents[i];
- const { threads, comments } = await get_comments(document.number);
+ const { threads, comments } = await get_comments(document.uid);
document.threads = threads;
document.comments = comments;
commentsBar.increment();
- commentsBar.updateETA();
}
return documents;
}
@@ -276,8 +272,6 @@ async function get_comments(pr_id: number): Promise<{ threads: Threads, comments
for (const comment of data) {
const clean_comment: Comment = {
url: comment.url,
- pull_request_review_id: comment.pull_request_review_id ?? undefined,
- id: comment.id,
diff_hunk: comment.diff_hunk,
path: comment.path,
position: comment.position,
@@ -292,7 +286,6 @@ async function get_comments(pr_id: number): Promise<{ threads: Threads, comments
body: comment.body,
created_at: comment.created_at,
updated_at: comment.updated_at,
- pull_request_url: comment.pull_request_url,
author_association: comment.author_association,
_links: {
self: {
@@ -305,11 +298,6 @@ async function get_comments(pr_id: number): Promise<{ threads: Threads, comments
href: comment._links.pull_request.href,
},
},
- start_line: comment.start_line ?? undefined,
- start_side: comment.start_side ?? undefined,
- line: comment.line,
- side: comment.side,
- subject_type: comment.subject_type,
reactions: comment.reactions ? {
url: comment.reactions.url,
total_count: comment.reactions.total_count,
@@ -340,21 +328,55 @@ async function get_comments(pr_id: number): Promise<{ threads: Threads, comments
}
}
+/**
+ * We want to wait until the status of the task is either `succeeded` or until
+ * the `error` field has an error. If we got an error we print it and exit.
+ *
+ * @param taskID The id of a meilisearch task
+ */
+async function waitForTaskToFailOrComplete(taskID: number, pr_number: number): Promise<number | undefined> {
+ const task = await client.getTask(taskID);
+ if (task.status === 'failed') {
+ console.error(`Task failed for PR ${pr_number}:`, JSON.stringify(task, null, 2));
+ //process.exit(1);
+ return pr_number;
+ } else if (task.status === 'succeeded') {
+ return;
+ } else {
+ await wait(1000);
+ await waitForTaskToFailOrComplete(taskID, pr_number);
+ }
+}
+
+/**
+ * We add documents one by one.
+ *
+ * @param documents The documents to add to the index
+ * @param primaryKey The primary key of the documents
+ */
+async function addDocuments(documents: Document[], primaryKey: string): Promise<number[]> {
+ let errors: number[] = [];
+ for (const document of documents) {
+ const task = await client.index(INDEX).addDocuments([document], { primaryKey });
+ //const error_pr = await waitForTaskToFailOrComplete(task.taskUid, document.number);
+ indexingBar.increment();
+ //if (error_pr) {
+ // errors.push(error_pr);
+ //}
+ }
+ return errors;
+}
+
async function main() {
await wait_for_rate_limit();
const documents = await get_documents();
- // Add documents in bulks of 1000
- for (let i = 0; i < documents.length; i += 1000) {
- const documents_to_add = documents.slice(i, i + 1000);
- await client.index(INDEX).addDocuments(documents_to_add, { primaryKey: 'uid' });
- indexingBar.increment(documents_to_add.length);
- indexingBar.updateETA();
- // Dont overload meilisearch
- await wait(5 * 60 * 1000);
- }
+ const errors = await addDocuments(documents, 'uid');
multibar.stop();
+ if (errors.length > 0) {
+ console.error(`Failed to index the following PRs: ${errors.join(", ")}`);
+ }
const stats = await client.getStats();
console.log(`Stats:`, JSON.stringify(stats, null, 2));
}
diff --git a/src/components/Checkbox.astro b/src/components/Checkbox.astro
@@ -29,7 +29,7 @@ const { name, label, checked = false, disabled = false } = Astro.props;
height: 20px;
border: 1px solid #94a3b8;
border-radius: 4px;
- transform: translateY(-0.5px);
+ transform: translateY(4px);
display: grid;
place-content: center;
@@ -72,7 +72,6 @@ const { name, label, checked = false, disabled = false } = Astro.props;
.form-control {
font-size: 18px;
font-weight: 400;
- line-height: normal;
display: grid;
grid-template-columns: 1em auto;
gap: 0.5em;
diff --git a/src/components/Pagination.astro b/src/components/Pagination.astro
@@ -79,11 +79,9 @@ const range = Array(pages+1).fill(0, currentPage === 1 ? currentPage : currentPa
align-items: center;
align-self: stretch;
color: #000;
- font-family: Inter;
font-size: 20px;
font-style: normal;
font-weight: 400;
- line-height: normal;
#left,
#right,
.middle {
diff --git a/src/components/Preview.astro b/src/components/Preview.astro
@@ -50,11 +50,9 @@ const markdown = marked.parse(content_joined, { breaks: true, gfm: true });
a {
color: var(--colors-neutral-50, #fafafa);
- font-family: Inter;
font-size: 24px;
font-style: normal;
font-weight: 500;
- line-height: normal;
}
a:hover {
@@ -64,16 +62,13 @@ const markdown = marked.parse(content_joined, { breaks: true, gfm: true });
h2 {
color: var(--colors-neutral-50, #fafafa);
- font-family: Inter;
font-size: 16px;
font-style: normal;
font-weight: 300;
- line-height: normal;
}
.markdown-wrapper {
color: var(--colors-neutral-50, #fafafa);
- font-family: Inter;
font-size: 16px;
font-style: normal;
font-weight: 400;
diff --git a/src/layouts/MSCLayout.astro b/src/layouts/MSCLayout.astro
@@ -1,4 +1,5 @@
---
+import "../styles/global.scss";
interface Props {
msc_number: number;
}
diff --git a/src/layouts/StartLayout.astro b/src/layouts/StartLayout.astro
@@ -1,4 +1,5 @@
---
+import "../styles/global.scss";
interface Props {}
---
diff --git a/src/pages/index.astro b/src/pages/index.astro
@@ -50,40 +50,35 @@ if (Astro.request.method === "POST") {
</StartLayout>
<style>
- html {
- height: 100%;
- }
- body {
- background: var(--colors-slate-700, #334155);
- height: 100%;
- }
main {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: var(--spacing-12, 48px);
- flex-shrink: 0;
height: 100%;
- h1 {
+ form {
+ width: unset;
+ height: unset;
+ }
+
+ header {
color: #fff;
text-align: center;
- font-family: Inter;
font-size: 60px;
font-style: normal;
font-weight: 700;
- line-height: normal;
}
#search {
width: 820px;
height: 100px;
display: flex;
- flex-shrink: 0;
border-radius: var(--border-radius-lg, 8px);
border: 2px solid var(--colors-slate-400, #94a3b8);
background: var(--colors-neutral-100, #f5f5f5);
+ padding-left: var(--spacing-2, 8px);
/* shadow/lg */
box-shadow:
@@ -98,11 +93,9 @@ if (Astro.request.method === "POST") {
background: var(--colors-neutral-100, #f5f5f5);
color: #000;
- font-family: Inter;
font-size: 24px;
font-style: normal;
font-weight: 400;
- line-height: normal;
}
#search-icon {
diff --git a/src/pages/mscs/[id].astro b/src/pages/mscs/[id].astro
@@ -15,7 +15,7 @@ export async function getStaticPaths() {
});
const documents = await client.index(INDEX).getDocuments({ limit: 8000 });
const ids = documents.results.map((document) => {
- return { params: { id: document.number } };
+ return { params: { id: document.uid } };
});
return ids;
}
diff --git a/src/pages/results.astro b/src/pages/results.astro
@@ -275,7 +275,7 @@ function filter_to_string(filter: FilterJson): string {
<form method="POST">
<main>
<header>
- <h1>Matrix Spec Changes</h1>
+ <a href="/"><h1>Matrix Spec Changes</h1></a>
<div id="search">
<input type="search" name="search" aria-label="Search" value={query} required />
<button type="submit" >
@@ -309,13 +309,13 @@ function filter_to_string(filter: FilterJson): string {
title={hit.title}
author={hit.author}
content={hit.body}
- id={hit.number}
+ id={hit.uid}
/>
))}
</div>
<aside id="filters">
<div class="filter-section">
- <h1>Labels</h1>
+ <h2>Labels</h2>
<div class="filter-options">
<Checkbox name="client_server" label="Client-Server" checked={filter_parsed.client_server} />
<Checkbox name="server_server" label="Server-Server" checked={filter_parsed.server_server} />
@@ -331,7 +331,7 @@ function filter_to_string(filter: FilterJson): string {
</div>
</div>
<div class="filter-section">
- <h1>State</h1>
+ <h2>State</h2>
<div class="filter-options">
<Checkbox name="merged" label="Merged" checked={filter_parsed.state?.merged} />
<Checkbox name="closed" label="Closed" checked={filter_parsed.state?.closed} />
@@ -340,7 +340,7 @@ function filter_to_string(filter: FilterJson): string {
</div>
<div class="filter-section">
- <h1>Opened Between</h1>
+ <h2>Opened Between</h2>
<div class="filter-options">
<div class="filter-wrapper date">
<label for="start-opened-date">Start</label>
@@ -368,7 +368,7 @@ function filter_to_string(filter: FilterJson): string {
</div>
<div class="filter-section">
- <h1>Merged/closed Between</h1>
+ <h2>Merged/closed Between</h2>
<div class="filter-options">
<div class="filter-wrapper date">
<label for="start-merged-closed-date"
@@ -408,27 +408,14 @@ function filter_to_string(filter: FilterJson): string {
</StartLayout>
<style lang="scss">
- html,
- body,
- form {
- margin: 0;
- min-width: 100%;
- min-height: 100%;
- }
-
- body {
- background: var(--colors-slate-700, #334155);
- }
-
main {
display: flex;
- min-width: 100%;
- min-height: 100%;
+ width: 100%;
+ height: 100%;
padding: var(--spacing-7, 28px) var(--spacing-6, 24px);
flex-direction: column;
align-items: center;
gap: var(--spacing-12, 48px);
- flex-shrink: 0;
header {
display: flex;
@@ -439,11 +426,9 @@ function filter_to_string(filter: FilterJson): string {
h1 {
color: var(--colors-base-white, #fff);
text-align: center;
- font-family: Inter;
font-size: 24px;
font-style: normal;
font-weight: 700;
- line-height: normal;
}
}
@@ -451,7 +436,6 @@ function filter_to_string(filter: FilterJson): string {
width: 730px;
height: 50px;
display: flex;
- flex-shrink: 0;
border-radius: var(--border-radius-lg, 8px);
border: 2px solid var(--colors-slate-400, #94a3b8);
background: var(--colors-neutral-100, #f5f5f5);
@@ -472,11 +456,9 @@ function filter_to_string(filter: FilterJson): string {
padding-left: var(--spacing-2, 8px);
color: #000;
- font-family: Inter;
font-size: 24px;
font-style: normal;
font-weight: 400;
- line-height: normal;
}
#search-icon {
@@ -534,11 +516,9 @@ function filter_to_string(filter: FilterJson): string {
gap: 8px;
align-self: stretch;
color: var(--colors-base-white, #fff);
- font-family: Inter;
font-size: 24px;
font-style: normal;
font-weight: 700;
- line-height: normal;
.filter-options {
display: flex;
@@ -550,11 +530,9 @@ function filter_to_string(filter: FilterJson): string {
.filter-wrapper {
color: var(--colors-base-white, #fff);
- font-family: Inter;
font-size: 18px;
font-style: normal;
font-weight: 400;
- line-height: normal;
display: flex;
align-items: center;
@@ -597,11 +575,9 @@ function filter_to_string(filter: FilterJson): string {
#infos {
color: var(--colors-gray-300, #d1d5db);
text-align: center;
- font-family: Inter;
font-size: 16px;
font-style: normal;
font-weight: 400;
- line-height: normal;
}
}
}
diff --git a/src/styles/global.scss b/src/styles/global.scss
@@ -0,0 +1,20 @@
+body {
+ background: var(--colors-slate-700, #334155);
+ font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
+ font-size: 1.125rem;
+ line-height: 1.6;
+}
+
+h1,
+h2,
+h3 {
+ line-height: 1;
+}
+
+html,
+body,
+form {
+ margin: 0 auto;
+ min-width: 100%;
+ min-height: 100%;
+}