Skip to content

Commit 714d94f

Browse files
save file
1 parent 141f849 commit 714d94f

File tree

1 file changed

+125
-0
lines changed

1 file changed

+125
-0
lines changed
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
2+
3+
<html-component-hdr>
4+
5+
<template shadowrootmode=open>
6+
7+
<style>
8+
9+
section
10+
{margin:0;box-sizing:border-box;display:flex;align-items:center;gap:10px;border-bottom:1px solid lightgray;margin-bottom:20px;padding-bottom:10px}
11+
12+
.icon
13+
{cursor:pointer;border-radius:3px;border:1px solid gray;box-sizing:border-box;width:38px;height:38px;}
14+
15+
.item
16+
{display:inline-flex;align-items:center;text-align:center;background:buttonface;border-radius:3px;border:1px solid lightgray;padding:5px 7px;}
17+
18+
.item-label
19+
{margin-right:10px;}
20+
21+
::slotted(.title)
22+
{text-align:center;position:absolute;left:0;right:0;top:0px;z-index:-1;margin:0 auto;}
23+
24+
25+
.date
26+
{position:absolute;top:5px;right:5px;}
27+
28+
a
29+
{color:blue;}
30+
a:visited
31+
{color:blue;}
32+
33+
34+
</style>
35+
36+
<section>
37+
38+
<div class=item>
39+
40+
<a id=home class=item-label href='/'>
41+
home
42+
</a>
43+
44+
<top-menu component=grp></top-menu>
45+
46+
</div>
47+
48+
<slot></slot>
49+
50+
<div class=date>
51+
<slot name=date></slot>
52+
</div>
53+
54+
</section>
55+
56+
</template>
57+
58+
59+
<script>
60+
61+
62+
(function html_component_hdr({mod,dom,host}){
63+
64+
var obj = {
65+
version : 'v2.0',
66+
};
67+
68+
var df=true
69+
;
70+
71+
72+
var $,menu
73+
;
74+
75+
obj.initmod = function(params){
76+
77+
$ = params.$;
78+
menu = params.menu;
79+
80+
}//initmod
81+
82+
83+
//:
84+
85+
86+
var top;
87+
88+
89+
obj.init = async function(){
90+
91+
top = mod['top-menu']
92+
93+
top.initmod({$,menu});
94+
95+
await top.init();
96+
97+
98+
}//init
99+
100+
101+
//:
102+
103+
104+
obj.initdom = function(rootnode){
105+
106+
var shadow = host.shadowRoot;
107+
108+
top.initdom(shadow);
109+
110+
111+
}//initdom
112+
113+
114+
115+
return obj;
116+
117+
})//html_component_hdr
118+
119+
120+
</script>
121+
122+
</html-component-hdr>
123+
124+
125+

0 commit comments

Comments
 (0)