10000 add share & preview & publish top label · ElixirNote/elixirnote@ffd9f92 · GitHub
[go: up one dir, main page]

Skip to content

Commit ffd9f92

Browse files
committed
add share & preview & publish top label
1 parent 28735f7 commit ffd9f92

File tree

3 files changed

+66
-7
lines changed

3 files changed

+66
-7
lines changed

packages/application/style/titlepanel.css

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,23 @@
1515
}
1616

1717
#jp-title-panel-title {
18-
flex: 1 1 auto;
19-
margin-left: 18px;
18+
/*flex: 1 1 auto;*/
19+
margin-left: 8px;
2020
}
2121

2222
#jp-title-panel-title input {
2323
background: transparent;
2424
margin: 0;
2525
height: 28px;
2626
width: 100%;
27+
padding: 0;
2728
box-sizing: border-box;
2829
border: none;
2930
font-size: 18px;
3031
font-weight: normal;
3132
font-family: var(--jp-ui-font-family);
3233
line-height: var(--jp-private-title-panel-height);
33-
color: #000000;
34+
color: #000;
3435
outline: none;
3536
appearance: none;
3637
-webkit-appearance: none;

packages/collaboration/src/menu.ts

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@ export class RendererUserMenu extends MenuBar.Renderer {
3737
return h.li(
3838
{ className, dataset, tabindex: '0', onfocus: data.onfocus, ...aria },
3939
this._createUserIcon(),
40-
this.renderLabel(data),
41-
this.renderIcon(data)
40+
this.createShareLabel(),
41+
this.createPreviewLabel(),
42+
this.createPublishLabel()
43+
// this.renderLabel(data),
44+
// this.renderIcon(data)
4245
);
4346
}
4447

@@ -97,6 +100,51 @@ export class RendererUserMenu extends MenuBar.Renderer {
97100
);
98101
}
99102
}
103+
104+
/**
105+
* Render the share icon element for a menu item.
106+
*
107+
* @returns A virtual element representing the item label.
108+
*/
109+
createShareLabel(): VirtualElement {
110+
return h.div(
111+
{
112+
className:
113+
'lm-MenuBar-itemIcon p-MenuBar-itemIcon jp-MenuBar-CommonLabel'
114+
},
115+
'Share'
116+
);
117+
}
118+
119+
/**
120+
* Render the preview icon element for a menu item.
121+
*
122+
* @returns A virtual element representing the item label.
123+
*/
124+
createPreviewLabel(): VirtualElement {
125+
return h.div(
126+
{
127+
className:
128+
'lm-MenuBar-itemIcon p-MenuBar-itemIcon jp-MenuBar-CommonLabel'
129+
},
130+
'Preview'
131+
);
132+
}
133+
134+
/**
135+
* Render the publish icon element for a menu item.
136+
*
137+
* @returns A virtual element representing the item label.
138+
*/
139+
createPublishLabel(): VirtualElement {
140+
return h.div(
141+
{
142+
className:
143+
'lm-MenuBar-itemIcon p-MenuBar-itemIcon jp-MenuBar-CommonLabel'
144+
},
145+
'Publish'
146+
);
147+
}
100148
}
101149

102150
/**

packages/collaboration/style/menu.css

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,17 @@
1919
width: 28px;
2020
height: 28px;
2121
text-align: center;
22-
border-radius: 100%;
22+
border-radius: 4px;
23+
margin: 0 16px;
24+
}
25+
26+
.jp-MenuBar-CommonLabel {
27+
height: 28px;
28+
width: 60px;
29+
text-align: center;
30+
border-radius: 2px;
31+
border: 1px solid #e0e0e0;
32+
margin: 0 4px;
2333
}
2434

2535
.jp-MenuBar-imageIcon img {
@@ -38,7 +48,7 @@
3848
#jp-UserMenu {
3949
/*background-color: #00a250;*/
5803
4050
height: 56px;
41-
width: 200px;
51+
width: 300px;
4252
align-items: center;
4353
justify-content: center;
4454
display: flex;

0 commit comments

Comments
 (0)
0