From f126eb41a9b6618107623762c1f735d871e8cf6b Mon Sep 17 00:00:00 2001 From: Shea Phillips Date: Tue, 3 Oct 2023 14:04:02 -0700 Subject: [PATCH 1/3] DEVX-75 adding banner to point to MVP site. --- web/src/components/UI/Link/ButtonLink.js | 48 ++++++++++++++++++++++++ web/src/components/UI/Link/index.js | 3 +- web/src/hoc/Layout.js | 36 +++++++++++++++++- 3 files changed, 84 insertions(+), 3 deletions(-) create mode 100644 web/src/components/UI/Link/ButtonLink.js diff --git a/web/src/components/UI/Link/ButtonLink.js b/web/src/components/UI/Link/ButtonLink.js new file mode 100644 index 000000000..a6624cad5 --- /dev/null +++ b/web/src/components/UI/Link/ButtonLink.js @@ -0,0 +1,48 @@ +/* +Copyright 2019 Province of British Columbia + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +Created by Patrick Simonian +*/ + +import React from 'react'; +import PropTypes from 'prop-types'; +import Link from './Link'; +import styled from '@emotion/styled'; + +const ButtonLink = ({ to, children, ...rest }) => ( + + {children} + +); + +const StyledLink = styled(ButtonLink)` + background-color: ${({ theme }) => theme.colors.blue}; + font-weight: 400; + text-align: center; + color: white; + border-radius: 5px; + display: block; + margin: 0 auto; + padding: 0.5em; + width: 150px; + text-decoration: none; +`; + +ButtonLink.propTypes = { + to: PropTypes.string.isRequired, + children: PropTypes.string.isRequired, +}; + +export default StyledLink; diff --git a/web/src/components/UI/Link/index.js b/web/src/components/UI/Link/index.js index c51ebc09d..40b660ab9 100644 --- a/web/src/components/UI/Link/index.js +++ b/web/src/components/UI/Link/index.js @@ -1,4 +1,5 @@ import Link from './Link'; import SearchAwareLink from './SearchAwareLink'; import ChevronLink from './ChevronLink'; -export { Link, SearchAwareLink, ChevronLink }; +import ButtonLink from './ButtonLink'; +export { Link, SearchAwareLink, ChevronLink, ButtonLink }; diff --git a/web/src/hoc/Layout.js b/web/src/hoc/Layout.js index 9f8efbef5..01181e299 100644 --- a/web/src/hoc/Layout.js +++ b/web/src/hoc/Layout.js @@ -2,7 +2,7 @@ import React, { useState } from 'react'; import { graphql } from 'gatsby'; import PropTypes from 'prop-types'; import styled from '@emotion/styled'; -import { Container } from 'reactstrap'; +import { Alert, Container } from 'reactstrap'; import Helmet from 'react-helmet'; // layout local components @@ -11,6 +11,7 @@ import PrimaryFooter from '../components/PrimaryFooter/PrimaryFooter'; import { Navbar } from '../components/Navbar/Navbar'; import { MAIN_NAV_ROUTE_LIST } from '../constants/routes'; +import { ButtonLink } from '../components/UI/Link'; const StyledContainer = styled(Container)` min-height: 100vh; @@ -27,6 +28,17 @@ const Wrapper = styled.div` } `; +const RetirementNotice = styled(Alert)` + width: 70%; + margin-left: auto; + margin-right: auto; + margin-top: 25px; + margin-bottom: 15px; + padding: 20px; +`; + +const utmLink = + 'https://mvp.developer.gov.bc.ca/?utm_source=devhub-classic&utm_medium=web&utm_campaign=retirement-notice-oct-2023'; export const Layout = ({ children }) => { const [menuToggled, setMenuToggled] = useState(false); return ( @@ -39,7 +51,27 @@ export const Layout = ({ children }) => { - {children} + + +

We're working on a new and improved DevHub!

+

+ Please try our MVP at{' '} + + https://mvp.developer.gov.bc.ca + + , and{' '} + + let us know + {' '} + what's missing to make it useful for you. +

+ {/*
*/} +

+ Test it out! +

+
+ {children} +
); From f4b823e7b9dcb17a3d17272f8433f7760bcba4dd Mon Sep 17 00:00:00 2001 From: Shea Phillips Date: Thu, 5 Oct 2023 16:22:30 -0700 Subject: [PATCH 2/3] DEVX-75 visual tweak to button placement --- .gitignore | 3 ++- web/src/hoc/Layout.js | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index aac0a8e81..6198b7f5a 100644 --- a/.gitignore +++ b/.gitignore @@ -118,4 +118,5 @@ web/registry/registry.json # VSCode configs .vscode/ -web/cypress/videos \ No newline at end of file +web/cypress/videos +/web/how_to_private.txt diff --git a/web/src/hoc/Layout.js b/web/src/hoc/Layout.js index 01181e299..28db40f33 100644 --- a/web/src/hoc/Layout.js +++ b/web/src/hoc/Layout.js @@ -65,10 +65,9 @@ export const Layout = ({ children }) => { {' '} what's missing to make it useful for you.

- {/*
*/} -

+

Test it out! -

+
{children} From 8b04246b2e734a6baf1b0b68b92515f8ad767a24 Mon Sep 17 00:00:00 2001 From: Shea Phillips Date: Fri, 6 Oct 2023 10:19:05 -0700 Subject: [PATCH 3/3] DEVX-75 removed reference to inaccurate "creator" --- web/src/components/UI/Link/ButtonLink.js | 1 - 1 file changed, 1 deletion(-) diff --git a/web/src/components/UI/Link/ButtonLink.js b/web/src/components/UI/Link/ButtonLink.js index a6624cad5..7b9e192ee 100644 --- a/web/src/components/UI/Link/ButtonLink.js +++ b/web/src/components/UI/Link/ButtonLink.js @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -Created by Patrick Simonian */ import React from 'react';