Skip to content

Commit 46212a0

Browse files
save file
1 parent 6d47d37 commit 46212a0

File tree

1 file changed

+133
-0
lines changed

1 file changed

+133
-0
lines changed
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
2+
3+
<video-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:20px;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+
<top-menu component=grp></top-menu>
55+
56+
</div>
57+
58+
<slot></slot>
59+
<slot name=seo-hdr class=visually-hidden></slot>
60+
61+
<div class=date>
62+
<slot name=date></slot>
63+
</div>
64+
65+
</section>
66+
67+
</template>
68+
69+
70+
<script>
71+
72+
(function video_hdr({mod,dom,host}){
73+
74+
var obj = {
75+
version : 'v2.0',
76+
};
77+
78+
var df=true,did='video-hdr'
79+
;
80+
81+
var ext,$,menu
82+
;
83+
84+
obj.initmod = function(params){
85+
86+
ext = params.ext;
87+
$ = params.$;
88+
menu = params.menu;
89+
90+
}//initmod
91+
92+
93+
//:
94+
95+
var top;
96+
97+
98+
obj.init = async function(){
99+
100+
top = mod['top-menu'];
101+
102+
top.initmod({ext,$,menu});
103+
104+
await top.init();
105+
106+
107+
}//init
108+
109+
110+
//:
111+
112+
113+
obj.initdom = function(rootnode){
114+
115+
var shadow = host.shadowRoot;
116+
117+
top.initdom(shadow);
118+
119+
120+
}//initdom
121+
122+
123+
//:
124+
125+
126+
127+
return obj;
128+
129+
})();//video-hdr
130+
131+
</script>
132+
133+
</video-hdr>

0 commit comments

Comments
 (0)