From e2c224cab588e837a237edf8e2beaa8ffcdb278f Mon Sep 17 00:00:00 2001 From: Matt Netkow Date: Fri, 8 May 2020 13:10:39 -0500 Subject: [PATCH] [Site] Add Announcement bar to all website pages (#2889) * Move announcement to site header * final touches --- .../components/landing-page/landing-page.scss | 85 +------------------ .../components/landing-page/landing-page.tsx | 12 --- .../components/site-header/site-header.scss | 82 ++++++++++++++++++ .../components/site-header/site-header.tsx | 13 +++ 4 files changed, 99 insertions(+), 93 deletions(-) diff --git a/site/src/components/landing-page/landing-page.scss b/site/src/components/landing-page/landing-page.scss index 8f87c65a5..df9ea7662 100644 --- a/site/src/components/landing-page/landing-page.scss +++ b/site/src/components/landing-page/landing-page.scss @@ -8,6 +8,10 @@ background-color: #0B1A24; } +.landing-page .announcement a { + color: #fff; +} + landing-page { display: block; color: #fff; @@ -23,87 +27,6 @@ landing-page { color: #BCC0BE; } - .announcement { - position: relative; - top: 60px; - - a { - text-decoration: none; - color: #fff; - transition: background 0.3s; - display: inline-flex; - align-items: center; - background: rgba(255,255,255,0.10); - border-radius: 100px; - padding: 5px; - border: 0; - } - - a:hover { - background: rgba(255,255,255,0.15); - } - - .pill, - .cta { - font-size: 10px; - text-transform: uppercase; - - } - .pill { - background-color: $color-yellow; - color: $color-yellow-contrast; - font-weight: 800; - padding: 2px 6px; - border-radius: 100px; - flex: 0 0 70px; - text-align: center; - } - .message { - font-weight: 500; - opacity: 0.8; - font-size: 13px; - margin: 0 14px; - flex: 0 0 auto; - } - .cta { - color: $color-yellow; - font-weight: 600; - padding-right: 4px; - flex: 0 0 94px; - } - .icon { - fill: $color-yellow; - height: 9px; - width: 8px; - transform: translateY(1.5px); - margin-left: 2px; - } - - @media screen and (max-width: $breakpoint-lg) { - top: 20px; - } - - @media screen and (max-width: $breakpoint-md) { - max-width: 100%; - padding: 0; - top: 0; - - a { - display: flex; - width: 100%; - border-radius: 0; - padding: 12px 24px; - } - .message { - flex: 1; - } - .cta { - flex: 0 0 94px; - padding-right: 0; - } - } - } - .hero { display: flex; justify-content: space-between; diff --git a/site/src/components/landing-page/landing-page.tsx b/site/src/components/landing-page/landing-page.tsx index 0a9fbfc52..df2cd1c83 100644 --- a/site/src/components/landing-page/landing-page.tsx +++ b/site/src/components/landing-page/landing-page.tsx @@ -22,18 +22,6 @@ export class LandingPage { render() { return [ -
- - Live demo - - Capacitor 2.0 features and capabilities - - - Register Now - - - -
,
diff --git a/site/src/components/site-header/site-header.scss b/site/src/components/site-header/site-header.scss index 7bbec596e..a9a2bb7f7 100644 --- a/site/src/components/site-header/site-header.scss +++ b/site/src/components/site-header/site-header.scss @@ -57,6 +57,88 @@ site-header { align-items: center; } } + + .announcement { + position: relative; + + a { + text-decoration: none; + color: var(--color-woodsmoke); + transition: background 0.3s; + display: inline-flex; + align-items: center; + background: rgba(255,255,255,0.10); + border-radius: 100px; + padding: 5px; + border: 0; + } + + a:hover { + background: rgba(255,255,255,0.15); + } + + .pill, + .cta { + font-size: 10px; + text-transform: uppercase; + + } + .pill { + background-color: $color-yellow; + color: $color-yellow-contrast; + font-weight: 800; + padding: 2px 6px; + border-radius: 100px; + flex: 0 0 70px; + text-align: center; + } + .message { + font-weight: 500; + opacity: 0.8; + font-size: 13px; + margin: 0 14px; + flex: 0 0 auto; + } + .black { + color: black; + } + .cta { + color: $color-yellow; + font-weight: 600; + padding-right: 4px; + flex: 0 0 94px; + } + .icon { + fill: $color-yellow; + height: 9px; + width: 8px; + transform: translateY(1.5px); + margin-left: 2px; + } + + @media screen and (max-width: $breakpoint-lg) and (min-width: $breakpoint-md) { + display: none; + } + + @media screen and (max-width: $breakpoint-md) { + max-width: 100%; + padding-top: 5px; + + a { + display: flex; + width: 100%; + border-radius: 0; + padding: 5px 24px; + } + .message { + flex: 1; + } + .cta { + flex: 0 0 94px; + padding-right: 0; + } + } + } } .landing-page site-header .version{ diff --git a/site/src/components/site-header/site-header.tsx b/site/src/components/site-header/site-header.tsx index 81879b0d5..164238296 100644 --- a/site/src/components/site-header/site-header.tsx +++ b/site/src/components/site-header/site-header.tsx @@ -83,6 +83,19 @@ export class SiteHeader { + +
{ this.hideNav() }}> Docs