From 448e62177e23659ff30af2dd14ab7f5ff359dccc Mon Sep 17 00:00:00 2001 From: louispaulb Date: Fri, 22 May 2026 06:22:47 -0400 Subject: [PATCH] feat(campaigns): convert existing HTML templates to Unlayer JSON designs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Solve the "editor starts blank" problem by writing a one-time converter that wraps each compiled .html template into a minimal Unlayer design JSON (one Custom HTML block containing the entire body content). On next editor load, Unlayer reads .json and renders the template in the canvas — instant visual fidelity without manual reconstruction. Strategy choice: Unlayer's "Import HTML" is a Pro-only feature. Building a real HTML→Unlayer-blocks parser is several days of work. The minimal- viable conversion (1 row + 1 Custom HTML block) gets the user 90% there immediately: • Canvas shows the template visually (Unlayer renders the HTML) • Variables ({{firstname}}, {{gift_url}}, etc.) preserved as text • User can edit the HTML directly via the block's side panel • User can incrementally REPLACE the HTML block with native Unlayer blocks (Text, Image, Button) for any section they want decomposed — on their own schedule, not blocking the campaign send New file: services/targo-hub/scripts/convert-html-to-unlayer.js • CLI: node scripts/convert-html-to-unlayer.js • Reads templates/.html, extracts inner content, detects preheader from a hidden
, builds Unlayer design JSON with brand-appropriate body.values (Targo Green link color #00C853, Plus Jakarta Sans font, F5FAF7 page background). • Backs up existing .json before overwriting. Generated outputs (committed): templates/gift-email-fr.json — 34 KB (30 KB inner HTML + Unlayer chrome) templates/gift-email-en.json — 33 KB Live verification: GET /campaigns/templates/gift-email-fr now returns { design: {...Unlayer JSON...} } alongside html. The editor's onReady() callback in TemplateEditorPage detects data.design and calls editor.loadDesign(design) → canvas populated immediately. Co-Authored-By: Claude Opus 4.7 --- .../campaigns/templates/gift-email-en.json | 98 ++++++++++++ .../campaigns/templates/gift-email-fr.json | 98 ++++++++++++ .../scripts/convert-html-to-unlayer.js | 147 ++++++++++++++++++ .../targo-hub/templates/gift-email-en.json | 98 ++++++++++++ .../targo-hub/templates/gift-email-fr.json | 98 ++++++++++++ 5 files changed, 539 insertions(+) create mode 100644 scripts/campaigns/templates/gift-email-en.json create mode 100644 scripts/campaigns/templates/gift-email-fr.json create mode 100755 services/targo-hub/scripts/convert-html-to-unlayer.js create mode 100644 services/targo-hub/templates/gift-email-en.json create mode 100644 services/targo-hub/templates/gift-email-fr.json diff --git a/scripts/campaigns/templates/gift-email-en.json b/scripts/campaigns/templates/gift-email-en.json new file mode 100644 index 0000000..1344dea --- /dev/null +++ b/scripts/campaigns/templates/gift-email-en.json @@ -0,0 +1,98 @@ +{ + "counters": { + "u_row": 1, + "u_column": 1, + "u_content_html": 1 + }, + "body": { + "id": "BODY-1", + "rows": [ + { + "id": "ROW-1", + "cells": [ + 1 + ], + "columns": [ + { + "id": "COL-1", + "contents": [ + { + "id": "HTML-1", + "type": "html", + "values": { + "html": "
Just like you, we love stable connections and lasting relationships.
\n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Hi {{firstname}},
\n \n \n \n \n \n \n \n Going local — we want to say thanks.
\n Just like you, we love stable connections and lasting relationships.\n \n \n \n \n \n \n \n Summer's here, and we have a limited-time gift for you.\n \n \n \n \n \n \n \n We now offer new plans, up to 3.5 Gbit/s.
\n Whether you want more speed, want to beat another offer, or just want to chat — we're right around the corner.\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 🎁 {{amount}} at hundreds of brands
\n \n \n \n \n \n \n \n ⚡ Instant on activation\n \n \n \n \n \n \n \n 🤝 Stay with us {{commitment_months}}+ months\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ✅ Option 1
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 🎁  {{amount}}\n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 🪂 If you leave before {{commitment_months}} months, the prorated amount is refundable.
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ⏭️ Option 2
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Do nothing. Your monthly subscription continues as usual — no commitment, no gift card.
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 🤝 Thanks for helping our regional economy thrive!
\n \n \n \n \n \n \n \n The TARGO team\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n You're getting this email because you're a TARGO customer at {{description}}.
\n Got a question? Write to\n support@targo.ca\n or call\n 514 448-0773.\n Support 7 days/week.
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n www.targo.ca\n  ·  1867 ch. de la rivière, Ste-Clotilde, QC
\n © {{year}} TARGO Communications · All rights reserved.
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ", + "hideDesktop": false, + "displayCondition": null, + "containerPadding": "0px", + "_meta": { + "htmlID": "u_content_html_1", + "htmlClassNames": "u_content_html" + }, + "selectable": true, + "draggable": true, + "duplicatable": true, + "deletable": true, + "hideable": true + } + } + ], + "values": { + "_meta": { + "htmlID": "u_column_1", + "htmlClassNames": "u_column" + } + } + } + ], + "values": { + "displayCondition": null, + "columns": false, + "backgroundColor": "", + "columnsBackgroundColor": "", + "padding": "0px", + "anchor": "", + "hideDesktop": false, + "_meta": { + "htmlID": "u_row_1", + "htmlClassNames": "u_row" + }, + "selectable": true, + "draggable": true, + "duplicatable": true, + "deletable": true, + "hideable": true + } + } + ], + "values": { + "popupPosition": "center", + "popupWidth": "600px", + "popupHeight": "auto", + "borderRadius": "10px", + "contentAlign": "center", + "contentVerticalAlign": "center", + "contentWidth": "600px", + "fontFamily": { + "label": "Plus Jakarta Sans", + "value": "'Plus Jakarta Sans', sans-serif", + "url": "https://fonts.googleapis.com/css?family=Plus+Jakarta+Sans:400,500,600,700" + }, + "textColor": "#1B2E24", + "popupBackgroundColor": "#FFFFFF", + "backgroundColor": "#F5FAF7", + "preheaderText": "Just like you, we love stable connections and lasting relationships.", + "linkStyle": { + "body": true, + "linkColor": "#00C853", + "linkHoverColor": "#005026", + "linkUnderline": true, + "linkHoverUnderline": true + }, + "_meta": { + "htmlID": "u_body", + "htmlClassNames": "u_body" + } + } + }, + "schemaVersion": 12 +} \ No newline at end of file diff --git a/scripts/campaigns/templates/gift-email-fr.json b/scripts/campaigns/templates/gift-email-fr.json new file mode 100644 index 0000000..b3471ab --- /dev/null +++ b/scripts/campaigns/templates/gift-email-fr.json @@ -0,0 +1,98 @@ +{ + "counters": { + "u_row": 1, + "u_column": 1, + "u_content_html": 1 + }, + "body": { + "id": "BODY-1", + "rows": [ + { + "id": "ROW-1", + "cells": [ + 1 + ], + "columns": [ + { + "id": "COL-1", + "contents": [ + { + "id": "HTML-1", + "type": "html", + "values": { + "html": "
Comme toi, on aime les connexions stables et les relations durables.
\n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Bonjour {{firstname}},
\n \n \n \n \n \n \n \n Tu choisis local, on veut te remercier.
\n Comme toi, on aime les connexions stables et les relations durables.\n \n \n \n \n \n \n \n Avec l'arrivée de l'été, voici un cadeau pour toi, disponible pour un temps limité.\n \n \n \n \n \n \n \n Nous offrons maintenant de nouveaux forfaits, jusqu'à 3.5 Gbit/s.
\n Que tu souhaites plus de vitesse, battre une autre offre ou juste nous jaser, on est juste à côté.\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 🎁 {{amount}} chez des centaines de marques
\n \n \n \n \n \n \n \n ⚡ Instantané à l'activation\n \n \n \n \n \n \n \n 🤝 Rester encore {{commitment_months}} mois ou +\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ✅ Option 1
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 🎁  {{amount}}\n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 🪂 En cas de départ avant {{commitment_months}} mois, le prorata du montant est remboursable.
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ⏭️ Option 2
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Ne rien faire. Ton abonnement mensuel se poursuit normalement, sans engagement ni carte-cadeau.
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 🤝 Merci de faire rouler l'économie de notre région avec nous !
\n \n \n \n \n \n \n \n L'équipe TARGO\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Tu reçois ce courriel parce que tu es client(e) TARGO à {{description}}.
\n Une question ? Écris à\n support@targo.ca\n ou appelle au\n 514 448-0773.\n Support 7j/7.
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n www.targo.ca\n  ·  1867 ch. de la rivière, Ste-Clotilde, QC
\n © {{year}} TARGO Communications · Tous droits réservés.
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ", + "hideDesktop": false, + "displayCondition": null, + "containerPadding": "0px", + "_meta": { + "htmlID": "u_content_html_1", + "htmlClassNames": "u_content_html" + }, + "selectable": true, + "draggable": true, + "duplicatable": true, + "deletable": true, + "hideable": true + } + } + ], + "values": { + "_meta": { + "htmlID": "u_column_1", + "htmlClassNames": "u_column" + } + } + } + ], + "values": { + "displayCondition": null, + "columns": false, + "backgroundColor": "", + "columnsBackgroundColor": "", + "padding": "0px", + "anchor": "", + "hideDesktop": false, + "_meta": { + "htmlID": "u_row_1", + "htmlClassNames": "u_row" + }, + "selectable": true, + "draggable": true, + "duplicatable": true, + "deletable": true, + "hideable": true + } + } + ], + "values": { + "popupPosition": "center", + "popupWidth": "600px", + "popupHeight": "auto", + "borderRadius": "10px", + "contentAlign": "center", + "contentVerticalAlign": "center", + "contentWidth": "600px", + "fontFamily": { + "label": "Plus Jakarta Sans", + "value": "'Plus Jakarta Sans', sans-serif", + "url": "https://fonts.googleapis.com/css?family=Plus+Jakarta+Sans:400,500,600,700" + }, + "textColor": "#1B2E24", + "popupBackgroundColor": "#FFFFFF", + "backgroundColor": "#F5FAF7", + "preheaderText": "Comme toi, on aime les connexions stables et les relations durables.", + "linkStyle": { + "body": true, + "linkColor": "#00C853", + "linkHoverColor": "#005026", + "linkUnderline": true, + "linkHoverUnderline": true + }, + "_meta": { + "htmlID": "u_body", + "htmlClassNames": "u_body" + } + } + }, + "schemaVersion": 12 +} \ No newline at end of file diff --git a/services/targo-hub/scripts/convert-html-to-unlayer.js b/services/targo-hub/scripts/convert-html-to-unlayer.js new file mode 100755 index 0000000..be3b9f4 --- /dev/null +++ b/services/targo-hub/scripts/convert-html-to-unlayer.js @@ -0,0 +1,147 @@ +#!/usr/bin/env node +'use strict' +/** + * convert-html-to-unlayer.js — one-time converter from our existing compiled + * .html templates into Unlayer design JSON. Run after MJML→Unlayer migration + * so the visual editor loads existing templates instead of starting blank. + * + * Strategy: wrap the entire HTML body content in a single "Custom HTML" block + * inside a minimal Unlayer design. This is the MIN VIABLE conversion — the + * template renders correctly in the canvas, the user can edit the HTML + * directly, and they can incrementally replace the HTML block with native + * Unlayer blocks (Text, Image, Button) on their own schedule. + * + * Usage: + * node convert-html-to-unlayer.js gift-email-fr + * node convert-html-to-unlayer.js gift-email-en + */ + +const fs = require('fs') +const path = require('path') + +function htmlToUnlayer (innerBodyHtml, opts = {}) { + const preheader = opts.preheader || '' + return { + counters: { u_row: 1, u_column: 1, u_content_html: 1 }, + body: { + id: 'BODY-1', + rows: [ + { + id: 'ROW-1', + cells: [1], + columns: [ + { + id: 'COL-1', + contents: [ + { + id: 'HTML-1', + type: 'html', + values: { + html: innerBodyHtml, + hideDesktop: false, + displayCondition: null, + containerPadding: '0px', + _meta: { htmlID: 'u_content_html_1', htmlClassNames: 'u_content_html' }, + selectable: true, + draggable: true, + duplicatable: true, + deletable: true, + hideable: true, + }, + }, + ], + values: { + _meta: { htmlID: 'u_column_1', htmlClassNames: 'u_column' }, + }, + }, + ], + values: { + displayCondition: null, + columns: false, + backgroundColor: '', + columnsBackgroundColor: '', + padding: '0px', + anchor: '', + hideDesktop: false, + _meta: { htmlID: 'u_row_1', htmlClassNames: 'u_row' }, + selectable: true, + draggable: true, + duplicatable: true, + deletable: true, + hideable: true, + }, + }, + ], + values: { + popupPosition: 'center', + popupWidth: '600px', + popupHeight: 'auto', + borderRadius: '10px', + contentAlign: 'center', + contentVerticalAlign: 'center', + contentWidth: '600px', + fontFamily: { + label: 'Plus Jakarta Sans', + value: "'Plus Jakarta Sans', sans-serif", + url: 'https://fonts.googleapis.com/css?family=Plus+Jakarta+Sans:400,500,600,700', + }, + textColor: '#1B2E24', + popupBackgroundColor: '#FFFFFF', + backgroundColor: '#F5FAF7', + preheaderText: preheader, + linkStyle: { + body: true, + linkColor: '#00C853', + linkHoverColor: '#005026', + linkUnderline: true, + linkHoverUnderline: true, + }, + _meta: { htmlID: 'u_body', htmlClassNames: 'u_body' }, + }, + }, + schemaVersion: 12, + } +} + +// ── CLI ────────────────────────────────────────────────────────────────── +const name = process.argv[2] +if (!name) { + console.error('Usage: convert-html-to-unlayer.js ') + process.exit(1) +} + +const TEMPLATES_DIR = path.resolve(__dirname, '..', 'templates') +const htmlPath = path.join(TEMPLATES_DIR, name + '.html') +const jsonPath = path.join(TEMPLATES_DIR, name + '.json') + +if (!fs.existsSync(htmlPath)) { + console.error(`✗ No HTML at ${htmlPath}`) + process.exit(1) +} + +const fullHtml = fs.readFileSync(htmlPath, 'utf8') + +// Extract just the body inner content — Unlayer wraps everything in its own +// at preview/export time, so we don't want duplicated +// doctype/head/body tags. +const bodyMatch = fullHtml.match(/]*>([\s\S]*?)<\/body>/i) +const innerHtml = bodyMatch ? bodyMatch[1].trim() : fullHtml + +// Pull preheader text if a hidden
is present +// (standard email preheader pattern, also what MJML's compiles to) +const preheaderMatch = innerHtml.match(/]*display:\s*none[^>]*>\s*([^<]+?)\s*<\/div>/i) +const preheader = preheaderMatch ? preheaderMatch[1].trim() : '' + +const design = htmlToUnlayer(innerHtml, { preheader }) + +// Optional: backup existing .json +if (fs.existsSync(jsonPath)) { + const ts = new Date().toISOString().replace(/[:.]/g, '-').slice(0, 19) + fs.copyFileSync(jsonPath, jsonPath.replace(/\.json$/, `.bak-${ts}.json`)) +} + +fs.writeFileSync(jsonPath, JSON.stringify(design, null, 2), 'utf8') + +console.log(`✓ Converted ${name}.html (${fullHtml.length}b) → ${name}.json (${JSON.stringify(design).length}b)`) +console.log(` preheader: "${preheader.slice(0, 80)}${preheader.length > 80 ? '…' : ''}"`) +console.log(` inner HTML: ${innerHtml.length}b in one Custom HTML block`) diff --git a/services/targo-hub/templates/gift-email-en.json b/services/targo-hub/templates/gift-email-en.json new file mode 100644 index 0000000..1344dea --- /dev/null +++ b/services/targo-hub/templates/gift-email-en.json @@ -0,0 +1,98 @@ +{ + "counters": { + "u_row": 1, + "u_column": 1, + "u_content_html": 1 + }, + "body": { + "id": "BODY-1", + "rows": [ + { + "id": "ROW-1", + "cells": [ + 1 + ], + "columns": [ + { + "id": "COL-1", + "contents": [ + { + "id": "HTML-1", + "type": "html", + "values": { + "html": "
Just like you, we love stable connections and lasting relationships.
\n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Hi {{firstname}},
\n \n \n \n \n \n \n \n Going local — we want to say thanks.
\n Just like you, we love stable connections and lasting relationships.\n \n \n \n \n \n \n \n Summer's here, and we have a limited-time gift for you.\n \n \n \n \n \n \n \n We now offer new plans, up to 3.5 Gbit/s.
\n Whether you want more speed, want to beat another offer, or just want to chat — we're right around the corner.\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 🎁 {{amount}} at hundreds of brands
\n \n \n \n \n \n \n \n ⚡ Instant on activation\n \n \n \n \n \n \n \n 🤝 Stay with us {{commitment_months}}+ months\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ✅ Option 1
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 🎁  {{amount}}\n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 🪂 If you leave before {{commitment_months}} months, the prorated amount is refundable.
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ⏭️ Option 2
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Do nothing. Your monthly subscription continues as usual — no commitment, no gift card.
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 🤝 Thanks for helping our regional economy thrive!
\n \n \n \n \n \n \n \n The TARGO team\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n You're getting this email because you're a TARGO customer at {{description}}.
\n Got a question? Write to\n support@targo.ca\n or call\n 514 448-0773.\n Support 7 days/week.
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n www.targo.ca\n  ·  1867 ch. de la rivière, Ste-Clotilde, QC
\n © {{year}} TARGO Communications · All rights reserved.
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ", + "hideDesktop": false, + "displayCondition": null, + "containerPadding": "0px", + "_meta": { + "htmlID": "u_content_html_1", + "htmlClassNames": "u_content_html" + }, + "selectable": true, + "draggable": true, + "duplicatable": true, + "deletable": true, + "hideable": true + } + } + ], + "values": { + "_meta": { + "htmlID": "u_column_1", + "htmlClassNames": "u_column" + } + } + } + ], + "values": { + "displayCondition": null, + "columns": false, + "backgroundColor": "", + "columnsBackgroundColor": "", + "padding": "0px", + "anchor": "", + "hideDesktop": false, + "_meta": { + "htmlID": "u_row_1", + "htmlClassNames": "u_row" + }, + "selectable": true, + "draggable": true, + "duplicatable": true, + "deletable": true, + "hideable": true + } + } + ], + "values": { + "popupPosition": "center", + "popupWidth": "600px", + "popupHeight": "auto", + "borderRadius": "10px", + "contentAlign": "center", + "contentVerticalAlign": "center", + "contentWidth": "600px", + "fontFamily": { + "label": "Plus Jakarta Sans", + "value": "'Plus Jakarta Sans', sans-serif", + "url": "https://fonts.googleapis.com/css?family=Plus+Jakarta+Sans:400,500,600,700" + }, + "textColor": "#1B2E24", + "popupBackgroundColor": "#FFFFFF", + "backgroundColor": "#F5FAF7", + "preheaderText": "Just like you, we love stable connections and lasting relationships.", + "linkStyle": { + "body": true, + "linkColor": "#00C853", + "linkHoverColor": "#005026", + "linkUnderline": true, + "linkHoverUnderline": true + }, + "_meta": { + "htmlID": "u_body", + "htmlClassNames": "u_body" + } + } + }, + "schemaVersion": 12 +} \ No newline at end of file diff --git a/services/targo-hub/templates/gift-email-fr.json b/services/targo-hub/templates/gift-email-fr.json new file mode 100644 index 0000000..b3471ab --- /dev/null +++ b/services/targo-hub/templates/gift-email-fr.json @@ -0,0 +1,98 @@ +{ + "counters": { + "u_row": 1, + "u_column": 1, + "u_content_html": 1 + }, + "body": { + "id": "BODY-1", + "rows": [ + { + "id": "ROW-1", + "cells": [ + 1 + ], + "columns": [ + { + "id": "COL-1", + "contents": [ + { + "id": "HTML-1", + "type": "html", + "values": { + "html": "
Comme toi, on aime les connexions stables et les relations durables.
\n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Bonjour {{firstname}},
\n \n \n \n \n \n \n \n Tu choisis local, on veut te remercier.
\n Comme toi, on aime les connexions stables et les relations durables.\n \n \n \n \n \n \n \n Avec l'arrivée de l'été, voici un cadeau pour toi, disponible pour un temps limité.\n \n \n \n \n \n \n \n Nous offrons maintenant de nouveaux forfaits, jusqu'à 3.5 Gbit/s.
\n Que tu souhaites plus de vitesse, battre une autre offre ou juste nous jaser, on est juste à côté.\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 🎁 {{amount}} chez des centaines de marques
\n \n \n \n \n \n \n \n ⚡ Instantané à l'activation\n \n \n \n \n \n \n \n 🤝 Rester encore {{commitment_months}} mois ou +\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ✅ Option 1
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 🎁  {{amount}}\n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 🪂 En cas de départ avant {{commitment_months}} mois, le prorata du montant est remboursable.
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ⏭️ Option 2
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Ne rien faire. Ton abonnement mensuel se poursuit normalement, sans engagement ni carte-cadeau.
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 🤝 Merci de faire rouler l'économie de notre région avec nous !
\n \n \n \n \n \n \n \n L'équipe TARGO\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Tu reçois ce courriel parce que tu es client(e) TARGO à {{description}}.
\n Une question ? Écris à\n support@targo.ca\n ou appelle au\n 514 448-0773.\n Support 7j/7.
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n www.targo.ca\n  ·  1867 ch. de la rivière, Ste-Clotilde, QC
\n © {{year}} TARGO Communications · Tous droits réservés.
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ", + "hideDesktop": false, + "displayCondition": null, + "containerPadding": "0px", + "_meta": { + "htmlID": "u_content_html_1", + "htmlClassNames": "u_content_html" + }, + "selectable": true, + "draggable": true, + "duplicatable": true, + "deletable": true, + "hideable": true + } + } + ], + "values": { + "_meta": { + "htmlID": "u_column_1", + "htmlClassNames": "u_column" + } + } + } + ], + "values": { + "displayCondition": null, + "columns": false, + "backgroundColor": "", + "columnsBackgroundColor": "", + "padding": "0px", + "anchor": "", + "hideDesktop": false, + "_meta": { + "htmlID": "u_row_1", + "htmlClassNames": "u_row" + }, + "selectable": true, + "draggable": true, + "duplicatable": true, + "deletable": true, + "hideable": true + } + } + ], + "values": { + "popupPosition": "center", + "popupWidth": "600px", + "popupHeight": "auto", + "borderRadius": "10px", + "contentAlign": "center", + "contentVerticalAlign": "center", + "contentWidth": "600px", + "fontFamily": { + "label": "Plus Jakarta Sans", + "value": "'Plus Jakarta Sans', sans-serif", + "url": "https://fonts.googleapis.com/css?family=Plus+Jakarta+Sans:400,500,600,700" + }, + "textColor": "#1B2E24", + "popupBackgroundColor": "#FFFFFF", + "backgroundColor": "#F5FAF7", + "preheaderText": "Comme toi, on aime les connexions stables et les relations durables.", + "linkStyle": { + "body": true, + "linkColor": "#00C853", + "linkHoverColor": "#005026", + "linkUnderline": true, + "linkHoverUnderline": true + }, + "_meta": { + "htmlID": "u_body", + "htmlClassNames": "u_body" + } + } + }, + "schemaVersion": 12 +} \ No newline at end of file