Skip to content

Commit 848e45b

Browse files
committed
[frontend] polish new tab page a bit
1 parent 8f01687 commit 848e45b

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

frontend/src/components/BookmarksStrip.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ BookmarksStrip.style = css`
7272
padding-right: 0.25em;
7373
background: none;
7474
border-radius: 0.5em;
75+
cursor: pointer;
76+
77+
font-family: "Noto Sans";
7578
}
7679
button:hover {
7780
background: gray;

frontend/src/pages/NewTabPage.tsx

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ export const NewTabPage: Component<
1212
return (
1313
<div>
1414
<div class="main">
15-
<h1>Puter Browser</h1>
1615
<input
1716
on:keydown={(e: KeyboardEvent) => {
1817
if (e.key === "Enter") {
@@ -25,10 +24,12 @@ export const NewTabPage: Component<
2524
<div class="suggestions">
2625
{browser.globalhistory.slice(0, 5).map((entry) => (
2726
<div class="suggestion" on:click={() => browser.newTab(entry.url)}>
28-
<div class="circle">
29-
<img src={entry.favicon || "/vite.svg"} alt="favicon" />
27+
<div class="suggestioninner">
28+
<div class="circle">
29+
<img src={entry.favicon || "/vite.svg"} alt="favicon" />
30+
</div>
31+
<span class="title">{entry.title || trimUrl(entry.url)}</span>
3032
</div>
31-
<span class="title">{entry.title || trimUrl(entry.url)}</span>
3233
</div>
3334
))}
3435
</div>
@@ -42,7 +43,7 @@ NewTabPage.style = css`
4243
height: 100%;
4344
display: flex;
4445
justify-content: center;
45-
font-family: sans-serif;
46+
font-family: "Noto Sans";
4647
}
4748
4849
.suggestions {
@@ -55,11 +56,20 @@ NewTabPage.style = css`
5556
5657
.suggestion {
5758
cursor: pointer;
59+
aspect-ratio: 1/1;
60+
display: flex;
61+
align-items: center;
62+
justify-content: center;
63+
border-radius: 2em;
64+
}
65+
.suggestion:hover {
66+
background: gray;
67+
}
68+
.suggestioninner {
5869
display: flex;
5970
flex-direction: column;
6071
align-items: center;
6172
gap: 0.5em;
62-
width: 6em;
6373
}
6474
.circle {
6575
width: 64px;
@@ -75,7 +85,6 @@ NewTabPage.style = css`
7585
width: 100%;
7686
text-overflow: ellipsis;
7787
text-align: center;
78-
overflow: hidden;
7988
white-space: nowrap;
8089
}
8190
.suggestion img {
@@ -97,7 +106,8 @@ NewTabPage.style = css`
97106
font-size: 1.5em;
98107
border: 2px solid #ccc;
99108
outline: none;
100-
border-radius: 4px;
109+
border-radius: 1em;
110+
padding: 1em;
101111
}
102112
103113
.main {

0 commit comments

Comments
 (0)