diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 28604379b..fdbd56e28 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -3,7 +3,7 @@ on: push: branches: [master] env: - SSH_HOST: solstice.mes-aides.1jeune1solution.beta.gouv.fr + SSH_HOST: kuli.mes-aides.org SSH_USER: root jobs: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3182496c3..4499001d9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,8 @@ on: push: branches: [master] pull_request: + branches: + - "**" workflow_dispatch: env: OPENFISCA_BIND_HOST: 127.0.0.1:2000 diff --git a/contribuer/public/admin/config.yml b/contribuer/public/admin/config.yml index 071e87328..2359f50e4 100644 --- a/contribuer/public/admin/config.yml +++ b/contribuer/public/admin/config.yml @@ -305,6 +305,7 @@ fields: name: link widget: string pattern: *pattern_url + required: false field_link_instructions: &field_link_instructions label: Lien vers des instructions à suivre name: instructions @@ -397,6 +398,14 @@ fields: value: _interetEtudesEtranger - label: Oui, l'afficher en cas d'intérêt pour faire une formation dans le sanitaire et social. value: _interetAidesSanitaireSocial + - label: Oui, l'afficher en cas d'intérêt de possession d'une voitur ou un tel souhait. + value: _interetVoiture + - label: Oui, l'afficher en cas de recherche d'un emploi. + value: _interetEmploi + - label: Oui, l'afficher en cas de recherche d'un logement. + value: _interetLogement + - label: Oui, l'afficher en cas d'intérêt pour un diagnostif financier. + value: _interetDiagnostifFinancier field_openfisca_linked_entity: &field_openfisca_linked_entity label: Entité de rattachement de la variable dans OpenFisca name: entity @@ -808,6 +817,14 @@ collections: - *field_benefit_position - *field_private_benefit - *field_benefit_partial_support + - label: Texte pour le CTA sur la page dédiée + name: cta + type: hidden + required: false + - label: Texte pour le CTA sur la page listing + name: list_cta + type: hidden + required: false - name: benefits_openfisca label: Aides complexes label_singular: Aide complexe diff --git a/cypress/integration/base.spec.js b/cypress/integration/base.spec.js index fe75d8957..41c24660b 100644 --- a/cypress/integration/base.spec.js +++ b/cypress/integration/base.spec.js @@ -6,6 +6,7 @@ import logement from "../utils/logement" import revenu from "../utils/revenu" import projet from "../utils/projet" import results from "../utils/results" +import caidf from "../utils/caidf" context("Full simulation", () => { beforeEach(() => { @@ -36,6 +37,8 @@ context("Full simulation", () => { projet.fill__interetPermisDeConduire(false) projet.fill__interetAidesSanitaireSocial(false) + caidf.fill_caidf() + results.wait() results.hasPrimeActivite() diff --git a/cypress/integration/family.spec.js b/cypress/integration/family.spec.js index f5558b6cc..3ef860ec3 100644 --- a/cypress/integration/family.spec.js +++ b/cypress/integration/family.spec.js @@ -7,6 +7,7 @@ import profil from "../utils/profil" import projet from "../utils/projet" import results from "../utils/results" import revenu from "../utils/revenu" +import caidf from "../utils/caidf" context("Full simulation", () => { beforeEach(() => { @@ -42,6 +43,8 @@ context("Full simulation", () => { projet.fill__interetPermisDeConduire(false) projet.fill__interetAidesSanitaireSocial(false) + caidf.fill_caidf() + results.wait() results.hasCSS() results.hasPrimeActivite() diff --git a/cypress/integration/handicap.spec.js b/cypress/integration/handicap.spec.js index 0204ccc35..f67c55c3a 100644 --- a/cypress/integration/handicap.spec.js +++ b/cypress/integration/handicap.spec.js @@ -6,6 +6,7 @@ import logement from "../utils/logement" import revenu from "../utils/revenu" import projet from "../utils/projet" import results from "../utils/results" +import caidf from "../utils/caidf" context("Full simulation", () => { beforeEach(() => { @@ -32,6 +33,8 @@ context("Full simulation", () => { projet.fill__interetPermisDeConduire(false) projet.fill__interetAidesSanitaireSocial(false) + caidf.fill_caidf() + results.wait() results.hasAAH() }) diff --git a/cypress/integration/student.spec.js b/cypress/integration/student.spec.js index acbee0351..8400e9cd7 100644 --- a/cypress/integration/student.spec.js +++ b/cypress/integration/student.spec.js @@ -6,6 +6,7 @@ import revenu from "../utils/revenu" import projet from "../utils/projet" import results from "../utils/results" import foyer from "../utils/foyer" +import caidf from "../utils/caidf" context("Full simulation", () => { beforeEach(() => { @@ -49,6 +50,8 @@ context("Full simulation", () => { projet.fill__interetEtudesEtranger(true) projet.fill__dureeMoisEtudesEtranger(2) + caidf.fill_caidf() + results.wait() results.hasIleDeFranceAideAuMerite() diff --git a/cypress/utils/caidf.js b/cypress/utils/caidf.js new file mode 100644 index 000000000..78780b9fa --- /dev/null +++ b/cypress/utils/caidf.js @@ -0,0 +1,12 @@ +import { fillCheckboxes, fillRadio } from "./form" + +const fill_caidf = () => { + fillRadio("_interetVoiture", false) + fillRadio("_interetLogement", false) + fillRadio("_interetEmploi", false) + fillCheckboxes("_aleas", []) +} + +export default { + fill_caidf, +} diff --git a/cypress/utils/results.js b/cypress/utils/results.js index d5515397e..135ffa3cf 100644 --- a/cypress/utils/results.js +++ b/cypress/utils/results.js @@ -45,7 +45,7 @@ const hasPrimeActivite = () => { const captureFiscalResources = () => { const name = /Livret d’épargne populaire/ const id = "livret_epargne_populaire_taux" - cy.get(".aj-droit-details-back-button").click() + cy.get('[data-testid="back-button"]').click() IdentifyBenefit(id, name) getBenefitSummary(id).click() cy.get(".notification.warning").invoke("text").should("contain", "ressources") diff --git a/data/benefits/javascript/ca-application-ma-banque.yml b/data/benefits/javascript/ca-application-ma-banque.yml new file mode 100644 index 000000000..a92669e78 --- /dev/null +++ b/data/benefits/javascript/ca-application-ma-banque.yml @@ -0,0 +1,13 @@ +label: application Ma Banque +institution: credit_agricole +description: > + Gardez la maîtrise de vos comptes avec l'application Ma Banque. Directement depuis votre smartphone, + consultez tous vos comptes en un clin d’œil et gérez votre budget facilement : + crédits, épargne, catégorisation des opérations, édition de RIB… +instructions: https://www.credit-agricole.fr/ca-paris/particulier/applications/ma-banque.html +prefix: l’ +type: bool +periodicite: ponctuelle +top: 116 +cta: Je télécharge l'application +list_cta: Découvrir ce service diff --git a/data/benefits/javascript/ca-assurance-complementaire-sante.yml b/data/benefits/javascript/ca-assurance-complementaire-sante.yml new file mode 100644 index 000000000..11f5024a7 --- /dev/null +++ b/data/benefits/javascript/ca-assurance-complementaire-sante.yml @@ -0,0 +1,16 @@ +label: assurance complémentaire Santé +institution: credit_agricole +description: >- + La complémentaire Santé complète les remboursements des frais de santé pris en charge par + votre Régime Obligatoire. Avec l’assurance Santé du Crédit Agricole, bénéficiez des couvertures + adaptées à vos besoins et d’avantages spécifiques. +conditions_generales: + - type: benefit + name: css_participation_forfaitaire + invert: true +teleservice: https://www.credit-agricole.fr/ca-paris/particulier/simulation-devis/assurance/devis-sante.html +prefix: l’ +type: bool +periodicite: ponctuelle +top: 114 +cta: Faire une demande en ligne diff --git a/data/benefits/javascript/ca-assurance-eko.yml b/data/benefits/javascript/ca-assurance-eko.yml new file mode 100644 index 000000000..8f7a4b53a --- /dev/null +++ b/data/benefits/javascript/ca-assurance-eko.yml @@ -0,0 +1,18 @@ +label: assurance Eko auto et/ou 2 roues +institution: credit_agricole +description: >- + En fonction de votre véhicule, de vos besoins et de votre budget vous pouvez + compléter votre couverture et réaliser des économies sur votre assurance automobile ou 2 roues, + grâce à EKO assurance comprenant les services essentiels à un prix attractif. +

+ Réalisez en ligne, sans engagement et en toute autonomie un devis assurance automobile + ou 2 roues suivant votre besoin. +interestFlag: _interetVoiture +instructions: https://www.credit-agricole.fr/ca-paris/particulier/assurances/auto-2-roues/nouvelle-assurance-auto.html +prefix: l’ +type: bool +periodicite: ponctuelle +top: 114 +cta: Je découvre diff --git a/data/benefits/javascript/ca-assurance-habitation.yml b/data/benefits/javascript/ca-assurance-habitation.yml new file mode 100644 index 000000000..87e872003 --- /dev/null +++ b/data/benefits/javascript/ca-assurance-habitation.yml @@ -0,0 +1,22 @@ +label: assurance habitation +institution: credit_agricole +description: >- + Contrat multirisque habitation (MRH) une formule d’assurance habitation qui correspond + à vos besoins tout en maîtrisant votre budget. +

+ Réalisez en ligne, sans engagement et en toute autonomie un devis habitation (MRH) suivant votre besoin. Je réalise un devis. + +

+
+
Bon à savoir
+
Vous avez un véhicule ? Fusionnez vos contrats et faites des économies sur vos contrats d'assurances. + Découvrez le + contrat d'assurance EKO.
+instructions: https://www.credit-agricole.fr/particulier/simulation-devis/assurance/devis-habitation.html +prefix: l’ +type: bool +periodicite: ponctuelle +top: 115 +cta: Faire une demande en ligne diff --git a/data/benefits/javascript/ca-bon-plan-emploi.yml b/data/benefits/javascript/ca-bon-plan-emploi.yml new file mode 100644 index 000000000..d9b04aa22 --- /dev/null +++ b/data/benefits/javascript/ca-bon-plan-emploi.yml @@ -0,0 +1,24 @@ +label: bon plan Emploi +institution: credit_agricole +description: >- + Hello Charly accompagne gratuitement des milliers de jeunes dans leur orientation scolaire. +

+ Profitez également de + 1jeune1solution qui vise à offrir à chaque jeune arrivant sur le marché + du travail, des leviers, des aides à l’embauche, des formations, des accompagnements, des aides financières… + L’objectif est de ne laisser personne sur le bord de la route. +conditions_generales: + - type: age + operator: ">=" + value: 18 + - type: age + operator: "<=" + value: 30 +interestFlag: _interetEmploi +instructions: https://globetrotterplace-ca-paris.fr/bon-plan-metier/ +prefix: le +type: bool +periodicite: ponctuelle +top: 116 +cta: Je trouve un emploi diff --git a/data/benefits/javascript/ca-bon-plan-location.yml b/data/benefits/javascript/ca-bon-plan-location.yml new file mode 100644 index 000000000..988bcf611 --- /dev/null +++ b/data/benefits/javascript/ca-bon-plan-location.yml @@ -0,0 +1,27 @@ +label: bon plan Location +institution: credit_agricole +description: >- + Futur locataire, vous rencontrez des difficultés à trouver un logement car votre dossier + ne répond pas aux critères du propriétaire bailleur. Le Crédit Agricole d’Ile-de-France + en partenariat avec Cautionéo devient votre garant ! + Bénéficiez de deux mois de cotisations offerts. +

+ Profitez également, de Ma future location, + gratuitement et sans engagement, + recevez des annonces quotidiennes correspondant à votre recherche et + boostez votre dossier de location. +conditions_generales: + - type: age + operator: ">=" + value: 18 + - type: age + operator: "<=" + value: 30 +interestFlag: _interetLogement +instructions: https://globetrotterplace-ca-paris.fr/bon-plan-location/ +prefix: le +type: bool +periodicite: ponctuelle +top: 116 +cta: Je trouve un logement diff --git a/data/benefits/javascript/ca-bon-plan-permis.yml b/data/benefits/javascript/ca-bon-plan-permis.yml new file mode 100644 index 000000000..af7eac117 --- /dev/null +++ b/data/benefits/javascript/ca-bon-plan-permis.yml @@ -0,0 +1,29 @@ +label: bon plan Permis +institution: credit_agricole +description: >- + Ce pack permis, en partenariat avec en voiture Simone + (code de la route et 20h de conduite) est proposé à tous nos clients de 18 à 30 ans. +

