Skip to content

Commit

Permalink
Merge pull request #66 from savoirfairelinux/Dev-Move_CIUSSS_logo_to_top
Browse files Browse the repository at this point in the history
Dev move ciusss logo to top
  • Loading branch information
lgharib authored Feb 8, 2023
2 parents 4af10d7 + 35a6507 commit f5fdee3
Show file tree
Hide file tree
Showing 40 changed files with 8,082 additions and 5,866 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build-deploy-subdomain_aom.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: 🚀 Build and deploy subdomain
on:
push:
branches:
- subdomain_aom
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v3
with:
node-version: 14
cache: 'npm'
- name: Install dependencies
run: npm i
- name: Install Browser List
run: npx browserslist@latest --update-db
- name: Build gatsby for translation
run: npm run build
- name: Extract translations
run: npm run extract
- name: Compile translations
run: npm run compile
- name: Build gatsby
run: npm run build
- name: 📂 Deploy to aom.prismref.ca
uses: SamKirkland/[email protected]
with:
server: ftp.prismref.ca
username: ${{ secrets.ftp_username }}
password: ${{ secrets.ftp_password }}
local-dir: public/
server-dir: /aom.prismref.ca/
9 changes: 9 additions & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,14 @@ module.exports = {
},
},
"semantic-ui-react",
{
resolve: 'gatsby-plugin-matomo',
options: {
siteId: '3',
matomoUrl: 'https://matomo.prismref.ca/',
siteUrl: 'https://aom.prismref.ca',
requireConsent: true
}
}
],
}
12,287 changes: 6,928 additions & 5,359 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@
"babel-preset-gatsby": "^0.5.10",
"bulma": "^0.9.0",
"create-react-class": "^15.7.0",
"gatsby": "^2.24.91",
"gatsby": "^2.32.2",
"gatsby-plugin-google-fonts": "^1.0.1",
"gatsby-plugin-matomo": "^0.8.3",
"gatsby-plugin-sass": "^2.3.13",
"gatsby-plugin-typography": "^2.5.11",
"node-sass": "^4.14.1",
"react": "^16.12.0",
"react-cookie-consent": "^6.2.1",
"react-device-detect": "^1.13.1",
"react-dom": "^16.12.0",
"react-helmet": "^6.1.0",
Expand Down
Binary file removed public.zip
Binary file not shown.
56 changes: 56 additions & 0 deletions src/components/consentPopup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import React from "react"
import { Link } from "gatsby"

import CookieConsent from "react-cookie-consent";

/* Translation using lingui */
import { I18nProvider } from "@lingui/react"
import catalogEn from "../locales/en/messages"
import catalogFr from "../locales/fr/messages"
import { Trans } from "@lingui/macro"

const ConsentPopup = () => {
const [language, setLanguage] = React.useState("en")

React.useEffect(() => {
if (localStorage.getItem("language") !== "") {
setLanguage(localStorage.getItem("language"))
}
}, [])


return (
<I18nProvider
language={language}
catalogs={{
en: catalogEn,
fr: catalogFr,
}}
>
<CookieConsent
location="bottom"
buttonText={<Trans id="msg.tracking_consent_message_accept">Accept</Trans>}
declineButtonText={<Trans id="msg.tracking_consent_message_decline">Decline</Trans>}
cookieName="consentGuiven"
style={{ background: "#e0e2e5", color: "#323232", fontWeight: "500" }}
buttonStyle={{ background: "#ffffff", color: "#323232", fontSize: "13px", width: "6rem" }}
declineButtonStyle={{background: "#323232", color: "#ffffff", fontSize: "13px", width: "6rem" }}
expires={150}
onAccept={() => {
window._paq.push(['setConsentGiven']);
}}
enableDeclineButton
>
<Trans id="msg.tracking_consent_text">We use cookies to collect information about the use of this Website to help us evaluate and improve this new Referral Service. To learn more, read our </Trans>{" "}
<Link
to="/privacy-policy"
onClick={() => {
localStorage.setItem("language", language)
}}
><Trans id="msg.tracking_consent_text_privacy_policy">privacy policy</Trans></Link>.
</CookieConsent>
</I18nProvider>
)
}

export default ConsentPopup
19 changes: 10 additions & 9 deletions src/components/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,28 @@ const Footer = () => {
}, [])

