Skip to content

Commit

Permalink
Merge pull request #173 from wearefuturegov/develop
Browse files Browse the repository at this point in the history
staging deployment
  • Loading branch information
apricot13 authored Nov 19, 2024
2 parents 82e1ce3 + be5fe1c commit 4893ce7
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/DetailDialog/ScheduleTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const ScheduleTable = ({ title, subtitle, regular_schedules }) => {
const EventTimes = () => (
<List>
{event_times.map((sched, i) => (
<ListItem>{sched.description}</ListItem>
<ListItem key={i}>{sched.description}</ListItem>
))}
</List>
)
Expand Down
6 changes: 6 additions & 0 deletions src/components/DetailDialog/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,12 @@ const DetailDialog = ({ serviceId, location, navigate }) => {
/>
</Body>
)}

{theme.DetailDialogExtra && (
<Body>
<theme.DetailDialogExtra service={service} />
</Body>
)}
<Body>
{service.hasOwnProperty("service_at_locations") &&
service.service_at_locations.length === 1 &&
Expand Down
34 changes: 34 additions & 0 deletions src/components/FamilyHubsNetwork/FamilyHubsNetworkLogo.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import React from "react"
import styled from "styled-components"
import text from "./family-hubs-text.png"
import { Crosshead } from "../DetailDialog/DetailDialog.styles"

const FamilyHubsNetwork = styled(Crosshead)`
&:before {
content: "";
display: inline-block;
margin-right: 8px;
width: 307px;
height: 50px;
background-image: url(${text});
background-size: cover;
background-position: center;
}
> span {
clip: rect(0 0 0 0);
clip-path: inset(50%);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;
}
`

export const FamilyHubsNetworkLogo = () => {
return (
<FamilyHubsNetwork>
<span>Part of Family Hub Network</span>
</FamilyHubsNetwork>
)
}
1 change: 1 addition & 0 deletions src/components/FamilyHubsNetwork/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from "./FamilyHubsNetworkTag"
export * from "./FamilyHubsNetworkLogo"
1 change: 0 additions & 1 deletion src/components/Filter/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ const Filter = ({
}
} else {
if (isMeta) {
console.log(meta, value)
setMeta(selection.filter(el => el !== value))
} else {
setSelection(selection.filter(el => el !== value))
Expand Down
23 changes: 22 additions & 1 deletion src/themes/bfis/vars_bfis.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ 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"
import {
FamilyHubsNetworkTag,
FamilyHubsNetworkLogo,
} from "../../components/FamilyHubsNetwork"

export const vars_bfis = {
slug: "bfis",
Expand Down Expand Up @@ -198,6 +201,24 @@ export const vars_bfis = {
.length > 0
return <>{isFamilyHub && <FamilyHubsNetworkTag />}</>
},
DetailDialogExtra: ({ service }) => {
if (service.meta?.some(m => m.key === "family-hub")) {
return (
<>
<FamilyHubsNetworkLogo />
<p>
The Family Hub network helps families with babies, children, and
young people from birth until they turn 19 (or up to 25 for those
with special educational needs and disabilities). As part of the
Family Hub Network in Buckinghamshire, we are committed to making it
easier for families to get the help and support they need.
</p>
</>
)
} else {
return <></>
}
},
}

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 @@ -91,6 +91,7 @@ const generate_theme = (vars, theme_vars) => {
headerComponentsBeforeSearch:
vars.headerComponentsBeforeSearch ?? vars.headerComponentsBeforeSearch,
ServiceCardFooter: vars.ServiceCardFooter ?? vars.ServiceCardFooter,
DetailDialogExtra: vars.DetailDialogExtra ?? vars.DetailDialogExtra,
cookiesDisabledMessage: vars.cookiesDisabledMessage,
cookieMessage: vars.cookieMessage,
cookieName: vars.cookieName,
Expand Down

0 comments on commit 4893ce7

Please sign in to comment.