+ De plus, profitez du + Prêt permis à 1euro par jour, vous ne remboursez que ce que vous empruntez, + au rythme de 30euros par mois (la durée varie selon le montant emprunté). + Et ce, même si vous êtes en conduite accompagnée. Il s'agit d'un prêt à taux zéro dont les + intérêts sont pris en charge par l'état. +conditions_generales: + - type: age + operator: ">=" + value: 18 + - type: age + operator: "<=" + value: 30 +interestFlag: _interetPermisDeConduire +instructions: https://globetrotterplace-ca-paris.fr/bon-plan-permis/ +prefix: le +type: float +montant: 639 +unit: € +legend: à la place de 1518€ +periodicite: ponctuelle +top: 116 +cta: Je passe mon permis diff --git a/data/benefits/javascript/ca-epargne-livret-jeune-mozaic.yml b/data/benefits/javascript/ca-epargne-livret-jeune-mozaic.yml new file mode 100644 index 000000000..c420c3b54 --- /dev/null +++ b/data/benefits/javascript/ca-epargne-livret-jeune-mozaic.yml @@ -0,0 +1,20 @@ +label: livret Jeune Mozaïc +institution: credit_agricole +description: + Le Livret Jeune Mozaïc permet de vous constituer une première épargne librement. + L’argent placé sur le livret reste disponible et vous rapporte 0,50% d’intérêts par an. +conditions: + - Déposer un montant minimum à l’ouverture de 10 €. +conditions_generales: + - type: age + operator: ">=" + value: 12 + - type: age + operator: "<=" + value: 25 +instructions: https://www.credit-agricole.fr/ca-paris/particulier/epargne/livret-epargne-logement/livret-jeune-mozaic.html +prefix: le +type: bool +periodicite: ponctuelle +top: 115 +cta: Je découvre diff --git a/data/benefits/javascript/ca-livret-a.yml b/data/benefits/javascript/ca-livret-a.yml new file mode 100644 index 000000000..1129e04a0 --- /dev/null +++ b/data/benefits/javascript/ca-livret-a.yml @@ -0,0 +1,21 @@ +label: livret A +institution: credit_agricole +description: + Une épargne pour tous, 100% souple et disponible. Constituez-vous sans aucun risque une + réserve d’argent facilement disponible pour les imprévus ou les coups de cœur. +conditions: + - Ne pas déjà détenir un livret A dans une autre banque. vous possédez un Livret A ? + Pensez au + Livret de développement durable et solidaire. + - Déposer un montant minimum à l’ouverture de 10 €. +conditions_generales: + - type: benefit + name: livret_epargne_populaire_taux + invert: true +instructions: https://www.credit-agricole.fr/ca-paris/particulier/epargne/livret-epargne-logement/livret-a.html +prefix: un +type: bool +periodicite: ponctuelle +top: 115 +cta: Je découvre diff --git a/data/benefits/javascript/ca-offre-eko.yml b/data/benefits/javascript/ca-offre-eko.yml new file mode 100644 index 000000000..857e6421f --- /dev/null +++ b/data/benefits/javascript/ca-offre-eko.yml @@ -0,0 +1,22 @@ +label: EKO +institution: credit_agricole +description: > + Dans la vie on ne maîtrise pas toujours tout. + Avec EKO, au moins vous maîtrisez votre budget ! Une carte, + une appli, une agence pour 2 euros par mois. +conditions: + - Ne pas être à découvert lors de la souscription de l'offre. + Votre solde est négatif ? Contactez votre conseiller pour + répondre à vos questions et vous accompagner. + - Détenir un compte dans une banque établie dans l’Espace + Economique Européen (compte ou livret d’épargne). +conditions_generales: + - type: age + operator: ">" + value: 30 +instructions: https://ca-eko-globetrotter.fr/eko#details-offre +prefix: l’ +type: bool +periodicite: ponctuelle +top: 113 +cta: Je découvre diff --git a/data/benefits/javascript/ca-offre-got.yml b/data/benefits/javascript/ca-offre-got.yml new file mode 100644 index 000000000..f1dc7bb90 --- /dev/null +++ b/data/benefits/javascript/ca-offre-got.yml @@ -0,0 +1,17 @@ +label: Globe Trotter +institution: credit_agricole +description: Globe Trotter, une offre pour les jeunes de 18 à 30 ans inclus. + 1 carte, 0 frais à l'étranger et tous les services d'une grande banque pour 2 euros par mois. +conditions: + - Détenir un compte dans une banque établie dans l’Espace + Economique Européen (compte ou livret d’épargne). +conditions_generales: + - type: age + operator: "<=" + value: 30 +instructions: https://ca-eko-globetrotter.fr/globetrotter +prefix: l’ +type: bool +periodicite: ponctuelle +top: 113 +cta: Je découvre diff --git a/data/benefits/javascript/ca-point-passerelle.yml b/data/benefits/javascript/ca-point-passerelle.yml new file mode 100644 index 000000000..a9aa17d60 --- /dev/null +++ b/data/benefits/javascript/ca-point-passerelle.yml @@ -0,0 +1,14 @@ +label: point Passerelle +institution: credit_agricole +description: + Le dispositif d’accompagnement humain, social et financier du Crédit Agricole + qui aide gratuitement les personnes fragilisées suite à un aléa de + la vie (séparation, perte d’emploi, maladie…). +interestFlag: _interetDiagnostifFinancier +instructions: https://www.credit-agricole.fr/ca-paris/particulier/conseils/coups-durs/point-passerelle.html +prefix: l’ +type: bool +periodicite: ponctuelle +top: 111 +cta: Je découvre +list_cta: Découvrir ce service diff --git a/data/benefits/javascript/ca-rubrique-newsletter.yml b/data/benefits/javascript/ca-rubrique-newsletter.yml new file mode 100644 index 000000000..2151c80f8 --- /dev/null +++ b/data/benefits/javascript/ca-rubrique-newsletter.yml @@ -0,0 +1,12 @@ +label: Newsletter « Nous les Franciliens » - Rubrique budget +institution: credit_agricole +description: > + Newsletter personnalisée, choisissez la thématique budget parmi 3 thèmes qui vous intéressent + le plus et recevez une fois par mois gratuitement des bons plans pour maitriser votre budget. +instructions: https://cadif.massmailing-grp-ext.credit-agricole.fr/optin/formulaire/23-R4J5W9DM3A +prefix: la +type: bool +periodicite: ponctuelle +top: 116 +cta: Je personnalise +list_cta: Découvrir ce service diff --git a/data/benefits/openfisca/livret_epargne_populaire_taux.yml b/data/benefits/openfisca/livret_epargne_populaire_taux.yml index 3b1796e63..f0df050d2 100644 --- a/data/benefits/openfisca/livret_epargne_populaire_taux.yml +++ b/data/benefits/openfisca/livret_epargne_populaire_taux.yml @@ -13,10 +13,11 @@ conditions: revenu fiscal. periodicite: annuelle link: https://www.service-public.fr/particuliers/vosdroits/F2367 +instructions: https://www.credit-agricole.fr/ca-paris/particulier/epargne/livret-epargne-logement/livret-d-epargne-populaire-lep.html entity: individus openfiscaPeriod: thisMonth isBaseRessourcesYearMinusTwo: true floorAt: 0.01 top: 30 prefix: le -institution: banque_de_france +institution: credit_agricole diff --git a/data/institutions/credit_agricole.yml b/data/institutions/credit_agricole.yml new file mode 100644 index 000000000..a912c58de --- /dev/null +++ b/data/institutions/credit_agricole.yml @@ -0,0 +1,4 @@ +name: Crédit Agricole d’Ile-de-France +imgSrc: caidf/img/logo-carre.png +type: national +code_siren: "775665615" diff --git a/lib/additional-questions.ts b/lib/additional-questions.ts new file mode 100644 index 000000000..c6bd29028 --- /dev/null +++ b/lib/additional-questions.ts @@ -0,0 +1,75 @@ +import { MultipleProperty, Property } from "./properties/property.js" +import { Step } from "./state/steps.js" + +const newQuestions: any = { + _interetVoiture: new Property({ + question: + "Possédez vous un véhicule ou avez-vous l'intention d'en acheter/louer un ?", + }), + _interetLogement: new Property({ + question: "Recherchez vous un logement ?", + }), + _interetEmploi: new Property({ + question: "Recherchez vous un emploi ?", + }), + _aleas: new MultipleProperty({ + question: "Faites-vous face à un aléa de la vie ?", + questionType: "multiple", + items: [ + { + value: "maladie_invalidite", + label: "Maladie / invalidité", + }, + { + value: "separation_divorce", + label: "Séparation / divorce", + }, + { + value: "depart_retraite", + label: "Départ à la retraite", + }, + { + value: "perte_emploi", + label: "Perte d'emploi / chômage", + }, + ], + }), + _interetDiagnostifFinancier: { + p: new Property({ + question: "Avez-vous besoin d'un diagnostic financier ?", + }), + step: { + isActive: (subject: any) => subject.demandeur?._aleas?.length >= 1, + steps: [ + new Step({ + key: undefined, + chapter: undefined, + entity: "individu", + id: "demandeur", + variable: "_interetDiagnostifFinancier", + }), + ], + }, + }, +} + +export function addBlocks(b: any) { + Object.keys(newQuestions).forEach((questionId) => { + b.push( + newQuestions[questionId].step || + new Step({ + key: undefined, + chapter: undefined, + entity: "individu", + id: "demandeur", + variable: questionId, + }) + ) + }) +} + +export function addProperties(props: any) { + Object.keys(newQuestions).forEach((questionId: string) => { + props[questionId] = newQuestions[questionId].p || newQuestions[questionId] + }) +} diff --git a/lib/benefits/compute-javascript.ts b/lib/benefits/compute-javascript.ts index e02429f38..105601ddf 100644 --- a/lib/benefits/compute-javascript.ts +++ b/lib/benefits/compute-javascript.ts @@ -103,6 +103,15 @@ export function testGeographicalEligibility( } export const CONDITION_STATEGY: ConditionsLayout = { + benefit: { + test: (condition, { openfiscaResponse, periods }) => { + const benefit = + openfiscaResponse.individus.demandeur[condition.name] || + openfiscaResponse.familles._[condition.name] + const eligibility = Boolean(benefit && benefit[periods.thisMonth.id]) + return condition.invert ? !eligibility : eligibility + }, + }, boursier: { test: (_, { openfiscaResponse, periods }) => { return openfiscaResponse.individus.demandeur.boursier?.[ diff --git a/lib/chapters.ts b/lib/chapters.ts index b77040a9f..a4fc35a87 100644 --- a/lib/chapters.ts +++ b/lib/chapters.ts @@ -1,13 +1,32 @@ import { chapterLayout } from "./types/chapters" const chapters: chapterLayout[] = [ - { label: "Mon profil", name: "profil" }, - { label: "Mon foyer", name: "foyer" }, - { label: "Mon logement", name: "logement" }, - { label: "Mes revenus", name: "revenus" }, - { label: "Mes projets", name: "projets" }, - { label: "Récapitulatif", name: "recapitulatif" }, - { label: "Mes résultats", name: "resultats" }, + { label: "Parlez-nous de vous", breadcrumb: "Vous", name: "profil" }, + { + label: "Qui sont les membres de votre foyer ?", + breadcrumb: "Votre famille", + name: "foyer", + }, + { + label: "Votre logement principal", + breadcrumb: "Votre logement", + name: "logement", + }, + { + label: "Vos ressources personnelles", + breadcrumb: "Vos ressources", + name: "revenus", + }, + { + label: "Parlez-nous de votre projet", + breadcrumb: "Vos projets", + name: "projets", + }, + { + label: "Résultat de votre simulation", + breadcrumb: "Vos résultats", + name: "resultats", + }, ] function getChapters() { diff --git a/lib/properties/individu-properties.ts b/lib/properties/individu-properties.ts index 85c9ad50d..70eb923c0 100644 --- a/lib/properties/individu-properties.ts +++ b/lib/properties/individu-properties.ts @@ -12,7 +12,7 @@ import { capitalize, yearsAgo } from "../utils.js" import Scolarite from "../scolarite.js" import { getAnswer } from "../answers.js" -export default { +const props = { aah_restriction_substantielle_durable_acces_emploi: new BooleanProperty({ question: ({ individu }) => { return `${Individu.label( @@ -675,3 +675,8 @@ export default { ], }), } + +import { addProperties } from "../additional-questions.js" +addProperties(props) + +export default props diff --git a/lib/state/blocks.ts b/lib/state/blocks.ts index 08db2c306..a99666604 100644 --- a/lib/state/blocks.ts +++ b/lib/state/blocks.ts @@ -7,6 +7,8 @@ import Scolarite from "../scolarite.js" import { BlockLayout } from "../types/blocks" +import { addBlocks } from "../additional-questions.js" + function individuBlockFactory(id, chapter?: string) { const r = (variable, chapter?: string) => new Step({ entity: "individu", id, variable, chapter }) @@ -464,7 +466,7 @@ function resourceBlocks(situation) { } export function generateBlocks(situation): BlockLayout[] { - return [ + const initial = [ { steps: [new Step({})] }, individuBlockFactory("demandeur"), kidBlock(situation), @@ -589,9 +591,18 @@ export function generateBlocks(situation): BlockLayout[] { ], }, extraBlock(), - { - steps: [new Step({ entity: "resultats", chapter: "resultats" })], - }, - new Step({ entity: "resultats" }), ] + + addBlocks(initial) + + initial.push( + ...[ + { + steps: [new Step({ entity: "resultats", chapter: "resultats" })], + }, + new Step({ entity: "resultats" }), + ] + ) + + return initial } diff --git a/lib/types/chapters.d.ts b/lib/types/chapters.d.ts index 34f5b0b9e..c4f447fff 100644 --- a/lib/types/chapters.d.ts +++ b/lib/types/chapters.d.ts @@ -4,4 +4,5 @@ export interface chapterLayout { done?: boolean current?: string root?: string + breadcrumb?: string } diff --git a/netlify.toml b/netlify.toml index c4ed85304..ce2aef7d6 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,6 +1,6 @@ [[redirects]] from = "/api/*" - to = "https://mes-aides.1jeune1solution.beta.gouv.fr/api/:splat" + to = "https://caidf.mes-aides.org/api/:splat" status = 200 [[redirects]] diff --git a/package-lock.json b/package-lock.json index 05577e610..85c4fb4f4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "@sentry/vue": "^6.14.0", "@vue/cli": "^5.0.4", "aides-velo": "2.0.48", + "aos": "^2.3.4", "axios": "^0.24.0", "communes-lonlat": "^1.1.0", "consolidate": "^0.16.0", @@ -6834,6 +6835,16 @@ "node": ">= 8" } }, + "node_modules/aos": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/aos/-/aos-2.3.4.tgz", + "integrity": "sha512-zh/ahtR2yME4I51z8IttIt4lC1Nw0ktsFtmeDzID1m9naJnWXhCoARaCgNOGXb5CLy3zm+wqmRAEgMYB5E2HUw==", + "dependencies": { + "classlist-polyfill": "^1.0.3", + "lodash.debounce": "^4.0.6", + "lodash.throttle": "^4.0.1" + } + }, "node_modules/apollo-cache-control": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/apollo-cache-control/-/apollo-cache-control-0.14.0.tgz", @@ -8848,6 +8859,11 @@ "node": ">=0.10.0" } }, + "node_modules/classlist-polyfill": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/classlist-polyfill/-/classlist-polyfill-1.2.0.tgz", + "integrity": "sha512-GzIjNdcEtH4ieA2S8NmrSxv7DfEV5fmixQeyTmqmRmRJPGpRBaSnA2a0VrCjyT8iW8JjEdMbKzDotAJf+ajgaQ==" + }, "node_modules/clean-css": { "version": "4.2.4", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.4.tgz", @@ -18076,6 +18092,11 @@ "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=" }, + "node_modules/lodash.throttle": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", + "integrity": "sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==" + }, "node_modules/lodash.uniq": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", @@ -32177,6 +32198,16 @@ "picomatch": "^2.0.4" } }, + "aos": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/aos/-/aos-2.3.4.tgz", + "integrity": "sha512-zh/ahtR2yME4I51z8IttIt4lC1Nw0ktsFtmeDzID1m9naJnWXhCoARaCgNOGXb5CLy3zm+wqmRAEgMYB5E2HUw==", + "requires": { + "classlist-polyfill": "^1.0.3", + "lodash.debounce": "^4.0.6", + "lodash.throttle": "^4.0.1" + } + }, "apollo-cache-control": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/apollo-cache-control/-/apollo-cache-control-0.14.0.tgz", @@ -33773,6 +33804,11 @@ } } }, + "classlist-polyfill": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/classlist-polyfill/-/classlist-polyfill-1.2.0.tgz", + "integrity": "sha512-GzIjNdcEtH4ieA2S8NmrSxv7DfEV5fmixQeyTmqmRmRJPGpRBaSnA2a0VrCjyT8iW8JjEdMbKzDotAJf+ajgaQ==" + }, "clean-css": { "version": "4.2.4", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.4.tgz", @@ -40772,6 +40808,11 @@ "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=" }, + "lodash.throttle": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", + "integrity": "sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==" + }, "lodash.uniq": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", diff --git a/package.json b/package.json index a4d1ee769..5567ffe17 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,7 @@ "@sentry/vue": "^6.14.0", "@vue/cli": "^5.0.4", "aides-velo": "2.0.48", + "aos": "^2.3.4", "axios": "^0.24.0", "communes-lonlat": "^1.1.0", "consolidate": "^0.16.0", diff --git a/public/caidf/img/arrow.png b/public/caidf/img/arrow.png new file mode 100644 index 000000000..1a5f1350d Binary files /dev/null and b/public/caidf/img/arrow.png differ diff --git a/public/caidf/img/girl-siting-on-table.png b/public/caidf/img/girl-siting-on-table.png new file mode 100644 index 000000000..8f65af95c Binary files /dev/null and b/public/caidf/img/girl-siting-on-table.png differ diff --git a/public/caidf/img/hand-with-phone.png b/public/caidf/img/hand-with-phone.png new file mode 100644 index 000000000..886ac603f Binary files /dev/null and b/public/caidf/img/hand-with-phone.png differ diff --git a/public/caidf/img/ic_a_propos.svg b/public/caidf/img/ic_a_propos.svg new file mode 100644 index 000000000..b931f7714 --- /dev/null +++ b/public/caidf/img/ic_a_propos.svg @@ -0,0 +1,9 @@ + + + + Icons/banque/ic_a_propos + Created with Sketch. + + + + diff --git a/public/caidf/img/ic_document.svg b/public/caidf/img/ic_document.svg new file mode 100644 index 000000000..f61035a24 --- /dev/null +++ b/public/caidf/img/ic_document.svg @@ -0,0 +1,9 @@ + + + + Icons/documents/ic_document + Created with Sketch. + + + + diff --git a/public/caidf/img/illustration.svg b/public/caidf/img/illustration.svg new file mode 100644 index 000000000..b356668cd --- /dev/null +++ b/public/caidf/img/illustration.svg @@ -0,0 +1,728 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/public/caidf/img/logo-carre.png b/public/caidf/img/logo-carre.png new file mode 100644 index 000000000..1b0f0eda5 Binary files /dev/null and b/public/caidf/img/logo-carre.png differ diff --git a/public/caidf/img/logo-simulation-logement.svg b/public/caidf/img/logo-simulation-logement.svg new file mode 100644 index 000000000..8db900fbf --- /dev/null +++ b/public/caidf/img/logo-simulation-logement.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/caidf/img/logo-simulation-projet.svg b/public/caidf/img/logo-simulation-projet.svg new file mode 100644 index 000000000..77515758e --- /dev/null +++ b/public/caidf/img/logo-simulation-projet.svg @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/caidf/img/logo.svg b/public/caidf/img/logo.svg new file mode 100644 index 000000000..f843f38e9 --- /dev/null +++ b/public/caidf/img/logo.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/public/caidf/img/ne-ratez-aucune-aide-2.png b/public/caidf/img/ne-ratez-aucune-aide-2.png new file mode 100644 index 000000000..a4cc80120 Binary files /dev/null and b/public/caidf/img/ne-ratez-aucune-aide-2.png differ diff --git a/public/caidf/img/ne-ratez-aucune-aide.png b/public/caidf/img/ne-ratez-aucune-aide.png new file mode 100644 index 000000000..bf073c4fd Binary files /dev/null and b/public/caidf/img/ne-ratez-aucune-aide.png differ diff --git a/public/caidf/img/planning-sheets.png b/public/caidf/img/planning-sheets.png new file mode 100644 index 000000000..347d46f42 Binary files /dev/null and b/public/caidf/img/planning-sheets.png differ diff --git a/public/caidf/img/restez-alerte.png b/public/caidf/img/restez-alerte.png new file mode 100644 index 000000000..cfa02eb94 Binary files /dev/null and b/public/caidf/img/restez-alerte.png differ diff --git a/public/caidf/jquery-3.6.0.min.js b/public/caidf/jquery-3.6.0.min.js new file mode 100644 index 000000000..c4c6022f2 --- /dev/null +++ b/public/caidf/jquery-3.6.0.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0>2,c=(c&3)<<4|d>>4,l=(d&15)<<2|p>>6,e=p&63,isNaN(d)?l=e=64:isNaN(p)&&(e=64),f=f+this._keyStr.charAt(q)+this._keyStr.charAt(c)+this._keyStr.charAt(l)+this._keyStr.charAt(e);return f},decode:function(a){var f="",c,d,p,q,l,e=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");e< +a.length;)c=this._keyStr.indexOf(a.charAt(e++)),d=this._keyStr.indexOf(a.charAt(e++)),q=this._keyStr.indexOf(a.charAt(e++)),l=this._keyStr.indexOf(a.charAt(e++)),c=c<<2|d>>4,d=(d&15)<<4|q>>2,p=(q&3)<<6|l,f+=String.fromCharCode(c),64!=q&&(f+=String.fromCharCode(d)),64!=l&&(f+=String.fromCharCode(p));return f=b.Base64._utf8_decode(f)},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var f="",c=0;cd?f+=String.fromCharCode(d):(127d?f+=String.fromCharCode(d>> +6|192):(f+=String.fromCharCode(d>>12|224),f+=String.fromCharCode(d>>6&63|128)),f+=String.fromCharCode(d&63|128))}return f},_utf8_decode:function(a){for(var f="",c=0,d,b,q;cd?(f+=String.fromCharCode(d),c++):191d?(b=a.charCodeAt(c+1),f+=String.fromCharCode((d&31)<<6|b&63),c+=2):(b=a.charCodeAt(c+1),q=a.charCodeAt(c+2),f+=String.fromCharCode((d&15)<<12|(b&63)<<6|q&63),c+=3);return f}};b.loadScript=function(a,f){var c;f=f||function(){};c=document.createElement("script"); +c.type="text/javascript";c.src=a.url;c.async=!1;c.defer=!1;c.onload=c.onreadystatechange=function(a){a=a||window.event;if("load"===a.type||/loaded|complete/.test(c.readyState)&&(!document.documentMode||9>document.documentMode))c.onload=c.onreadystatechange=c.onerror=null,f(null,a)};c.onerror=function(a){c.onload=c.onreadystatechange=c.onerror=null;f({msg:"script not loaded",event:a})};var d=document.head||document.getElementsByTagName("head")[0];d.insertBefore(c,d.lastChild)};b.cloneSimpleObject= +function(a,f){if("object"!==typeof a||null===a||a instanceof Date)return a;var c=new a.constructor,d;for(d in a)a.hasOwnProperty(d)&&(void 0===d||f&&void 0===a[d]||(c[d]=b.cloneSimpleObject(a[d])));return c};b.jsonSerialize=function(b){try{return"undefined"!==typeof JSON&&JSON.stringify?JSON.stringify(b):a(b)}catch(f){return null}};b.jsonParse=function(a){try{return"undefined"!==typeof JSON&&JSON.parse?JSON.parse(a+""):m(a)}catch(f){return null}};b.arrayIndexOf=function(a,f){return Array.indexOf? +a.indexOf(f):function(c){if(null==this)throw new TypeError;var a=Object(this),f=a.length>>>0;if(0===f)return-1;var b=0;1=f)return-1;for(b=0<=b?b:Math.max(f-Math.abs(b),0);bc?"0"+c:String(c)};return c(b.getHours())+""+c(b.getMinutes())+""+c(b.getSeconds())+""+function(c){return Math.floor((9*Math.random()+1)*Math.pow(10,c-1))}(a-6)}}};b.getObjectKeys=function(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c);return b};b.completeFstLevelObj=function(a,b,c){if(a){if(b)for(var d in b)!b.hasOwnProperty(d)||a[d]&&!c||(a[d]=b[d])}else a=b;return a};b.isPreview= +function(){return window.navigator&&"preview"===window.navigator.loadPurpose};b.isPrerender=function(a){var f,c=!1,d=["webkit","ms"];if("prerender"===document.visibilityState)f="visibilitychange";else for(var e=0;em&&(p.str=p.str.substring(0,m-p.paramSize),p.strSize=p.str.length),w=u,t=p;else if(f[u]= +p,f[u].paramSize+f[u].strSize>m&&!f[u].truncate){a.emit("Tracker:Hit:Build:Error",{lvl:"ERROR",msg:'Too long parameter: "'+f[u].param+'"',details:{value:f[u].str}});l=!0;e=u;break}w&&(f[w]=t);f=[f,l,e,x];c=f[0];l=f[1];q=f[3];l&&(f=f[2],c=c[f],c.str=c.str.substring(0,m-c.paramSize),c.strSize=c.str.length,l={},l.mherr=n("mherr","1",!1,!1,"",!1),l[f]=c,c=l);c=k(c,m);if(null===c[1])d=c[0];else for(d.push(c[0]);null!==c[1];)c=k(c[1],m),d.push(c[0]);return d},h="";a.buffer.presentInFilters(d,"hitType")|| +(d=a.buffer.addInFilters(d,"hitType",["page"]));d=a.buffer.addInFilters(d,"hitType",["all"]);var s;if("object"===typeof f&&null!==f){d=a.buffer.addInFilters(d,"permanent",!0);d=a.buffer.get(d,!0);var r,g,x,t;for(s in f)if(f.hasOwnProperty(s)){h=f[s];r={};if(c&&"object"===typeof f[s]){x=g=!1;for(t in f[s])f[s].hasOwnProperty(t)&&("value"===t?g=!0:"options"===t&&"object"===typeof f[s].options&&null!==f[s].options&&(x=!0));g&&x&&(h=f[s].value,r=f[s].options)}d[s]={value:h,options:r}}h=l(d)}else for(s in d= +a.buffer.get(d,!0),h=l(d),d)!d.hasOwnProperty(s)||d[s].options&&d[s].options.permanent||a.buffer.del(s);e&&e(h,q)},r=function(b,c){var d=a.getConfig("secure"),e="";if(b)e=b;else var e="https:"===document.location.protocol,q=(e=d||e)?a.getConfig("logSSL"):a.getConfig("log"),l=a.getConfig("domain"),e=q&&l?q+"."+l:e?a.getConfig("collectDomainSSL"):a.getConfig("collectDomain");q=a.getConfig("baseURL");l=(l=a.getConfig("pixelPath"))||"/";"/"!==l.charAt(0)&&(l="/"+l);var h=a.getConfig("site");if((q||e&& +l)&&h){var k="//";d&&(k="https:"+k);c&&c(null,(q?q:k+e+l)+("?s="+h))}else c&&c({message:"Config error"})},h=function(a,c,d,b,q){r(b,function(b,p){b?q&&q(b):(m=1600-(p.length+27),e(a,c,d,function(c,a){var d=[],b=ATInternet.Utils.uuid().num(13);if(c instanceof Array)for(var f=1;f<=c.length;f++)d.push(p+a+"&mh="+f+"-"+c.length+"-"+b+c[f-1]);else d.push(p+a+c);q&&q(null,d)}))})};g.send=function(b,c,d,e,q){h(b,q,c,e,function(c,b){if(c)a.emit("Tracker:Hit:Build:Error",{lvl:"ERROR",msg:c.message,details:{}}), +d&&d();else for(var f=0;ft-d||t-d>=a.getConfig("visitLifetime"));t=q||e||c;l&&t&&v("atredir",{path:"/",end:a.getConfig("redirectionLifetime")})&&(a.storage[m](["atredir","camp"],t),y=t=!1,q||(e?(t=n,y=k):(t=w,y=s)), +a.storage[m](["atredir","gopc"],t),a.storage[m](["atredir","gopc_err"],y));!l&&h&&(x("xtor",h),t=(new Date).getTime()/36E5,t=Math.floor(t-f),x("roinbh",0<=t?t:0));l||(t=null,t=e?n?q||t:q||e:w?q:q||c||t,r&&r instanceof Array&&-1r.indexOf(z))&&v("atsession",{path:"/",session:60*a.getConfig("visitLifetime")}))a.storage[m](["atsession", +"histo_camp"],r&&r.push(z)?r:[z]);h&&!g.lastPersistence||!v("atreman",{path:"/",session:86400*g.lifetime})||(a.storage[m](["atreman","camp"],z),a.storage[m](["atreman","date"],(new Date).getTime()/36E5))}a.emit("Campaigns:process:done",{lvl:"INFO"})})})()};window.ATInternet.Tracker.addPlugin("Campaigns"); +}).call(window);(function(){var dfltPluginCfg={};var dfltGlobalCfg={"storageMode":"cookie"};ATInternet.Tracker.Plugins.Cookies=ATInternet.Tracker.Plugins.Storage=function(a){var g=this,m={},b=!1,n=null;a.configPlugin("Storage",dfltPluginCfg||{},function(a){m=a;"localStorage"===m.storageMode&&(b=ATInternet.Utils.isLocalStorageAvailable())});var k={},e=function(c){return a.getConfig("base64Storage")?ATInternet.Utils.Base64.encode(c):encodeURIComponent(c)},r=function(c){return a.getConfig("base64Storage")?ATInternet.Utils.Base64.decode(c):decodeURIComponent(c)},h=function(){this.getData=function(a){var c= +null;(a=RegExp("(?:^| )"+a+"=([^;]+)").exec(document.cookie)||null)&&(c=r(a[1]));return c};this.setData=function(c){var b=!1;if(c.name&&"string"===typeof c.name){var d=c.options||{},f=d.end||{},g=d.domain||a.getConfig("cookieDomain"),h=d.secure||a.getConfig("cookieSecure"),k=ATInternet.Utils.jsonSerialize(c),k=c.name+"="+e(k),k=k+(d.path&&"string"===typeof d.path?";path="+d.path:""),k=k+(g&&"string"===typeof g?";domain="+g:"")+(h&&"boolean"===typeof h?";secure":"");"function"===typeof f.toUTCString? +k+=";expires="+f.toUTCString():"number"===typeof f&&(k+=";max-age="+f.toString());document.cookie=k;this.getData(c.name)&&(b=!0)}return b}};n=b?new function(){var a=function(a){var c=+new Date,b=!1,d;a.options&&("undefined"!==typeof a.options.expires?d=a.options.expires:(a=a.options.end||{},"function"===typeof a.getTime?d=a.getTime():"number"===typeof a&&(d=c+1E3*a)));"number"===typeof d&&c>=d&&(b=!0);return{itemToDelete:b,timestamp:d}},c=function(a){var c=!1;try{localStorage.removeItem(a),c=!0}catch(b){}return c}; +this.getData=function(b){var d=null,e=localStorage.getItem(b);if(e){var e=r(e),f=ATInternet.Utils.jsonParse(e);f&&"object"===typeof f?a(f).itemToDelete&&c(b)||(delete f.options.expires,d=ATInternet.Utils.jsonSerialize(f)):d=e}return d};this.setData=function(b){var d=!1;if(b.name&&"string"===typeof b.name){var f=a(b);"number"===typeof f.timestamp&&(b.options.expires=f.timestamp);var g=ATInternet.Utils.jsonSerialize(b);if(f.itemToDelete)d=c(b.name);else try{localStorage.setItem(b.name,e(g)),d=!0}catch(h){}}return d}}: +new h;var f=function(c,b){var d=!1;!ATInternet.Utils.consent&&!b||a.getConfig("disableCookie")||a.getConfig("disableStorage")||!c||"object"!==typeof c||(d=n.setData(c));return d},c=function(a,c,b){a={name:a,val:c};b&&b.session&&"number"===typeof b.session&&(b.end=b.session);a.options=b||{};return a},d=function(c){var b=null,d=null;a.getConfig("disableCookie")||a.getConfig("disableStorage")||!c||"string"!==typeof c||(d=n.getData(c));(c=d)&&(b=ATInternet.Utils.jsonParse(c));return b},p=function(a,c){var b= +ATInternet.Utils.cloneSimpleObject(a);return f(b,c)?ATInternet.Utils.jsonParse(ATInternet.Utils.jsonSerialize(a)):null},q=function(a,c,b){if(!b&&k[a])b=k[a];else if(b=d(a))b.options=b.options||{},b.options.session&&"number"===typeof b.options.session&&(b.options.end=b.options.session,p(b,!1)),k[a]=b;return b?c?(a=null,!b||"object"!==typeof b.val||b.val instanceof Array||void 0===b.val[c]||(a=b.val[c]),a):b.val:null},l=function(a,b,e,f,g){if(b){if(g=d(a))!g||"object"!==typeof g.val||g.val instanceof +Array?g=null:"undefined"===typeof e?delete g.val[b]:g.val[b]=e,g&&(g=p(g,f))}else g=g||{},g=c(a,e,g),g=p(g,f);return g?(k[a]=g,g.val):null},w=function(a,b){if(b)l(a,b,void 0,!1,null);else{k[a]=void 0;var d=c(a,"",{end:new Date("Thu, 01 Jan 1970 00:00:00 UTC"),path:"/"});f(d,!1)}};a.storage={};a.storage.get=g.get=function(a,c){c=!!c;return a instanceof Array?q(a[0],a[1],c):q(a,"",c)};a.storage.getPrivate=g.getPrivate=function(c,b){c instanceof Array?c[0]+=a.getConfig("site"):c+=a.getConfig("site"); +return g.get(c,b)};a.storage.set=g.set=function(a,c,b,d){return a instanceof Array?l(a[0],a[1],c,d,null):l(a,null,c,d,b)};a.storage.setPrivate=g.setPrivate=function(c,b,d){c instanceof Array?c[0]+=a.getConfig("site"):c+=a.getConfig("site");return g.set(c,b,d)};a.storage.del=g.del=function(a){a instanceof Array?w(a[0],a[1]):w(a,"")};a.storage.delPrivate=g.delPrivate=function(c){c instanceof Array?c[0]+=a.getConfig("site"):c+=a.getConfig("site");g.del(c)};a.storage.cacheInvalidation=g.cacheInvalidation= +function(){k={}}};ATInternet.Tracker.addPlugin("Storage");ATInternet.Tracker.addPlugin("Cookies"); +}).call(window);(function(){var dfltPluginCfg={};var dfltGlobalCfg={};window.ATInternet.Tracker.Plugins.Utils=function(a){var g=this,m={};a.utils={};a.utils.getQueryStringValue=g.getQueryStringValue=function(a,b){var g=ATInternet.Utils.hashcode(b).toString();if(!m[g]){m[g]={};var h=RegExp("[&#?]{1}([^&=#?]*)=([^&#]*)?","g"),f=h.exec(b);if(null!==f)for(;null!==f;)m[g][f[1]]=f[2],f=h.exec(b)}return m[g].hasOwnProperty(a)?m[g][a]:null};a.utils.manageChapters=g.manageChapters=function(b,e,g){var h=a.getConfig("ignoreEmptyChapterValue"),f="";if(b){g=parseInt(g,10);for(var c= +1;cb.indexOf("."))return window[b]||document;b=b.split(".");return window[b[0]][b[1]]||document}return document};a.utils.getLocation=g.getLocation=function(){return g.getDocumentLevel().location.href};a.utils.getHostName=g.getHostName=function(){return g.getDocumentLevel().location.hostname};a.utils.getCollectDomain= +g.getCollectDomain=function(){var b="",b=a.getConfig("logSSL")||a.getConfig("log"),e=a.getConfig("domain");return b=b&&e?b+"."+e:a.getConfig("collectDomainSSL")||a.getConfig("collectDomain")};a.dispatchIndex={};a.dispatchStack=[];a.dispatchEventFor={};var b=0;a.dispatchSubscribe=function(b){return a.dispatchIndex[b]?!1:(a.dispatchStack.push(b),a.dispatchIndex[b]=!0)};a.dispatchSubscribed=function(b){return!0===a.dispatchIndex[b]};a.addSpecificDispatchEventFor=function(g){return a.dispatchEventFor[g]? +!1:(a.dispatchEventFor[g]=!0,b++,!0)};a.processSpecificDispatchEventFor=function(g){a.dispatchEventFor[g]&&(a.dispatchEventFor[g]=!1,b--,0===b&&(a.dispatchEventFor={},a.emit("Tracker:Plugin:SpecificEvent:Exec:Complete",{lvl:"INFO"})))};a.dispatch=function(g){var e=function(){for(var b="",e=null;0]/g,"").substring(0,1600).replace(/&/g,"$"));return c};a.plugins.waitForDependencies(["Storage","Utils"],function(){n="set"+(e.domainAttribution?"":"Private");k="get"+(e.domainAttribution?"":"Private");var c=a.utils.getLocation();g=a.utils.getQueryStringValue("xtref",c);void 0===g&&(g="");b=a.getContext("forcedReferer");if(a.getConfig("redirect")){var c=a.utils.getDocumentLevel(),c=b?b:null!==g?g:c?c.referrer:"acc_dir",d;if(d= +c){d={path:"/",end:a.getConfig("redirectionLifetime")};var p=r(k,["atredir"]);null!==p?d="object"===typeof p&&!(p instanceof Array):(r(n,["atredir",{},d]),d=!0)}d&&r(n,[["atredir","ref"],c])}else{m=r(k,[["atredir","ref"]]);r("del",[["atredir","ref"]]);a.setParam("vtag",a.version,{permanent:!0,hitType:["all"]});a.setParam("ptag","js",{permanent:!0,hitType:["all"]});c="";try{c+=window.screen.width+"x"+window.screen.height+"x"+window.screen.pixelDepth+"x"+window.screen.colorDepth}catch(q){}a.setParam("r", +c,{permanent:!0,hitType:["all"]});c="";window.innerWidth?c+=window.innerWidth+"x"+window.innerHeight:document.body&&document.body.offsetWidth&&(c+=document.body.offsetWidth+"x"+document.body.offsetHeight);a.setParam("re",c,{permanent:!0,hitType:["all"]});h();window.navigator&&a.setParam("lng",window.navigator.language||window.navigator.userLanguage,{permanent:!0,hitType:["all"]});c=ATInternet.Utils.uuid().num(13);a.setParam("idp",c,{permanent:!0,hitType:["page","clickzone"]});window.navigator&&a.setParam("jv", +window.navigator.javaEnabled()?"1":"0",{hitType:["page"]});c=a.utils.getDocumentLevel();a.setParam("ref",f(c),{permanent:!0,last:!0,hitType:["page","ecommerce"]})}a.emit("ContextVariables:Ready",{lvl:"INFO"})})};window.ATInternet.Tracker.addPlugin("ContextVariables"); +}).call(window);(function(){var dfltPluginCfg={};var dfltGlobalCfg={};window.ATInternet.Tracker.Plugins.Page=function(a){var g=["pageId","chapterLabel","update"],m=["pid","pchap","pidt"],b=["page","site"],n=["f","x"],k=function(c){return a.utils.manageChapters(c,"chapter",3)+(c.name?c.name:"")},e=function(a,c,b){c?a=c:a||"undefined"===typeof b||(a=b);return a},r=function(a,c,b){c.hasOwnProperty(b)&&(a[b]=e(a[b],c[b]))},h=function(c,d,e){if(d)for(var f=0;f - - - - - - + + + + + + + - +
diff --git a/src/components/droits-list.vue b/src/components/droits-list.vue index a6a753583..1d954987d 100644 --- a/src/components/droits-list.vue +++ b/src/components/droits-list.vue @@ -37,7 +37,7 @@
- +
@@ -113,6 +113,12 @@ export default { droit.label }` }, + getBenefitCTA: function (droit) { + if (droit.institution.slug == "credit_agricole") { + return droit.list_cta || "Découvrir cette offre" + } + return "Demander cette aide" + }, }, } diff --git a/src/components/feedback.vue b/src/components/feedback.vue index 6e43e3d7e..30e61ede7 100644 --- a/src/components/feedback.vue +++ b/src/components/feedback.vue @@ -94,6 +94,7 @@ +
+ +
+ + + + + + diff --git a/src/context/caidf/components/breadcrumb.vue b/src/context/caidf/components/breadcrumb.vue new file mode 100644 index 000000000..a5df8da2d --- /dev/null +++ b/src/context/caidf/components/breadcrumb.vue @@ -0,0 +1,72 @@ + + + + + diff --git a/src/context/caidf/components/droits-details.vue b/src/context/caidf/components/droits-details.vue new file mode 100644 index 000000000..14bd73b12 --- /dev/null +++ b/src/context/caidf/components/droits-details.vue @@ -0,0 +1,190 @@ + + + diff --git a/src/context/caidf/components/en-savoir-plus.vue b/src/context/caidf/components/en-savoir-plus.vue new file mode 100644 index 000000000..79258dadf --- /dev/null +++ b/src/context/caidf/components/en-savoir-plus.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/context/caidf/components/home/caidf-cta-block.vue b/src/context/caidf/components/home/caidf-cta-block.vue new file mode 100644 index 000000000..d8f53a0b2 --- /dev/null +++ b/src/context/caidf/components/home/caidf-cta-block.vue @@ -0,0 +1,78 @@ + + + + + diff --git a/src/context/caidf/components/home/consultant-contact-button.vue b/src/context/caidf/components/home/consultant-contact-button.vue new file mode 100644 index 000000000..ee1c065bb --- /dev/null +++ b/src/context/caidf/components/home/consultant-contact-button.vue @@ -0,0 +1,14 @@ + + + diff --git a/src/context/caidf/components/home/first-section.vue b/src/context/caidf/components/home/first-section.vue new file mode 100644 index 000000000..51ff6470c --- /dev/null +++ b/src/context/caidf/components/home/first-section.vue @@ -0,0 +1,58 @@ + + + diff --git a/src/context/caidf/components/home/mentions-legales.vue b/src/context/caidf/components/home/mentions-legales.vue new file mode 100644 index 000000000..361980a5f --- /dev/null +++ b/src/context/caidf/components/home/mentions-legales.vue @@ -0,0 +1,32 @@ + + + diff --git a/src/context/caidf/components/home/new-simulation-button.vue b/src/context/caidf/components/home/new-simulation-button.vue new file mode 100644 index 000000000..233d0a586 --- /dev/null +++ b/src/context/caidf/components/home/new-simulation-button.vue @@ -0,0 +1,17 @@ + + + diff --git a/src/context/caidf/components/home/second-section.vue b/src/context/caidf/components/home/second-section.vue new file mode 100644 index 000000000..7f311f38e --- /dev/null +++ b/src/context/caidf/components/home/second-section.vue @@ -0,0 +1,75 @@ + + + diff --git a/src/context/caidf/components/home/third-section.vue b/src/context/caidf/components/home/third-section.vue new file mode 100644 index 000000000..f4814ee11 --- /dev/null +++ b/src/context/caidf/components/home/third-section.vue @@ -0,0 +1,27 @@ + + + diff --git a/src/context/caidf/components/small-back-button.vue b/src/context/caidf/components/small-back-button.vue new file mode 100644 index 000000000..09fb04733 --- /dev/null +++ b/src/context/caidf/components/small-back-button.vue @@ -0,0 +1,16 @@ + + diff --git a/src/context/caidf/components/titre-chapitre.vue b/src/context/caidf/components/titre-chapitre.vue new file mode 100644 index 000000000..05fc8c59b --- /dev/null +++ b/src/context/caidf/components/titre-chapitre.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/src/context/caidf/components/warning-message.vue b/src/context/caidf/components/warning-message.vue new file mode 100644 index 000000000..0c0946c87 --- /dev/null +++ b/src/context/caidf/components/warning-message.vue @@ -0,0 +1,14 @@ + + + diff --git a/src/context/caidf/home.vue b/src/context/caidf/home.vue new file mode 100644 index 000000000..4a7e8a311 --- /dev/null +++ b/src/context/caidf/home.vue @@ -0,0 +1,32 @@ + + + diff --git a/src/context/caidf/icons/alert.vue b/src/context/caidf/icons/alert.vue new file mode 100644 index 000000000..3859ad501 --- /dev/null +++ b/src/context/caidf/icons/alert.vue @@ -0,0 +1,38 @@ + + + diff --git a/src/context/caidf/icons/arrow-right.vue b/src/context/caidf/icons/arrow-right.vue new file mode 100644 index 000000000..f78c3b50c --- /dev/null +++ b/src/context/caidf/icons/arrow-right.vue @@ -0,0 +1,33 @@ + + + diff --git a/src/context/caidf/icons/check-circle.vue b/src/context/caidf/icons/check-circle.vue new file mode 100644 index 000000000..2275c063c --- /dev/null +++ b/src/context/caidf/icons/check-circle.vue @@ -0,0 +1,33 @@ + + + diff --git a/src/context/caidf/icons/check.vue b/src/context/caidf/icons/check.vue new file mode 100644 index 000000000..c28ceec0d --- /dev/null +++ b/src/context/caidf/icons/check.vue @@ -0,0 +1,33 @@ + + + diff --git a/src/context/caidf/icons/dash-arrow-left.vue b/src/context/caidf/icons/dash-arrow-left.vue new file mode 100644 index 000000000..d5fe9abb2 --- /dev/null +++ b/src/context/caidf/icons/dash-arrow-left.vue @@ -0,0 +1,44 @@ + + + diff --git a/src/context/caidf/icons/double-chevron-bottom.vue b/src/context/caidf/icons/double-chevron-bottom.vue new file mode 100644 index 000000000..086487d7d --- /dev/null +++ b/src/context/caidf/icons/double-chevron-bottom.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/src/context/caidf/icons/export.vue b/src/context/caidf/icons/export.vue new file mode 100644 index 000000000..5ae95553a --- /dev/null +++ b/src/context/caidf/icons/export.vue @@ -0,0 +1,33 @@ + + + diff --git a/src/context/caidf/index.js b/src/context/caidf/index.js new file mode 100644 index 000000000..fd29aaea3 --- /dev/null +++ b/src/context/caidf/index.js @@ -0,0 +1,59 @@ +import Home from "./home.vue" +import BaseLayout from "./base-layout.vue" +import Simulation from "./views/simulation.vue" + +const NAME = "mes-aides.org" +export default { + Home, + BaseLayout, + Simulation, + name: NAME, + routes: [ + { + path: "/simulation/resultats", + name: "caidf-resultats", + meta: { + headTitle: `Les résultats de ma simulation sur le simulateur d'aides ${NAME}`, + }, + component: () => + import( + /* webpackChunkName: "static" */ "@/context/caidf/views/resultats/resultats.vue" + ), + }, + { + name: "caidf-resultats-detail", + path: "/simulation/resultats/:droitId", + meta: { + headTitle: `Les résultats de ma simulation sur le simulateur d'aides ${NAME}`, + }, + component: () => + import( + /* webpackChunkName: "static" */ "@/context/caidf/views/resultats/resultats-detail.vue" + ), + }, + { + path: "/a-propos", + name: "a-propos", + component: () => + import( + /* webpackChunkName: "static" */ "@/context/caidf/views/a-propos.vue" + ), + }, + { + path: "/ameliorer", + name: "ameliorer", + component: () => + import( + /* webpackChunkName: "static" */ "@/context/caidf/views/ameliorer.vue" + ), + }, + { + path: "/liens-utiles", + name: "liens-utiles", + component: () => + import( + /* webpackChunkName: "static" */ "@/context/caidf/views/liens-utiles.vue" + ), + }, + ], +} diff --git a/src/context/caidf/views/a-propos.vue b/src/context/caidf/views/a-propos.vue new file mode 100644 index 000000000..5ea1d266b --- /dev/null +++ b/src/context/caidf/views/a-propos.vue @@ -0,0 +1,118 @@ + diff --git a/src/context/caidf/views/ameliorer.vue b/src/context/caidf/views/ameliorer.vue new file mode 100644 index 000000000..7ef8d74b7 --- /dev/null +++ b/src/context/caidf/views/ameliorer.vue @@ -0,0 +1,149 @@ + diff --git a/src/context/caidf/views/liens-utiles.vue b/src/context/caidf/views/liens-utiles.vue new file mode 100644 index 000000000..b3f70b78b --- /dev/null +++ b/src/context/caidf/views/liens-utiles.vue @@ -0,0 +1,150 @@ + diff --git a/src/context/caidf/views/lieux.vue b/src/context/caidf/views/lieux.vue new file mode 100644 index 000000000..199d889c6 --- /dev/null +++ b/src/context/caidf/views/lieux.vue @@ -0,0 +1,80 @@ + + + + + diff --git a/src/context/caidf/views/resultats/resultat-base.vue b/src/context/caidf/views/resultats/resultat-base.vue new file mode 100644 index 000000000..b4652e11f --- /dev/null +++ b/src/context/caidf/views/resultats/resultat-base.vue @@ -0,0 +1,60 @@ + + + diff --git a/src/context/caidf/views/resultats/resultats-detail.vue b/src/context/caidf/views/resultats/resultats-detail.vue new file mode 100644 index 000000000..340585bb0 --- /dev/null +++ b/src/context/caidf/views/resultats/resultats-detail.vue @@ -0,0 +1,82 @@ + + + diff --git a/src/context/caidf/views/resultats/resultats.vue b/src/context/caidf/views/resultats/resultats.vue new file mode 100644 index 000000000..afd48e92e --- /dev/null +++ b/src/context/caidf/views/resultats/resultats.vue @@ -0,0 +1,150 @@ + + + diff --git a/src/context/caidf/views/simulation.vue b/src/context/caidf/views/simulation.vue new file mode 100644 index 000000000..d4b86313e --- /dev/null +++ b/src/context/caidf/views/simulation.vue @@ -0,0 +1,190 @@ + + + + + diff --git a/src/context/index.js b/src/context/index.js index 8cdf14180..a2806d39e 100644 --- a/src/context/index.js +++ b/src/context/index.js @@ -1,2 +1,2 @@ -import context from "./base" -export default context +import mesAides from "./caidf" +export default mesAides diff --git a/src/context/mes-aides.org/base-layout.vue b/src/context/mes-aides.org/base-layout.vue new file mode 100644 index 000000000..9a7355988 --- /dev/null +++ b/src/context/mes-aides.org/base-layout.vue @@ -0,0 +1,124 @@ + + + + + diff --git a/src/context/mes-aides.org/home.vue b/src/context/mes-aides.org/home.vue new file mode 100644 index 000000000..393cf0911 --- /dev/null +++ b/src/context/mes-aides.org/home.vue @@ -0,0 +1,123 @@ + + + diff --git a/src/context/mes-aides.org/index.js b/src/context/mes-aides.org/index.js new file mode 100644 index 000000000..1908b157c --- /dev/null +++ b/src/context/mes-aides.org/index.js @@ -0,0 +1,36 @@ +import Home from "./home.vue" +import BaseLayout from "./base-layout.vue" +import Simulation from "@/views/simulation.vue" + +export default { + Home, + BaseLayout, + Simulation, + name: "mes-aides.org", + routes: [ + { + path: "/a-propos", + name: "a-propos", + component: () => + import( + /* webpackChunkName: "static" */ "@/context/mes-aides.org/views/a-propos.vue" + ), + }, + { + path: "/ameliorer", + name: "ameliorer", + component: () => + import( + /* webpackChunkName: "static" */ "@/context/mes-aides.org/views/ameliorer.vue" + ), + }, + { + path: "/liens-utiles", + name: "liens-utiles", + component: () => + import( + /* webpackChunkName: "static" */ "@/context/mes-aides.org/views/liens-utiles.vue" + ), + }, + ], +} diff --git a/src/context/mes-aides.org/views/a-propos.vue b/src/context/mes-aides.org/views/a-propos.vue new file mode 100644 index 000000000..5ea1d266b --- /dev/null +++ b/src/context/mes-aides.org/views/a-propos.vue @@ -0,0 +1,118 @@ + diff --git a/src/context/mes-aides.org/views/ameliorer.vue b/src/context/mes-aides.org/views/ameliorer.vue new file mode 100644 index 000000000..7ef8d74b7 --- /dev/null +++ b/src/context/mes-aides.org/views/ameliorer.vue @@ -0,0 +1,149 @@ + diff --git a/src/context/mes-aides.org/views/liens-utiles.vue b/src/context/mes-aides.org/views/liens-utiles.vue new file mode 100644 index 000000000..b3f70b78b --- /dev/null +++ b/src/context/mes-aides.org/views/liens-utiles.vue @@ -0,0 +1,150 @@ + diff --git a/src/fonts/caidf/OpenSans-Bold.ttf b/src/fonts/caidf/OpenSans-Bold.ttf new file mode 100755 index 000000000..efdd5e84a Binary files /dev/null and b/src/fonts/caidf/OpenSans-Bold.ttf differ diff --git a/src/fonts/caidf/OpenSans-Regular.ttf b/src/fonts/caidf/OpenSans-Regular.ttf new file mode 100755 index 000000000..29bfd35a2 Binary files /dev/null and b/src/fonts/caidf/OpenSans-Regular.ttf differ diff --git a/src/fonts/caidf/OpenSans-SemiBold.ttf b/src/fonts/caidf/OpenSans-SemiBold.ttf new file mode 100755 index 000000000..54e7059cf Binary files /dev/null and b/src/fonts/caidf/OpenSans-SemiBold.ttf differ diff --git a/src/mixins/caidf/home-mixin.js b/src/mixins/caidf/home-mixin.js new file mode 100644 index 000000000..27e19c957 --- /dev/null +++ b/src/mixins/caidf/home-mixin.js @@ -0,0 +1,22 @@ +import { useStore } from "@/stores" + +export default { + computed: { + hasExistingSituation: function () { + const store = useStore() + return store.passSanityCheck + }, + }, + methods: { + newSituation: function () { + const store = useStore() + store.clear(this.$route.query.external_id) + this.next() + }, + next: function () { + const store = useStore() + store.verifyBenefitVariables() + this.$push() + }, + }, +} diff --git a/src/plugins/state-service.js b/src/plugins/state-service.js index ad99709d0..720fb0c0a 100644 --- a/src/plugins/state-service.js +++ b/src/plugins/state-service.js @@ -22,6 +22,7 @@ const StateService = { failure.toString() ) } else { + console.log(failure) throw new Error(failure) } }) diff --git a/src/router.js b/src/router.js index cb0932032..3def6d0a0 100644 --- a/src/router.js +++ b/src/router.js @@ -33,7 +33,10 @@ const router = createRouter({ { path: "/simulation", name: "simulation", - redirect: "/simulation/individu/demandeur/date_naissance", + redirect: () => { + const store = useStore() + return store.getAllSteps[1].path + }, component: context.Simulation, meta: { headTitle: `Ma simulation sur le simulateur d'aides ${context.name}`, @@ -398,7 +401,7 @@ router.beforeEach((to, from, next) => { if ( to.matched.some((r) => r.name === "foyer" || r.name === "simulation") && - !to.path.endsWith("/date_naissance") && + to.path != store.getAllSteps[1].path && [ "redirect", "resultats", @@ -465,6 +468,7 @@ router.afterEach((to) => { if (to.preventFocus) return nextTick(function () { + window.responsiveIframe() document.title = getTitleMeta(to) let title = document.querySelector("h1") @@ -477,4 +481,12 @@ router.afterEach((to) => { }) }) +router.afterEach((to) => { + if (window?.ATInternet?.Tracker?.Tag) { + var tag = new window.ATInternet.Tracker.Tag() + tag.page.set({ name: to.path }) + tag.dispatch() + } +}) + export default router diff --git a/src/stores/index.ts b/src/stores/index.ts index cafa105f2..3424ed3d0 100644 --- a/src/stores/index.ts +++ b/src/stores/index.ts @@ -494,7 +494,7 @@ export const useStore = defineStore("store", { }, redirection(next: (path: string) => void) { this.setMessage( - `Vous avez été redirigé·e sur la première page du simulateur. Vous pensez que c'est une erreur ? Contactez-nous :
${process.env.VUE_APP_CONTACT_EMAIL}.` + `Vous avez été redirigé·e sur la première page du simulateur. Vous pensez que c'est une erreur ? Contactez-nous.` ) next("/simulation") }, diff --git a/src/styles/caidf/_fonts.scss b/src/styles/caidf/_fonts.scss new file mode 100644 index 000000000..12400dbd4 --- /dev/null +++ b/src/styles/caidf/_fonts.scss @@ -0,0 +1,101 @@ +@font-face { + font-family: "Open Sans"; + src: url("../fonts/caidf/OpenSans-Regular.ttf") format("truetype"); +} + +@font-face { + font-family: "Open Sans Semi-bold"; + src: url("../fonts/caidf/OpenSans-SemiBold.ttf") format("truetype"); +} + +@font-face { + font-family: "Open Sans Bold"; + src: url("../fonts/caidf/OpenSans-Bold.ttf") format("truetype"); +} + +html { + @include font-body(); + + body { + &, + a { + font-family: "Open Sans"; + } + } + + h1, + .caidf-is-font-size-1, + body .aj-main-container .aj-category-title h1 { + @include font-heading-1-regular(); + color: $color-primaire; + } + + h2, + .caidf-is-font-size-2 { + @include font-heading-2-regular(); + } + + h3, + .caidf-is-font-size-3 { + @include font-heading-3(); + } + + h4, + .caidf-is-font-size-4 { + @include font-heading-4(); + } + + h5, + .caidf-is-font-size-5 { + @include font-heading-5(); + } + + body .aj-question { + font-size: 14px; + font-weight: normal; + font-family: "Open Sans Semi-bold"; + color: black; + } + + body h3.aj-question { + text-transform: none !important; + } + + .caidf-font-body-small { + @include font-body-small(); + } + + // Override class font + button.button, + a.button, + .aj-main-container .aj-tooltip:before, + .aj-main-container .aj-help-popup > *:last-child { + font-family: "Open Sans" !important; + } +} + +html body .aj-help-modal .aj-help-modal-container .aj-help-modal-content { + font-family: "Open Sans"; +} + +.caidf { + &-font-bold { + font-weight: 700 !important; + } + + &-font-open-sans-semi-bold { + font-family: "Open Sans Semi-bold" !important; + } + + &-font-open-sans-bold { + font-family: "Open Sans Bold" !important; + } + + &-has-text-uppercase { + text-transform: uppercase !important; + } + + &-text-transformation-none { + text-transform: none; + } +} diff --git a/src/styles/caidf/_style-params.scss b/src/styles/caidf/_style-params.scss new file mode 100644 index 000000000..0b0af21ca --- /dev/null +++ b/src/styles/caidf/_style-params.scss @@ -0,0 +1,251 @@ +/* + This file was auto-generated by InVision DSM from the cads design library. + To keep style values in sync across teams, changes to this file should be made directly from DSM. + +*/ +/* + Colors: +*/ + +$color-accent: #99cc00; +$color-primaire: #007d8f; +$color-secondaire: #006675; +$color-0-white: #ffffff; +$color-10-background: #f5f5f5; +$color-20-background-alt: #ececec; +$color-30-disabled: #e9e9e9; +$color-40-dividers: #d8d8d8; +$color-50-borders: #cccccc; +$color-60-text-minor: #999999; +$color-70-text-major: #454545; +$color-info-100: #5bc0de; +$color-info-30: #d5eff6; +$color-warning-100: #f0ad4e; +$color-warning-30: #fee6c5; +$color-danger-100: #dd3938; +$color-danger-30: #f9dcdc; +$color-80-footer: #222222; +$color-contact: #009c8c; +$color-success-100: #43a047; +$color-success-30: #bfe4c5; + +$color-first-section-home: #7fbec7; + +/* + Font Styles: +*/ + +/* Heading 1 Bold font style */ +$font-heading-1-bold-font-size: 32px; +$font-heading-1-bold-line-height: 48px; +$font-heading-1-bold-text-align: start; +$font-heading-1-bold-color: #454545; +$font-heading-1-bold-text-transform: uppercase; +$font-heading-1-bold-font-style: normal; +$font-heading-1-bold-font-weight: bold; +$font-heading-1-bold-font-family: Open Sans; + +@mixin font-heading-1-bold() { + font-size: $font-heading-1-bold-font-size; + line-height: $font-heading-1-bold-line-height; + text-align: $font-heading-1-bold-text-align; + color: $font-heading-1-bold-color; + text-transform: $font-heading-1-bold-text-transform; + font-style: $font-heading-1-bold-font-style; + font-weight: $font-heading-1-bold-font-weight; + font-family: $font-heading-1-bold-font-family; +} + +/* Heading 1 Regular font style */ +$font-heading-1-regular-font-size: 32px; +$font-heading-1-regular-line-height: 48px; +$font-heading-1-regular-text-align: start; +$font-heading-1-regular-color: #454545; +$font-heading-1-regular-text-transform: uppercase; +$font-heading-1-regular-font-style: normal; +$font-heading-1-regular-font-weight: 400; +$font-heading-1-regular-font-family: Open Sans; + +@mixin font-heading-1-regular() { + font-size: $font-heading-1-regular-font-size; + line-height: $font-heading-1-regular-line-height; + text-align: $font-heading-1-regular-text-align; + color: $font-heading-1-regular-color; + text-transform: $font-heading-1-regular-text-transform; + font-style: $font-heading-1-regular-font-style; + font-weight: $font-heading-1-regular-font-weight; + font-family: $font-heading-1-regular-font-family; +} + +/* Heading 2 Bold font style */ +$font-heading-2-bold-font-size: 26px; +$font-heading-2-bold-line-height: 40px; +$font-heading-2-bold-text-align: start; +$font-heading-2-bold-color: #454545; +$font-heading-2-bold-font-style: normal; +$font-heading-2-bold-font-weight: bold; +$font-heading-2-bold-font-family: Open Sans; + +@mixin font-heading-2-bold() { + font-size: $font-heading-2-bold-font-size; + line-height: $font-heading-2-bold-line-height; + text-align: $font-heading-2-bold-text-align; + color: $font-heading-2-bold-color; + font-style: $font-heading-2-bold-font-style; + font-weight: $font-heading-2-bold-font-weight; + font-family: $font-heading-2-bold-font-family; +} + +/* Heading 2 Regular font style */ +$font-heading-2-regular-font-size: 26px; +$font-heading-2-regular-line-height: 40px; +$font-heading-2-regular-text-align: start; +$font-heading-2-regular-color: #454545; +$font-heading-2-regular-font-style: normal; +$font-heading-2-regular-font-weight: 400; +$font-heading-2-regular-font-family: Open Sans; + +@mixin font-heading-2-regular() { + font-size: $font-heading-2-regular-font-size; + line-height: $font-heading-2-regular-line-height; + text-align: $font-heading-2-regular-text-align; + color: $font-heading-2-regular-color; + font-style: $font-heading-2-regular-font-style; + font-weight: $font-heading-2-regular-font-weight; + font-family: $font-heading-2-regular-font-family; +} + +/* Heading 3 font style */ +$font-heading-3-font-size: 24px; +$font-heading-3-line-height: 40px; +$font-heading-3-text-align: left; +$font-heading-3-color: #454545; +$font-heading-3-text-transform: uppercase; +$font-heading-3-font-style: normal; +$font-heading-3-font-weight: 400; +$font-heading-3-font-family: Open Sans; + +@mixin font-heading-3() { + font-size: $font-heading-3-font-size; + line-height: $font-heading-3-line-height; + text-align: $font-heading-3-text-align; + color: $font-heading-3-color; + text-transform: $font-heading-3-text-transform; + font-style: $font-heading-3-font-style; + font-weight: $font-heading-3-font-weight; + font-family: $font-heading-3-font-family; +} + +/* Heading 4 font style */ +$font-heading-4-font-size: 20px; +$font-heading-4-line-height: 32px; +$font-heading-4-text-align: left; +$font-heading-4-color: #454545; +$font-heading-4-font-style: normal; +$font-heading-4-font-weight: bold; +$font-heading-4-font-family: Open Sans; + +@mixin font-heading-4() { + font-size: $font-heading-4-font-size; + line-height: $font-heading-4-line-height; + text-align: $font-heading-4-text-align; + color: $font-heading-4-color; + font-style: $font-heading-4-font-style; + font-weight: $font-heading-4-font-weight; + font-family: $font-heading-4-font-family; +} + +/* Heading 5 font style */ +$font-heading-5-font-size: 18px; +$font-heading-5-line-height: 24px; +$font-heading-5-text-align: left; +$font-heading-5-color: #454545; +$font-heading-5-font-style: normal; +$font-heading-5-font-weight: 400; +$font-heading-5-font-family: Open Sans; + +@mixin font-heading-5() { + font-size: $font-heading-5-font-size; + line-height: $font-heading-5-line-height; + text-align: $font-heading-5-text-align; + color: $font-heading-5-color; + font-style: $font-heading-5-font-style; + font-weight: $font-heading-5-font-weight; + font-family: $font-heading-5-font-family; +} + +/* Body font style */ +$font-body-font-size: 16px; +$font-body-line-height: 24px; +$font-body-text-align: left; +$font-body-color: #454545; +$font-body-font-style: normal; +$font-body-font-weight: 400; +$font-body-font-family: Open Sans; + +@mixin font-body() { + font-size: $font-body-font-size; + line-height: $font-body-line-height; + text-align: $font-body-text-align; + color: $font-body-color; + font-style: $font-body-font-style; + font-weight: $font-body-font-weight; + font-family: $font-body-font-family; +} + +/* Body Small font style */ +$font-body-small-font-size: 14px; +$font-body-small-line-height: 18px; +$font-body-small-text-align: left; +$font-body-small-color: #454545; +$font-body-small-font-style: normal; +$font-body-small-font-weight: 400; +$font-body-small-font-family: Open Sans; + +@mixin font-body-small() { + font-size: $font-body-small-font-size; + line-height: $font-body-small-line-height; + text-align: $font-body-small-text-align; + color: $font-body-small-color; + font-style: $font-body-small-font-style; + font-weight: $font-body-small-font-weight; + font-family: $font-body-small-font-family; +} + +/* Caption font style */ +$font-caption-font-size: 12px; +$font-caption-line-height: 16px; +$font-caption-text-align: left; +$font-caption-color: #454545; +$font-caption-font-style: normal; +$font-caption-font-weight: 400; +$font-caption-font-family: Open Sans; + +@mixin font-caption() { + font-size: $font-caption-font-size; + line-height: $font-caption-line-height; + text-align: $font-caption-text-align; + color: $font-caption-color; + font-style: $font-caption-font-style; + font-weight: $font-caption-font-weight; + font-family: $font-caption-font-family; +} + +/* .Type-System/Links/Enabled font style */ +$font-type-system-links-enabled-font-size: 14px; +$font-type-system-links-enabled-line-height: 24px; +$font-type-system-links-enabled-text-align: left; +$font-type-system-links-enabled-color: #007d8f; +$font-type-system-links-enabled-font-style: normal; +$font-type-system-links-enabled-font-weight: bold; +$font-type-system-links-enabled-font-family: Open Sans; + +@mixin font-type-system-links-enabled() { + font-size: $font-type-system-links-enabled-font-size; + line-height: $font-type-system-links-enabled-line-height; + text-align: $font-type-system-links-enabled-text-align; + color: $font-type-system-links-enabled-color; + font-style: $font-type-system-links-enabled-font-style; + font-weight: $font-type-system-links-enabled-font-weight; + font-family: $font-type-system-links-enabled-font-family; +} diff --git a/src/styles/caidf/_utils.scss b/src/styles/caidf/_utils.scss new file mode 100644 index 000000000..0c245910b --- /dev/null +++ b/src/styles/caidf/_utils.scss @@ -0,0 +1,20 @@ +.caidf { + &-has-text-white { + color: white !important; + } + &-has-text-center { + text-align: center; + } + + &-columns { + display: flex; + + .caidf-is-half { + width: 50%; + } + } + + &-is-full-width { + width: 100%; + } +} diff --git a/src/styles/caidf/desktop/_buttons.scss b/src/styles/caidf/desktop/_buttons.scss new file mode 100644 index 000000000..23afa3b45 --- /dev/null +++ b/src/styles/caidf/desktop/_buttons.scss @@ -0,0 +1,105 @@ +.light-primary-button { + border: none !important; + background-color: rgba($color-primaire, 0.6) !important; + + &:hover, + &:focus { + background-color: $color-primaire !important; + } +} + +.caidf-recapitulatif-button { + display: flex; + height: 40px; + width: 40px; + border-radius: 3px; + + img { + margin: auto; + width: 18px; + height: 24px; + } +} + +button.button { + box-shadow: none !important; + + &.disabled { + border: 1px solid $color-30-disabled !important; + background-color: $color-30-disabled !important; + } +} + +.caidf-back-button { + display: flex; + align-items: center; + margin-bottom: 12px; + + background-color: transparent; + color: $color-primaire; + font-family: "Open Sans Semi-bold"; + font-size: 16px; + text-decoration: none; + + svg { + transform: rotate(180deg); + height: 16px; + width: 16px; + margin-right: 8px; + + path { + fill: $color-primaire; + } + } + + &:hover { + svg path { + fill: var(--dark-blue); + } + } +} + +@mixin caidf-button-mixin( + $color-background, + $color-font, + $color-border, + $color-border-hover +) { + border: 1px solid $color-border; + background-color: $color-background; + color: $color-font; + + &:focus, + &:hover { + background-color: $color-font; + color: $color-background; + border-color: $color-border-hover; + } +} + +.caidf-button { + display: inline-block; + padding: 12px 24px; + min-width: 200px; + text-decoration: none; + text-align: center; + border-radius: 4px; + + &.caidf-accent { + @include caidf-button-mixin($color-accent, white, $color-accent, white); + } + + &.caidf-outline-white { + @include caidf-button-mixin($color-first-section-home, white, white, white); + } +} + +.caidf-link-with-icon { + display: flex; + align-items: center; + + svg, + img { + margin-right: 8px; + } +} diff --git a/src/styles/caidf/desktop/_composants.scss b/src/styles/caidf/desktop/_composants.scss new file mode 100644 index 000000000..d21778776 --- /dev/null +++ b/src/styles/caidf/desktop/_composants.scss @@ -0,0 +1,128 @@ +.caidf-breadcrumb-wrapper { + display: flex; + align-items: center; + background-color: $color-secondaire; + color: white; + height: 72px; + + .caidf-breadcrumb { + display: flex; + align-items: center; + margin: 0 auto; + + &.tablet { + display: none; + } + + .caidf-breadcrumb-arrow { + margin: 0 16px; + + svg { + height: 15px; + width: 15px; + } + } + + .caidf-breadcrumb-link { + display: flex; + align-items: center; + color: white; + + text-decoration: none; + + svg { + height: 24px; + width: 24px; + } + + &.active { + font-weight: 700; + color: white; + } + + span::before { + display: block; + content: attr(data-text); + font-weight: bold; + height: 0; + overflow: hidden; + visibility: hidden; + } + + &.disable:not(.active) { + opacity: 0.5; + pointer-events: none; + } + + &.done { + color: white; + + svg.caidf-check path { + fill: $color-accent; + } + } + + .caidf-check { + margin-right: 8px; + } + } + } +} + +.aj-selections .aj-selection-wrapper, +.aj-selection-wrapper { + input[type="radio"], + input[type="checkbox"] { + left: 0 !important; + + &:focus + label { + font-weight: 700; + } + } + + label { + width: auto !important; + min-width: 0px !important; + padding: 0 0 0 36px !important; + box-shadow: none !important; + border: none !important; + background-color: transparent !important; + transition: none !important; + } +} + +html body .aj-main-container .aj-help-popup { + display: none; + padding: 6px; + font-size: 14px; + line-height: 20px; + + img { + height: 20px; + width: 20px; + } +} + +.caidf-notification { + display: flex; + align-items: center; + + svg { + margin-right: 16px; + path { + fill: $color-warning-100; + } + } + + .caidf-font-bold { + margin-right: 16px; + } +} + +html body > .aj-website .aj-complete-progress-bar { + height: $progress-height; +} + +.caidf-max-width-text { + max-width: 650px; +} diff --git a/src/styles/caidf/desktop/_home.scss b/src/styles/caidf/desktop/_home.scss new file mode 100644 index 000000000..03db1901f --- /dev/null +++ b/src/styles/caidf/desktop/_home.scss @@ -0,0 +1,218 @@ +html { + overflow-x: hidden; +} +#homepage { + .caidf-home-section { + padding: 32px 67px; + display: flex; + flex-direction: column; + } + + .caidf-home-container { + position: relative; + flex-grow: 1; + max-width: 1400px; + width: 100%; + margin: 0 auto; + } + + .caidf-first-section { + position: relative; + min-height: calc(100vh - 150px); + background-color: $color-first-section-home; + + .caidf-home-breadcrumb { + display: flex; + + .caidf-home-breadcrumb-arrow { + margin: 0 8px; + + svg { + width: 9px; + height: 12px; + } + } + + .caidf-home-breadcrumb-link { + font-size: 14px; + font-family: "Open Sans Semi-bold"; + color: white; + text-decoration: none; + + &.active { + font-family: "Open Sans Bold"; + } + } + } + + .caidf-home-container { + min-height: 100%; + display: flex; + } + + .caidf-hand-with-phone-img { + position: absolute; + bottom: -32px; + right: 0; + width: 35%; + } + + .caidf-first-section-text { + margin-top: auto; + margin-bottom: auto; + padding: 32px 0; + width: 66%; + } + + h1 { + font-size: 44px; + margin-bottom: 32px; + font-family: "Open Sans Bold"; + text-transform: unset; + } + + p { + font-size: 20px; + margin-bottom: 32px; + } + + .caidf-button, + .caidf-link-with-icon { + margin-bottom: 24px; + } + + .caidf-accent { + margin-right: 24px; + } + + .caidf-link-with-icon { + color: white; + + svg path { + fill: white; + } + } + } + + .caidf-second-section { + background-color: $color-primaire; + + @keyframes slide-bottom { + 0% { + transform: translateY(0); + } + 50% { + transform: translateY(20px); + } + 100% { + transform: translateY(0); + } + } + + .caidf-chevron-wrapper { + display: flex; + margin-bottom: 40px; + + a { + margin-right: auto; + margin-left: auto; + padding: 0 10px 20px 10px; + + span { + animation-name: slide-bottom; + animation-duration: 5s; + animation-iteration-count: infinite; + } + + svg path { + fill: $color-accent; + } + } + } + + .caidf-cta-block { + margin-bottom: 120px; + + .caidf-cta-wrapper { + margin-top: 40px; + } + } + .caidf-cta-column { + z-index: 1; + display: flex; + flex-direction: column; + justify-content: center; + + p { + color: rgba(255, 255, 255, 0.8); + } + } + .caidf-img-column { + z-index: 0; + position: relative; + + .caidf-dash-arrow { + position: absolute; + top: calc(-162px - 40px); + } + } + + .cta-left { + .caidf-cta-column { + padding-right: 50px; + } + + .caidf-dash-arrow { + left: 40px; + transform: scale(-1, 1); + } + } + + .cta-right { + .caidf-cta-column { + order: 2; + padding-left: 50px; + padding-bottom: 30px; + } + + .caidf-img-column { + order: 1; + } + + .caidf-dash-arrow { + right: 40px; + } + } + } + + .caidf-third-section { + background-color: white; + padding-top: 64px; + padding-bottom: 72px; + + .caidf-home-container { + display: flex; + justify-content: center; + } + h2 { + font-family: "Open Sans" !important; + color: $color-70-text-major; + } + + .caidf-third-buttons { + display: flex; + justify-content: center; + margin-top: 52px; + } + } + + .caidf-mentions-legales { + h2 { + font-size: 23px; + color: #454545; + } + font-size: 12px; + background-color: #e5e5e5; + color: #454545; + } +} diff --git a/src/styles/caidf/desktop/_inputs.scss b/src/styles/caidf/desktop/_inputs.scss new file mode 100644 index 000000000..4d4927199 --- /dev/null +++ b/src/styles/caidf/desktop/_inputs.scss @@ -0,0 +1,44 @@ +html body { + .aj-selections .aj-selection-wrapper { + input[type="radio"] { + border: 1px solid $color-40-dividers; + width: 24px; + height: 24px; + + &:checked { + border: 1px solid $color-70-text-major; + + &:before { + width: 8px; + height: 8px; + background-color: $color-primaire; + } + } + } + } + + .aj-main-container .aj-selection-wrapper { + input[type="checkbox"] { + border: 1px solid $color-40-dividers; + width: 16px; + height: 16px; + border-radius: 3px; + + &:checked { + border: 1px solid $color-70-text-major !important; + background-color: transparent !important; + + &:before { + content: ""; + top: 50%; + left: 50%; + transform: translateY(-50%) translateX(-50%); + width: 5px; + height: 5px; + border-radius: 0; + background-color: $color-primaire; + } + } + } + } +} diff --git a/src/styles/caidf/desktop/_resultats.scss b/src/styles/caidf/desktop/_resultats.scss new file mode 100644 index 000000000..9d1b3e6ce --- /dev/null +++ b/src/styles/caidf/desktop/_resultats.scss @@ -0,0 +1,137 @@ +.caidf-resultats { + .caidf-resultats-title-content { + padding: 0 16px; + margin: 60px auto 32px auto; + max-width: 700px; + text-align: center; + + h1, + p { + margin-top: 16px; + margin-bottom: 16px; + text-align: center; + } + + .caidf-benefits-count { + margin-top: 16px; + font-weight: 700; + + span { + font-size: 24px; + color: $color-accent; + } + } + } + + .caidf-resultats-container { + padding-top: 60px; + background-color: $color-10-background; + + .aj-main-container { + background-color: transparent; + } + + .aj-aide-box, + .aj-box-wrapper .aj-box { + box-shadow: 0px 3px 6px #00000029; + } + .aj-droit-detail .aj-droit-conditions { + background-color: rgba($color-primaire, 0.5); + color: white; + border-radius: 4px; + + a { + color: white; + } + + &, + .aj-droit-conditions-title, + a { + font-family: "Open Sans Semi-bold"; + } + + svg { + margin-right: 4px; + width: 14px; + height: 12px; + path { + fill: $color-primaire; + stroke: $color-primaire; + stroke-width: 3px; + } + } + } + + .aj-aide-illustration { + width: 90px; + } + + .aj-benefit-label { + font-size: 18px; + } + } + + .aj-aide-text { + img { + display: none; + } + } + + .caidf-resultats-button { + display: flex; + justify-content: center; + padding: 16px 0; + + .button span { + text-transform: uppercase; + margin-left: 8px; + } + } + + .aj-droit-pro-agricole { + display: flex !important; + align-items: center; + + svg { + margin-right: 8px; + + path { + fill: $color-accent; + } + } + } + + .aj-results-details { + margin-bottom: 75px; + + .aj-droit-detail { + position: relative; + .caidf-invalid-link { + position: absolute; + bottom: -75px; + left: 50%; + transform: translateX(-50%); + + a { + padding: 10px; + color: $color-70-text-major; + text-decoration: none; + } + } + } + } +} + +.caidf-bon-a-savoir { + background-color: lightgrey; + border-radius: 3px; + padding: 5px; + + .title { + font-weight: bold; + } +} + +.mention-credit { + font-size: 20px; +} diff --git a/src/styles/caidf/desktop/_simulation.scss b/src/styles/caidf/desktop/_simulation.scss new file mode 100644 index 000000000..c0998f3ff --- /dev/null +++ b/src/styles/caidf/desktop/_simulation.scss @@ -0,0 +1,137 @@ +html body .aj-simulation { + min-height: 100%; + background: white; + + .caidf-simulation-content { + $helping-text-size: 30%; + display: flex; + position: relative; + + &.full-width { + .caidf-simulation-helping-block { + display: none; + } + .caidf-simulation-survey { + width: 100%; + } + } + + .caidf-simulation-helping-block { + padding: 0 4%; + width: $helping-text-size; + background-color: $color-primaire; + color: white; + + .caidf-simulation-helping-block-content { + overflow-y: hidden; + display: flex; + flex-direction: column; + position: sticky; + top: 88px; + + height: calc( + 100vh - 72px - #{$progress-height} + ); // full screen height - breadcrumb - progress-bar + } + + .caidf-help-icon { + display: flex; + justify-content: center; + margin-top: 64px; + margin-bottom: 32px; + + img { + height: 45px; + width: 45px; + } + } + + .caidf-simulation-helping-text { + max-width: 300px; + margin-left: auto; + margin-right: auto; + margin-bottom: 32px; + text-align: center; + font-size: 16px; + } + + .caidf-simulation-helping-img { + margin-top: auto; + max-height: 400px; + max-width: 100%; + + &.planning-sheets { + margin-bottom: 32px; + } + &.logement { + margin-bottom: 90px; + } + } + } + + .caidf-simulation-survey { + width: #{100% - $helping-text-size}; + background-color: white; + .aj-main-container { + background-color: white; + + .aj-box-wrapper > * { + box-shadow: none; + padding-left: 0; + padding-right: 0; + } + } + + .aj-category-title-wrapper { + padding-right: 0; + padding-bottom: 0; + padding-left: 0; + } + + .aj-actions { + left: 0; + } + } + } + + .aj-category-title { + align-items: center; + justify-content: flex-start; + flex-direction: row !important; + + .caidf-recapitulatif-button { + flex-shrink: 0; + margin-left: 24px; + } + } + + #add-pac { + display: flex; + flex-direction: column; + background-color: $color-primaire; + color: white; + font-family: "Open Sans Semi-bold" !important; + text-transform: uppercase; + + padding: 24px 28px; + + &:hover { + background-color: white; + color: $color-primaire; + + svg path { + fill: $color-primaire; + } + } + + svg { + margin-bottom: 12px; + height: 24px; + width: 24px; + + path { + fill: white; + } + } + } +} diff --git a/src/styles/caidf/main.scss b/src/styles/caidf/main.scss new file mode 100644 index 000000000..b337cb89f --- /dev/null +++ b/src/styles/caidf/main.scss @@ -0,0 +1,25 @@ +$progress-height: 4px; + +@import "./fonts"; +@import "./utils"; + +@import "./desktop/composants"; +@import "./desktop/home"; +@import "./desktop/simulation"; +@import "./desktop/resultats"; +@import "./desktop/buttons"; +@import "./desktop/inputs"; + +/* TABLET IMPORTS */ +@media (max-width: 768px) { + @import "./tablet/home"; + @import "./tablet/simulation"; + @import "./tablet/resultat"; + @import "./tablet/composants"; +} + +/* MOBILE IMPORTS */ +@media (max-width: 576px) { + @import "./mobile/home"; + @import "./mobile/simulation"; +} diff --git a/src/styles/caidf/mobile/_home.scss b/src/styles/caidf/mobile/_home.scss new file mode 100644 index 000000000..8afe5951f --- /dev/null +++ b/src/styles/caidf/mobile/_home.scss @@ -0,0 +1,5 @@ +#homepage { + .caidf-home-section { + padding: 16px 32px; + } +} diff --git a/src/styles/caidf/mobile/_simulation.scss b/src/styles/caidf/mobile/_simulation.scss new file mode 100644 index 000000000..af21cbe1f --- /dev/null +++ b/src/styles/caidf/mobile/_simulation.scss @@ -0,0 +1,6 @@ +html body .aj-simulation { + .caidf-simulation-content { + padding-left: 16px; + padding-right: 16px; + } +} diff --git a/src/styles/caidf/tablet/_composants.scss b/src/styles/caidf/tablet/_composants.scss new file mode 100644 index 000000000..c26ef2c1a --- /dev/null +++ b/src/styles/caidf/tablet/_composants.scss @@ -0,0 +1,14 @@ +.caidf-breadcrumb-wrapper { + .caidf-breadcrumb { + &:not(.tablet) { + display: none; + } + &.tablet { + display: flex; + } + } +} + +html body .aj-main-container .aj-help-popup { + display: inline-flex; +} diff --git a/src/styles/caidf/tablet/_home.scss b/src/styles/caidf/tablet/_home.scss new file mode 100644 index 000000000..7e1ed6708 --- /dev/null +++ b/src/styles/caidf/tablet/_home.scss @@ -0,0 +1,72 @@ +#homepage { + .caidf-first-section { + .caidf-home-breadcrumb { + margin-bottom: 32px; + } + + .caidf-first-section-text { + width: 100%; + + .caidf-first-section-buttons { + display: flex; + flex-direction: column; + align-items: center; + + .caidf-accent { + margin-right: 0; + } + } + } + .caidf-hand-with-phone-img { + display: none; + } + } + + .caidf-second-section { + .caidf-chevron-wrapper { + margin-bottom: 20px; + } + + .caidf-cta-block { + flex-direction: column; + margin-bottom: 60px; + + .caidf-img-column, + .caidf-cta-column { + width: 100%; + } + + .caidf-img-column { + order: 1; + display: flex; + margin-bottom: 36px; + + .caidf-dash-arrow { + display: none; + } + + .caidf-cta-block-img { + margin-left: auto; + margin-right: auto; + height: auto; + width: 70%; + min-width: 200px; + } + } + + .caidf-cta-column { + order: 2; + padding: 0; + + &, + h3 { + text-align: center; + } + + h3 { + margin-top: 0 !important; + } + } + } + } +} diff --git a/src/styles/caidf/tablet/_resultat.scss b/src/styles/caidf/tablet/_resultat.scss new file mode 100644 index 000000000..1af444604 --- /dev/null +++ b/src/styles/caidf/tablet/_resultat.scss @@ -0,0 +1,3 @@ +.caidf-resultats .caidf-resultats-container .aj-aide-illustration { + width: 70px; +} diff --git a/src/styles/caidf/tablet/_simulation.scss b/src/styles/caidf/tablet/_simulation.scss new file mode 100644 index 000000000..c992d66a0 --- /dev/null +++ b/src/styles/caidf/tablet/_simulation.scss @@ -0,0 +1,12 @@ +html body .aj-simulation { + .caidf-simulation-content { + .caidf-simulation-helping-block { + display: none; + } + + .caidf-simulation-survey { + width: 100%; + padding-bottom: 80px; + } + } +} diff --git a/src/styles/main.scss b/src/styles/main.scss index f70844c0f..8fe3ef7de 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -1,6 +1,8 @@ -// FROM BOOTSTRAP +@import "caidf/_style-params"; + +// FROM BOOTSTRAPv $font-size-base: 15px; -$font-size-h2: floor(($font-size-base * 2.15)); // ~30px +$font-size-h2: $font-heading-2-bold-font-size; // END FROM BOOTSTRAP $text-color: lighten(#000, 20%); @@ -10,33 +12,26 @@ $screen-xs-max: 768px-1; $screen-smaller-than-mobile: 399px; :root { - --theme-border-radius: 25px; - --theme-primary: #526ab6; - --theme-primary-light: #4b5bd0; - --theme-primary-lighter: #e2e5fb; + --theme-border-radius: 3px; --theme-dark-text: #26353f; - --light-grey: #c4c4c4; --darkest-grey: #4f4f4f; - --green: #169b62; - --light-green: #51d27d; - --lighter-green: #eefbf2; - --lighter-green-shadow: #2fac66; + --theme-primary: #{$color-primaire}; + --theme-primary-dark: #{$color-secondaire}; + --theme-primary-darker: #{$color-secondaire}; + --theme-primary-light: #{white}; + --theme-primary-lighter: #{$color-primaire}; + --green: #{$color-success-100}; + --light-green: #{$color-accent}; + --lighter-green: #f6fdfb; //#eefbf2; + --lighter-green-shadow: #8ee2d2; //#f6fdfb;//#2fac66; --space-xs: 20px; -} -@font-face { - font-family: "Marianne"; - src: url("../fonts/Marianne-Regular.woff2") format("truetype"); + --theme-warning-bg: #{$color-warning-30}; + --theme-warning-border: #{$color-warning-30}; } -@font-face { - font-family: "MarianneBold"; - src: url("../fonts/Marianne-Bold.woff2") format("truetype"); -} - -@font-face { - font-family: "MarianneExtraBold"; - src: url("../fonts/Marianne-ExtraBold.woff2") format("truetype"); +body { + background-color: #f2f5f9; } /* DESKTOP IMPORTS */ @@ -80,3 +75,5 @@ $screen-smaller-than-mobile: 399px; /* UTILS */ @import "partials/utils/helpers"; + +@import "caidf/main"; diff --git a/src/styles/partials/desktop/_home.scss b/src/styles/partials/desktop/_home.scss index 58489a3b3..840f4fbec 100644 --- a/src/styles/partials/desktop/_home.scss +++ b/src/styles/partials/desktop/_home.scss @@ -20,10 +20,10 @@ html { height: 100%; .aj-home-hero { - width: 55%; display: flex; align-items: center; flex-wrap: wrap; + flex-shrink: 0; .aj-home-hero-content { h1 { @@ -65,7 +65,6 @@ html { flex-direction: column; justify-content: flex-end; align-items: stretch; - flex-grow: 2; div { display: flex; diff --git a/src/views/simulation/logement.vue b/src/views/simulation/logement.vue index ac58d1d9a..d5067a32a 100644 --- a/src/views/simulation/logement.vue +++ b/src/views/simulation/logement.vue @@ -68,22 +68,24 @@ }} -
- - +
+
+ + +
diff --git a/src/views/simulation/resultats.vue b/src/views/simulation/resultats.vue index d01d35afc..249ee998f 100644 --- a/src/views/simulation/resultats.vue +++ b/src/views/simulation/resultats.vue @@ -59,7 +59,7 @@
diff --git a/tests/integration/benefits-description.spec.js b/tests/integration/benefits-description.spec.js index 0fb7390d9..8f0cb906d 100644 --- a/tests/integration/benefits-description.spec.js +++ b/tests/integration/benefits-description.spec.js @@ -108,7 +108,7 @@ describe("benefit descriptions", function () { .replace(/\s\s+/g, " ") .trim() expect(innerText.length).toBeGreaterThanOrEqual(10) - expect(innerText.length).toBeLessThanOrEqual(420) + expect(innerText.length).toBeLessThanOrEqual(460) }) if (benefit.description.includes('target="_blank"')) { @@ -119,7 +119,7 @@ describe("benefit descriptions", function () { }) } - it("should have a link", function () { + xit("should have a link", function () { expect(typeof benefit.link).toBe("string") expect(benefit.link).toMatch(/^https?:\/\//) }) diff --git a/vue.config.js b/vue.config.js index 247f1d8d6..b7232ae65 100644 --- a/vue.config.js +++ b/vue.config.js @@ -6,6 +6,7 @@ import config from "./dist-server/backend/config/index.js" import configureAPI from "./dist-server/configure.js" import mock from "./dist-server/mock.js" import benefits from "./dist-server/data/all.js" +import webpack from "webpack" const { baseURL, github, matomo, netlifyContributionURL, statistics } = config const __dirname = new URL(".", import.meta.url).pathname @@ -15,8 +16,8 @@ process.env.VUE_APP_BENEFIT_COUNT = benefits.all.filter( (benefit) => !benefit.private ).length process.env.VUE_APP_MATOMO_ID = matomo.id -process.env.VUE_APP_CONTACT_EMAIL = "aides-jeunes@beta.gouv.fr" -process.env.VUE_APP_CONTEXT_NAME = "1jeune1solution" +process.env.VUE_APP_CONTACT_EMAIL = "equipe@mes-aides.org" +process.env.VUE_APP_CONTEXT_NAME = "mes-aides.org" process.env.VUE_APP_BASE_URL = baseURL process.env.VUE_APP_CONTEXT = process.env.CONTEXT process.env.VUE_APP_PR_URL = `${process.env.REPOSITORY_URL}/pull/${process.env.REVIEW_ID}` @@ -53,6 +54,26 @@ export default { if (args.env?.BUNDLEANALYZE) { config.plugins.push(new BundleAnalyzerPlugin({})) } + + // Remplace les fichiers pour éviter de modifier les fichiers fork + config.plugins.push( + new webpack.NormalModuleReplacementPlugin( + /en-savoir-plus$/, + "@/context/caidf/components/en-savoir-plus.vue" + ) + ) + config.plugins.push( + new webpack.NormalModuleReplacementPlugin( + /warning-message$/, + "@/context/caidf/components/warning-message" + ) + ) + config.plugins.push( + new webpack.NormalModuleReplacementPlugin( + /views\/simulation\/resultats\/lieux.vue$/, + "@/context/caidf/views/lieux" + ) + ) }, chainWebpack(config) { config.module