Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: create section-header component for marketing site #3070

Merged
merged 8 commits into from
May 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sites/fast-website/src/app/components/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { GradientPicker } from "./gradient-picker";
export { FASTSectionHeader } from "./section-header";
14 changes: 14 additions & 0 deletions sites/fast-website/src/app/components/section-header/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { customElement } from "@microsoft/fast-element";
import { SectionHeader } from "./section-header";
import { SectionHeaderTemplate as template } from "./section-header.template";
import { SectionHeaderStyles as styles } from "./section-header.styles";

@customElement({
name: "fast-section-header",
template,
styles,
})
export class FASTSectionHeader extends SectionHeader {}
export * from "./section-header.template";
export * from "./section-header.styles";
export * from "./section-header";
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { css } from "@microsoft/fast-element";
import { display } from "@microsoft/fast-components";

export const SectionHeaderStyles = css`
${display("flex")} :host {
flex-direction: column;
font-family: var(--body-font);
color: var(--neutral-foreground-rest);
box-sizing: border-box;
text-align: center;
}
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { html } from "@microsoft/fast-element";
import { SectionHeader } from "./section-header";

export const SectionHeaderTemplate = html<SectionHeader>`
<template>
khamudom marked this conversation as resolved.
Show resolved Hide resolved
<slot name="badge"></slot>
<slot></slot>
<slot name="body"></slot>
<slot name="action"></slot>
</template>
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { FASTElement } from "@microsoft/fast-element";

export class SectionHeader extends FASTElement {}
31 changes: 26 additions & 5 deletions sites/fast-website/src/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,24 @@
<!-- hero-section:start -->
<section class="section">
<div class="section-content">
Hero section header
<fast-section-header>
<fast-badge slot="badge" class="section-badge">ADAPTIVE UI SYSTEM, UTILITIES, & TOOLS</fast-badge>
<p class="section-heading-hero">The adaptive interface system for modern web experiences</p>
<p slot="body">Interfaces bult with FAST adapt to your design system and can be used with any modern UI Framework by leveraging industry standard Web Components.</p>
<fast-button slot="action" appearance="outline">Get start</fast-button>
</fast-section-header>
</div>
</section>
<!-- hero-section:end -->

<section class="section">
<div class="section-content">
Page section header
<fast-section-header>
<fast-badge slot="badge" class="section-badge">FLEXIBLE AND ADAPTABLE</fast-badge>
<p class="section-heading">One component, many faces</p>
<p slot="body">Using an unopinionated architecture and Adaptive Styling, one suite of components can blend into any environment.</p>
<fast-button slot="action" appearance="outline">Explore components</fast-button>
</fast-section-header>
</div>
</section>

Expand All @@ -48,7 +58,11 @@

<section class="section">
<div class="section-content">
Page section header
<fast-section-header>
<fast-badge slot="badge" class="section-badge">FULLY INTEGRATED</fast-badge>
<p class="section-heading">Works with existing frameworks</p>
<fast-button slot="action" appearance="outline">Learn more</fast-button>
</fast-section-header>
</div>
</section>

Expand All @@ -62,7 +76,11 @@

<section class="section">
<div class="section-content">
Page section header
<fast-section-header>
<fast-badge slot="badge" class="section-badge">A COMPREHENSIVE TOOLKIT</fast-badge>
<p class="section-heading">Feature and Utilities</p>
<fast-button slot="action" appearance="outline">Read documentation</fast-button>
</fast-section-header>
</div>
</section>

Expand All @@ -76,7 +94,10 @@

<section class="section">
<div class="section-content">
Page section header
<fast-section-header>
<fast-badge slot="badge" class="section-badge">LEARN, MODIFY AND FOLLOW</fast-badge>
<p class="section-heading">Join the community</p>
</fast-section-header>
</div>
</section>

Expand Down
21 changes: 18 additions & 3 deletions sites/fast-website/src/public/style.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
body {
margin: 0;
padding: 0;
background: #242424;
color: #ddd;
}

.wrapper {
Expand All @@ -26,7 +24,8 @@ body {
display: flex;
align-items: center;
justify-content: center;
height: 300px;
min-height: 300px;
margin: 20px 0;
}

.section-component {
Expand All @@ -50,4 +49,20 @@ body {

.footer-copyright-group {
display: flex;
}

.section-badge {
font-weight: bold;
}

.section-heading-hero {
font-size: 60px;
line-height: 72px;
margin: 0;
}

.section-heading {
font-size: 46px;
line-height: 56px;
margin: 0;
}