Skip to content

Commit e480073

Browse files
save file
1 parent 7fe67e6 commit e480073

File tree

1 file changed

+139
-0
lines changed

1 file changed

+139
-0
lines changed
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
2+
3+
<gcloud-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;}
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+
}
20+
21+
::slotted(.title) {
22+
text-align : center;
23+
position : absolute;
24+
left : 0;
25+
right : 0;
26+
top : 0px;
27+
z-index : -1;
28+
margin : 0 auto;
29+
}
30+
31+
32+
.date {
33+
position : absolute;
34+
top : 5px;
35+
right : 5px;
36+
}
37+
38+
a {
39+
color : blue;
40+
}
41+
a:visited {
42+
color : blue;
43+
}
44+
45+
46+
</style>
47+
48+
<section>
49+
50+
<div class=item>
51+
52+
<top-menu component=grp></top-menu>
53+
54+
<a id=home class=item-label href='/'>
55+
home
56+
</a>
57+
58+
</div>
59+
60+
<slot></slot>
61+
62+
<div class=date>
63+
<slot name=date></slot>
64+
</div>
65+
66+
</section>
67+
68+
</template>
69+
70+
71+
<script>
72+
73+
74+
(function gcloud_hdr({mod,dom,host}){
75+
76+
var obj = {
77+
version : 'v2.0',
78+
};
79+
80+
var df=true
81+
;
82+
83+
84+
var $,menu
85+
;
86+
87+
obj.initmod = function(params){
88+
89+
$ = params.$;
90+
menu = params.menu;
91+
92+
}//initmod
93+
94+
95+
//:
96+
97+
98+
var top;
99+
100+
101+
obj.init = async function(){
102+
103+
top = mod['top-menu']
104+
105+
top.initmod({$,menu});
106+
107+
await top.init();
108+
109+
110+
}//init
111+
112+
113+
//:
114+
115+
116+
obj.initdom = function(rootnode){
117+
118+
var shadow = host.shadowRoot;
119+
120+
top.initdom(shadow);
121+
122+
123+
}//initdom
124+
125+
126+
127+
return obj;
128+
129+
})//github_hdr
130+
131+
132+
</script>
133+
134+
</gcloud-hdr>
135+
136+
137+
138+
139+

0 commit comments

Comments
 (0)