Skip to content

Commit 3a50a25

Browse files
committed
feat: add link to calculator main page
1 parent 9d6fc48 commit 3a50a25

3 files changed

Lines changed: 21 additions & 14 deletions

File tree

src/lib/components/Header.svelte

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,16 @@
1010
</a>
1111
</div>
1212
<div id="top-buttons">
13-
<div id="documentation-top-btn">
13+
<div class="top-button">
14+
<a
15+
href="https://data.hubblo.org/gpu"
16+
class="simple-link"
17+
aria-label="Navigate to the calculator page"
18+
>
19+
🧮 Calculator
20+
</a>
21+
</div>
22+
<div class="top-button">
1423
<a
1524
href="https://data.hubblo.org/gpu/docs"
1625
class="simple-link"
@@ -19,7 +28,7 @@
1928
📖 Documentation
2029
</a>
2130
</div>
22-
<div id="code-top-btn">
31+
<div class="top-button">
2332
<a
2433
href="https://github.com/hubblo-org/gpu-calculator"
2534
class="simple-link"
@@ -28,7 +37,7 @@
2837
👩‍💻 Code
2938
</a>
3039
</div>
31-
<div id="contact-top-btn">
40+
<div class="top-button">
3241
<a
3342
href="https://hubblo.org/en/contact/"
3443
class="simple-link"

src/tests/layout/header.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ describe("header component test suite", () => {
1414
expect(hubbloLink).toBeVisible();
1515
});
1616

17-
it("should display links to the documentation, the repository and to the contact form", () => {
17+
it("should display links to the calculator, the documentation, the repository and to the contact form", () => {
18+
const calculatorLink = screen.getByRole("link", {
19+
name: "Navigate to the calculator page"
20+
});
21+
1822
const documentationLink = screen.getByRole("link", {
1923
name: "Navigate to the calculator documentation page"
2024
});
@@ -25,6 +29,7 @@ describe("header component test suite", () => {
2529

2630
const contactLink = screen.getByRole("link", { name: "Navigate to the Hubblo contact form" });
2731

32+
expect(calculatorLink).toBeVisible();
2833
expect(documentationLink).toBeVisible();
2934
expect(repositoryLink).toBeVisible();
3035
expect(contactLink).toBeVisible();

static/css/global.css

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -393,23 +393,16 @@ tr:nth-child(even) {
393393
user-select: none;
394394
}
395395

396+
.top-button {
397+
margin-right: 10px;
398+
}
396399

397400
#top-buttons {
398401
display: flex;
399402
flex-direction: row;
400403
justify-content: flex-end;
401404
}
402405

403-
#community-top-btn,
404-
#documentation-top-btn,
405-
#contact-top-btn,
406-
#code-top-btn {
407-
margin-right: 10px;
408-
}
409-
410-
411-
412-
413406
::selection {
414407
background: var(--color-secondary-30, Highlight);
415408
}

0 commit comments

Comments
 (0)