const getFooterText = () => {
if(url === "/")
if(url !== "/" && language === "fr"){
return(
<p>PRISM-ACCESS Open Minds is a health services innovation project to improve access to mental health care for youth. It is managed by the Youth Mental Health and Technology (YMHTech) Lab at the University of Montreal Hospital Centre,
and led by the Canada Research Chair in Innovation and Technology for Youth Mental Health Services |
<br/>PRISM-ACCESS Esprits ouverts est un projet d’innovation dans les services de santé visant à améliorer l’accès des jeunes aux soins de santé mentale. Il est géré par le laboratoire Santé mentale des jeunes et technologies (SMJ-techno)
<p>PRISM-ACCESS Esprits ouverts est un projet d’innovation dans les services de santé visant à améliorer l’accès des jeunes aux soins de santé mentale. Il est géré par le laboratoire Santé mentale des jeunes et technologies (SMJ-techno)
du Centre hospitalier de l'Université de Montréal est dirigé par la Chaire de recherche du Canada sur l’innovation et les technologies pour les services de soins de santé mentale pour les jeunes
<br/>
<a href="https://www.ymhtech.com" target="_blank">www.ymhtech.com</a> / <a href="https://www.smjtechno.com" target="_blank">www.smjtechno.com</a></p>
)
else if(url !== "/" && language === "fr"){
}
else if(url !== "/" && language === "en" ) {
return(
<p>PRISM-ACCESS Esprits ouverts est un projet d’innovation dans les services de santé visant à améliorer l’accès des jeunes aux soins de santé mentale. Il est géré par le laboratoire Santé mentale des jeunes et technologies (SMJ-techno)
du Centre hospitalier de l'Université de Montréal est dirigé par la Chaire de recherche du Canada sur l’innovation et les technologies pour les services de soins de santé mentale pour les jeunes
<p>PRISM-ACCESS Open Minds is a health services innovation project to improve access to mental health care for youth. It is managed by the Youth Mental Health and Technology (YMHTech) Lab at the University of Montreal Hospital Centre,
and led by the Canada Research Chair in Innovation and Technology for Youth Mental Health Services
<br/>
<a href="https://www.ymhtech.com" target="_blank">www.ymhtech.com</a> / <a href="https://www.smjtechno.com" target="_blank">www.smjtechno.com</a></p>
)
}
else if(url !== "/" && language === "en" ) {
else {
return(
<p>PRISM-ACCESS Open Minds is a health services innovation project to improve access to mental health care for youth. It is managed by the Youth Mental Health and Technology (YMHTech) Lab at the University of Montreal Hospital Centre,
and led by the Canada Research Chair in Innovation and Technology for Youth Mental Health Services
and led by the Canada Research Chair in Innovation and Technology for Youth Mental Health Services |
<br/>PRISM-ACCESS Esprits ouverts est un projet d’innovation dans les services de santé visant à améliorer l’accès des jeunes aux soins de santé mentale. Il est géré par le laboratoire Santé mentale des jeunes et technologies (SMJ-techno)
du Centre hospitalier de l'Université de Montréal est dirigé par la Chaire de recherche du Canada sur l’innovation et les technologies pour les services de soins de santé mentale pour les jeunes
<br/>
<a href="https://www.ymhtech.com" target="_blank">www.ymhtech.com</a> / <a href="https://www.smjtechno.com" target="_blank">www.smjtechno.com</a></p>
)
Expand Down
55 changes: 41 additions & 14 deletions src/components/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,47 @@ const Header = props => {

return (
<div className={headerStyles.header}>
<Link to="/">
{(url === "/" || url === "/forms") ?
<img
src={"/prism.png"}
alt="Prism"
className={headerStyles.logo1}
/>
:
<img
src={"/prism.png"}
alt="Prism"
className={headerStyles.logo2}
/>}
</Link>
{url === "/" || url === "/forms" ? (
<div className={headerStyles.headerHomePageImages}>
<a href="https://ciusss-centresudmtl.gouv.qc.ca/aire-ouverte">
<img
src={"/aire_ouverte.png"}
alt="Aire ouverte"
className={headerStyles.logo3}
/>
</a>
<Link to="/">
<img
src={"/prism.png"}
alt="Prism"
className={headerStyles.logo1}
/>
</Link>
<div className={headerStyles.logo3}>
<a href="https://ciusss-estmtl.gouv.qc.ca/" target="_blank"><img src={"/CIUSSS_logo.png"} alt="CIUSSS" /></a>
</div>
</div>
) : (
<div className={headerStyles.headerHomePageImages}>
<a href="https://ciusss-centresudmtl.gouv.qc.ca/aire-ouverte">
<img
src={"/aire_ouverte.png"}
alt="Aire ouverte"
className={headerStyles.logo3}
/>
</a>
<Link to="/">
<img
src={"/prism.png"}
alt="Prism"
className={headerStyles.logo2}
/>
</Link>
<div className={headerStyles.logo3}>
<a href="https://ciusss-estmtl.gouv.qc.ca/" target="_blank"><img src={"/CIUSSS_logo.png"} alt="CIUSSS" /></a>
</div>
</div>
)}
</div>
)
}
Expand Down
23 changes: 20 additions & 3 deletions src/components/header.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ $xl: 1920px;
margin: 2rem;
}

.headerHomePageImages {
display: flex;
flex-direction: row;
justify-content: space-around;
}

.nav-list {
display: flex;
list-style-type: none;
Expand All @@ -32,7 +38,11 @@ $xl: 1920px;
width: 20rem;
}
.logo2 {
width: 15rem;
width: 20rem;
}
.logo3 {
width: 10rem;
height: 8rem;
}

@media (min-width: $lg) {
Expand Down Expand Up @@ -120,10 +130,17 @@ $xl: 1920px;

@media only screen and (max-width: $sm) {
.logo1 {
width: 13rem;
width: 7rem;
height: 4rem;
}
.logo2 {
width: 12rem;
width: 7rem;
height: 4rem;
}

.logo3 {
width: 5rem;
height: 4rem;
}

.headerMain {
Expand Down
47 changes: 47 additions & 0 deletions src/components/homeConsentPopup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import React from "react"
import { Link } from "gatsby"

import CookieConsent from "react-cookie-consent";

/* Translation using lingui */
import { I18nProvider } from "@lingui/react"
import catalogEn from "../locales/en/messages"
import catalogFr from "../locales/fr/messages"
import { Trans } from "@lingui/macro"

const HomeConsentPopup = () => {


return (
<CookieConsent
location="bottom"
buttonText="I accept/ J'accepte"
declineButtonText="I decline/ Je refuse"
cookieName="consentGuiven"
style={{ background: "#e0e2e5", color: "#323232", fontWeight: "500" }}
buttonStyle={{ background: "#ffffff", color: "#323232", fontSize: "13px", width: "10rem" }}
declineButtonStyle={{background: "#323232", color: "#ffffff", fontSize: "13px", width: "10rem" }}
expires={150}
onAccept={() => {
window._paq.push(['setConsentGiven']);
}}
enableDeclineButton
>
We use cookies to collect information about the use of this Website to help us evaluate and improve this new Referral Service. To learn more, read our <Link
to="/privacy-policy"
onClick={() => {
localStorage.setItem("language", "en")
}}
>privacy policy</Link>.<br/><br/>
Nous utilisons des cookies pour collecter des informations concernant l’utilisation de ce site web et ainsi nous aider à évaluer et à améliorer ce nouveau service de référence. Pour en connaître davantage, consultez notre {" "}
<Link
to="/privacy-policy"
onClick={() => {
localStorage.setItem("language", "fr")
}}
>politique de confidentialité</Link>.
</CookieConsent>
)
}

export default HomeConsentPopup
2 changes: 2 additions & 0 deletions src/components/homeLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Header from "./header"
import Footer from "./footer"
import "../styles/index.scss"
import layoutStyles from "./layout.module.scss"
import HomeConsentPopup from "./homeConsentPopup"

const Layout = props => {
return (
Expand All @@ -13,6 +14,7 @@ const Layout = props => {
<div className={layoutStyles.main}>{props.children}</div>
<Footer />
</div>
<HomeConsentPopup/>
</div>
)
}
Expand Down
2 changes: 2 additions & 0 deletions src/components/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Footer from "./footer"
import Sidebar from "./sidebar"
import "../styles/index.scss"
import layoutStyles from "./layout.module.scss"
import ConsentPopup from "./consentPopup"

const Layout = props => {
return (
Expand All @@ -18,6 +19,7 @@ const Layout = props => {
<Footer />
</div>
<Sidebar />
<ConsentPopup/>
</div>
)
}
Expand Down
Loading

0 comments on commit f5fdee3

Please sign in to comment.