Skip to content

Commit

Permalink
family hubs
Browse files Browse the repository at this point in the history
  • Loading branch information
apricot13 committed Nov 12, 2024
1 parent bd2254f commit 9a73796
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ const App = ({ children, location, navigate }) => {
clearCategory={setCollection}
clearSubCategory={setCategories}
clearPerPage={setPerPage}
clearMeta={setMeta}
/>
</Filters>
</>
Expand Down
3 changes: 3 additions & 0 deletions src/components/ClearFilters/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const ClearFilters = ({
clearCategory,
clearSubCategory,
clearPerPage,
clearMeta,
}) => {
const actionClearFilters = e => {
e && e.preventDefault()
Expand All @@ -53,6 +54,8 @@ const ClearFilters = ({

clearPerPage(false)

clearMeta([])

Object.keys(filters).forEach(function (key) {
filters[key].clear.map((clr, i) => clr(filters[key].clearValue[i]))
})
Expand Down
29 changes: 29 additions & 0 deletions src/components/FamilyHubsNetwork/FamilyHubsNetworkTag.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import React from "react"
import styled from "styled-components"
import logo from "./family-hubs-icon.png"

// import { theme } from "./../../themes/theme_generator"

const FamilyHubsNetwork = styled.strong`
margin-right: 15px;
margin-bottom: 2px;
background: ${props => props.theme.styles.pale};
color: #368a8e;
border-radius: 2px;
padding: 0px 6px;
display: flex;
&:before {
content: "";
display: inline-block;
margin-right: 8px;
width: 25px;
height: 24px;
background-image: url(${logo});
background-size: cover;
background-position: center;
}
`

export const FamilyHubsNetworkTag = () => {
return <FamilyHubsNetwork>Part of Family Hubs Network</FamilyHubsNetwork>
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/components/FamilyHubsNetwork/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./FamilyHubsNetworkTag"
1 change: 1 addition & 0 deletions src/components/ServiceCardFooter/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ const ServiceCardFooter = props => {
return (
<Footer>
{local_offer && <LocalOfferTag>Part of SEND local offer</LocalOfferTag>}
{theme.ServiceCardFooter && theme.ServiceCardFooter(props)}
{theme.noLocationIsCountywide && countywide && (
<CountyWideServiceTag>
{theme.serviceCard.countyWideServiceText}
Expand Down
8 changes: 8 additions & 0 deletions src/themes/bfis/vars_bfis.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import logo from "./logo.svg"
import * as Styles from "../../components/Footer/Footer.styles"
import ResponsiveSentence from "../../components/ResponsiveSentence"
import { AStrong } from "../../components/A"
import { FamilyHubsNetworkTag } from "../../components/FamilyHubsNetwork"

export const vars_bfis = {
slug: "bfis",
Expand Down Expand Up @@ -191,6 +192,13 @@ export const vars_bfis = {
}
/>
),
ServiceCardFooter: args => {
return (
<>
<FamilyHubsNetworkTag />
</>
)
},
}

export default vars_bfis
1 change: 1 addition & 0 deletions src/themes/theme_generator.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ const generate_theme = (vars, theme_vars) => {
headerComponents: vars.headerComponents ?? vars.headerComponents,
headerComponentsBeforeSearch:
vars.headerComponentsBeforeSearch ?? vars.headerComponentsBeforeSearch,
ServiceCardFooter: vars.ServiceCardFooter ?? vars.ServiceCardFooter,
cookiesDisabledMessage: vars.cookiesDisabledMessage,
cookieMessage: vars.cookieMessage,
cookieName: vars.cookieName,
Expand Down

0 comments on commit 9a73796

Please sign in to comment.