Skip to content

Commit c8f6c1a

Browse files
Add some content to the top-bar (#1374)
1 parent 6235d56 commit c8f6c1a

File tree

3 files changed

+66
-8
lines changed

3 files changed

+66
-8
lines changed

packages/site-client/src/components/wco-top-bar.ts

Lines changed: 58 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,72 @@ export class WCOTopBar extends LitElement {
1515
top: 0;
1616
left: 0;
1717
width: 100vw;
18-
height: 50px;
19-
padding: 10px 20px;
18+
height: 70px;
19+
padding: 0 20px;
2020
display: flex;
2121
align-items: center;
2222
background: #eee;
2323
border-bottom: 1px solid #ccc;
24-
font-family: sans-serif;
24+
box-sizing: border-box;
25+
font-weight: 500;
26+
color: #222;
2527
}
28+
29+
#title {
30+
font-size: 1.5rem;
31+
letter-spacing: .05em;
32+
text-transform: lowercase;
33+
}
34+
35+
#logo {
36+
border-radius: 10%;
37+
display: inline-flex;
38+
align-items: center;
39+
justify-content: center;
40+
width: 48px;
41+
height: 48px;
42+
background: #444;
43+
color: white;
44+
font-size: 1.25rem;
45+
font-weight: normal;
46+
margin-right: 8px;
47+
text-transform: initial;
48+
}
49+
50+
nav {
51+
display: flex;
52+
justify-content: right;
53+
align-items: center;
54+
flex: 1;
55+
height: 100%;
56+
font-size: 1.25rem;
57+
}
58+
59+
nav > a {
60+
display: flex;
61+
align-items: center;
62+
height: 100%;
63+
padding: 0 16px;
64+
text-decoration: none;
65+
color: inherit;
66+
}
67+
68+
nav > a:hover {
69+
background: #00000008;
70+
}
71+
2672
`;
2773

2874
render() {
29-
return html`🚧 webcomponents.org `;
75+
return html`
76+
<span id="title"><span id="logo">WC</span> WebComponents.org</span>
77+
<nav>
78+
<a href="/catalog">Catalog</a>
79+
<a href="/docs">Docs</a>
80+
<a href="/articles">Articles</a>
81+
<a href="/community">Community</a>
82+
</nav>
83+
`;
3084
}
3185
}
3286

packages/site-content/site/index.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,10 @@
44
scripts:
55
- "./js/homepage.js"
66
---
7-
<wco-top-bar></wco-top-bar>
8-
<h2>🚧 Under construction! 🚧</h2>
7+
<section>
8+
<h2>🚧 Under construction! 🚧</h2>
9+
<p>
10+
This version of webcomponents.org is under active development and not
11+
ready for use.
12+
</p>
13+
</section>

packages/site-server/src/templates/base.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ export const renderPage = (data: {
3636
margin: 0;
3737
--mdc-typography-font-family: 'Open Sans', Arial, Helvetica, sans-serif;
3838
font-family: var(--mdc-typography-font-family);
39-
font-size: 14px;
40-
line-height: 1.5;
4139
min-height: 100vh;
4240
}
4341
@media (max-width: 500px), (max-height: 500px) {
@@ -50,6 +48,7 @@ export const renderPage = (data: {
5048
<title>${escapeHTML(data.title)}</title>
5149
</head>
5250
<body>
51+
<wco-top-bar></wco-top-bar>
5352
${data.content}
5453
</body>
5554
</html>

0 commit comments

Comments
 (0)