Skip to content

Commit a00179d

Browse files
save file
1 parent b6fcfcd commit a00179d

File tree

1 file changed

+18
-33
lines changed

1 file changed

+18
-33
lines changed

utils/editors/html/editors-hdr/editors-hdr.html

Lines changed: 18 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66

77
<style>
88

9+
:host
10+
{margin-bottom:10px}
11+
912
section
10-
{margin:0;box-sizing:border-box;display:flex;align-items:center;
11-
gap:10px;
12-
}
13+
{margin:0;box-sizing:border-box;display:flex;align-items:center;gap:10px}
1314

1415
.icon
1516
{cursor:pointer;border-radius:3px;border:1px solid gray;box-sizing:border-box;
@@ -24,15 +25,14 @@
2425
.item-label
2526
{}
2627

27-
::slotted(.title)
28-
{text-align:center;position:absolute;left:0;right:0;top:0px;z-index:-1;margin:0 auto;
29-
}
28+
::slotted([slot=title])
29+
{text-align:center;position:absolute;left:0;right:0;top:0px;z-index:-1;margin:0 auto}
3030

3131
::slotted([slot=version])
32-
{color:green;font-weight:bold}
32+
{color:blue;font-weight:bold;margin:0 20px}
3333

3434
.date
35-
{position:absolute;top:5px;right:5px;}
35+
{}
3636

3737
a
3838
{color:blue;}
@@ -50,6 +50,7 @@
5050
<section>
5151

5252
<slot name=seo-hdr class=visually-hidden></slot>
53+
<slot name=title></slot>
5354

5455
<div class=item>
5556

@@ -61,9 +62,12 @@
6162

6263
</div>
6364

64-
<input value=isolate type=button>
65+
<div id=btns>
66+
</div>
6567

66-
<slot></slot>
68+
<div style='flex:1'></div>
69+
70+
<page-source component></page-source>
6771

6872
<slot name=version></slot>
6973

@@ -107,12 +111,9 @@
107111

108112
obj.init = async function(){
109113
debug('init',obj.version);
110-
top = mod['top-menu'];
111-
112-
top.initmod({ext,$,menu});
113-
114-
await top.init();
114+
await mod.auto();
115115

116+
obj['page-source'] = mod['page-source'];
116117

117118
}//init
118119

@@ -124,31 +125,15 @@
124125

125126
var shadow = host.shadowRoot;
126127

127-
top.initdom(shadow);
128-
129-
$(shadow,'[value=isolate]').onclick = btn.isolate;
130-
131128

132129
}//initdom
133130

134131

135132
//:
136133

137134

138-
btn.isolate = function(){
139-
140-
var url = window.location.toString();
141-
142-
if(url.indexOf('?')!=-1){
143-
return;
144-
}
145-
146-
url += '?isolate';
147-
window.location = url;
148-
149-
}//isolate
150-
151-
135+
136+
152137
//:
153138

154139

0 commit comments

Comments
 (0)