Skip to content

Commit d9211ad

Browse files
save file
1 parent 9fd1697 commit d9211ad

File tree

1 file changed

+148
-0
lines changed

1 file changed

+148
-0
lines changed

chat/html/chat-hdr/chat-hdr.html

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

0 commit comments

Comments
 (0)