Skip to content

Commit

Permalink
13756 - Add banner text and What's new in the home page.
Browse files Browse the repository at this point in the history
  • Loading branch information
pwei1018 committed Sep 29, 2022
1 parent a35cd60 commit 8fa0de8
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ REGISTRY_ACCOUNT_CREATE_URL = "https://dev.bcregistry.ca/business/auth/choose-au
KEYCLOAK_CONFIG_PATH = "keycloak-dev.json"
AUTH_API_URL = "https://auth-api-dev.apps.silver.devops.gov.bc.ca/api/v1/"
STATUS_API_URL = "https://status-api-dev.apps.silver.devops.gov.bc.ca/api/v1/"
AUTH_LD_CLIENT_ID = ""
BCROS_LD_CLIENT_ID = ""
RPT_URL="https://staging.www.etax.gov.bc.ca/bts/Web.BCOnl/WebServices/BCO/login"
BUSINESS_SEARCH_URL = "https://dev.bcregistry.ca/business/search"
BUS_SEARCH_LEARN_MORE = "https://www2.gov.bc.ca/gov/content?id=B75BE1375F084B138B60D62C0094D9E8"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ typings/

# Optional REPL history
.node_repl_history
.history

# Output of 'npm pack'
*.tgz
Expand Down
10 changes: 7 additions & 3 deletions assets/scss/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ ol {
padding:0;
counter-reset:item;
}

ol > li {
margin: 1rem 0;
padding:0 0 0 5rem;
list-style-type: none;
counter-increment: item;
}

ol > li:before {
display: inline-block;
margin-left: -5rem;
Expand Down Expand Up @@ -203,7 +203,7 @@ a.link {

// .nuxt-inline-helper {
// display: inline-block;

// &:before {
// display: inline-block;
// width: 0.25rem;
Expand Down Expand Up @@ -433,3 +433,7 @@ a.link {
.v-navigation-drawer--close {
visibility: inherit;
}

.colour-dk-text {
color: $dk-text !important;
}
5 changes: 5 additions & 0 deletions assets/scss/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,8 @@ $px-20: 1.2500rem;
$px-24: 1.5000rem;
$px-32: 2.0000rem;
$px-40: 2.5000rem;

// Font colors
$dk-text: $gray9;
$text: $gray7;
$BCgovFontColorInverted: #ffffff;
2 changes: 1 addition & 1 deletion cloudbuild-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ steps:
- 'STATUS_API_URL=$_STATUS_API_URL'
- 'ADDRESSCHANGE_URL=$_ADDRESSCHANGE_URL'
- 'BUSINESS_URL=$_BUSINESS_URL'
- 'AUTH_LD_CLIENT_ID=$_AUTH_LD_CLIENT_ID'
- 'BCROS_LD_CLIENT_ID=$_BCROS_LD_CLIENT_ID'
- 'RPT_URL=$_RPT_URL'
- 'BUSINESS_SEARCH_URL=$_BUSINESS_SEARCH_URL'
- 'BUS_SEARCH_LEARN_MORE=$_BUS_SEARCH_LEARN_MORE'
Expand Down
2 changes: 1 addition & 1 deletion cloudbuild-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ steps:
- 'STATUS_API_URL=$_STATUS_API_URL'
- 'ADDRESSCHANGE_URL=$_ADDRESSCHANGE_URL'
- 'BUSINESS_URL=$_BUSINESS_URL'
- 'AUTH_LD_CLIENT_ID=$_AUTH_LD_CLIENT_ID'
- 'BCROS_LD_CLIENT_ID=$BCROS_LD_CLIENT_ID'
- 'RPT_URL=$_RPT_URL'
- 'BUSINESS_SEARCH_URL=$_BUSINESS_SEARCH_URL'
- 'BUS_SEARCH_LEARN_MORE=$_BUS_SEARCH_LEARN_MORE'
Expand Down
22 changes: 20 additions & 2 deletions layouts/default.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
<template>
<v-app id="app">
<SbcHeader class="sbc-header" />
<SbcHeader class="sbc-header" :in-auth="false" />

<!-- Alert banner -->
<v-alert
v-if="bannerText"
tile dense
icon=" "
type="warning"
class="mb-0 text-center colour-dk-text"
v-html="bannerText"
/>

<Breadcrumb v-if="isShowBreadcrumb" />
<nuxt class="app-body" />
<SbcFooter />
Expand All @@ -11,6 +22,7 @@
import SbcFooter from 'sbc-common-components/src/components/SbcFooter.vue'
import SbcHeader from 'sbc-common-components/src/components/SbcHeader.vue'
import Breadcrumb from '~/components/Breadcrumb.vue'
import { getFeatureFlag } from '~/utils'
import { isLoginRoute } from '@/utils'
export default {
Expand All @@ -24,6 +36,12 @@ export default {
computed: {
isShowBreadcrumb (): boolean {
return !isLoginRoute()
},
bannerText (): string | null {
const bannerText: string = getFeatureFlag('banner-text')
// remove spaces so that " " becomes falsy
return bannerText?.trim()
}
},
}
Expand All @@ -39,6 +57,6 @@ export default {
// to -12px all around, which breaks the SbcHeader layout,
// so override top and bottom specifically here
margin-top: 0;
margin-bottom: 0;
margin-bottom: 0;
}
</style>
2 changes: 1 addition & 1 deletion nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export default {
regAccountCreateURL: process.env.REGISTRY_ACCOUNT_CREATE_URL,
authAPIURL: process.env.AUTH_API_URL,
statusAPIURL: process.env.STATUS_API_URL,
ldClientId: process.env.AUTH_LD_CLIENT_ID,
ldClientId: process.env.BCROS_LD_CLIENT_ID,
// as composite variables:
keycloakConfigPath: process.env.BCROS_BASE_URL + process.env.KEYCLOAK_CONFIG_PATH
+ `?${new Date().getTime()}`,
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bc-registry",
"version": "1.0.21",
"version": "1.0.22",
"private": true,
"scripts": {
"dev": "nuxt",
Expand Down

0 comments on commit 8fa0de8

Please sign in to comment.