From 09aa0d4646b697e92a3e04f6bce95213d8f349d9 Mon Sep 17 00:00:00 2001 From: khamudom Date: Mon, 11 May 2020 13:23:01 -0700 Subject: [PATCH] add slotted for nav items --- .../app/components/site-navigation/index.ts | 2 +- .../site-navigation.template.ts | 10 +--- .../site-navigation/site-navigation.ts | 16 +++++-- sites/fast-website/src/public/index.html | 48 +++++++++---------- sites/fast-website/src/public/style.css | 38 ++++++++------- 5 files changed, 59 insertions(+), 55 deletions(-) diff --git a/sites/fast-website/src/app/components/site-navigation/index.ts b/sites/fast-website/src/app/components/site-navigation/index.ts index a9390904202..6228fcb8211 100644 --- a/sites/fast-website/src/app/components/site-navigation/index.ts +++ b/sites/fast-website/src/app/components/site-navigation/index.ts @@ -8,7 +8,7 @@ import { SiteNavigationStyles as styles } from "./site-navigation.styles"; template, styles, }) -export class FASTSectionHeader extends SiteNavigation {} +export class FASTSiteNavigation extends SiteNavigation {} export * from "./site-navigation.template"; export * from "./site-navigation.styles"; export * from "./site-navigation"; diff --git a/sites/fast-website/src/app/components/site-navigation/site-navigation.template.ts b/sites/fast-website/src/app/components/site-navigation/site-navigation.template.ts index 6756932f4a5..2cf3a8aafe4 100644 --- a/sites/fast-website/src/app/components/site-navigation/site-navigation.template.ts +++ b/sites/fast-website/src/app/components/site-navigation/site-navigation.template.ts @@ -1,16 +1,10 @@ -import { html, repeat } from "@microsoft/fast-element"; +import { html, slotted } from "@microsoft/fast-element"; import { SiteNavigation } from "./site-navigation"; export const SiteNavigationTemplate = html` `; diff --git a/sites/fast-website/src/app/components/site-navigation/site-navigation.ts b/sites/fast-website/src/app/components/site-navigation/site-navigation.ts index c63063fe0a6..5bd88a34cd8 100644 --- a/sites/fast-website/src/app/components/site-navigation/site-navigation.ts +++ b/sites/fast-website/src/app/components/site-navigation/site-navigation.ts @@ -1,9 +1,15 @@ -import { FASTElement, attr, observable } from "@microsoft/fast-element"; +import { FASTElement, observable } from "@microsoft/fast-element"; export class SiteNavigation extends FASTElement { - @attr - public item: string; - @observable - public items: string[] = []; + items: HTMLElement[]; + + public connectedCallback(): void { + super.connectedCallback(); + this.items.forEach((item: any) => { + if (item instanceof HTMLElement) { + item.setAttribute("role", "listitem"); + } + }); + } } diff --git a/sites/fast-website/src/public/index.html b/sites/fast-website/src/public/index.html index bd723e1e46b..3f5cb30058d 100644 --- a/sites/fast-website/src/public/index.html +++ b/sites/fast-website/src/public/index.html @@ -11,15 +11,19 @@
- Logo - - Github + FAST + + Components + Integration + Documentation + Community + + + Github + + + +
@@ -107,22 +111,16 @@ -
- - Logo - -
+ +
diff --git a/sites/fast-website/src/public/style.css b/sites/fast-website/src/public/style.css index 272878184fa..a89e36aa260 100644 --- a/sites/fast-website/src/public/style.css +++ b/sites/fast-website/src/public/style.css @@ -16,6 +16,10 @@ body { height: 80px; } +.header-navigation-item { + margin: 0 30px; +} + .section { grid-column: 2; } @@ -36,21 +40,6 @@ body { background-color: #3A3A3A; } -.footer { - grid-column: 2; - height: 240px; - margin-top: 100px -} - -.footer-links { - display: flex; - justify-content: space-between; -} - -.footer-copyright-group { - display: flex; -} - .section-badge { font-weight: bold; } @@ -65,4 +54,21 @@ body { font-size: 46px; line-height: 56px; margin: 0; -} \ No newline at end of file +} + +.divider { + grid-column: 2; + margin-top: 100px; + margin-bottom: 60px; +} + +.footer { + grid-column: 2; + display: flex; + justify-content: space-between; + margin-bottom: 84px; +} + +.footer-navigation-item { + margin-right: 50px; +}