Skip to content

Commit d2a3be0

Browse files
save file
1 parent 95b7e35 commit d2a3be0

1 file changed

Lines changed: 41 additions & 18 deletions

File tree

utils/misc/html/misc-hdr/v2.0/misc-hdr-v2.0.html

Lines changed: 41 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,7 @@
1515
}
1616

1717

18-
.item, ::slotted(.item)
19-
{display:inline-flex;align-items:center;text-align:center;background:buttonface;
20-
border-radius:3px;border:1px solid lightgray;padding:5px 7px;cursor:pointer}
21-
.item:hover, ::slotted(.item):hover
22-
{background:lightyellow}
23-
24-
25-
.item-icon, ::slotted(.item-icon)
26-
{display:flex;flex-direction:column;align-items:center}
27-
28-
.icon, ::slotted(.icon)
29-
{cursor:pointer;width:20px;height:20px;border:none}
3018

31-
.item-label, ::slotted(.item-label)
32-
{color:blue}
3319

3420
::slotted([slot=title])
3521
{text-align:center;position:absolute;left:0;right:0;top:0px;z-index:-1;margin:0 auto}
@@ -55,6 +41,26 @@
5541
{color:blue}
5642

5743

44+
</style>
45+
46+
<style id=item>
47+
48+
.item, ::slotted(.item)
49+
{display:inline-flex;align-items:center;text-align:center;background:buttonface;
50+
border-radius:3px;border:1px solid lightgray;padding:5px 7px;cursor:pointer}
51+
.item:hover, ::slotted(.item):hover
52+
{background:lightyellow}
53+
54+
55+
.item-icon, ::slotted(.item-icon)
56+
{display:flex;flex-direction:column;align-items:center}
57+
58+
.icon, ::slotted(.icon)
59+
{cursor:pointer;width:20px;height:20px;border:none}
60+
61+
.item-label, ::slotted(.item-label)
62+
{color:blue}
63+
5864
</style>
5965

6066
<section>
@@ -71,6 +77,7 @@
7177
</div>
7278

7379
<slot name=help></slot>
80+
<help-file v1.0 component=grp_root></help-file>
7481

7582

7683

@@ -150,6 +157,7 @@
150157
//:
151158

152159

160+
var help;
153161
var top;
154162

155163
var shadow;
@@ -163,8 +171,12 @@
163171

164172
obj.init = async function(){
165173

174+
help = mod['help-file'];
175+
166176
await mod.auto();
167177

178+
console.log($(host.shadowRoot,'[slot=help]'));
179+
168180
}//init
169181

170182

@@ -176,11 +188,12 @@
176188
shadow = host.shadowRoot;
177189

178190
set.filename();
179-
if(typeof version==='undefined'){
180-
set.version('v1.0');
181-
}else{
182-
set.version(version);
191+
192+
var v = 'v1.0';
193+
if(typeof version!='undefined'){
194+
v = version;
183195
}
196+
set.version(v);
184197

185198
}//initdom
186199

@@ -207,6 +220,16 @@
207220
}//filename
208221

209222

223+
obj.add = function(slot,node){
224+
225+
slot = $(shadow,`slot[name=${slot}]`);
226+
if(!slot){
227+
return null;
228+
}
229+
slot.parentNode.replaceChild(node,slot);
230+
return slot;
231+
232+
}//add
210233

211234

212235
obj.complete = function(){

0 commit comments

Comments
 (0)