Skip to content

Commit 8ef96d5

Browse files
save file
1 parent cd01cf9 commit 8ef96d5

File tree

1 file changed

+39
-35
lines changed

1 file changed

+39
-35
lines changed

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

Lines changed: 39 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,37 +6,39 @@
66

77
<style>
88

9-
section
9+
section
1010
{margin:0;box-sizing:border-box;display:flex;align-items:center;
1111
gap:10px;
1212
}
13-
13+
1414
.icon
1515
{cursor:pointer;border-radius:3px;border:1px solid gray;box-sizing:border-box;
1616
width:38px;height:38px;
1717
}
18-
18+
1919
.item
2020
{display:inline-flex;align-items:center;text-align:center;background:buttonface;
2121
border-radius:3px;border:1px solid lightgray;padding:5px 7px;
2222
}
23-
23+
2424
.item-label
2525
{}
26-
26+
2727
::slotted(.title)
2828
{text-align:center;position:absolute;left:0;right:0;top:0px;z-index:-1;margin:0 auto;
2929
}
30-
31-
30+
31+
::slotted([slot=version])
32+
{color:green;font-weight:bold}
33+
3234
.date
3335
{position:absolute;top:5px;right:5px;}
34-
36+
3537
a
3638
{color:blue;}
3739
a:visited
3840
{color:blue;}
39-
41+
4042
::slotted(.visually-hidden)
4143
{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}
4244

@@ -46,36 +48,38 @@
4648
</style>
4749

4850
<section>
49-
51+
52+
<slot name=seo-hdr class=visually-hidden></slot>
53+
5054
<div class=item>
5155

5256
<a id=home class=item-label href='/'>
5357
home
5458
</a>
5559

5660
<top-menu component=grp></top-menu>
57-
61+
5862
</div>
5963

6064
<input value=isolate type=button>
61-
65+
6266
<slot></slot>
6367

64-
<slot name=seo-hdr class=visually-hidden></slot>
65-
68+
<slot name=version></slot>
69+
6670
<div class=date>
6771
<slot name=date></slot>
6872
</div>
69-
73+
7074
</section>
7175

7276
</template>
73-
77+
7478

7579
<script>
7680

7781
(function editors_hdr({mod,dom,host}){
78-
82+
7983
var obj = {
8084
version : 'v2.0'
8185
};
@@ -85,39 +89,39 @@
8589

8690
var ext,$,menu
8791
;
88-
92+
8993
obj.initmod = function(params){
90-
94+
9195
ext = params.ext;
9296
$ = params.$;
9397
menu = params.menu;
9498

9599
}//initmod
96100

97-
101+
98102
//:
99103

100-
104+
101105
var top;
102106

103-
107+
104108
obj.init = async function(){
105109
debug('init',obj.version);
106110
top = mod['top-menu'];
107111

108112
top.initmod({ext,$,menu});
109113

110114
await top.init();
111-
115+
112116

113117
}//init
114-
115-
118+
119+
116120
//:
117121

118122

119123
obj.initdom = function(rootnode){
120-
124+
121125
var shadow = host.shadowRoot;
122126

123127
top.initdom(shadow);
@@ -127,12 +131,12 @@
127131

128132
}//initdom
129133

130-
134+
131135
//:
132136

133137

134138
btn.isolate = function(){
135-
139+
136140
var url = window.location.toString();
137141

138142
if(url.indexOf('?')!=-1){
@@ -143,25 +147,25 @@
143147
window.location = url;
144148

145149
}//isolate
146-
147-
150+
151+
148152
//:
149-
153+
150154

151155
function debug(){
152-
156+
153157
if(!df && !obj.df)return;
154158
var str = [...arguments].join(' ');
155159
console.log(`[ ${did} ]`,str);
156160

157161
}//debug
158-
159-
162+
163+
160164
return obj;
161165

162166
})//editors-hdr
163167

164-
168+
165169
</script>
166170

167171
</editors-hdr>

0 commit comments

Comments
 (0)