File tree Expand file tree Collapse file tree 3 files changed +58
-1
lines changed Expand file tree Collapse file tree 3 files changed +58
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { ThemeVars } from "./theme";
55import { config } from "./Browser" ;
66import { browser } from "./main" ;
77import type { Tab } from "./Tab" ;
8+ import { BookmarksStrip } from "./components/BookmarksStrip" ;
89
910export const App : Component = function ( cx ) {
1011 return (
@@ -21,6 +22,7 @@ export const App: Component = function (cx) {
2122 } }
2223 />
2324 < Omnibox tab = { use ( browser . activetab ) } />
25+ < BookmarksStrip />
2426 { cx . children }
2527 </ div >
2628 ) ;
Original file line number Diff line number Diff line change 1+ import { css , type Component } from "dreamland/core" ;
2+ import { Icon } from "./Icon" ;
3+ import iconAdd from "@ktibow/iconset-ion/add" ;
4+ import { browser } from "../main" ;
5+
6+ export const BookmarksStrip : Component = function ( ) {
7+ return (
8+ < div >
9+ < button on :click = { ( ) => { } } >
10+ < Icon icon = { iconAdd } > </ Icon >
11+ < span > create bookmark</ span >
12+ </ button >
13+ { use ( browser . globalhistory ) . mapEach ( ( g ) => (
14+ < button on :click = { ( ) => { } } >
15+ < img src = { g . favicon } > </ img >
16+ < span > { g . title } </ span >
17+ </ button >
18+ ) ) }
19+ </ div >
20+ ) ;
21+ } ;
22+ BookmarksStrip . style = css `
23+ : scope {
24+ padding : 0.25em ;
25+ height : 2em ;
26+ display : flex;
27+ gap : 0.5em ;
28+ background : var (--aboutbrowser-omnibox-bg );
29+ }
30+
31+ button {
32+ padding : 0 ;
33+ border : 0 ;
34+ display : flex;
35+ align-items : center;
36+ height : 100% ;
37+ gap : 0.25em ;
38+
39+ padding-left : 0.25em ;
40+ padding-right : 0.25em ;
41+ background : none;
42+ border-radius : 0.5em ;
43+ }
44+ button : hover {
45+ background : gray;
46+ }
47+ button span {
48+ white-space : nowrap;
49+ }
50+
51+ button img {
52+ width : 16px ;
53+ height : 16px ;
54+ }
55+ ` ;
Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ DragTab.style = css`
148148
149149 .tooltip {
150150 position : absolute;
151- top : 5 em ;
151+ top : 2.25 em ;
152152 left : 0 ;
153153 z-index : 1000 ;
154154 background : var (--aboutbrowser-frame-bg );
You can’t perform that action at this time.
0 commit comments