This commit is contained in:
2025-11-18 16:39:33 +00:00
parent c70394d367
commit df1f90c6cd
9673 changed files with 3464697 additions and 34 deletions
@@ -0,0 +1,141 @@
Changelog
=========
1.0.0 (2025-08-06)
- Initial release
1.0.1 (2025-08-06)
- Bump version logic
1.0.2 (2025-08-12)
- Update translations
- Fix: loader in select page redirection
- Fix: Apostrophe is not displayed correctly in page name on Select page modal
- Fix: Link Go to Reach in welcome screen should open in new tab
- Fix: Buttons are not aligned in Forms
- Fix: Subscription form not being auto-loaded sometimes
- Fix: Change Menu load priority
- Tweak: Toasts UI
- Tweak: Add scrollbar to select page modal
- Tweak: Add header to overview page
1.0.3 (2025-08-21)
- Fix: Replace Connect Hero image
- Fix: Reach plugin content not visible when no other Hostinger plugin is installed
- Feat: Implement ServerSideRendering component in the Gutenberg Block
1.0.4 (2025-08-25)
- Fix: Lock background scroll if a modal is open
- Fix: Remove Warnings when running FE linter
- Fix: Footer and View form links
- Feat: Add satisfaction survey
1.0.5 (2025-08-26)
- Fix: Assets compiler flag
1.0.6 (2025-09-01)
- Feature: Elementor integration
- Tweak: Load plugin entries if any 3rd party plugin is active
- Tweak: Update translations
- Tweak: Remove Bootstrap dependencies
- Fix: update Reach URLs to use new route structure
1.0.7 (2025-09-08)
- Feature: Add Dialog when a post is published with Reach Block
- Fix: Add/edit forms for elementor pages doesn't open Elementor
- Fix: Elementor pages with Reach forms not recognized
- Fix: Submit button style overrides theme styles
- Fix: Prevent Toggle On/Off an invalid form
- Dev: Update PR templates
- Dev: Add staging support for Reach API
- Dev: Fix Lint workflow
- Dev: Implement JavaScript unit test coverage
1.0.8 (2025-09-11)
- Feature: Integration with WooCommerce Checkout
- Tweak: Include Add Form entry in the Integrations menu
- Fix: Routes not working with simple Permalinks
1.0.9 (2025-09-15)
- Feature: Send metadata with contacts
- Feature: Readme update
- Feature: Dependency update
1.0.10 (2025-09-25)
- Fix: Context menu dropdown
- Fix: Change elementor logo
- Tweak: Refactor FE Integration logic
- tweak: Integrate Review plugin step in CSAT
- Dev: Implement Coderabbit
- Dev: Add automated Jira integration for release workflow
- Dev: Fix Release Updater errors
- Dev: Bump dependencies
1.0.11 (2025-09-30)
- Tweak: Add Pagination in Add form pages list
- Tweak: Include platform metadata in contact submission
- Tweak: Bump dependencies
1.0.12 (2025-10-07)
- Fix: Broken links in pagination
1.0.13 (2025-10-09)
- Dev: Workflow optimisation
- Fix: Prevent sending non existent contact list
1.0.14 (2025-10-14)
- Fix: Dialog style (z-index, link color, hide after 10s)
1.1.0 (2025-10-21)
- Feature: Allow 3rd party integrations
1.1.1 (2025-10-21)
- Fix: Fatal error on plugin installation
- Tweak: Update translations
- Dev: Remove unused workflows
1.2.0 (2025-10-28)
- Feature: Tracking for Abandoned carts
- Feature: Tracking for Purchases
- Feature: Add WordPress Admin Notice for Connecting Reach
- Tweak: Updated Translations
1.2.1 (2025-11-05)
- Feature: Support for Guest Abandoned Carts Automation
- Feature: New E-Commerce Tab in Overview page
- Tweak: Refactor Connection logic
- Tweak: Add encryption for Guests automation
1.2.2 (2025-11-06)
- Feature: Auto-enable WooCommerce integration
- Fix: Refresh Overview Page when Reach connection is lost
- Tweak: Refactor to connection logic to use new Reach Connection endpoint
1.2.3 (2025-11-13)
- Feature: Integration with Ninja forms
- Feature: Integration with WS Forms
- Feature: Integration with Sure Forms
- Feature: Integration with Forminator
- Tweak: Security fixes
- Tweak: Trigger CSAT Survey when user Adds a form or Integration
@@ -0,0 +1,131 @@
language: "en-US"
early_access: false
tone_instructions: "Expert Vue 3, TypeScript & WordPress PHP reviewer for enterprise development. Provide concise, clear advice based on project's actual patterns. Elaborate only when requested."
reviews:
profile: "chill"
request_changes_workflow: false
high_level_summary: true
poem: false
review_status: true
collapse_walkthrough: true
auto_review:
enabled: true
drafts: true
ignore_title_keywords:
- "WIP"
- "Draft"
- "DO NOT MERGE"
- "TEMP"
path_instructions:
- path: "**/*.{vue,ts,js}"
instructions: |
**No English Text:** Never use hardcoded English text - always use translation slugs
**Translation Slugs:** Use project pattern: `hostinger_reach_section_element_type`
**Translation Functions:** Use `translate()` function: `translate("hostinger_reach_section_element")`
**Repository Pattern:** Create repositories for API calls - don't make direct HTTP requests in components
**Naming:** Use camelCase for all variables and functions - no snake_case in frontend code
- path: "**/*.vue"
instructions: |
**Props:** Type with interfaces: `defineProps<{ userId: string }>()`
**Emits:** Explicit declarations: `defineEmits<{ update: [value: string] }>()`
**Keys:** Use `:key="item.id"` not `:key="index"` in v-for
**Reactivity:** Use `ref()` for primitives, `computed()` for derived state
**Heavy Computations:** Place complex computations in parent components and pass results as props
**Accessibility:** Use semantic HTML and ARIA attributes - `<button aria-label="close">` not `<div @click>`
**Conditionals:** Use `v-if` for conditional DOM, `v-show` for visibility toggle
**Cleanup:** Clear timers/listeners in `onUnmounted`
**Component Design:** Single responsibility, extend via props/slots, minimal prop requirements
- path: "**/*.ts"
instructions: |
**Type Safety:** Use strict TypeScript - avoid `any`, prefer specific types
**Union Types:** `type Status = 'pending' | 'success' | 'error'`
**Interface Design:** Prefer interfaces over types for object shapes
**Generics:** Use generics for reusable type definitions
**Utility Types:** Leverage TypeScript utility types: `Partial<T>`, `Required<T>`, `Pick<T, K>`
- path: "**/*.php"
instructions: |
**PHPCS Compliance:** Follow coding standards defined in `.phpcs.xml` - formatting, spacing, naming conventions
**Project Architecture:** Repository pattern for DB queries, DTO classes for data transfer, dependency injection via constructors
**WordPress Integration:** Escape output with `esc_html()`, `esc_url()`, verify nonces with `wp_verify_nonce()`
**Naming Conventions:** Database tables/options prefixed with `hostinger_`, class suffixes: `UserFactory`, `UserDto`, `UserRepository`
**Code Organization:** Constants in dedicated classes, translations in static methods, early returns over else statements
**Error Handling:** Prefix error logs: `error_log('Hostinger Reach: error message')`
- path: "**/stores/**/*.ts"
instructions: |
**Store Pattern:** Use `defineStore` with setup syntax matching your `generalDataStore` pattern
**State:** Use `ref()` for reactive state, `computed()` for derived values
**File Naming:** `{camelCase}Store.ts`
**Destructuring:** Use `storeToRefs()` when needed
- path: "**/composables/**/*.ts"
instructions: |
**Naming:** Use 'use' prefix: `useOverviewData`, `useModal`
**File Naming:** `use{PascalCase}.ts`
**Return:** Return refs that can be destructured: `return { data, loading, error }`
- path: "**/repositories/**/*.ts"
instructions: |
**Repository Pattern:** Export default object like your `formsRepo`, `reachRepo` pattern
**Method Naming:** Use descriptive names: `getForms`, `toggleFormStatus`, `getOverview`
**Headers:** Include correlation ID and nonce like your existing repos
**Typing:** Use proper TypeScript types: `httpService.get<Form[]>`
- path: "**/*.test.ts"
instructions: |
**Structure:** Use `describe/it` blocks: `describe('ConfirmDisconnectModal', () => { it('should render', () => {}) })`
**Imports:** Import `vi` from vitest: `import { vi } from 'vitest'`
**Mounting:** Use `mount` from `@vue/test-utils`
**Mocking:** Use `vi.mock()` for stores and composables like your existing tests
**Store Mocking:** Mock stores with return objects matching your pattern
- path: "**/tests/**/*.php"
instructions: |
**Test Structure:** Extend from `WP_UnitTestCase` class following WordPress core standards
**Setup Methods:** Use `set_up(): void` with `parent::set_up()` FIRST LINE (snake_case required)
**Teardown Methods:** Use `tear_down(): void` with `parent::tear_down()` as LAST LINE
**Method Names:** `snake_case` for test methods: `test_integrations_constant()`
**Fixtures:** Use `self::factory()->user->create()` for test data creation
**Mocking:** Use `createMock()` for dependencies like your existing tests
**Assertions:** Use most specific assertion: `assertSame()`, `assertContains()`, `assertTrue()`
**WordPress Methods:** Use snake_case versions: `set_up_before_class()`, `tear_down_after_class()`
- path: "**/*"
instructions: |
**Commit Messages:** Follow semantic format: `<type>(<scope>): <subject>`
**Commit Types:** Use `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore`
**Deep Review:** Mark complex PRs with "deep review wanted" label and provide clear testing instructions
**File Structure:** PHP files under `src/`, Vue under `frontend/vue/`, React/Gutenberg under `frontend/blocks/`
**PSR-4:** Follow PSR-4 autoloader standard with proper namespace mapping
path_filters:
- "**/*.vue"
- "**/*.ts"
- "**/*.php"
- "**/*.{test,spec}.{ts,php}"
- "package.json"
- "composer.json"
- "!**/node_modules"
- "!**/vendor"
- "!**/dist"
- "!coverage/**"
- "!**/*.min.js"
- "!**/*.min.css"
- "!**/*.d.ts"
- "!package-lock.json"
- "!composer.lock"
tools:
eslint:
enabled: true
phpcs:
enabled: true
chat:
auto_reply: true
@@ -0,0 +1,64 @@
{
"repositories": [
{
"type": "vcs",
"url": "[email protected]:hostinger/hostinger-wp-menu-manager.git"
},
{
"type": "vcs",
"url": "[email protected]:hostinger/hostinger-wp-helper.git"
},
{
"type": "vcs",
"url": "[email protected]:hostinger/hostinger-wp-surveys.git"
}
],
"name": "hostinger/hostinger-reach",
"description": "Hostinger Reach",
"type": "plugin",
"license": "GPL-2.0+",
"autoload": {
"psr-4": {
"Hostinger\\Reach\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Hostinger\\Reach\\Tests\\": "tests/phpunit"
}
},
"authors": [
{
"name": "Hostinger"
}
],
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"automattic/jetpack-autoloader": true
}
},
"require-dev": {
"phpunit/phpunit": "^9.6",
"yoast/phpunit-polyfills": "^2.0",
"squizlabs/php_codesniffer": "^3.7",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7",
"phpcompatibility/phpcompatibility-wp": "*",
"wp-coding-standards/wpcs": "^3.0",
"phpunit/php-code-coverage": "^9.2",
"slevomat/coding-standard": "^8.0@dev"
},
"scripts": {
"phpunit": "phpunit",
"phpcs": "./vendor/bin/phpcs"
},
"require": {
"automattic/jetpack-autoloader": "^5.0",
"hostinger/hostinger-wp-menu-manager": "^1.2",
"psr/container": "^2.0@dev",
"hostinger/hostinger-wp-surveys": "^1.0",
"hostinger/hostinger-wp-helper": "^1.0",
"woocommerce/action-scheduler": "^3.9"
},
"minimum-stability": "dev"
}
@@ -0,0 +1,36 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "hostinger-reach/subscription",
"title": "Reach Subscription Form",
"category": "common",
"icon": "email",
"description": "Subscription form for Hostinger Reach",
"textdomain": "hostinger-reach",
"attributes": {
"formId": {
"type": "string",
"default": ""
},
"showName": {
"type": "boolean",
"default": false
},
"showSurname": {
"type": "boolean",
"default": false
},
"contactList": {
"type": "string",
"default": ""
},
"layout": {
"type": "string",
"default": "default",
"enum": ["default", "inline"]
}
},
"supports": {
"html": false
}
}
@@ -0,0 +1,21 @@
import {__} from '@wordpress/i18n';
import './Connect.scss'
const Connect = () => {
return <div className="hostinger-reach-block-connect">
<div className="hostinger-reach-block-connect__title">
{__("You are not connected to Hostinger Reach", "hostinger-reach")}
</div>
<div className="hostinger-reach-block-connect__subtitle">
{__("You are not connected to Hostinger Reach. To gain full access to this block, you need to connect your Hostinger Reach account.", "hostinger-reach")}
</div>
<div className="hostinger-reach-block-connect__button-wrap"><a
target="_blank"
href="/wp-admin/admin.php?page=hostinger-reach"
className="hostinger-block-button hostinger-block-button--is-normal hostinger-block-button--is-primary">
{__("Connect Now", "hostinger-reach")}
</a></div>
</div>
}
export default Connect;
@@ -0,0 +1,27 @@
.hostinger-reach-block-connect {
display: flex;
flex-direction: column;
align-content: flex-start;
background: #fff6e9;
padding: 14px;
font-size: 14px;
margin: 28px 0 14px;
&__title {
color: #1d1e20;
font-weight: 700;
margin-bottom: 4px;
}
&__subtitle {
color: #727586;
margin-bottom: 4px;
}
a {
color: rgba(var(--bs-link-color-rgb), var(--bs-link-opacity, 1));
text-decoration: underline;
}
}
@@ -0,0 +1,60 @@
import {__} from '@wordpress/i18n';
import { useEffect } from '@wordpress/element';
import './Dialog.scss'
import reachLogo from '../reach-logo.svg';
const SIDEBAR_SELECTORS = [
'.interface-navigable-region.interface-interface-skeleton__secondary-sidebar',
'.spectra-ee-quick-access-container .spectra-ee-quick-access__sidebar'
];
const Dialog = ( { onClose } ) => {
useEffect(() => {
const sidebars = SIDEBAR_SELECTORS
.map(selector => document.querySelector(selector))
.filter(Boolean);
sidebars.forEach(sidebar => {
sidebar.style.zIndex = '0';
});
const timeoutId = setTimeout(() => {
onClose();
}, 10000);
return () => {
sidebars.forEach(sidebar => {
sidebar.style.zIndex = '';
});
clearTimeout(timeoutId);
};
}, []);
return <div id="hostinger-reach-block-dialog" className="hostinger-reach-block-dialog">
<div className="hostinger-reach-block-dialog__close" onClick={onClose}></div>
<div className="hostinger-reach-block-dialog__logo">
<img src={reachLogo} alt={__('Hostinger Reach Logo', 'hostinger-reach')} />
</div>
<p>{ __('Your form is ready. Go to Reach to complete setup and create templates.', 'hostinger-reach') }</p>
<div className="hostinger-reach-block-dialog__actions">
<Button link="https://reach.hostinger.com/" label={__('Go to Reach', 'hostinger-reach')} />
</div>
</div>
}
const Button = ({ link, label }) => {
return <div className="hostinger-reach-block-dialog__button">
<a target="_blank" href={link}>{ label }</a>
<div className="hostinger-reach-block-dialog__button_indicator">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M2.5 5.24792C2.5 3.72914 3.73122 2.49792 5.25 2.49792H6C6.41421 2.49792 6.75 2.83371 6.75 3.24792C6.75 3.66214 6.41421 3.99792 6 3.99792H5.25C4.55964 3.99792 4 4.55757 4 5.24792V10.686C4 11.3764 4.55964 11.936 5.25 11.936H10.7508C11.4411 11.936 12.0008 11.3764 12.0008 10.686V10.0001C12.0008 9.58591 12.3366 9.25012 12.7508 9.25012C13.165 9.25012 13.5008 9.58591 13.5008 10.0001V10.686C13.5008 12.2048 12.2696 13.436 10.7508 13.436H5.25C3.73122 13.436 2.5 12.2048 2.5 10.686V5.24792Z" fill="#1D1E20"/>
<path d="M12 5.06089L8.03033 9.03056C7.73744 9.32345 7.26256 9.32345 6.96967 9.03056C6.67678 8.73766 6.67678 8.26279 6.96967 7.9699L10.9393 4.00023H9C8.58579 4.00023 8.25 3.66444 8.25 3.25023C8.25 2.83601 8.58579 2.50023 9 2.50023L12.25 2.50023C12.9404 2.50023 13.5 3.05987 13.5 3.75023V7.00023C13.5 7.41444 13.1642 7.75023 12.75 7.75023C12.3358 7.75023 12 7.41444 12 7.00023V5.06089Z" fill="#1D1E20"/>
</svg>
</div>
</div>
}
export default Dialog;
@@ -0,0 +1,101 @@
.hostinger-reach-block-dialog {
display: block;
flex-direction: column;
align-content: flex-start;
background: #fff;
color: #1D1E20;
padding: 20px;
gap: 14px;
font-size: 14px;
line-height: 20px;
bottom: 80px;
left: 20px;
position: fixed;
z-index: 100001;
max-width: 400px;
border-radius: 16px;
box-shadow: 0 0 10px rgba(0,0,0,0.05);
&__actions {
display: flex;
justify-content: flex-start;
gap: 10px;
}
&__button_indicator {
height: 16px;
width: 16px;
}
&__button {
cursor: pointer;
text-align: center;
background: #673DE6;
color: #fff;
font-weight: 700;
font-size: 12px;
padding: 6px 16px;
display: flex;
flex-direction: row;
align-items: center;
gap: 10px;
border-radius: 8px;
&:hover {
background: #5029c2;
}
a {
color: #fff;
text-decoration: none;
&:hover, &:focus, &:active {
color: #fff;
box-shadow: none;
outline: none;
}
}
svg {
height: 16px;
width: 16px;
path {
fill: #fff;
}
}
}
&__close {
cursor: pointer;
&:before, &:after {
content: '';
position: absolute;
width: 16px;
height: 2px;
background-color: #1D1E20;
top: 26px;
right: 16px;
}
&:before {
transform: rotate(45deg);
}
&:after {
transform: rotate(-45deg);
}
&:hover:before, &:hover:after {
background-color: #727272;
}
}
}
@@ -0,0 +1,23 @@
wp.domReady(() => {
whenEditorIsReady().then(() => {
let block = wp.blocks.createBlock('hostinger-reach/subscription', {});
setTimeout(() => {
wp.data.dispatch('core/block-editor').insertBlocks(block);
}, 0);
});
function whenEditorIsReady() {
return new Promise((resolve) => {
const unsubscribe = wp.data.subscribe(() => {
if (wp.data.select('core/editor').isCleanNewPost() || wp.data.select('core/block-editor').getBlockCount() > 0) {
unsubscribe()
resolve()
}
})
})
}
});
@@ -0,0 +1,174 @@
import {useState, useEffect} from "react";
import apiFetch from '@wordpress/api-fetch';
import { useSelect, select } from '@wordpress/data';
import ServerSideRender from "@wordpress/server-side-render";
import {useBlockProps, InspectorControls} from "@wordpress/block-editor";
import {
PanelBody, SelectControl,
TextControl,
ToggleControl,
} from "@wordpress/components";
import {__} from '@wordpress/i18n';
import Connect from "./Components/Connect";
import Dialog from "./Components/Dialog";
const Edit = ({attributes, setAttributes, clientId}) => {
const { isPostPublished, postPermalink } = useSelect((select) => ({
isPostPublished: select('core/editor').isCurrentPostPublished()
}));
const blockProps = useBlockProps();
const nonce = wp.data.select('core/editor').getEditorSettings().nonce || '';
const [showNewContactList, setShowNewContactList] = useState(attributes.contactList === '');
const [isConnected, setIsConnected] = useState(true);
const [contactLists, setContactLists] = useState([]);
const [showDialog, setShowDialog] = useState(false);
const [lastStatus, setLastStatus] = useState(null);
const layoutOptions = [
{ label: __('Default', 'hostinger-reach'), value: 'default' },
{ label: __('Inline', 'hostinger-reach'), value: 'inline' }
];
useEffect(() => {
if ( isPostPublished && lastStatus !== null && lastStatus !== 'publish' ) {
setShowDialog(true);
}
}, [isPostPublished, lastStatus]);
useEffect(() => {
setLastPostStatus();
fetchContactLists();
checkConnection();
}, []);
useEffect(() => {
if (attributes.formId) return;
setAttributes({formId: clientId});
}, [setAttributes]);
const fetchContactLists = async () => {
await getContactLists();
};
const checkConnection = async () => {
try {
const response = await apiFetch({
path: '/hostinger-reach/v1/overview',
method: 'GET',
headers: {
'X-WP-Nonce': nonce,
},
parse: false,
});
if (response.ok) {
setIsConnected(true);
} else {
setIsConnected(false);
}
} catch (err) {
setIsConnected(false);
}
}
const setLastPostStatus = () => {
const lastKnownStatus = select('core/editor').getEditedPostAttribute('status');
setLastStatus(lastKnownStatus);
}
const getContactLists = async () => {
const response = await apiFetch({
path: '/hostinger-reach/v1/contact-lists',
method: 'GET',
headers: {
'X-WP-Nonce': nonce,
},
parse: false,
});
if (response.ok) {
setContactLists(await response.json());
}
}
return <div {...blockProps}>
<InspectorControls key="hostinger-reach-block-controls">
<PanelBody title={__("Settings", "hostinger-reach")}>
{!isConnected && <Connect/>}
<TextControl
disabled
label={__('Form ID', 'hostinger-reach')}
value={attributes.formId}
help={__('Unique identifier for this form', 'hostinger-reach')}
/>
<SelectControl
label={__('Contact List', 'hostinger-reach')}
value={attributes.contactList}
options={[
{label: __("Create New List", "hostinger-reach"), value: ''},
...contactLists.map(list => {
return {label: list.name, value: list.name}
})
]}
onChange={(value) => {
setAttributes({contactList: value})
if (!value) {
setShowNewContactList(true);
} else {
setShowNewContactList(false);
}
}}
/>
{showNewContactList && <TextControl
label={__('New Contact List', 'hostinger-reach')}
value={attributes.contactList}
onChange={(value) => {
setAttributes({contactList: value})
}}
help={__('Name for the new Contact List', 'hostinger-reach')}
/>}
<ToggleControl
label={__("Show Name Field?", "hostinger-reach")}
key="hostinger-reach-block-show-name-field"
checked={attributes.showName}
onChange={(value) =>
setAttributes({showName: value})
}
/>
<ToggleControl
label={__("Show Surname Field?", "hostinger-reach")}
key="hostinger-reach-block-show-surname-field"
checked={attributes.showSurname}
onChange={(value) =>
setAttributes({showSurname: value})
}
/>
</PanelBody>
<PanelBody title={__('Layout Settings', 'hostinger-reach')}>
<SelectControl
label={__('Layout', 'hostinger-reach')}
value={attributes.layout}
options={layoutOptions}
onChange={(value) => setAttributes({ layout: value })}
/>
</PanelBody>
</InspectorControls>
{!isConnected && <Connect/>}
<ServerSideRender
key="hostinger-reach-server-side-renderer"
block="hostinger-reach/subscription"
attributes={attributes}
/>
{showDialog && <Dialog onClose={() => setShowDialog(false)} /> }
</div>
}
export default Edit;
@@ -0,0 +1,4 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M2.5 5.24792C2.5 3.72914 3.73122 2.49792 5.25 2.49792H6C6.41421 2.49792 6.75 2.83371 6.75 3.24792C6.75 3.66214 6.41421 3.99792 6 3.99792H5.25C4.55964 3.99792 4 4.55757 4 5.24792V10.686C4 11.3764 4.55964 11.936 5.25 11.936H10.7508C11.4411 11.936 12.0008 11.3764 12.0008 10.686V10.0001C12.0008 9.58591 12.3366 9.25012 12.7508 9.25012C13.165 9.25012 13.5008 9.58591 13.5008 10.0001V10.686C13.5008 12.2048 12.2696 13.436 10.7508 13.436H5.25C3.73122 13.436 2.5 12.2048 2.5 10.686V5.24792Z" fill="#1D1E20"/>
<path d="M12 5.06089L8.03033 9.03056C7.73744 9.32345 7.26256 9.32345 6.96967 9.03056C6.67678 8.73766 6.67678 8.26279 6.96967 7.9699L10.9393 4.00023H9C8.58579 4.00023 8.25 3.66444 8.25 3.25023C8.25 2.83601 8.58579 2.50023 9 2.50023L12.25 2.50023C12.9404 2.50023 13.5 3.05987 13.5 3.75023V7.00023C13.5 7.41444 13.1642 7.75023 12.75 7.75023C12.3358 7.75023 12 7.41444 12 7.00023V5.06089Z" fill="#1D1E20"/>
</svg>

After

Width:  |  Height:  |  Size: 1019 B

@@ -0,0 +1,57 @@
import {registerBlockType} from '@wordpress/blocks';
import {__} from '@wordpress/i18n';
import Edit from './edit';
import './styles.scss'
registerBlockType('hostinger-reach/subscription',
{
name: "hostinger-reach/subscription",
title: __("Reach Subscription Form", "hostinger-reach"),
icon:
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M13.925 7.35306L18.0634 3.21429L20.7856 5.9365L18.5036 8.21843H15.8008L15.7823 8.20957L10.0747 5.67124V1.5H13.925V7.35306Z"
fill="#1D1E20"/>
<path
d="M5.49586 15.7815L8.21638 15.7895L13.9252 18.3287V22.4999H10.0749L10.0736 16.649L5.93656 20.7856L3.21436 18.0634L5.49586 15.7815Z"
fill="#1D1E20"/>
<path
d="M22.5003 10.0757H18.3282L15.7827 15.7997V18.505L18.0638 20.7861L20.786 18.0635L16.6472 13.9251L22.5003 13.9243V10.0757Z"
fill="#1D1E20"/>
<path
d="M5.9365 3.21436L8.21632 5.49418V8.20415L5.67208 13.9244H1.5V10.0758H7.35306L3.21429 5.93741L5.9365 3.21436Z"
fill="#1D1E20"/>
</svg>,
category: "common",
textdomain: "hostinger-reach",
attributes: {
formId: {
type: 'string',
default: '',
},
showName: {
type: 'boolean',
default: false,
},
showSurname: {
type: 'boolean',
default: false,
},
contactList: {
type: 'string',
default: '',
},
layout: {
type: 'string',
default: 'default',
enum: ['default', 'inline']
}
},
edit: Edit,
save: () => {
return null;
}
}
);
@@ -0,0 +1,28 @@
<svg width="210" height="28" viewBox="0 0 210 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_9697_102453)">
<path d="M8.95524 19.0529L5.32791 19.041L2.28558 22.0835L5.91461 25.7143L11.4313 20.1991L11.433 28H16.567V22.4372L8.95524 19.0529Z" fill="#1D1E20"/>
<path d="M22.0837 2.28566L16.567 7.80423V0H11.433V5.56109L19.0431 8.94706L19.0686 8.95896H22.6704L25.7144 5.91482L22.0837 2.28566Z" fill="#1D1E20"/>
<path d="M28 11.4346H22.4374L19.0431 19.0653V22.6741L22.0837 25.7148L25.7144 22.084L20.1961 16.5671L20.1944 16.5654H28V11.4346Z" fill="#1D1E20"/>
<path d="M8.95523 5.32883L5.9146 2.28809L2.28557 5.91895L7.80224 11.4358H7.80394V11.4375H0V16.5683H5.56258L7.84475 11.4358L8.95523 8.94098V5.32883Z" fill="#1D1E20"/>
<path d="M47.1216 8.80078H49.7803V20.482H47.1216V15.5266H42.6586V20.482H39.9999V8.80078H42.6586V13.2682H47.1216V8.80078Z" fill="#1D1E20"/>
<path d="M56.0338 14.562C56.0338 15.1351 56.1053 15.6555 56.2449 16.1129C56.3861 16.5772 56.5904 16.9768 56.8542 17.3067C57.118 17.6366 57.4448 17.8934 57.8261 18.0754C58.2108 18.254 58.6499 18.3492 59.1469 18.3492C59.644 18.3492 60.0712 18.254 60.4593 18.0754C60.8491 17.8968 61.1776 17.6366 61.4414 17.3067C61.7052 16.9768 61.9095 16.5772 62.0507 16.1129C62.1903 15.6521 62.2618 15.1317 62.2618 14.562C62.2618 13.9923 62.1903 13.4634 62.0507 12.9924C61.9095 12.5281 61.7052 12.1234 61.4414 11.7935C61.1776 11.4636 60.8491 11.2068 60.4593 11.0248C60.0695 10.8462 59.632 10.751 59.1469 10.751C58.6618 10.751 58.2091 10.8462 57.8261 11.0333C57.4414 11.2187 57.118 11.4806 56.8542 11.8122C56.5904 12.1421 56.3861 12.5468 56.2449 13.0111C56.1036 13.4804 56.0338 13.9974 56.0338 14.562ZM64.9937 14.562C64.9937 15.5653 64.8439 16.4462 64.546 17.2081C64.2465 17.97 63.838 18.6026 63.3188 19.1195C62.7997 19.628 62.1818 20.0158 61.4652 20.2793C60.7469 20.5361 59.9776 20.6654 59.1521 20.6654C58.3265 20.6654 57.5946 20.5361 56.8831 20.2793C56.1734 20.0158 55.5504 19.628 55.021 19.1195C54.49 18.6026 54.073 17.97 53.7666 17.2081C53.4636 16.4462 53.3087 15.5653 53.3087 14.562C53.3087 13.5587 53.4687 12.6727 53.7836 11.9108C54.1002 11.1489 54.5257 10.5078 55.0619 9.99425C55.598 9.47218 56.2176 9.08614 56.924 8.82255C57.6304 8.56577 58.3725 8.43652 59.1503 8.43652C59.9282 8.43652 60.7078 8.56577 61.4193 8.82255C62.129 9.08614 62.752 9.47388 63.2814 9.99425C63.8107 10.5112 64.2294 11.1489 64.5324 11.9108C64.8388 12.6727 64.9903 13.5536 64.9903 14.562H64.992H64.9937Z" fill="#1D1E20"/>
<path d="M71.637 18.4206C72.0098 18.4206 72.3178 18.3866 72.5612 18.3254C72.8029 18.2642 73.0004 18.1791 73.1434 18.0737C73.2897 17.9666 73.3902 17.839 73.4497 17.6911C73.5059 17.5448 73.5348 17.3782 73.5348 17.1962C73.5348 16.8136 73.3544 16.4956 72.9936 16.2439C72.6327 15.9871 72.0115 15.7184 71.1315 15.4191C70.7468 15.2847 70.3621 15.1283 69.9808 14.9548C69.5962 14.7814 69.2523 14.5637 68.9477 14.2984C68.6447 14.0297 68.3945 13.7117 68.2021 13.3342C68.0115 12.9516 67.9145 12.4924 67.9145 11.9567C67.9145 11.421 68.0149 10.9262 68.2192 10.4925C68.4217 10.0538 68.7094 9.68475 69.0838 9.38374C69.4566 9.08104 69.9077 8.84466 70.4387 8.68311C70.9698 8.52155 71.5672 8.43652 72.2344 8.43652C73.0259 8.43652 73.7085 8.51985 74.2855 8.68821C74.8608 8.85657 75.334 9.04873 75.7084 9.2494L74.9476 11.3292C74.6191 11.1608 74.2565 11.0078 73.8548 10.882C73.4531 10.7527 72.9714 10.6864 72.4081 10.6864C71.7766 10.6864 71.3204 10.7765 71.043 10.95C70.7655 11.1234 70.6293 11.3921 70.6293 11.7526C70.6293 11.9703 70.6804 12.1523 70.7808 12.2968C70.8813 12.4431 71.0259 12.5774 71.2115 12.6965C71.3987 12.8138 71.6132 12.9209 71.8566 13.0179C72.0983 13.1131 72.3655 13.2134 72.66 13.3138C73.2693 13.5383 73.7987 13.761 74.2514 13.9821C74.7025 14.2066 75.077 14.46 75.3782 14.7559C75.6778 15.0467 75.9008 15.3902 76.0472 15.7864C76.1935 16.1776 76.2684 16.6605 76.2684 17.22C76.2684 18.3135 75.8838 19.1655 75.1161 19.7658C74.3502 20.3695 73.191 20.6739 71.6455 20.6739C71.1264 20.6739 70.6583 20.6399 70.2396 20.5786C69.8208 20.5174 69.4515 20.4443 69.1298 20.3542C68.8081 20.2589 68.5323 20.1637 68.2992 20.0634C68.0694 19.963 67.8736 19.8678 67.717 19.7777L68.4626 17.6809C68.8132 17.8713 69.2438 18.0448 69.7579 18.1978C70.2719 18.3492 70.9017 18.4274 71.6472 18.4274H71.6404L71.637 18.4206Z" fill="#1D1E20"/>
<path d="M87.8973 8.70508V10.96H84.3569V20.4323H81.7169V10.96H78.1765V8.70508H87.8973Z" fill="#1D1E20"/>
<path d="M90.8334 20.4306H93.4733V8.70508H90.8334V20.4306Z" fill="#1D1E20"/>
<path d="M105.298 20.4306C104.54 19.0837 103.722 17.7624 102.843 16.4512C101.962 15.1435 101.026 13.9139 100.033 12.7456V20.4306H97.4274V8.70508H99.5788C99.9516 9.07921 100.364 9.53496 100.816 10.0774C101.267 10.6165 101.727 11.193 102.197 11.8103C102.665 12.4276 103.129 13.0603 103.592 13.7218C104.055 14.3833 104.489 15.0159 104.896 15.6281V8.70678H107.523V20.4323H105.301L105.298 20.4306Z" fill="#1D1E20"/>
<path d="M117.192 10.734C115.962 10.734 115.073 11.0758 114.523 11.7595C113.975 12.4431 113.703 13.375 113.703 14.5569C113.703 15.1351 113.769 15.6555 113.905 16.1265C114.04 16.5908 114.244 16.9955 114.515 17.3305C114.787 17.6724 115.124 17.9342 115.531 18.1213C115.938 18.3067 116.411 18.3951 116.952 18.3951C117.247 18.3951 117.499 18.39 117.706 18.3781C117.914 18.373 118.098 18.3441 118.258 18.3118V14.2372H120.898V20.0379C120.583 20.1603 120.074 20.2946 119.374 20.4375C118.673 20.5769 117.812 20.6501 116.782 20.6501C115.9 20.6501 115.1 20.5157 114.385 20.2419C113.667 19.9732 113.056 19.5804 112.549 19.06C112.042 18.5431 111.647 17.9053 111.373 17.1486C111.095 16.3918 110.959 15.5279 110.959 14.5586C110.959 13.5893 111.111 12.7084 111.417 11.9567C111.722 11.2 112.14 10.5622 112.671 10.0334C113.201 9.51129 113.825 9.11335 114.544 8.83956C115.259 8.57087 116.026 8.43652 116.836 8.43652C117.39 8.43652 117.89 8.47054 118.336 8.54366C118.782 8.62189 119.163 8.70521 119.488 8.80045C119.808 8.89568 120.076 8.99091 120.285 9.09635C120.493 9.19668 120.642 9.27491 120.733 9.33103L119.97 11.4431C119.608 11.2527 119.194 11.0826 118.726 10.9432C118.258 10.8037 117.745 10.7306 117.192 10.7306V10.7357V10.734Z" fill="#1D1E20"/>
<path d="M124.596 20.4306V8.70508H132.521V10.9243H127.238V13.2218H131.929V15.3849H127.238V18.2096H132.911V20.4289H124.596V20.4306Z" fill="#1D1E20"/>
<path d="M139.689 10.8231C139.498 10.8231 139.326 10.8282 139.171 10.8401C139.02 10.852 138.875 10.8673 138.741 10.8741V14.0576H139.486C140.479 14.0576 141.192 13.9352 141.621 13.6835C142.05 13.4369 142.266 13.0151 142.266 12.4148C142.266 11.8145 142.048 11.4336 141.614 11.1853C141.182 10.9455 140.54 10.8214 139.691 10.8214L139.689 10.8231ZM139.537 8.57324C141.299 8.57324 142.645 8.88615 143.585 9.51536C144.521 10.1378 144.991 11.1139 144.991 12.4302C144.991 13.2549 144.802 13.9199 144.422 14.4368C144.045 14.9453 143.5 15.35 142.788 15.6476C143.025 15.9384 143.274 16.2769 143.534 16.651C143.793 17.0336 144.051 17.4247 144.305 17.8329C144.56 18.2461 144.805 18.6747 145.042 19.1219C145.28 19.5641 145.498 20.0028 145.701 20.4331H142.746C142.53 20.047 142.314 19.6593 142.092 19.2614C141.871 18.8702 141.645 18.4876 141.411 18.1118C141.178 17.7428 140.95 17.389 140.724 17.0574C140.496 16.7224 140.268 16.418 140.043 16.1493H138.739V20.4331H136.099V8.87594C136.674 8.76371 137.27 8.68548 137.885 8.64126C138.499 8.59705 139.051 8.57494 139.536 8.57494H139.537V8.57324Z" fill="#1D1E20"/>
<path d="M156.45 8.77539H155.684V20.4873H156.45V8.77539Z" fill="#1D1E20"/>
<path d="M171.083 15.5651C171.265 15.7913 171.495 16.0889 171.772 16.4579C172.05 16.827 172.337 17.2351 172.632 17.6824C172.926 18.1296 173.219 18.5973 173.508 19.0853C173.798 19.5734 174.044 20.0428 174.249 20.4968H172.444C172.218 20.0666 171.971 19.6295 171.704 19.1874C171.437 18.7452 171.168 18.3235 170.896 17.9204C170.623 17.5174 170.354 17.1416 170.087 16.7896C169.82 16.4375 169.58 16.1314 169.364 15.8712C169.216 15.8831 169.066 15.8882 168.913 15.8882H166.964V20.4968H165.313V8.88187C165.777 8.76793 166.296 8.69141 166.87 8.65229C167.444 8.61318 167.968 8.59277 168.444 8.59277C170.101 8.59277 171.364 8.90398 172.232 9.52809C173.1 10.1522 173.534 11.0807 173.534 12.317C173.534 13.0993 173.326 13.7676 172.913 14.3237C172.499 14.8798 171.888 15.293 171.083 15.5651ZM168.581 10.0383C167.878 10.0383 167.338 10.0553 166.964 10.0893V14.5278H168.138C168.705 14.5278 169.216 14.4989 169.67 14.4428C170.124 14.3866 170.507 14.2778 170.819 14.1196C171.13 13.9615 171.372 13.737 171.542 13.4479C171.713 13.1588 171.798 12.7762 171.798 12.3C171.798 11.8579 171.713 11.4889 171.542 11.1947C171.372 10.9005 171.142 10.6675 170.853 10.4974C170.564 10.3274 170.223 10.2083 169.832 10.1403C169.44 10.0723 169.023 10.0383 168.581 10.0383Z" fill="#1D1E20"/>
<path d="M175.423 16.0922C175.423 15.3099 175.537 14.6263 175.764 14.043C175.99 13.4597 176.291 12.975 176.666 12.589C177.04 12.203 177.471 11.9139 177.959 11.7217C178.448 11.5296 178.947 11.4326 179.457 11.4326C180.649 11.4326 181.563 11.8033 182.198 12.5465C182.832 13.2896 183.151 14.4205 183.151 15.9391V16.2027C183.151 16.3099 183.146 16.4102 183.134 16.5003H177.074C177.142 17.4186 177.41 18.1159 177.874 18.592C178.339 19.0682 179.066 19.3063 180.053 19.3063C180.61 19.3063 181.078 19.2587 181.457 19.1617C181.837 19.0648 182.124 18.9713 182.317 18.8811L182.538 20.2076C182.346 20.3096 182.007 20.4168 181.525 20.5307C181.044 20.6446 180.495 20.7008 179.883 20.7008C179.112 20.7008 178.444 20.5851 177.883 20.3521C177.321 20.1192 176.858 19.7995 176.496 19.3913C176.133 18.9832 175.862 18.4985 175.687 17.9373C175.51 17.3761 175.423 16.7605 175.423 16.0922ZM181.5 15.2249C181.512 14.5107 181.333 13.924 180.964 13.4648C180.594 13.0057 180.087 12.7761 179.44 12.7761C179.078 12.7761 178.756 12.8475 178.478 12.9886C178.201 13.1298 177.964 13.3152 177.772 13.5413C177.58 13.7675 177.428 14.0294 177.321 14.3236C177.214 14.6178 177.142 14.9188 177.108 15.2249H181.5Z" fill="#1D1E20"/>
<path d="M188.291 11.4326C188.926 11.4326 189.462 11.5142 189.9 11.6792C190.337 11.8442 190.688 12.0754 190.955 12.3764C191.222 12.6774 191.411 13.0346 191.525 13.4478C191.639 13.861 191.695 14.3185 191.695 14.8168V20.3436C191.559 20.3657 191.369 20.3981 191.125 20.4372C190.882 20.4763 190.606 20.5137 190.3 20.5477C189.993 20.5817 189.661 20.6123 189.304 20.6412C188.947 20.6702 188.592 20.6838 188.24 20.6838C187.741 20.6838 187.282 20.6327 186.861 20.5307C186.441 20.4287 186.078 20.2671 185.772 20.046C185.466 19.825 185.227 19.5325 185.057 19.1702C184.887 18.808 184.802 18.371 184.802 17.8608C184.802 17.3506 184.901 16.9544 185.1 16.6024C185.299 16.2504 185.568 15.9681 185.908 15.7521C186.249 15.5361 186.645 15.378 187.1 15.2759C187.554 15.1739 188.031 15.1229 188.53 15.1229C188.688 15.1229 188.853 15.1314 189.023 15.1484C189.193 15.1654 189.355 15.1875 189.508 15.2164C189.661 15.2453 189.794 15.2708 189.908 15.2929C190.022 15.315 190.101 15.332 190.147 15.3439V14.9018C190.147 14.6416 190.118 14.3831 190.061 14.128C190.005 13.8729 189.903 13.6468 189.755 13.4478C189.607 13.2488 189.406 13.0907 189.151 12.9716C188.895 12.8526 188.564 12.7931 188.155 12.7931C187.632 12.7931 187.176 12.8305 186.785 12.9036C186.393 12.9767 186.101 13.0533 185.908 13.1332L185.721 11.8237C185.925 11.7336 186.266 11.6452 186.742 11.5602C187.219 11.4751 187.735 11.4326 188.291 11.4326ZM188.427 19.3573C188.802 19.3573 189.134 19.3488 189.423 19.3318C189.712 19.3148 189.954 19.2842 190.147 19.2383V16.6024C190.032 16.5463 189.849 16.4969 189.593 16.4578C189.338 16.4187 189.028 16.3983 188.666 16.3983C188.427 16.3983 188.175 16.4153 187.908 16.4493C187.641 16.4833 187.398 16.5548 187.176 16.6619C186.955 16.769 186.771 16.917 186.623 17.104C186.475 17.2911 186.402 17.5377 186.402 17.8438C186.402 18.4101 186.584 18.8046 186.947 19.0257C187.309 19.2468 187.803 19.3573 188.427 19.3573Z" fill="#1D1E20"/>
<path d="M198.162 20.7008C197.447 20.7008 196.82 20.5868 196.281 20.3606C195.741 20.1345 195.288 19.8165 194.919 19.4083C194.55 19.0002 194.276 18.5155 194.094 17.9543C193.911 17.3931 193.821 16.7724 193.821 16.0922C193.821 15.412 193.92 14.7879 194.119 14.2216C194.318 13.6553 194.599 13.1655 194.962 12.7506C195.324 12.3373 195.77 12.0142 196.298 11.7812C196.826 11.5483 197.413 11.4326 198.06 11.4326C198.456 11.4326 198.854 11.4666 199.251 11.5347C199.648 11.6027 200.029 11.7098 200.391 11.8578L200.034 13.2012C199.796 13.0873 199.52 12.9971 199.208 12.9291C198.897 12.8611 198.565 12.8271 198.213 12.8271C197.328 12.8271 196.65 13.1043 196.179 13.6604C195.707 14.2165 195.472 15.0259 195.472 16.0922C195.472 16.5684 195.527 17.0054 195.634 17.4016C195.741 17.7979 195.911 18.138 196.145 18.422C196.378 18.706 196.676 18.9237 197.038 19.0767C197.401 19.2298 197.843 19.3063 198.366 19.3063C198.786 19.3063 199.166 19.2672 199.506 19.1872C199.847 19.1073 200.114 19.0223 200.306 18.9322L200.528 20.2586C200.437 20.3147 200.306 20.3692 200.136 20.4202C199.966 20.4712 199.774 20.5171 199.557 20.5562C199.341 20.5953 199.111 20.6293 198.868 20.6582C198.625 20.6872 198.388 20.7008 198.162 20.7008Z" fill="#1D1E20"/>
<path d="M202.231 20.4953V7.57092L203.814 7.29883V11.8224C204.109 11.7084 204.424 11.6217 204.759 11.5588C205.094 11.4959 205.426 11.4652 205.755 11.4652C206.458 11.4652 207.043 11.5639 207.508 11.7628C207.973 11.9618 208.345 12.239 208.623 12.5961C208.9 12.9532 209.096 13.3818 209.21 13.8801C209.324 14.3783 209.38 14.9293 209.38 15.5296V20.4953H207.797V15.8697C207.797 15.3256 207.76 14.8613 207.687 14.4753C207.613 14.0892 207.491 13.778 207.321 13.5399C207.15 13.3019 206.924 13.1284 206.64 13.0213C206.356 12.9141 206.005 12.8597 205.585 12.8597C205.414 12.8597 205.239 12.8716 205.057 12.8937C204.875 12.9158 204.703 12.9413 204.538 12.9703C204.373 12.9992 204.226 13.0298 204.095 13.0638C203.964 13.0978 203.871 13.1267 203.814 13.1488V20.4953H202.231Z" fill="#1D1E20"/>
</g>
<defs>
<clipPath id="clip0_9697_102453">
<rect width="209.38" height="28" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 14 KiB

@@ -0,0 +1,66 @@
.hostinger-reach-block-subscription-form {
.hostinger-reach-block-form-fields {
display: flex;
flex-direction: column;
width: 100%;
&--inline {
flex-direction: row;
justify-content: flex-start;
align-items: end;
width: 100%;
gap: 0.5rem;
.hostinger-reach-block-form-field {
min-width: 70%
}
.hostinger-reach-block-submit {
min-width: 30%;
}
}
}
.hostinger-reach-block-submit {
border-width: 0;
margin-top: var(--wp--preset--spacing--20);
align-content: center;
box-sizing: border-box;
cursor: pointer;
display: inline-block;
height: 100%;
text-align: center;
width: 100%;
word-break: break-word;
font-weight: 500;
min-height: 40px;
}
.hostinger-reach-block-form-field {
margin-top: 8px;
}
label {
display: block;
font-size: 11px;
font-weight: 500;
line-height: 1.4;
text-transform: uppercase;
margin-bottom: calc(8px);
padding: 0;
}
input {
display: block;
width: 100%;
padding: 3px 10px;
min-height: 40px;
box-shadow: 0 0 0 transparent;
border-radius: 4px;
border: 1px solid #8c8f94;
background-color: #fff;
color: #2c3338;
box-sizing: border-box;
}
}
@@ -0,0 +1,58 @@
document.addEventListener('DOMContentLoaded', function() {
const translations = hostinger_reach_subscription_block_data.translations;
const formSelector = '.hostinger-reach-block-subscription-form';
const forms = document.querySelectorAll(formSelector);
forms.forEach(form => {
const messageEl = form.querySelector('.reach-subscription-message');
form.addEventListener('submit', function(e) {
e.preventDefault();
const submitBtn = form.querySelector('button[type="submit"]');
const formData = new FormData(form);
const data = {};
formData.forEach((value, key) => {
if (key.includes('.')) {
const [ mainKey, subkey ] = key.split('.');
if ( ! data[mainKey] ) {
data[mainKey] = {};
}
data[mainKey][subkey] = value;
} else {
data[key] = value;
}
});
submitBtn.disabled = true;
fetch(hostinger_reach_subscription_block_data.endpoint, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-WP-Nonce': hostinger_reach_subscription_block_data.nonce,
},
body: JSON.stringify(data)
})
.then(response => {
messageEl.style.display = 'block';
form.reset();
if ( response.ok ) {
messageEl.textContent = translations.thanks;
const submitBtn = form.querySelector('.hostinger-reach-block-submit');
submitBtn.style.display = 'none';
} else {
throw new Error(response.statusText);
}
})
.catch(error => {
messageEl.textContent = translations.error;
messageEl.style.display = 'block';
submitBtn.disabled = false;
});
});
});
});
@@ -0,0 +1 @@
.base-modal__header[data-v-330ecf55]{margin-bottom:8px;margin-top:-4px;position:relative}.base-modal__title-container[data-v-330ecf55]{align-items:center;display:flex;justify-content:flex-start}.base-modal__title-container--centered[data-v-330ecf55]{justify-content:center}.base-modal__title[data-v-330ecf55]{color:var(--neutral--700);font-size:20px;font-weight:700;margin:0}.base-modal__subtitle[data-v-330ecf55]{color:var(--neutral--500);font-size:14px;margin-bottom:24px;margin-top:4px}.base-modal__subtitle--centered[data-v-330ecf55]{text-align:center}.plugin-integration-skeleton[data-v-15d2a7d7]{align-items:center;display:flex;justify-content:space-between;padding:16px;width:100%}.plugin-integration-skeleton__info[data-v-15d2a7d7]{align-items:center;display:flex;gap:12px}.plugin-integration-skeleton__icon[data-v-15d2a7d7]{flex-shrink:0}.plugin-integration-skeleton__details[data-v-15d2a7d7]{display:flex;flex-direction:column;gap:4px}.plugin-integration-skeleton__actions[data-v-15d2a7d7]{align-items:center;display:flex;flex-shrink:0;gap:12px}.plugins-section-skeleton[data-v-4a7c7531]{display:flex;flex-direction:column;gap:16px}.plugins-section-skeleton__toggle[data-v-4a7c7531]{display:flex;justify-content:center}.plugins-section-skeleton__list[data-v-4a7c7531]{display:flex;flex-direction:column;gap:12px}.plugins-section-skeleton__item[data-v-4a7c7531]{align-items:center;background:var(--neutral--0);border:1px solid var(--neutral--200);border-radius:12px;display:flex;justify-content:space-between;padding:16px}.plugins-section-skeleton__item-info[data-v-4a7c7531]{align-items:center;display:flex;gap:12px}.plugins-section-skeleton__item-icon[data-v-4a7c7531]{flex-shrink:0}.plugins-section-skeleton__item-details[data-v-4a7c7531]{display:flex;flex-direction:column;gap:4px}.plugins-section-skeleton__item-actions[data-v-4a7c7531]{align-items:center;display:flex;flex-shrink:0;gap:12px}.add-form-modal[data-v-0a8c7886]{display:flex;flex-direction:column;gap:20px;margin-top:24px}.add-form-modal__main-card[data-v-0a8c7886]{align-items:center;background:var(--neutral--0);border:1px solid var(--primary--500);border-radius:12px;display:flex;justify-content:space-between;padding:20px;transition:border-color .2s ease,box-shadow .2s ease}.add-form-modal__main-card[data-v-0a8c7886]:hover{border-color:var(--primary--600);box-shadow:0 0 0 3px rgba(124,58,237,.1)}.add-form-modal__main-content[data-v-0a8c7886]{align-items:center;display:flex;gap:12px}.add-form-modal__main-icon[data-v-0a8c7886]{align-items:center;background:var(--primary--50);border-radius:8px;display:flex;flex-shrink:0;height:32px;justify-content:center;width:32px}.add-form-modal__plugins-section[data-v-0a8c7886]{display:flex;flex-direction:column;gap:16px}.add-form-modal__plugins-toggle[data-v-0a8c7886]{align-self:center}.add-form-modal__plugins-list[data-v-0a8c7886]{display:flex;flex-direction:column;gap:12px}.add-form-modal__plugin-card[data-v-0a8c7886]{background:var(--neutral--0);border:1px solid var(--neutral--200);border-radius:12px;contain:layout style;display:flex;flex-direction:column;transition:border-color .2s ease}.add-form-modal__plugin-card[data-v-0a8c7886]:hover{border-color:var(--neutral--300)}.add-form-modal__plugin-content[data-v-0a8c7886]{align-items:center;display:flex;justify-content:space-between;padding:16px;width:100%}.add-form-modal__plugin-info[data-v-0a8c7886]{align-items:center;display:flex;gap:12px}.add-form-modal__plugin-icon[data-v-0a8c7886]{align-items:center;background:var(--neutral--50);border-radius:8px;display:flex;flex-shrink:0;height:40px;justify-content:center;width:40px}.add-form-modal__plugin-image[data-v-0a8c7886]{height:32px;object-fit:contain;width:32px}.add-form-modal__plugin-details[data-v-0a8c7886]{align-items:center;display:flex;gap:8px}.add-form-modal__plugin-actions[data-v-0a8c7886]{align-items:center;display:flex;gap:12px}.add-form-modal__installed-section[data-v-0a8c7886]{display:flex;flex-direction:column;gap:8px}@media(max-width:640px){.add-form-modal[data-v-0a8c7886]{gap:16px}.add-form-modal__main-card[data-v-0a8c7886]{align-items:stretch;flex-direction:column;gap:16px;padding:16px}.add-form-modal__main-content[data-v-0a8c7886]{justify-content:center}.add-form-modal__plugin-content[data-v-0a8c7886]{padding:14px}.add-form-modal__plugin-icon[data-v-0a8c7886]{height:36px;width:36px}.add-form-modal__plugin-image[data-v-0a8c7886]{height:28px;width:28px}}@media(max-width:480px){.add-form-modal[data-v-0a8c7886]{gap:12px}.add-form-modal__main-card[data-v-0a8c7886]{padding:14px}.add-form-modal__plugins-list[data-v-0a8c7886]{gap:8px}.add-form-modal__plugin-content[data-v-0a8c7886]{padding:12px}}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
.base-modal__header[data-v-330ecf55]{margin-bottom:8px;margin-top:-4px;position:relative}.base-modal__title-container[data-v-330ecf55]{align-items:center;display:flex;justify-content:flex-start}.base-modal__title-container--centered[data-v-330ecf55]{justify-content:center}.base-modal__title[data-v-330ecf55]{color:var(--neutral--700);font-size:20px;font-weight:700;margin:0}.base-modal__subtitle[data-v-330ecf55]{color:var(--neutral--500);font-size:14px;margin-bottom:24px;margin-top:4px}.base-modal__subtitle--centered[data-v-330ecf55]{text-align:center}.pagination[data-v-35c72b14]{align-items:center;display:flex;gap:8px}.pagination-ellipsis[data-v-35c72b14]{align-items:center;color:var(--neutral--700);display:flex;font-size:14px;font-weight:500;height:48px;justify-content:center;width:48px}.select-page-modal[data-v-3421b05a]{margin-top:24px}.select-page-modal__back-button[data-v-3421b05a]{align-items:center;background:transparent;border:none;border-radius:8px;cursor:pointer;display:flex;height:32px;justify-content:center;left:0;position:absolute;top:0;transition:background-color .2s ease;width:32px}.select-page-modal__back-button[data-v-3421b05a]:hover{background-color:var(--neutral--100)}.select-page-modal__back-button[data-v-3421b05a]:active{background-color:var(--neutral--200)}.select-page-modal__content[data-v-3421b05a]{align-items:center;display:flex;flex-direction:column;gap:20px;margin-bottom:24px}.select-page-modal__pages[data-v-3421b05a]{display:flex;flex-direction:column;gap:8px;max-width:100%;width:100%}.select-page-modal__page-item[data-v-3421b05a]{align-items:center;background:var(--neutral--0);border:1px solid var(--neutral--200);border-radius:16px;cursor:pointer;display:flex;gap:16px;height:60px;justify-content:space-between;padding:20px;transition:border-color .2s ease,opacity .2s ease}.select-page-modal__page-item--selected[data-v-3421b05a],.select-page-modal__page-item[data-v-3421b05a]:hover:not(.select-page-modal__page-item--loading){border-color:var(--primary--500)}.select-page-modal__page-item--loading[data-v-3421b05a]{border-color:var(--neutral--300);cursor:not-allowed;opacity:.7}.select-page-modal__page-loading[data-v-3421b05a]{align-items:center;display:flex;gap:12px;width:100%}.select-page-modal__page-content[data-v-3421b05a]{align-items:center;display:flex;flex:1;gap:12px}.select-page-modal__page-name[data-v-3421b05a]{font-weight:700}.select-page-modal__checkmark[data-v-3421b05a]{align-items:center;display:flex;flex-shrink:0;height:20px;justify-content:center;width:20px}.select-page-modal__no-pages[data-v-3421b05a]{align-items:center;display:flex;flex-direction:column;gap:12px;justify-content:center;padding:40px 20px;text-align:center}.select-page-modal__no-pages-icon[data-v-3421b05a]{color:var(--neutral--400);height:32px;width:32px}.select-page-modal__no-pages-text[data-v-3421b05a]{color:var(--neutral--500);margin:0}.select-page-modal__pagination[data-v-3421b05a]{align-items:center;display:flex;justify-content:center;margin-bottom:8px;padding:16px 0}.select-page-modal__footer[data-v-3421b05a]{display:flex;gap:8px;justify-content:flex-end}@media(max-width:640px){.select-page-modal__page-item[data-v-3421b05a]{padding:16px}.select-page-modal__footer[data-v-3421b05a]{flex-direction:column-reverse;gap:12px}.select-page-modal__footer[data-v-3421b05a] .h-button{width:100%}}@media(max-width:480px){.select-page-modal__pages[data-v-3421b05a]{gap:6px}.select-page-modal__page-item[data-v-3421b05a]{padding:14px}}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
.base-modal__header[data-v-330ecf55]{margin-bottom:8px;margin-top:-4px;position:relative}.base-modal__title-container[data-v-330ecf55]{align-items:center;display:flex;justify-content:flex-start}.base-modal__title-container--centered[data-v-330ecf55]{justify-content:center}.base-modal__title[data-v-330ecf55]{color:var(--neutral--700);font-size:20px;font-weight:700;margin:0}.base-modal__subtitle[data-v-330ecf55]{color:var(--neutral--500);font-size:14px;margin-bottom:24px;margin-top:4px}.base-modal__subtitle--centered[data-v-330ecf55]{text-align:center}.confirm-disconnect-modal[data-v-5df88622]{margin-top:24px}.confirm-disconnect-modal__icon[data-v-5df88622]{margin-right:12px}.confirm-disconnect-modal__content[data-v-5df88622]{align-items:center;display:flex;flex-direction:column;gap:20px;margin-bottom:24px}.confirm-disconnect-modal__footer[data-v-5df88622]{display:flex;gap:8px;justify-content:flex-end}@media(max-width:640px){.confirm-disconnect-modal__footer[data-v-5df88622]{flex-direction:column-reverse;gap:12px}.confirm-disconnect-modal__footer[data-v-5df88622] .h-button{width:100%}}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
!function(){const e=['form.checkout input[name="billing_email"]','form.woocommerce-checkout input[name="billing_email"]','form[name="checkout"] input[type="email"]','form.checkout input[type="email"]','form[id*="checkout"] input[type="email"]','form[class*="checkout"] input[type="email"]',"input#billing_email",'input[type="email"]'];!function(){const t=()=>{for(const t of e){let e=document.querySelector(t);if(e)return e}return null},n=()=>{const e=new FormData;e.append("action",hostinger_reach_email_capture_data.action),e.append("nonce",hostinger_reach_email_capture_data.nonce);let n=t();n&&(e.append("email",n.value),fetch(hostinger_reach_email_capture_data.ajaxurl,{method:"POST",body:e}))};document.addEventListener("DOMContentLoaded",()=>{const e=t();hostinger_reach_email_capture_data&&e&&(e.addEventListener("change",n,{passive:!0}),e.addEventListener("blur",n,{passive:!0}))})}()}();
Binary file not shown.

After

Width:  |  Height:  |  Size: 243 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

@@ -0,0 +1 @@
<?php return array('dependencies' => array(), 'version' => 'd96f90687dce17ec8aa0');
@@ -0,0 +1,2 @@
wp.domReady(function(){new Promise(function(e){var t=wp.data.subscribe(function(){(wp.data.select("core/editor").isCleanNewPost()||wp.data.select("core/block-editor").getBlockCount()>0)&&(t(),e())})}).then(function(){var e=wp.blocks.createBlock("hostinger-reach/subscription",{});setTimeout(function(){wp.data.dispatch("core/block-editor").insertBlocks(e)},0)})});
//# sourceMappingURL=subscription-autoloader.js.map
@@ -0,0 +1 @@
{"version":3,"file":"subscription-autoloader.js","mappings":"AAAAA,GAAGC,SAAS,WAUH,IAAIC,QAAQ,SAACC,GACnB,IAAMC,EAAcJ,GAAGK,KAAKC,UAAU,YACjCN,GAAGK,KAAKE,OAAO,eAAeC,kBAAoBR,GAAGK,KAAKE,OAAO,qBAAqBE,gBAAkB,KAC3GL,IACAD,IAEF,EACD,GAhBmBO,KAAK,WACxB,IAAIC,EAAQX,GAAGY,OAAOC,YAAY,+BAAgC,CAAC,GACnEC,WAAW,WACVd,GAAGK,KAAKU,SAAS,qBAAqBC,aAAaL,EACpD,EAAG,EAEJ,EAYD","sources":["webpack://hostinger-reach/./frontend/blocks/subscription-block/src/autoloader.js"],"sourcesContent":["wp.domReady(() => {\n\twhenEditorIsReady().then(() => {\n\t\tlet block = wp.blocks.createBlock('hostinger-reach/subscription', {});\n\t\tsetTimeout(() => {\n\t\t\twp.data.dispatch('core/block-editor').insertBlocks(block);\n\t\t}, 0);\n\n\t});\n\n\tfunction whenEditorIsReady() {\n\t\treturn new Promise((resolve) => {\n\t\t\tconst unsubscribe = wp.data.subscribe(() => {\n\t\t\t\tif (wp.data.select('core/editor').isCleanNewPost() || wp.data.select('core/block-editor').getBlockCount() > 0) {\n\t\t\t\t\tunsubscribe()\n\t\t\t\t\tresolve()\n\t\t\t\t}\n\t\t\t})\n\t\t})\n\t}\n});\n\n\n\n"],"names":["wp","domReady","Promise","resolve","unsubscribe","data","subscribe","select","isCleanNewPost","getBlockCount","then","block","blocks","createBlock","setTimeout","dispatch","insertBlocks"],"sourceRoot":""}
@@ -0,0 +1,3 @@
.hostinger-reach-block-connect{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-line-pack:start;align-content:flex-start;background:#fff6e9;padding:14px;font-size:14px;margin:28px 0 14px}.hostinger-reach-block-connect__title{color:#1d1e20;font-weight:700;margin-bottom:4px}.hostinger-reach-block-connect__subtitle{color:#727586;margin-bottom:4px}.hostinger-reach-block-connect a{color:rgba(var(--bs-link-color-rgb), var(--bs-link-opacity, 1));text-decoration:underline}
.hostinger-reach-block-dialog{display:block;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-line-pack:start;align-content:flex-start;background:#fff;color:#1d1e20;padding:20px;gap:14px;font-size:14px;line-height:20px;bottom:80px;right:20px;position:fixed;z-index:100001;max-width:400px;border-radius:16px;-webkit-box-shadow:0 0 10px rgba(0,0,0,.05);box-shadow:0 0 10px rgba(0,0,0,.05)}.hostinger-reach-block-dialog__actions{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;gap:10px}.hostinger-reach-block-dialog__button_indicator{height:16px;width:16px}.hostinger-reach-block-dialog__button{cursor:pointer;text-align:center;background:#673de6;color:#fff;font-weight:700;font-size:12px;padding:6px 16px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:10px;border-radius:8px}.hostinger-reach-block-dialog__button:hover{background:#5029c2}.hostinger-reach-block-dialog__button a{color:#fff;text-decoration:none}.hostinger-reach-block-dialog__button a:hover,.hostinger-reach-block-dialog__button a:focus,.hostinger-reach-block-dialog__button a:active{color:#fff;-webkit-box-shadow:none;box-shadow:none;outline:none}.hostinger-reach-block-dialog__button svg{height:16px;width:16px}.hostinger-reach-block-dialog__button svg path{fill:#fff}.hostinger-reach-block-dialog__close{cursor:pointer}.hostinger-reach-block-dialog__close:before,.hostinger-reach-block-dialog__close:after{content:"";position:absolute;width:16px;height:2px;background-color:#1d1e20;top:26px;left:16px}.hostinger-reach-block-dialog__close:before{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.hostinger-reach-block-dialog__close:after{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.hostinger-reach-block-dialog__close:hover:before,.hostinger-reach-block-dialog__close:hover:after{background-color:#727272}
.hostinger-reach-block-subscription-form .hostinger-reach-block-form-fields{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:100%}.hostinger-reach-block-subscription-form .hostinger-reach-block-form-fields--inline{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:end;-ms-flex-align:end;align-items:end;width:100%;gap:.5rem}.hostinger-reach-block-subscription-form .hostinger-reach-block-form-fields--inline .hostinger-reach-block-form-field{min-width:70%}.hostinger-reach-block-subscription-form .hostinger-reach-block-form-fields--inline .hostinger-reach-block-submit{min-width:30%}.hostinger-reach-block-subscription-form .hostinger-reach-block-submit{border-width:0;margin-top:var(--wp--preset--spacing--20);-ms-flex-line-pack:center;align-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:inline-block;height:100%;text-align:center;width:100%;word-break:break-word;font-weight:500;min-height:40px}.hostinger-reach-block-subscription-form .hostinger-reach-block-form-field{margin-top:8px}.hostinger-reach-block-subscription-form label{display:block;font-size:11px;font-weight:500;line-height:1.4;text-transform:uppercase;margin-bottom:8px;padding:0}.hostinger-reach-block-subscription-form input{display:block;width:100%;padding:3px 10px;min-height:40px;-webkit-box-shadow:0 0 0 rgba(0,0,0,0);box-shadow:0 0 0 rgba(0,0,0,0);border-radius:4px;border:1px solid #8c8f94;background-color:#fff;color:#2c3338;-webkit-box-sizing:border-box;box-sizing:border-box}
@@ -0,0 +1 @@
<?php return array('dependencies' => array(), 'version' => '7f752e7e1a0308f99c43');
@@ -0,0 +1,2 @@
!function(){"use strict";var t={145:function(t,n,r){function e(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=Array(n);r<n;r++)e[r]=t[r];return e}r.d(n,{A:function(){return e}})},369:function(t,n,r){function e(t){if(Array.isArray(t))return t}r.d(n,{A:function(){return e}})},453:function(t,n,r){r.d(n,{A:function(){return u}});var e=r(369),o=r(986),i=r(800),c=r(562);function u(t,n){return(0,e.A)(t)||(0,o.A)(t,n)||(0,i.A)(t,n)||(0,c.A)()}},562:function(t,n,r){function e(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}r.d(n,{A:function(){return e}})},800:function(t,n,r){r.d(n,{A:function(){return o}});var e=r(145);function o(t,n){if(t){if("string"==typeof t)return(0,e.A)(t,n);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?(0,e.A)(t,n):void 0}}},986:function(t,n,r){function e(t,n){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var e,o,i,c,u=[],a=!0,l=!1;try{if(i=(r=r.call(t)).next,0===n){if(Object(r)!==r)return;a=!1}else for(;!(a=(e=i.call(r)).done)&&(u.push(e.value),u.length!==n);a=!0);}catch(t){l=!0,o=t}finally{try{if(!a&&null!=r.return&&(c=r.return(),Object(c)!==c))return}finally{if(l)throw o}}return u}}r.d(n,{A:function(){return e}})}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.d=function(t,n){for(var e in n)r.o(n,e)&&!r.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)};var e=r(453);document.addEventListener("DOMContentLoaded",function(){var t=hostinger_reach_subscription_block_data.translations;document.querySelectorAll(".hostinger-reach-block-subscription-form").forEach(function(n){var r=n.querySelector(".reach-subscription-message");n.addEventListener("submit",function(o){o.preventDefault();var i=n.querySelector('button[type="submit"]'),c=new FormData(n),u={};c.forEach(function(t,n){if(n.includes(".")){var r=n.split("."),o=(0,e.A)(r,2),i=o[0],c=o[1];u[i]||(u[i]={}),u[i][c]=t}else u[n]=t}),i.disabled=!0,fetch(hostinger_reach_subscription_block_data.endpoint,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":hostinger_reach_subscription_block_data.nonce},body:JSON.stringify(u)}).then(function(e){if(r.style.display="block",n.reset(),!e.ok)throw new Error(e.statusText);r.textContent=t.thanks,n.querySelector(".hostinger-reach-block-submit").style.display="none"}).catch(function(n){r.textContent=t.error,r.style.display="block",i.disabled=!1})})})})}();
//# sourceMappingURL=subscription-view.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
<?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-server-side-render'), 'version' => '214c782251b07b841f2d');
@@ -0,0 +1,5 @@
.hostinger-reach-block-connect{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-line-pack:start;align-content:flex-start;background:#fff6e9;padding:14px;font-size:14px;margin:28px 0 14px}.hostinger-reach-block-connect__title{color:#1d1e20;font-weight:700;margin-bottom:4px}.hostinger-reach-block-connect__subtitle{color:#727586;margin-bottom:4px}.hostinger-reach-block-connect a{color:rgba(var(--bs-link-color-rgb), var(--bs-link-opacity, 1));text-decoration:underline}
.hostinger-reach-block-dialog{display:block;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-line-pack:start;align-content:flex-start;background:#fff;color:#1d1e20;padding:20px;gap:14px;font-size:14px;line-height:20px;bottom:80px;left:20px;position:fixed;z-index:100001;max-width:400px;border-radius:16px;-webkit-box-shadow:0 0 10px rgba(0,0,0,.05);box-shadow:0 0 10px rgba(0,0,0,.05)}.hostinger-reach-block-dialog__actions{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;gap:10px}.hostinger-reach-block-dialog__button_indicator{height:16px;width:16px}.hostinger-reach-block-dialog__button{cursor:pointer;text-align:center;background:#673de6;color:#fff;font-weight:700;font-size:12px;padding:6px 16px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:10px;border-radius:8px}.hostinger-reach-block-dialog__button:hover{background:#5029c2}.hostinger-reach-block-dialog__button a{color:#fff;text-decoration:none}.hostinger-reach-block-dialog__button a:hover,.hostinger-reach-block-dialog__button a:focus,.hostinger-reach-block-dialog__button a:active{color:#fff;-webkit-box-shadow:none;box-shadow:none;outline:none}.hostinger-reach-block-dialog__button svg{height:16px;width:16px}.hostinger-reach-block-dialog__button svg path{fill:#fff}.hostinger-reach-block-dialog__close{cursor:pointer}.hostinger-reach-block-dialog__close:before,.hostinger-reach-block-dialog__close:after{content:"";position:absolute;width:16px;height:2px;background-color:#1d1e20;top:26px;right:16px}.hostinger-reach-block-dialog__close:before{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.hostinger-reach-block-dialog__close:after{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.hostinger-reach-block-dialog__close:hover:before,.hostinger-reach-block-dialog__close:hover:after{background-color:#727272}
.hostinger-reach-block-subscription-form .hostinger-reach-block-form-fields{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:100%}.hostinger-reach-block-subscription-form .hostinger-reach-block-form-fields--inline{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:end;-ms-flex-align:end;align-items:end;width:100%;gap:.5rem}.hostinger-reach-block-subscription-form .hostinger-reach-block-form-fields--inline .hostinger-reach-block-form-field{min-width:70%}.hostinger-reach-block-subscription-form .hostinger-reach-block-form-fields--inline .hostinger-reach-block-submit{min-width:30%}.hostinger-reach-block-subscription-form .hostinger-reach-block-submit{border-width:0;margin-top:var(--wp--preset--spacing--20);-ms-flex-line-pack:center;align-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:inline-block;height:100%;text-align:center;width:100%;word-break:break-word;font-weight:500;min-height:40px}.hostinger-reach-block-subscription-form .hostinger-reach-block-form-field{margin-top:8px}.hostinger-reach-block-subscription-form label{display:block;font-size:11px;font-weight:500;line-height:1.4;text-transform:uppercase;margin-bottom:8px;padding:0}.hostinger-reach-block-subscription-form input{display:block;width:100%;padding:3px 10px;min-height:40px;-webkit-box-shadow:0 0 0 rgba(0,0,0,0);box-shadow:0 0 0 rgba(0,0,0,0);border-radius:4px;border:1px solid #8c8f94;background-color:#fff;color:#2c3338;-webkit-box-sizing:border-box;box-sizing:border-box}
/*# sourceMappingURL=subscription.css.map*/
@@ -0,0 +1 @@
{"version":3,"file":"subscription.css","mappings":"AAAA,+BACC,qDACA,yGACA,kDACA,mBACA,aACA,eACA,mBAGA,sCACC,cACA,gBACA,kBAGD,yCACC,cACA,kBAGD,iCACC,gEACA,0B;ACvBF,8BACC,cACA,yGACA,kDACA,gBACA,cACA,aACA,SACA,eACA,iBACA,YACA,UACA,eACA,eACA,gBACA,mBACA,gFAEA,uCACC,qDACA,sEACA,SAGD,gDACC,YACA,WAGD,sCACC,eACA,kBACA,mBACA,WACA,gBACA,eACA,iBACA,qDACA,qGACA,kEACA,SACA,kBAEA,4CACC,mBAGD,wCACC,WACA,qBAEA,2IACC,WACA,wCACA,aAMF,0CACC,YACA,WAEA,+CACC,UAMH,qCACC,eAEA,uFACC,WACA,kBACA,WACA,WACA,yBACA,SACA,WAGD,4CACC,wDAGD,2CACC,0DAGD,mGACC,yB;AC3FF,4EACC,qDACA,yGACA,WAEA,oFACC,qGACA,sEACA,yDACA,WACA,UAEA,sHACC,cAGD,kHACC,cAKH,uEACC,eACA,0CACA,+CACA,oDACA,eACA,qBACA,YACA,kBACA,WACA,sBACA,gBACA,gBAGD,2EACC,eAGD,+CACC,cACA,eACA,gBACA,gBACA,yBACA,kBACA,UAGD,+CACC,cACA,WACA,iBACA,gBACA,sEACA,kBACA,yBACA,sBACA,cACA,oD","sources":["webpack://hostinger-reach/./frontend/blocks/subscription-block/src/Components/Connect.scss","webpack://hostinger-reach/./frontend/blocks/subscription-block/src/Components/Dialog.scss","webpack://hostinger-reach/./frontend/blocks/subscription-block/src/styles.scss"],"sourcesContent":[".hostinger-reach-block-connect {\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-content: flex-start;\n\tbackground: #fff6e9;\n\tpadding: 14px;\n\tfont-size: 14px;\n\tmargin: 28px 0 14px;\n\n\n\t&__title {\n\t\tcolor: #1d1e20;\n\t\tfont-weight: 700;\n\t\tmargin-bottom: 4px;\n\t}\n\n\t&__subtitle {\n\t\tcolor: #727586;\n\t\tmargin-bottom: 4px;\n\t}\n\n\ta {\n\t\tcolor: rgba(var(--bs-link-color-rgb), var(--bs-link-opacity, 1));\n\t\ttext-decoration: underline;\n\t}\n\n}\n",".hostinger-reach-block-dialog {\n\tdisplay: block;\n\tflex-direction: column;\n\talign-content: flex-start;\n\tbackground: #fff;\n\tcolor: #1D1E20;\n\tpadding: 20px;\n\tgap: 14px;\n\tfont-size: 14px;\n\tline-height: 20px;\n\tbottom: 80px;\n\tleft: 20px;\n\tposition: fixed;\n\tz-index: 100001;\n\tmax-width: 400px;\n\tborder-radius: 16px;\n\tbox-shadow: 0 0 10px rgba(0,0,0,0.05);\n\n\t&__actions {\n\t\tdisplay: flex;\n\t\tjustify-content: flex-start;\n\t\tgap: 10px;\n\t}\n\n\t&__button_indicator {\n\t\theight: 16px;\n\t\twidth: 16px;\n\t}\n\n\t&__button {\n\t\tcursor: pointer;\n\t\ttext-align: center;\n\t\tbackground: #673DE6;\n\t\tcolor: #fff;\n\t\tfont-weight: 700;\n\t\tfont-size: 12px;\n\t\tpadding: 6px 16px;\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\talign-items: center;\n\t\tgap: 10px;\n\t\tborder-radius: 8px;\n\n\t\t&:hover {\n\t\t\tbackground: #5029c2;\n\t\t}\n\n\t\ta {\n\t\t\tcolor: #fff;\n\t\t\ttext-decoration: none;\n\n\t\t\t&:hover, &:focus, &:active {\n\t\t\t\tcolor: #fff;\n\t\t\t\tbox-shadow: none;\n\t\t\t\toutline: none;\n\t\t\t}\n\n\n\t\t}\n\n\t\tsvg {\n\t\t\theight: 16px;\n\t\t\twidth: 16px;\n\n\t\t\tpath {\n\t\t\t\tfill: #fff;\n\t\t\t}\n\t\t}\n\n\t}\n\n\t&__close {\n\t\tcursor: pointer;\n\n\t\t&:before, &:after {\n\t\t\tcontent: '';\n\t\t\tposition: absolute;\n\t\t\twidth: 16px;\n\t\t\theight: 2px;\n\t\t\tbackground-color: #1D1E20;\n\t\t\ttop: 26px;\n\t\t\tright: 16px;\n\t\t}\n\n\t\t&:before {\n\t\t\ttransform: rotate(45deg);\n\t\t}\n\n\t\t&:after {\n\t\t\ttransform: rotate(-45deg);\n\t\t}\n\n\t\t&:hover:before, &:hover:after {\n\t\t\tbackground-color: #727272;\n\t\t}\n\t}\n}\n\n\n\n\n",".hostinger-reach-block-subscription-form {\n\n\t.hostinger-reach-block-form-fields {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\twidth: 100%;\n\n\t\t&--inline {\n\t\t\tflex-direction: row;\n\t\t\tjustify-content: flex-start;\n\t\t\talign-items: end;\n\t\t\twidth: 100%;\n\t\t\tgap: 0.5rem;\n\n\t\t\t.hostinger-reach-block-form-field {\n\t\t\t\tmin-width: 70%\n\t\t\t}\n\n\t\t\t.hostinger-reach-block-submit {\n\t\t\t\tmin-width: 30%;\n\t\t\t}\n\t\t}\n\t}\n\n\t.hostinger-reach-block-submit {\n\t\tborder-width: 0;\n\t\tmargin-top: var(--wp--preset--spacing--20);\n\t\talign-content: center;\n\t\tbox-sizing: border-box;\n\t\tcursor: pointer;\n\t\tdisplay: inline-block;\n\t\theight: 100%;\n\t\ttext-align: center;\n\t\twidth: 100%;\n\t\tword-break: break-word;\n\t\tfont-weight: 500;\n\t\tmin-height: 40px;\n\t}\n\n\t.hostinger-reach-block-form-field {\n\t\tmargin-top: 8px;\n\t}\n\n\tlabel {\n\t\tdisplay: block;\n\t\tfont-size: 11px;\n\t\tfont-weight: 500;\n\t\tline-height: 1.4;\n\t\ttext-transform: uppercase;\n\t\tmargin-bottom: calc(8px);\n\t\tpadding: 0;\n\t}\n\n\tinput {\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t\tpadding: 3px 10px;\n\t\tmin-height: 40px;\n\t\tbox-shadow: 0 0 0 transparent;\n\t\tborder-radius: 4px;\n\t\tborder: 1px solid #8c8f94;\n\t\tbackground-color: #fff;\n\t\tcolor: #2c3338;\n\t\tbox-sizing: border-box;\n\t}\n}\n"],"names":[],"sourceRoot":""}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
.hostinger-reach-notice{border:none;border-left:4px solid #673de6;box-shadow:0 1px 3px rgba(0,0,0,.1);padding:0;position:relative}.hostinger-reach-notice .hostinger-reach-notice-wrap{display:flex}.hostinger-reach-notice .hostinger-reach-notice-aside{display:none}@media screen and (min-width:756px){.hostinger-reach-notice .hostinger-reach-notice-aside{display:block}}.hostinger-reach-notice .hostinger-reach-notice-aside{background:#f8f8ff;padding:10px}.hostinger-reach-notice .hostinger-reach-notice-close{background:none;border:none;color:#9ca3af;cursor:pointer;display:block;font-size:.8125rem;font-style:normal;height:20px;line-height:20px;margin:0;padding:0;position:absolute;right:15px;text-align:center;top:15px;transition:color .2s ease;width:20px}.hostinger-reach-notice .hostinger-reach-notice-close:focus,.hostinger-reach-notice .hostinger-reach-notice-close:hover{color:#673de6}.hostinger-reach-notice .hostinger-reach-notice-close:before{content:"×";display:inline-block;font-size:20px;font-weight:400;line-height:20px;position:relative}.hostinger-reach-notice .notice-dismiss{display:none}.hostinger-reach-notice .hostinger-reach-notice-content{padding:20px 25px}.hostinger-reach-notice .hostinger-reach-notice-content h3{color:#1e1e1e;font-size:16px;font-weight:600;line-height:1.4;margin:0 0 8px;padding:0}.hostinger-reach-notice .hostinger-reach-notice-content p{color:#6c757d;font-size:14px;line-height:1.6;margin:0;padding:0}.hostinger-reach-notice .hostinger-reach-notice-actions{align-items:center;display:flex;gap:12px;margin-right:32px;padding:0 25px 25px}.hostinger-reach-notice .hostinger-reach-notice-actions .hostinger-reach-button{border:none;border-radius:4px;cursor:pointer;font-size:12px;font-weight:500;line-height:1.4;padding:10px 20px;transition:all .2s ease;white-space:nowrap}.hostinger-reach-notice .hostinger-reach-notice-actions .hostinger-reach-button.button-primary{background:#673de6;box-shadow:0 2px 4px rgba(103,61,230,.2);color:#fff}.hostinger-reach-notice .hostinger-reach-notice-actions .hostinger-reach-button.button-primary:focus,.hostinger-reach-notice .hostinger-reach-notice-actions .hostinger-reach-button.button-primary:hover{background:#5633b8;box-shadow:0 4px 8px rgba(103,61,230,.3);transform:translateY(-1px)}.hostinger-reach-notice .hostinger-reach-notice-actions .hostinger-reach-button.button-primary:active{transform:translateY(0)}.hostinger-reach-notice .hostinger-reach-notice-actions .hostinger-reach-button.button-secondary{background:transparent;border:1px solid #673de6;box-shadow:none;color:#673de6}.hostinger-reach-notice .hostinger-reach-notice-actions .hostinger-reach-button.button-secondary:focus,.hostinger-reach-notice .hostinger-reach-notice-actions .hostinger-reach-button.button-secondary:hover{background:#f8f5ff;border-color:#5633b8;color:#5633b8}
@@ -0,0 +1 @@
!function(){"use strict";!function(){const n=()=>document.getElementById("hostinger-reach-connection-notice"),e=e=>{const t=new FormData;t.append("action",hostinger_reach_connection_notice_data.action),t.append("nonce",hostinger_reach_connection_notice_data.nonce),t.append("choice",e),fetch(hostinger_reach_connection_notice_data.ajaxurl,{method:"POST",body:t}).then(n=>n.json()).then(e=>{e.success&&e.data.redirect_url&&(window.location.href=e.data.redirect_url);const t=n().querySelector(".notice-dismiss");t&&t.click(),notice.style.display="none"})};document.addEventListener("DOMContentLoaded",()=>{const t=n();if(!t||!hostinger_reach_connection_notice_data)return;const c=t.querySelectorAll(".hostinger-reach-action-button");c?.length&&c.forEach(n=>{n.addEventListener("click",function(n){e(n.target.dataset.action)})})})}()}();
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 28 KiB

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 400 400" fill="none"><g clip-path="url(#clip0)"><path d="M200 0C89.5321 0 0 89.5321 0 200C0 310.431 89.5321 400 200 400C310.468 400 400 310.468 400 200C399.964 89.5321 310.431 0 200 0ZM150.009 283.306H116.694V116.658H150.009V283.306ZM283.306 283.306H183.324V249.991H283.306V283.306ZM283.306 216.639H183.324V183.324H283.306V216.639ZM283.306 149.973H183.324V116.658H283.306V149.973Z" fill="#92003B"></path></g><defs><clipPath id="clip0"><rect width="400" height="400" fill="white"></rect></clipPath></defs></svg>

After

Width:  |  Height:  |  Size: 587 B

@@ -0,0 +1,12 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<!-- Email envelope -->
<rect x="2" y="5" width="20" height="14" rx="2" stroke="currentColor" stroke-width="2" fill="none"/>
<path d="M2 7l10 6 10-6" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
<!-- Reach/broadcast waves -->
<path d="M16 2c3.5 3.5 3.5 6.5 0 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" opacity="0.7"/>
<path d="M18 4c2 2 2 4 0 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" opacity="0.5"/>
<!-- Small connecting dot -->
<circle cx="15" cy="7" r="1.5" fill="currentColor"/>
</svg>

After

Width:  |  Height:  |  Size: 678 B

@@ -0,0 +1,5 @@
<svg width="32" height="32" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="logotype">
<path id="symbol" fill-rule="evenodd" clip-rule="evenodd" d="M0.000249566 14.046V0.000497794L7.08916 3.78046V10.1086L16.4735 10.1132L23.6774 14.046H0.000249566ZM18.3925 8.95058V0L25.6725 3.6859V13.1797L18.3925 8.95058ZM18.3924 26.1177V19.8441L8.93577 19.8375C8.9446 19.8793 1.6123 15.8418 1.6123 15.8418L25.6725 15.9547V30L18.3924 26.1177ZM0 26.1177L0.000252212 16.9393L7.08916 21.0683V29.8033L0 26.1177Z" fill="#673DE6"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 553 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 39 KiB

@@ -0,0 +1,28 @@
<svg width="210" height="28" viewBox="0 0 210 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_9697_102453)">
<path d="M8.95524 19.0529L5.32791 19.041L2.28558 22.0835L5.91461 25.7143L11.4313 20.1991L11.433 28H16.567V22.4372L8.95524 19.0529Z" fill="#1D1E20"/>
<path d="M22.0837 2.28566L16.567 7.80423V0H11.433V5.56109L19.0431 8.94706L19.0686 8.95896H22.6704L25.7144 5.91482L22.0837 2.28566Z" fill="#1D1E20"/>
<path d="M28 11.4346H22.4374L19.0431 19.0653V22.6741L22.0837 25.7148L25.7144 22.084L20.1961 16.5671L20.1944 16.5654H28V11.4346Z" fill="#1D1E20"/>
<path d="M8.95523 5.32883L5.9146 2.28809L2.28557 5.91895L7.80224 11.4358H7.80394V11.4375H0V16.5683H5.56258L7.84475 11.4358L8.95523 8.94098V5.32883Z" fill="#1D1E20"/>
<path d="M47.1216 8.80078H49.7803V20.482H47.1216V15.5266H42.6586V20.482H39.9999V8.80078H42.6586V13.2682H47.1216V8.80078Z" fill="#1D1E20"/>
<path d="M56.0338 14.562C56.0338 15.1351 56.1053 15.6555 56.2449 16.1129C56.3861 16.5772 56.5904 16.9768 56.8542 17.3067C57.118 17.6366 57.4448 17.8934 57.8261 18.0754C58.2108 18.254 58.6499 18.3492 59.1469 18.3492C59.644 18.3492 60.0712 18.254 60.4593 18.0754C60.8491 17.8968 61.1776 17.6366 61.4414 17.3067C61.7052 16.9768 61.9095 16.5772 62.0507 16.1129C62.1903 15.6521 62.2618 15.1317 62.2618 14.562C62.2618 13.9923 62.1903 13.4634 62.0507 12.9924C61.9095 12.5281 61.7052 12.1234 61.4414 11.7935C61.1776 11.4636 60.8491 11.2068 60.4593 11.0248C60.0695 10.8462 59.632 10.751 59.1469 10.751C58.6618 10.751 58.2091 10.8462 57.8261 11.0333C57.4414 11.2187 57.118 11.4806 56.8542 11.8122C56.5904 12.1421 56.3861 12.5468 56.2449 13.0111C56.1036 13.4804 56.0338 13.9974 56.0338 14.562ZM64.9937 14.562C64.9937 15.5653 64.8439 16.4462 64.546 17.2081C64.2465 17.97 63.838 18.6026 63.3188 19.1195C62.7997 19.628 62.1818 20.0158 61.4652 20.2793C60.7469 20.5361 59.9776 20.6654 59.1521 20.6654C58.3265 20.6654 57.5946 20.5361 56.8831 20.2793C56.1734 20.0158 55.5504 19.628 55.021 19.1195C54.49 18.6026 54.073 17.97 53.7666 17.2081C53.4636 16.4462 53.3087 15.5653 53.3087 14.562C53.3087 13.5587 53.4687 12.6727 53.7836 11.9108C54.1002 11.1489 54.5257 10.5078 55.0619 9.99425C55.598 9.47218 56.2176 9.08614 56.924 8.82255C57.6304 8.56577 58.3725 8.43652 59.1503 8.43652C59.9282 8.43652 60.7078 8.56577 61.4193 8.82255C62.129 9.08614 62.752 9.47388 63.2814 9.99425C63.8107 10.5112 64.2294 11.1489 64.5324 11.9108C64.8388 12.6727 64.9903 13.5536 64.9903 14.562H64.992H64.9937Z" fill="#1D1E20"/>
<path d="M71.637 18.4206C72.0098 18.4206 72.3178 18.3866 72.5612 18.3254C72.8029 18.2642 73.0004 18.1791 73.1434 18.0737C73.2897 17.9666 73.3902 17.839 73.4497 17.6911C73.5059 17.5448 73.5348 17.3782 73.5348 17.1962C73.5348 16.8136 73.3544 16.4956 72.9936 16.2439C72.6327 15.9871 72.0115 15.7184 71.1315 15.4191C70.7468 15.2847 70.3621 15.1283 69.9808 14.9548C69.5962 14.7814 69.2523 14.5637 68.9477 14.2984C68.6447 14.0297 68.3945 13.7117 68.2021 13.3342C68.0115 12.9516 67.9145 12.4924 67.9145 11.9567C67.9145 11.421 68.0149 10.9262 68.2192 10.4925C68.4217 10.0538 68.7094 9.68475 69.0838 9.38374C69.4566 9.08104 69.9077 8.84466 70.4387 8.68311C70.9698 8.52155 71.5672 8.43652 72.2344 8.43652C73.0259 8.43652 73.7085 8.51985 74.2855 8.68821C74.8608 8.85657 75.334 9.04873 75.7084 9.2494L74.9476 11.3292C74.6191 11.1608 74.2565 11.0078 73.8548 10.882C73.4531 10.7527 72.9714 10.6864 72.4081 10.6864C71.7766 10.6864 71.3204 10.7765 71.043 10.95C70.7655 11.1234 70.6293 11.3921 70.6293 11.7526C70.6293 11.9703 70.6804 12.1523 70.7808 12.2968C70.8813 12.4431 71.0259 12.5774 71.2115 12.6965C71.3987 12.8138 71.6132 12.9209 71.8566 13.0179C72.0983 13.1131 72.3655 13.2134 72.66 13.3138C73.2693 13.5383 73.7987 13.761 74.2514 13.9821C74.7025 14.2066 75.077 14.46 75.3782 14.7559C75.6778 15.0467 75.9008 15.3902 76.0472 15.7864C76.1935 16.1776 76.2684 16.6605 76.2684 17.22C76.2684 18.3135 75.8838 19.1655 75.1161 19.7658C74.3502 20.3695 73.191 20.6739 71.6455 20.6739C71.1264 20.6739 70.6583 20.6399 70.2396 20.5786C69.8208 20.5174 69.4515 20.4443 69.1298 20.3542C68.8081 20.2589 68.5323 20.1637 68.2992 20.0634C68.0694 19.963 67.8736 19.8678 67.717 19.7777L68.4626 17.6809C68.8132 17.8713 69.2438 18.0448 69.7579 18.1978C70.2719 18.3492 70.9017 18.4274 71.6472 18.4274H71.6404L71.637 18.4206Z" fill="#1D1E20"/>
<path d="M87.8973 8.70508V10.96H84.3569V20.4323H81.7169V10.96H78.1765V8.70508H87.8973Z" fill="#1D1E20"/>
<path d="M90.8334 20.4306H93.4733V8.70508H90.8334V20.4306Z" fill="#1D1E20"/>
<path d="M105.298 20.4306C104.54 19.0837 103.722 17.7624 102.843 16.4512C101.962 15.1435 101.026 13.9139 100.033 12.7456V20.4306H97.4274V8.70508H99.5788C99.9516 9.07921 100.364 9.53496 100.816 10.0774C101.267 10.6165 101.727 11.193 102.197 11.8103C102.665 12.4276 103.129 13.0603 103.592 13.7218C104.055 14.3833 104.489 15.0159 104.896 15.6281V8.70678H107.523V20.4323H105.301L105.298 20.4306Z" fill="#1D1E20"/>
<path d="M117.192 10.734C115.962 10.734 115.073 11.0758 114.523 11.7595C113.975 12.4431 113.703 13.375 113.703 14.5569C113.703 15.1351 113.769 15.6555 113.905 16.1265C114.04 16.5908 114.244 16.9955 114.515 17.3305C114.787 17.6724 115.124 17.9342 115.531 18.1213C115.938 18.3067 116.411 18.3951 116.952 18.3951C117.247 18.3951 117.499 18.39 117.706 18.3781C117.914 18.373 118.098 18.3441 118.258 18.3118V14.2372H120.898V20.0379C120.583 20.1603 120.074 20.2946 119.374 20.4375C118.673 20.5769 117.812 20.6501 116.782 20.6501C115.9 20.6501 115.1 20.5157 114.385 20.2419C113.667 19.9732 113.056 19.5804 112.549 19.06C112.042 18.5431 111.647 17.9053 111.373 17.1486C111.095 16.3918 110.959 15.5279 110.959 14.5586C110.959 13.5893 111.111 12.7084 111.417 11.9567C111.722 11.2 112.14 10.5622 112.671 10.0334C113.201 9.51129 113.825 9.11335 114.544 8.83956C115.259 8.57087 116.026 8.43652 116.836 8.43652C117.39 8.43652 117.89 8.47054 118.336 8.54366C118.782 8.62189 119.163 8.70521 119.488 8.80045C119.808 8.89568 120.076 8.99091 120.285 9.09635C120.493 9.19668 120.642 9.27491 120.733 9.33103L119.97 11.4431C119.608 11.2527 119.194 11.0826 118.726 10.9432C118.258 10.8037 117.745 10.7306 117.192 10.7306V10.7357V10.734Z" fill="#1D1E20"/>
<path d="M124.596 20.4306V8.70508H132.521V10.9243H127.238V13.2218H131.929V15.3849H127.238V18.2096H132.911V20.4289H124.596V20.4306Z" fill="#1D1E20"/>
<path d="M139.689 10.8231C139.498 10.8231 139.326 10.8282 139.171 10.8401C139.02 10.852 138.875 10.8673 138.741 10.8741V14.0576H139.486C140.479 14.0576 141.192 13.9352 141.621 13.6835C142.05 13.4369 142.266 13.0151 142.266 12.4148C142.266 11.8145 142.048 11.4336 141.614 11.1853C141.182 10.9455 140.54 10.8214 139.691 10.8214L139.689 10.8231ZM139.537 8.57324C141.299 8.57324 142.645 8.88615 143.585 9.51536C144.521 10.1378 144.991 11.1139 144.991 12.4302C144.991 13.2549 144.802 13.9199 144.422 14.4368C144.045 14.9453 143.5 15.35 142.788 15.6476C143.025 15.9384 143.274 16.2769 143.534 16.651C143.793 17.0336 144.051 17.4247 144.305 17.8329C144.56 18.2461 144.805 18.6747 145.042 19.1219C145.28 19.5641 145.498 20.0028 145.701 20.4331H142.746C142.53 20.047 142.314 19.6593 142.092 19.2614C141.871 18.8702 141.645 18.4876 141.411 18.1118C141.178 17.7428 140.95 17.389 140.724 17.0574C140.496 16.7224 140.268 16.418 140.043 16.1493H138.739V20.4331H136.099V8.87594C136.674 8.76371 137.27 8.68548 137.885 8.64126C138.499 8.59705 139.051 8.57494 139.536 8.57494H139.537V8.57324Z" fill="#1D1E20"/>
<path d="M156.45 8.77539H155.684V20.4873H156.45V8.77539Z" fill="#1D1E20"/>
<path d="M171.083 15.5651C171.265 15.7913 171.495 16.0889 171.772 16.4579C172.05 16.827 172.337 17.2351 172.632 17.6824C172.926 18.1296 173.219 18.5973 173.508 19.0853C173.798 19.5734 174.044 20.0428 174.249 20.4968H172.444C172.218 20.0666 171.971 19.6295 171.704 19.1874C171.437 18.7452 171.168 18.3235 170.896 17.9204C170.623 17.5174 170.354 17.1416 170.087 16.7896C169.82 16.4375 169.58 16.1314 169.364 15.8712C169.216 15.8831 169.066 15.8882 168.913 15.8882H166.964V20.4968H165.313V8.88187C165.777 8.76793 166.296 8.69141 166.87 8.65229C167.444 8.61318 167.968 8.59277 168.444 8.59277C170.101 8.59277 171.364 8.90398 172.232 9.52809C173.1 10.1522 173.534 11.0807 173.534 12.317C173.534 13.0993 173.326 13.7676 172.913 14.3237C172.499 14.8798 171.888 15.293 171.083 15.5651ZM168.581 10.0383C167.878 10.0383 167.338 10.0553 166.964 10.0893V14.5278H168.138C168.705 14.5278 169.216 14.4989 169.67 14.4428C170.124 14.3866 170.507 14.2778 170.819 14.1196C171.13 13.9615 171.372 13.737 171.542 13.4479C171.713 13.1588 171.798 12.7762 171.798 12.3C171.798 11.8579 171.713 11.4889 171.542 11.1947C171.372 10.9005 171.142 10.6675 170.853 10.4974C170.564 10.3274 170.223 10.2083 169.832 10.1403C169.44 10.0723 169.023 10.0383 168.581 10.0383Z" fill="#1D1E20"/>
<path d="M175.423 16.0922C175.423 15.3099 175.537 14.6263 175.764 14.043C175.99 13.4597 176.291 12.975 176.666 12.589C177.04 12.203 177.471 11.9139 177.959 11.7217C178.448 11.5296 178.947 11.4326 179.457 11.4326C180.649 11.4326 181.563 11.8033 182.198 12.5465C182.832 13.2896 183.151 14.4205 183.151 15.9391V16.2027C183.151 16.3099 183.146 16.4102 183.134 16.5003H177.074C177.142 17.4186 177.41 18.1159 177.874 18.592C178.339 19.0682 179.066 19.3063 180.053 19.3063C180.61 19.3063 181.078 19.2587 181.457 19.1617C181.837 19.0648 182.124 18.9713 182.317 18.8811L182.538 20.2076C182.346 20.3096 182.007 20.4168 181.525 20.5307C181.044 20.6446 180.495 20.7008 179.883 20.7008C179.112 20.7008 178.444 20.5851 177.883 20.3521C177.321 20.1192 176.858 19.7995 176.496 19.3913C176.133 18.9832 175.862 18.4985 175.687 17.9373C175.51 17.3761 175.423 16.7605 175.423 16.0922ZM181.5 15.2249C181.512 14.5107 181.333 13.924 180.964 13.4648C180.594 13.0057 180.087 12.7761 179.44 12.7761C179.078 12.7761 178.756 12.8475 178.478 12.9886C178.201 13.1298 177.964 13.3152 177.772 13.5413C177.58 13.7675 177.428 14.0294 177.321 14.3236C177.214 14.6178 177.142 14.9188 177.108 15.2249H181.5Z" fill="#1D1E20"/>
<path d="M188.291 11.4326C188.926 11.4326 189.462 11.5142 189.9 11.6792C190.337 11.8442 190.688 12.0754 190.955 12.3764C191.222 12.6774 191.411 13.0346 191.525 13.4478C191.639 13.861 191.695 14.3185 191.695 14.8168V20.3436C191.559 20.3657 191.369 20.3981 191.125 20.4372C190.882 20.4763 190.606 20.5137 190.3 20.5477C189.993 20.5817 189.661 20.6123 189.304 20.6412C188.947 20.6702 188.592 20.6838 188.24 20.6838C187.741 20.6838 187.282 20.6327 186.861 20.5307C186.441 20.4287 186.078 20.2671 185.772 20.046C185.466 19.825 185.227 19.5325 185.057 19.1702C184.887 18.808 184.802 18.371 184.802 17.8608C184.802 17.3506 184.901 16.9544 185.1 16.6024C185.299 16.2504 185.568 15.9681 185.908 15.7521C186.249 15.5361 186.645 15.378 187.1 15.2759C187.554 15.1739 188.031 15.1229 188.53 15.1229C188.688 15.1229 188.853 15.1314 189.023 15.1484C189.193 15.1654 189.355 15.1875 189.508 15.2164C189.661 15.2453 189.794 15.2708 189.908 15.2929C190.022 15.315 190.101 15.332 190.147 15.3439V14.9018C190.147 14.6416 190.118 14.3831 190.061 14.128C190.005 13.8729 189.903 13.6468 189.755 13.4478C189.607 13.2488 189.406 13.0907 189.151 12.9716C188.895 12.8526 188.564 12.7931 188.155 12.7931C187.632 12.7931 187.176 12.8305 186.785 12.9036C186.393 12.9767 186.101 13.0533 185.908 13.1332L185.721 11.8237C185.925 11.7336 186.266 11.6452 186.742 11.5602C187.219 11.4751 187.735 11.4326 188.291 11.4326ZM188.427 19.3573C188.802 19.3573 189.134 19.3488 189.423 19.3318C189.712 19.3148 189.954 19.2842 190.147 19.2383V16.6024C190.032 16.5463 189.849 16.4969 189.593 16.4578C189.338 16.4187 189.028 16.3983 188.666 16.3983C188.427 16.3983 188.175 16.4153 187.908 16.4493C187.641 16.4833 187.398 16.5548 187.176 16.6619C186.955 16.769 186.771 16.917 186.623 17.104C186.475 17.2911 186.402 17.5377 186.402 17.8438C186.402 18.4101 186.584 18.8046 186.947 19.0257C187.309 19.2468 187.803 19.3573 188.427 19.3573Z" fill="#1D1E20"/>
<path d="M198.162 20.7008C197.447 20.7008 196.82 20.5868 196.281 20.3606C195.741 20.1345 195.288 19.8165 194.919 19.4083C194.55 19.0002 194.276 18.5155 194.094 17.9543C193.911 17.3931 193.821 16.7724 193.821 16.0922C193.821 15.412 193.92 14.7879 194.119 14.2216C194.318 13.6553 194.599 13.1655 194.962 12.7506C195.324 12.3373 195.77 12.0142 196.298 11.7812C196.826 11.5483 197.413 11.4326 198.06 11.4326C198.456 11.4326 198.854 11.4666 199.251 11.5347C199.648 11.6027 200.029 11.7098 200.391 11.8578L200.034 13.2012C199.796 13.0873 199.52 12.9971 199.208 12.9291C198.897 12.8611 198.565 12.8271 198.213 12.8271C197.328 12.8271 196.65 13.1043 196.179 13.6604C195.707 14.2165 195.472 15.0259 195.472 16.0922C195.472 16.5684 195.527 17.0054 195.634 17.4016C195.741 17.7979 195.911 18.138 196.145 18.422C196.378 18.706 196.676 18.9237 197.038 19.0767C197.401 19.2298 197.843 19.3063 198.366 19.3063C198.786 19.3063 199.166 19.2672 199.506 19.1872C199.847 19.1073 200.114 19.0223 200.306 18.9322L200.528 20.2586C200.437 20.3147 200.306 20.3692 200.136 20.4202C199.966 20.4712 199.774 20.5171 199.557 20.5562C199.341 20.5953 199.111 20.6293 198.868 20.6582C198.625 20.6872 198.388 20.7008 198.162 20.7008Z" fill="#1D1E20"/>
<path d="M202.231 20.4953V7.57092L203.814 7.29883V11.8224C204.109 11.7084 204.424 11.6217 204.759 11.5588C205.094 11.4959 205.426 11.4652 205.755 11.4652C206.458 11.4652 207.043 11.5639 207.508 11.7628C207.973 11.9618 208.345 12.239 208.623 12.5961C208.9 12.9532 209.096 13.3818 209.21 13.8801C209.324 14.3783 209.38 14.9293 209.38 15.5296V20.4953H207.797V15.8697C207.797 15.3256 207.76 14.8613 207.687 14.4753C207.613 14.0892 207.491 13.778 207.321 13.5399C207.15 13.3019 206.924 13.1284 206.64 13.0213C206.356 12.9141 206.005 12.8597 205.585 12.8597C205.414 12.8597 205.239 12.8716 205.057 12.8937C204.875 12.9158 204.703 12.9413 204.538 12.9703C204.373 12.9992 204.226 13.0298 204.095 13.0638C203.964 13.0978 203.871 13.1267 203.814 13.1488V20.4953H202.231Z" fill="#1D1E20"/>
</g>
<defs>
<clipPath id="clip0_9697_102453">
<rect width="209.38" height="28" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 14 KiB

@@ -0,0 +1,14 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" class="wccom-icon wccom-icon__woo-logo" role="img"
aria-labelledby="logoTitle" viewBox="0 0 95 26" width="95" height="26" preserveAspectRatio="xMidYMid"
style="max-width: 100%; height: auto;">
<title id="logoTitle">WooCommerce</title>
<path
d="M12.0825 25.2704C14.8471 25.2704 17.0657 23.9052 18.7381 20.7651L22.4584 13.8023V19.707C22.4584 23.1884 24.7111 25.2704 28.1925 25.2704C30.923 25.2704 32.9368 24.0758 34.8822 20.7651L43.4492 6.29339C45.3264 3.11918 43.9953 0.72998 39.8654 0.72998C37.6469 0.72998 36.2134 1.44674 34.9164 3.87006L29.0117 14.9628V5.09879C29.0117 2.1635 27.6123 0.72998 25.0183 0.72998C22.9704 0.72998 21.3321 1.6174 20.0692 4.07485L14.5058 14.9628V5.20119C14.5058 2.0611 13.2088 0.72998 10.0687 0.72998H3.65206C1.22873 0.72998 0 1.85632 0 3.93833C0 6.02034 1.29699 7.21494 3.65206 7.21494H6.28017V19.6729C6.28017 23.1884 8.63523 25.2704 12.0825 25.2704Z"
fill="#873EFF"></path>
<path fill-rule="evenodd" clip-rule="evenodd"
d="M55.9772 0.72998C48.9803 0.72998 43.6217 5.95208 43.6217 13.0173C43.6217 20.0825 49.0144 25.2704 55.9772 25.2704C62.94 25.2704 68.2645 20.0483 68.2986 13.0173C68.2986 5.95208 62.94 0.72998 55.9772 0.72998ZM55.9772 17.7274C53.3491 17.7274 51.5401 15.7478 51.5401 13.0173C51.5401 10.2868 53.3491 8.27301 55.9772 8.27301C58.6053 8.27301 60.4143 10.2868 60.4143 13.0173C60.4143 15.7478 58.6395 17.7274 55.9772 17.7274Z"
fill="#873EFF"></path>
<path fill-rule="evenodd" clip-rule="evenodd"
d="M70.0369 13.0173C70.0369 5.95208 75.3955 0.72998 82.3583 0.72998C89.3211 0.72998 94.6797 5.98621 94.6797 13.0173C94.6797 20.0483 89.3211 25.2704 82.3583 25.2704C75.3955 25.2704 70.0369 20.0825 70.0369 13.0173ZM77.9554 13.0173C77.9554 15.7478 79.6961 17.7274 82.3583 17.7274C84.9864 17.7274 86.7954 15.7478 86.7954 13.0173C86.7954 10.2868 84.9864 8.27301 82.3583 8.27301C79.7302 8.27301 77.9554 10.2868 77.9554 13.0173Z"
fill="#873EFF"></path>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 32 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 2.4 MiB

@@ -0,0 +1,28 @@
<svg width="210" height="28" viewBox="0 0 210 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_9697_102453)">
<path d="M8.95524 19.0529L5.32791 19.041L2.28558 22.0835L5.91461 25.7143L11.4313 20.1991L11.433 28H16.567V22.4372L8.95524 19.0529Z" fill="#1D1E20"/>
<path d="M22.0837 2.28566L16.567 7.80423V0H11.433V5.56109L19.0431 8.94706L19.0686 8.95896H22.6704L25.7144 5.91482L22.0837 2.28566Z" fill="#1D1E20"/>
<path d="M28 11.4346H22.4374L19.0431 19.0653V22.6741L22.0837 25.7148L25.7144 22.084L20.1961 16.5671L20.1944 16.5654H28V11.4346Z" fill="#1D1E20"/>
<path d="M8.95523 5.32883L5.9146 2.28809L2.28557 5.91895L7.80224 11.4358H7.80394V11.4375H0V16.5683H5.56258L7.84475 11.4358L8.95523 8.94098V5.32883Z" fill="#1D1E20"/>
<path d="M47.1216 8.80078H49.7803V20.482H47.1216V15.5266H42.6586V20.482H39.9999V8.80078H42.6586V13.2682H47.1216V8.80078Z" fill="#1D1E20"/>
<path d="M56.0338 14.562C56.0338 15.1351 56.1053 15.6555 56.2449 16.1129C56.3861 16.5772 56.5904 16.9768 56.8542 17.3067C57.118 17.6366 57.4448 17.8934 57.8261 18.0754C58.2108 18.254 58.6499 18.3492 59.1469 18.3492C59.644 18.3492 60.0712 18.254 60.4593 18.0754C60.8491 17.8968 61.1776 17.6366 61.4414 17.3067C61.7052 16.9768 61.9095 16.5772 62.0507 16.1129C62.1903 15.6521 62.2618 15.1317 62.2618 14.562C62.2618 13.9923 62.1903 13.4634 62.0507 12.9924C61.9095 12.5281 61.7052 12.1234 61.4414 11.7935C61.1776 11.4636 60.8491 11.2068 60.4593 11.0248C60.0695 10.8462 59.632 10.751 59.1469 10.751C58.6618 10.751 58.2091 10.8462 57.8261 11.0333C57.4414 11.2187 57.118 11.4806 56.8542 11.8122C56.5904 12.1421 56.3861 12.5468 56.2449 13.0111C56.1036 13.4804 56.0338 13.9974 56.0338 14.562ZM64.9937 14.562C64.9937 15.5653 64.8439 16.4462 64.546 17.2081C64.2465 17.97 63.838 18.6026 63.3188 19.1195C62.7997 19.628 62.1818 20.0158 61.4652 20.2793C60.7469 20.5361 59.9776 20.6654 59.1521 20.6654C58.3265 20.6654 57.5946 20.5361 56.8831 20.2793C56.1734 20.0158 55.5504 19.628 55.021 19.1195C54.49 18.6026 54.073 17.97 53.7666 17.2081C53.4636 16.4462 53.3087 15.5653 53.3087 14.562C53.3087 13.5587 53.4687 12.6727 53.7836 11.9108C54.1002 11.1489 54.5257 10.5078 55.0619 9.99425C55.598 9.47218 56.2176 9.08614 56.924 8.82255C57.6304 8.56577 58.3725 8.43652 59.1503 8.43652C59.9282 8.43652 60.7078 8.56577 61.4193 8.82255C62.129 9.08614 62.752 9.47388 63.2814 9.99425C63.8107 10.5112 64.2294 11.1489 64.5324 11.9108C64.8388 12.6727 64.9903 13.5536 64.9903 14.562H64.992H64.9937Z" fill="#1D1E20"/>
<path d="M71.637 18.4206C72.0098 18.4206 72.3178 18.3866 72.5612 18.3254C72.8029 18.2642 73.0004 18.1791 73.1434 18.0737C73.2897 17.9666 73.3902 17.839 73.4497 17.6911C73.5059 17.5448 73.5348 17.3782 73.5348 17.1962C73.5348 16.8136 73.3544 16.4956 72.9936 16.2439C72.6327 15.9871 72.0115 15.7184 71.1315 15.4191C70.7468 15.2847 70.3621 15.1283 69.9808 14.9548C69.5962 14.7814 69.2523 14.5637 68.9477 14.2984C68.6447 14.0297 68.3945 13.7117 68.2021 13.3342C68.0115 12.9516 67.9145 12.4924 67.9145 11.9567C67.9145 11.421 68.0149 10.9262 68.2192 10.4925C68.4217 10.0538 68.7094 9.68475 69.0838 9.38374C69.4566 9.08104 69.9077 8.84466 70.4387 8.68311C70.9698 8.52155 71.5672 8.43652 72.2344 8.43652C73.0259 8.43652 73.7085 8.51985 74.2855 8.68821C74.8608 8.85657 75.334 9.04873 75.7084 9.2494L74.9476 11.3292C74.6191 11.1608 74.2565 11.0078 73.8548 10.882C73.4531 10.7527 72.9714 10.6864 72.4081 10.6864C71.7766 10.6864 71.3204 10.7765 71.043 10.95C70.7655 11.1234 70.6293 11.3921 70.6293 11.7526C70.6293 11.9703 70.6804 12.1523 70.7808 12.2968C70.8813 12.4431 71.0259 12.5774 71.2115 12.6965C71.3987 12.8138 71.6132 12.9209 71.8566 13.0179C72.0983 13.1131 72.3655 13.2134 72.66 13.3138C73.2693 13.5383 73.7987 13.761 74.2514 13.9821C74.7025 14.2066 75.077 14.46 75.3782 14.7559C75.6778 15.0467 75.9008 15.3902 76.0472 15.7864C76.1935 16.1776 76.2684 16.6605 76.2684 17.22C76.2684 18.3135 75.8838 19.1655 75.1161 19.7658C74.3502 20.3695 73.191 20.6739 71.6455 20.6739C71.1264 20.6739 70.6583 20.6399 70.2396 20.5786C69.8208 20.5174 69.4515 20.4443 69.1298 20.3542C68.8081 20.2589 68.5323 20.1637 68.2992 20.0634C68.0694 19.963 67.8736 19.8678 67.717 19.7777L68.4626 17.6809C68.8132 17.8713 69.2438 18.0448 69.7579 18.1978C70.2719 18.3492 70.9017 18.4274 71.6472 18.4274H71.6404L71.637 18.4206Z" fill="#1D1E20"/>
<path d="M87.8973 8.70508V10.96H84.3569V20.4323H81.7169V10.96H78.1765V8.70508H87.8973Z" fill="#1D1E20"/>
<path d="M90.8334 20.4306H93.4733V8.70508H90.8334V20.4306Z" fill="#1D1E20"/>
<path d="M105.298 20.4306C104.54 19.0837 103.722 17.7624 102.843 16.4512C101.962 15.1435 101.026 13.9139 100.033 12.7456V20.4306H97.4274V8.70508H99.5788C99.9516 9.07921 100.364 9.53496 100.816 10.0774C101.267 10.6165 101.727 11.193 102.197 11.8103C102.665 12.4276 103.129 13.0603 103.592 13.7218C104.055 14.3833 104.489 15.0159 104.896 15.6281V8.70678H107.523V20.4323H105.301L105.298 20.4306Z" fill="#1D1E20"/>
<path d="M117.192 10.734C115.962 10.734 115.073 11.0758 114.523 11.7595C113.975 12.4431 113.703 13.375 113.703 14.5569C113.703 15.1351 113.769 15.6555 113.905 16.1265C114.04 16.5908 114.244 16.9955 114.515 17.3305C114.787 17.6724 115.124 17.9342 115.531 18.1213C115.938 18.3067 116.411 18.3951 116.952 18.3951C117.247 18.3951 117.499 18.39 117.706 18.3781C117.914 18.373 118.098 18.3441 118.258 18.3118V14.2372H120.898V20.0379C120.583 20.1603 120.074 20.2946 119.374 20.4375C118.673 20.5769 117.812 20.6501 116.782 20.6501C115.9 20.6501 115.1 20.5157 114.385 20.2419C113.667 19.9732 113.056 19.5804 112.549 19.06C112.042 18.5431 111.647 17.9053 111.373 17.1486C111.095 16.3918 110.959 15.5279 110.959 14.5586C110.959 13.5893 111.111 12.7084 111.417 11.9567C111.722 11.2 112.14 10.5622 112.671 10.0334C113.201 9.51129 113.825 9.11335 114.544 8.83956C115.259 8.57087 116.026 8.43652 116.836 8.43652C117.39 8.43652 117.89 8.47054 118.336 8.54366C118.782 8.62189 119.163 8.70521 119.488 8.80045C119.808 8.89568 120.076 8.99091 120.285 9.09635C120.493 9.19668 120.642 9.27491 120.733 9.33103L119.97 11.4431C119.608 11.2527 119.194 11.0826 118.726 10.9432C118.258 10.8037 117.745 10.7306 117.192 10.7306V10.7357V10.734Z" fill="#1D1E20"/>
<path d="M124.596 20.4306V8.70508H132.521V10.9243H127.238V13.2218H131.929V15.3849H127.238V18.2096H132.911V20.4289H124.596V20.4306Z" fill="#1D1E20"/>
<path d="M139.689 10.8231C139.498 10.8231 139.326 10.8282 139.171 10.8401C139.02 10.852 138.875 10.8673 138.741 10.8741V14.0576H139.486C140.479 14.0576 141.192 13.9352 141.621 13.6835C142.05 13.4369 142.266 13.0151 142.266 12.4148C142.266 11.8145 142.048 11.4336 141.614 11.1853C141.182 10.9455 140.54 10.8214 139.691 10.8214L139.689 10.8231ZM139.537 8.57324C141.299 8.57324 142.645 8.88615 143.585 9.51536C144.521 10.1378 144.991 11.1139 144.991 12.4302C144.991 13.2549 144.802 13.9199 144.422 14.4368C144.045 14.9453 143.5 15.35 142.788 15.6476C143.025 15.9384 143.274 16.2769 143.534 16.651C143.793 17.0336 144.051 17.4247 144.305 17.8329C144.56 18.2461 144.805 18.6747 145.042 19.1219C145.28 19.5641 145.498 20.0028 145.701 20.4331H142.746C142.53 20.047 142.314 19.6593 142.092 19.2614C141.871 18.8702 141.645 18.4876 141.411 18.1118C141.178 17.7428 140.95 17.389 140.724 17.0574C140.496 16.7224 140.268 16.418 140.043 16.1493H138.739V20.4331H136.099V8.87594C136.674 8.76371 137.27 8.68548 137.885 8.64126C138.499 8.59705 139.051 8.57494 139.536 8.57494H139.537V8.57324Z" fill="#1D1E20"/>
<path d="M156.45 8.77539H155.684V20.4873H156.45V8.77539Z" fill="#1D1E20"/>
<path d="M171.083 15.5651C171.265 15.7913 171.495 16.0889 171.772 16.4579C172.05 16.827 172.337 17.2351 172.632 17.6824C172.926 18.1296 173.219 18.5973 173.508 19.0853C173.798 19.5734 174.044 20.0428 174.249 20.4968H172.444C172.218 20.0666 171.971 19.6295 171.704 19.1874C171.437 18.7452 171.168 18.3235 170.896 17.9204C170.623 17.5174 170.354 17.1416 170.087 16.7896C169.82 16.4375 169.58 16.1314 169.364 15.8712C169.216 15.8831 169.066 15.8882 168.913 15.8882H166.964V20.4968H165.313V8.88187C165.777 8.76793 166.296 8.69141 166.87 8.65229C167.444 8.61318 167.968 8.59277 168.444 8.59277C170.101 8.59277 171.364 8.90398 172.232 9.52809C173.1 10.1522 173.534 11.0807 173.534 12.317C173.534 13.0993 173.326 13.7676 172.913 14.3237C172.499 14.8798 171.888 15.293 171.083 15.5651ZM168.581 10.0383C167.878 10.0383 167.338 10.0553 166.964 10.0893V14.5278H168.138C168.705 14.5278 169.216 14.4989 169.67 14.4428C170.124 14.3866 170.507 14.2778 170.819 14.1196C171.13 13.9615 171.372 13.737 171.542 13.4479C171.713 13.1588 171.798 12.7762 171.798 12.3C171.798 11.8579 171.713 11.4889 171.542 11.1947C171.372 10.9005 171.142 10.6675 170.853 10.4974C170.564 10.3274 170.223 10.2083 169.832 10.1403C169.44 10.0723 169.023 10.0383 168.581 10.0383Z" fill="#1D1E20"/>
<path d="M175.423 16.0922C175.423 15.3099 175.537 14.6263 175.764 14.043C175.99 13.4597 176.291 12.975 176.666 12.589C177.04 12.203 177.471 11.9139 177.959 11.7217C178.448 11.5296 178.947 11.4326 179.457 11.4326C180.649 11.4326 181.563 11.8033 182.198 12.5465C182.832 13.2896 183.151 14.4205 183.151 15.9391V16.2027C183.151 16.3099 183.146 16.4102 183.134 16.5003H177.074C177.142 17.4186 177.41 18.1159 177.874 18.592C178.339 19.0682 179.066 19.3063 180.053 19.3063C180.61 19.3063 181.078 19.2587 181.457 19.1617C181.837 19.0648 182.124 18.9713 182.317 18.8811L182.538 20.2076C182.346 20.3096 182.007 20.4168 181.525 20.5307C181.044 20.6446 180.495 20.7008 179.883 20.7008C179.112 20.7008 178.444 20.5851 177.883 20.3521C177.321 20.1192 176.858 19.7995 176.496 19.3913C176.133 18.9832 175.862 18.4985 175.687 17.9373C175.51 17.3761 175.423 16.7605 175.423 16.0922ZM181.5 15.2249C181.512 14.5107 181.333 13.924 180.964 13.4648C180.594 13.0057 180.087 12.7761 179.44 12.7761C179.078 12.7761 178.756 12.8475 178.478 12.9886C178.201 13.1298 177.964 13.3152 177.772 13.5413C177.58 13.7675 177.428 14.0294 177.321 14.3236C177.214 14.6178 177.142 14.9188 177.108 15.2249H181.5Z" fill="#1D1E20"/>
<path d="M188.291 11.4326C188.926 11.4326 189.462 11.5142 189.9 11.6792C190.337 11.8442 190.688 12.0754 190.955 12.3764C191.222 12.6774 191.411 13.0346 191.525 13.4478C191.639 13.861 191.695 14.3185 191.695 14.8168V20.3436C191.559 20.3657 191.369 20.3981 191.125 20.4372C190.882 20.4763 190.606 20.5137 190.3 20.5477C189.993 20.5817 189.661 20.6123 189.304 20.6412C188.947 20.6702 188.592 20.6838 188.24 20.6838C187.741 20.6838 187.282 20.6327 186.861 20.5307C186.441 20.4287 186.078 20.2671 185.772 20.046C185.466 19.825 185.227 19.5325 185.057 19.1702C184.887 18.808 184.802 18.371 184.802 17.8608C184.802 17.3506 184.901 16.9544 185.1 16.6024C185.299 16.2504 185.568 15.9681 185.908 15.7521C186.249 15.5361 186.645 15.378 187.1 15.2759C187.554 15.1739 188.031 15.1229 188.53 15.1229C188.688 15.1229 188.853 15.1314 189.023 15.1484C189.193 15.1654 189.355 15.1875 189.508 15.2164C189.661 15.2453 189.794 15.2708 189.908 15.2929C190.022 15.315 190.101 15.332 190.147 15.3439V14.9018C190.147 14.6416 190.118 14.3831 190.061 14.128C190.005 13.8729 189.903 13.6468 189.755 13.4478C189.607 13.2488 189.406 13.0907 189.151 12.9716C188.895 12.8526 188.564 12.7931 188.155 12.7931C187.632 12.7931 187.176 12.8305 186.785 12.9036C186.393 12.9767 186.101 13.0533 185.908 13.1332L185.721 11.8237C185.925 11.7336 186.266 11.6452 186.742 11.5602C187.219 11.4751 187.735 11.4326 188.291 11.4326ZM188.427 19.3573C188.802 19.3573 189.134 19.3488 189.423 19.3318C189.712 19.3148 189.954 19.2842 190.147 19.2383V16.6024C190.032 16.5463 189.849 16.4969 189.593 16.4578C189.338 16.4187 189.028 16.3983 188.666 16.3983C188.427 16.3983 188.175 16.4153 187.908 16.4493C187.641 16.4833 187.398 16.5548 187.176 16.6619C186.955 16.769 186.771 16.917 186.623 17.104C186.475 17.2911 186.402 17.5377 186.402 17.8438C186.402 18.4101 186.584 18.8046 186.947 19.0257C187.309 19.2468 187.803 19.3573 188.427 19.3573Z" fill="#1D1E20"/>
<path d="M198.162 20.7008C197.447 20.7008 196.82 20.5868 196.281 20.3606C195.741 20.1345 195.288 19.8165 194.919 19.4083C194.55 19.0002 194.276 18.5155 194.094 17.9543C193.911 17.3931 193.821 16.7724 193.821 16.0922C193.821 15.412 193.92 14.7879 194.119 14.2216C194.318 13.6553 194.599 13.1655 194.962 12.7506C195.324 12.3373 195.77 12.0142 196.298 11.7812C196.826 11.5483 197.413 11.4326 198.06 11.4326C198.456 11.4326 198.854 11.4666 199.251 11.5347C199.648 11.6027 200.029 11.7098 200.391 11.8578L200.034 13.2012C199.796 13.0873 199.52 12.9971 199.208 12.9291C198.897 12.8611 198.565 12.8271 198.213 12.8271C197.328 12.8271 196.65 13.1043 196.179 13.6604C195.707 14.2165 195.472 15.0259 195.472 16.0922C195.472 16.5684 195.527 17.0054 195.634 17.4016C195.741 17.7979 195.911 18.138 196.145 18.422C196.378 18.706 196.676 18.9237 197.038 19.0767C197.401 19.2298 197.843 19.3063 198.366 19.3063C198.786 19.3063 199.166 19.2672 199.506 19.1872C199.847 19.1073 200.114 19.0223 200.306 18.9322L200.528 20.2586C200.437 20.3147 200.306 20.3692 200.136 20.4202C199.966 20.4712 199.774 20.5171 199.557 20.5562C199.341 20.5953 199.111 20.6293 198.868 20.6582C198.625 20.6872 198.388 20.7008 198.162 20.7008Z" fill="#1D1E20"/>
<path d="M202.231 20.4953V7.57092L203.814 7.29883V11.8224C204.109 11.7084 204.424 11.6217 204.759 11.5588C205.094 11.4959 205.426 11.4652 205.755 11.4652C206.458 11.4652 207.043 11.5639 207.508 11.7628C207.973 11.9618 208.345 12.239 208.623 12.5961C208.9 12.9532 209.096 13.3818 209.21 13.8801C209.324 14.3783 209.38 14.9293 209.38 15.5296V20.4953H207.797V15.8697C207.797 15.3256 207.76 14.8613 207.687 14.4753C207.613 14.0892 207.491 13.778 207.321 13.5399C207.15 13.3019 206.924 13.1284 206.64 13.0213C206.356 12.9141 206.005 12.8597 205.585 12.8597C205.414 12.8597 205.239 12.8716 205.057 12.8937C204.875 12.9158 204.703 12.9413 204.538 12.9703C204.373 12.9992 204.226 13.0298 204.095 13.0638C203.964 13.0978 203.871 13.1267 203.814 13.1488V20.4953H202.231Z" fill="#1D1E20"/>
</g>
<defs>
<clipPath id="clip0_9697_102453">
<rect width="209.38" height="28" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 14 KiB

File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,68 @@
/*!
* XRegExp 5.1.2
* <xregexp.com>
* Steven Levithan (c) 2007-present MIT License
*/
/*!
* XRegExp Unicode Categories 5.1.2
* <xregexp.com>
* Steven Levithan (c) 2010-present MIT License
* Unicode data by Mathias Bynens <mathiasbynens.be>
*/
/*!
* XRegExp Unicode Properties 5.1.2
* <xregexp.com>
* Steven Levithan (c) 2012-present MIT License
* Unicode data by Mathias Bynens <mathiasbynens.be>
*/
/*!
* XRegExp Unicode Scripts 5.1.2
* <xregexp.com>
* Steven Levithan (c) 2010-present MIT License
* Unicode data by Mathias Bynens <mathiasbynens.be>
*/
/*!
* pinia v2.3.1
* (c) 2025 Eduardo San Martin Morote
* @license MIT
*/
/*!
* vue-router v4.6.3
* (c) 2025 Eduardo San Martin Morote
* @license MIT
*/
/*! #__NO_SIDE_EFFECTS__ */
/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */
/*! js-cookie v3.0.5 | MIT */
/**
* vee-validate v4.15.1
* (c) 2025 Abdelrahman Awad
* @license MIT
*/
/**
* @vue/runtime-core v3.5.24
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
/**
* @vue/runtime-dom v3.5.24
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
/**
* @vue/shared v3.5.24
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
@@ -0,0 +1,52 @@
import './connection-notice.scss';
(function () {
const getNotice = () => {
return document.getElementById('hostinger-reach-connection-notice');
}
const handleAction = (choice) => {
const data = new FormData();
data.append('action', hostinger_reach_connection_notice_data.action);
data.append('nonce', hostinger_reach_connection_notice_data.nonce);
data.append('choice', choice);
fetch(hostinger_reach_connection_notice_data.ajaxurl, {
method: 'POST',
body: data
})
.then(response => response.json())
.then(result => {
if (result.success && result.data.redirect_url) {
window.location.href = result.data.redirect_url;
}
const closer = getNotice().querySelector('.notice-dismiss');
if ( closer ) {
closer.click();
}
notice.style.display = 'none';
})
}
const init = () => {
const notice = getNotice();
if (!notice || !hostinger_reach_connection_notice_data) {
return;
}
const actions = notice.querySelectorAll('.hostinger-reach-action-button');
if (actions?.length) {
actions.forEach(( action ) => {
action.addEventListener('click', function (e) {
handleAction(e.target.dataset.action);
});
});
}
}
document.addEventListener('DOMContentLoaded', init);
})();
@@ -0,0 +1,133 @@
.hostinger-reach-notice {
position: relative;
padding: 0;
border: none;
border-left: 4px solid #673DE6;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
.hostinger-reach-notice-wrap {
display: flex;
}
.hostinger-reach-notice-aside {
display: none;
@media screen and (min-width: 756px) {
display: block;
}
background: #f8f8ff;
padding: 10px;
}
.hostinger-reach-notice-close {
position: absolute;
top: 15px;
right: 15px;
cursor: pointer;
background: none;
border: none;
display: block;
font-size: .8125rem;
font-style: normal;
height: 20px;
line-height: 20px;
margin: 0;
padding: 0;
text-align: center;
width: 20px;
color: #9ca3af;
transition: color 0.2s ease;
&:hover,
&:focus {
color: #673DE6;
}
&:before {
content: '\00d7';
position: relative;
display: inline-block;
font-size: 20px;
line-height: 20px;
font-weight: 400;
}
}
.notice-dismiss {
display: none;
}
.hostinger-reach-notice-content {
padding: 20px 25px;
h3 {
margin: 0 0 8px;
padding: 0;
font-size: 16px;
font-weight: 600;
line-height: 1.4;
color: #1e1e1e;
}
p {
margin: 0;
padding: 0;
font-size: 14px;
line-height: 1.6;
color: #6c757d;
}
}
.hostinger-reach-notice-actions {
display: flex;
align-items: center;
gap: 12px;
padding: 0 25px 25px;
margin-right: 32px;
.hostinger-reach-button {
padding: 10px 20px;
font-size: 12px;
font-weight: 500;
line-height: 1.4;
border: none;
border-radius: 4px;
cursor: pointer;
transition: all 0.2s ease;
white-space: nowrap;
&.button-primary {
background: #673DE6;
color: #fff;
box-shadow: 0 2px 4px rgba(103, 61, 230, 0.2);
&:hover,
&:focus {
background: #5633B8;
box-shadow: 0 4px 8px rgba(103, 61, 230, 0.3);
transform: translateY(-1px);
}
&:active {
transform: translateY(0);
}
}
&.button-secondary {
background: transparent;
color: #673DE6;
border: 1px solid #673DE6;
box-shadow: none;
&:hover,
&:focus {
background: #f8f5ff;
border-color: #5633B8;
color: #5633B8;
}
}
}
}
}
@@ -0,0 +1,55 @@
const EMAIL_FIELD_SELECTORS = [
'form.checkout input[name="billing_email"]',
'form.woocommerce-checkout input[name="billing_email"]',
'form[name="checkout"] input[type="email"]',
'form.checkout input[type="email"]',
'form[id*="checkout"] input[type="email"]',
'form[class*="checkout"] input[type="email"]',
'input#billing_email',
'input[type="email"]'
];
(function () {
const findEmailInput = () => {
for (const field of EMAIL_FIELD_SELECTORS) {
let emailField = document.querySelector(field);
if (emailField) return emailField;
}
return null;
}
const handleAction = () => {
const data = new FormData();
data.append('action', hostinger_reach_email_capture_data.action);
data.append('nonce', hostinger_reach_email_capture_data.nonce);
let email = findEmailInput();
if (!email) {
return;
}
data.append('email', email.value);
fetch(hostinger_reach_email_capture_data.ajaxurl, {
method: 'POST',
body: data
});
}
const init = () => {
const emailInput = findEmailInput();
if (!hostinger_reach_email_capture_data || !emailInput) {
return;
}
emailInput.addEventListener('change', handleAction, {passive: true});
emailInput.addEventListener('blur', handleAction, {passive: true});
}
document.addEventListener('DOMContentLoaded', init);
})();
@@ -0,0 +1,14 @@
<script lang="ts" setup>
import { HPopoverGlobalBackdrop } from '@hostinger/hcomponents';
import Modals from '@/components/Modals/Modals.vue';
</script>
<template>
<div id="hostinger-reach-app">
<RouterView />
<Modals />
<HToast />
<HPopoverGlobalBackdrop />
</div>
</template>
Binary file not shown.

After

Width:  |  Height:  |  Size: 243 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 28 KiB

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 400 400" fill="none"><g clip-path="url(#clip0)"><path d="M200 0C89.5321 0 0 89.5321 0 200C0 310.431 89.5321 400 200 400C310.468 400 400 310.468 400 200C399.964 89.5321 310.431 0 200 0ZM150.009 283.306H116.694V116.658H150.009V283.306ZM283.306 283.306H183.324V249.991H283.306V283.306ZM283.306 216.639H183.324V183.324H283.306V216.639ZM283.306 149.973H183.324V116.658H283.306V149.973Z" fill="#92003B"></path></g><defs><clipPath id="clip0"><rect width="400" height="400" fill="white"></rect></clipPath></defs></svg>

After

Width:  |  Height:  |  Size: 587 B

@@ -0,0 +1,12 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<!-- Email envelope -->
<rect x="2" y="5" width="20" height="14" rx="2" stroke="currentColor" stroke-width="2" fill="none"/>
<path d="M2 7l10 6 10-6" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
<!-- Reach/broadcast waves -->
<path d="M16 2c3.5 3.5 3.5 6.5 0 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" opacity="0.7"/>
<path d="M18 4c2 2 2 4 0 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" opacity="0.5"/>
<!-- Small connecting dot -->
<circle cx="15" cy="7" r="1.5" fill="currentColor"/>
</svg>

After

Width:  |  Height:  |  Size: 678 B

@@ -0,0 +1,5 @@
<svg width="32" height="32" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="logotype">
<path id="symbol" fill-rule="evenodd" clip-rule="evenodd" d="M0.000249566 14.046V0.000497794L7.08916 3.78046V10.1086L16.4735 10.1132L23.6774 14.046H0.000249566ZM18.3925 8.95058V0L25.6725 3.6859V13.1797L18.3925 8.95058ZM18.3924 26.1177V19.8441L8.93577 19.8375C8.9446 19.8793 1.6123 15.8418 1.6123 15.8418L25.6725 15.9547V30L18.3924 26.1177ZM0 26.1177L0.000252212 16.9393L7.08916 21.0683V29.8033L0 26.1177Z" fill="#673DE6"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 553 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 39 KiB

@@ -0,0 +1,28 @@
<svg width="210" height="28" viewBox="0 0 210 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_9697_102453)">
<path d="M8.95524 19.0529L5.32791 19.041L2.28558 22.0835L5.91461 25.7143L11.4313 20.1991L11.433 28H16.567V22.4372L8.95524 19.0529Z" fill="#1D1E20"/>
<path d="M22.0837 2.28566L16.567 7.80423V0H11.433V5.56109L19.0431 8.94706L19.0686 8.95896H22.6704L25.7144 5.91482L22.0837 2.28566Z" fill="#1D1E20"/>
<path d="M28 11.4346H22.4374L19.0431 19.0653V22.6741L22.0837 25.7148L25.7144 22.084L20.1961 16.5671L20.1944 16.5654H28V11.4346Z" fill="#1D1E20"/>
<path d="M8.95523 5.32883L5.9146 2.28809L2.28557 5.91895L7.80224 11.4358H7.80394V11.4375H0V16.5683H5.56258L7.84475 11.4358L8.95523 8.94098V5.32883Z" fill="#1D1E20"/>
<path d="M47.1216 8.80078H49.7803V20.482H47.1216V15.5266H42.6586V20.482H39.9999V8.80078H42.6586V13.2682H47.1216V8.80078Z" fill="#1D1E20"/>
<path d="M56.0338 14.562C56.0338 15.1351 56.1053 15.6555 56.2449 16.1129C56.3861 16.5772 56.5904 16.9768 56.8542 17.3067C57.118 17.6366 57.4448 17.8934 57.8261 18.0754C58.2108 18.254 58.6499 18.3492 59.1469 18.3492C59.644 18.3492 60.0712 18.254 60.4593 18.0754C60.8491 17.8968 61.1776 17.6366 61.4414 17.3067C61.7052 16.9768 61.9095 16.5772 62.0507 16.1129C62.1903 15.6521 62.2618 15.1317 62.2618 14.562C62.2618 13.9923 62.1903 13.4634 62.0507 12.9924C61.9095 12.5281 61.7052 12.1234 61.4414 11.7935C61.1776 11.4636 60.8491 11.2068 60.4593 11.0248C60.0695 10.8462 59.632 10.751 59.1469 10.751C58.6618 10.751 58.2091 10.8462 57.8261 11.0333C57.4414 11.2187 57.118 11.4806 56.8542 11.8122C56.5904 12.1421 56.3861 12.5468 56.2449 13.0111C56.1036 13.4804 56.0338 13.9974 56.0338 14.562ZM64.9937 14.562C64.9937 15.5653 64.8439 16.4462 64.546 17.2081C64.2465 17.97 63.838 18.6026 63.3188 19.1195C62.7997 19.628 62.1818 20.0158 61.4652 20.2793C60.7469 20.5361 59.9776 20.6654 59.1521 20.6654C58.3265 20.6654 57.5946 20.5361 56.8831 20.2793C56.1734 20.0158 55.5504 19.628 55.021 19.1195C54.49 18.6026 54.073 17.97 53.7666 17.2081C53.4636 16.4462 53.3087 15.5653 53.3087 14.562C53.3087 13.5587 53.4687 12.6727 53.7836 11.9108C54.1002 11.1489 54.5257 10.5078 55.0619 9.99425C55.598 9.47218 56.2176 9.08614 56.924 8.82255C57.6304 8.56577 58.3725 8.43652 59.1503 8.43652C59.9282 8.43652 60.7078 8.56577 61.4193 8.82255C62.129 9.08614 62.752 9.47388 63.2814 9.99425C63.8107 10.5112 64.2294 11.1489 64.5324 11.9108C64.8388 12.6727 64.9903 13.5536 64.9903 14.562H64.992H64.9937Z" fill="#1D1E20"/>
<path d="M71.637 18.4206C72.0098 18.4206 72.3178 18.3866 72.5612 18.3254C72.8029 18.2642 73.0004 18.1791 73.1434 18.0737C73.2897 17.9666 73.3902 17.839 73.4497 17.6911C73.5059 17.5448 73.5348 17.3782 73.5348 17.1962C73.5348 16.8136 73.3544 16.4956 72.9936 16.2439C72.6327 15.9871 72.0115 15.7184 71.1315 15.4191C70.7468 15.2847 70.3621 15.1283 69.9808 14.9548C69.5962 14.7814 69.2523 14.5637 68.9477 14.2984C68.6447 14.0297 68.3945 13.7117 68.2021 13.3342C68.0115 12.9516 67.9145 12.4924 67.9145 11.9567C67.9145 11.421 68.0149 10.9262 68.2192 10.4925C68.4217 10.0538 68.7094 9.68475 69.0838 9.38374C69.4566 9.08104 69.9077 8.84466 70.4387 8.68311C70.9698 8.52155 71.5672 8.43652 72.2344 8.43652C73.0259 8.43652 73.7085 8.51985 74.2855 8.68821C74.8608 8.85657 75.334 9.04873 75.7084 9.2494L74.9476 11.3292C74.6191 11.1608 74.2565 11.0078 73.8548 10.882C73.4531 10.7527 72.9714 10.6864 72.4081 10.6864C71.7766 10.6864 71.3204 10.7765 71.043 10.95C70.7655 11.1234 70.6293 11.3921 70.6293 11.7526C70.6293 11.9703 70.6804 12.1523 70.7808 12.2968C70.8813 12.4431 71.0259 12.5774 71.2115 12.6965C71.3987 12.8138 71.6132 12.9209 71.8566 13.0179C72.0983 13.1131 72.3655 13.2134 72.66 13.3138C73.2693 13.5383 73.7987 13.761 74.2514 13.9821C74.7025 14.2066 75.077 14.46 75.3782 14.7559C75.6778 15.0467 75.9008 15.3902 76.0472 15.7864C76.1935 16.1776 76.2684 16.6605 76.2684 17.22C76.2684 18.3135 75.8838 19.1655 75.1161 19.7658C74.3502 20.3695 73.191 20.6739 71.6455 20.6739C71.1264 20.6739 70.6583 20.6399 70.2396 20.5786C69.8208 20.5174 69.4515 20.4443 69.1298 20.3542C68.8081 20.2589 68.5323 20.1637 68.2992 20.0634C68.0694 19.963 67.8736 19.8678 67.717 19.7777L68.4626 17.6809C68.8132 17.8713 69.2438 18.0448 69.7579 18.1978C70.2719 18.3492 70.9017 18.4274 71.6472 18.4274H71.6404L71.637 18.4206Z" fill="#1D1E20"/>
<path d="M87.8973 8.70508V10.96H84.3569V20.4323H81.7169V10.96H78.1765V8.70508H87.8973Z" fill="#1D1E20"/>
<path d="M90.8334 20.4306H93.4733V8.70508H90.8334V20.4306Z" fill="#1D1E20"/>
<path d="M105.298 20.4306C104.54 19.0837 103.722 17.7624 102.843 16.4512C101.962 15.1435 101.026 13.9139 100.033 12.7456V20.4306H97.4274V8.70508H99.5788C99.9516 9.07921 100.364 9.53496 100.816 10.0774C101.267 10.6165 101.727 11.193 102.197 11.8103C102.665 12.4276 103.129 13.0603 103.592 13.7218C104.055 14.3833 104.489 15.0159 104.896 15.6281V8.70678H107.523V20.4323H105.301L105.298 20.4306Z" fill="#1D1E20"/>
<path d="M117.192 10.734C115.962 10.734 115.073 11.0758 114.523 11.7595C113.975 12.4431 113.703 13.375 113.703 14.5569C113.703 15.1351 113.769 15.6555 113.905 16.1265C114.04 16.5908 114.244 16.9955 114.515 17.3305C114.787 17.6724 115.124 17.9342 115.531 18.1213C115.938 18.3067 116.411 18.3951 116.952 18.3951C117.247 18.3951 117.499 18.39 117.706 18.3781C117.914 18.373 118.098 18.3441 118.258 18.3118V14.2372H120.898V20.0379C120.583 20.1603 120.074 20.2946 119.374 20.4375C118.673 20.5769 117.812 20.6501 116.782 20.6501C115.9 20.6501 115.1 20.5157 114.385 20.2419C113.667 19.9732 113.056 19.5804 112.549 19.06C112.042 18.5431 111.647 17.9053 111.373 17.1486C111.095 16.3918 110.959 15.5279 110.959 14.5586C110.959 13.5893 111.111 12.7084 111.417 11.9567C111.722 11.2 112.14 10.5622 112.671 10.0334C113.201 9.51129 113.825 9.11335 114.544 8.83956C115.259 8.57087 116.026 8.43652 116.836 8.43652C117.39 8.43652 117.89 8.47054 118.336 8.54366C118.782 8.62189 119.163 8.70521 119.488 8.80045C119.808 8.89568 120.076 8.99091 120.285 9.09635C120.493 9.19668 120.642 9.27491 120.733 9.33103L119.97 11.4431C119.608 11.2527 119.194 11.0826 118.726 10.9432C118.258 10.8037 117.745 10.7306 117.192 10.7306V10.7357V10.734Z" fill="#1D1E20"/>
<path d="M124.596 20.4306V8.70508H132.521V10.9243H127.238V13.2218H131.929V15.3849H127.238V18.2096H132.911V20.4289H124.596V20.4306Z" fill="#1D1E20"/>
<path d="M139.689 10.8231C139.498 10.8231 139.326 10.8282 139.171 10.8401C139.02 10.852 138.875 10.8673 138.741 10.8741V14.0576H139.486C140.479 14.0576 141.192 13.9352 141.621 13.6835C142.05 13.4369 142.266 13.0151 142.266 12.4148C142.266 11.8145 142.048 11.4336 141.614 11.1853C141.182 10.9455 140.54 10.8214 139.691 10.8214L139.689 10.8231ZM139.537 8.57324C141.299 8.57324 142.645 8.88615 143.585 9.51536C144.521 10.1378 144.991 11.1139 144.991 12.4302C144.991 13.2549 144.802 13.9199 144.422 14.4368C144.045 14.9453 143.5 15.35 142.788 15.6476C143.025 15.9384 143.274 16.2769 143.534 16.651C143.793 17.0336 144.051 17.4247 144.305 17.8329C144.56 18.2461 144.805 18.6747 145.042 19.1219C145.28 19.5641 145.498 20.0028 145.701 20.4331H142.746C142.53 20.047 142.314 19.6593 142.092 19.2614C141.871 18.8702 141.645 18.4876 141.411 18.1118C141.178 17.7428 140.95 17.389 140.724 17.0574C140.496 16.7224 140.268 16.418 140.043 16.1493H138.739V20.4331H136.099V8.87594C136.674 8.76371 137.27 8.68548 137.885 8.64126C138.499 8.59705 139.051 8.57494 139.536 8.57494H139.537V8.57324Z" fill="#1D1E20"/>
<path d="M156.45 8.77539H155.684V20.4873H156.45V8.77539Z" fill="#1D1E20"/>
<path d="M171.083 15.5651C171.265 15.7913 171.495 16.0889 171.772 16.4579C172.05 16.827 172.337 17.2351 172.632 17.6824C172.926 18.1296 173.219 18.5973 173.508 19.0853C173.798 19.5734 174.044 20.0428 174.249 20.4968H172.444C172.218 20.0666 171.971 19.6295 171.704 19.1874C171.437 18.7452 171.168 18.3235 170.896 17.9204C170.623 17.5174 170.354 17.1416 170.087 16.7896C169.82 16.4375 169.58 16.1314 169.364 15.8712C169.216 15.8831 169.066 15.8882 168.913 15.8882H166.964V20.4968H165.313V8.88187C165.777 8.76793 166.296 8.69141 166.87 8.65229C167.444 8.61318 167.968 8.59277 168.444 8.59277C170.101 8.59277 171.364 8.90398 172.232 9.52809C173.1 10.1522 173.534 11.0807 173.534 12.317C173.534 13.0993 173.326 13.7676 172.913 14.3237C172.499 14.8798 171.888 15.293 171.083 15.5651ZM168.581 10.0383C167.878 10.0383 167.338 10.0553 166.964 10.0893V14.5278H168.138C168.705 14.5278 169.216 14.4989 169.67 14.4428C170.124 14.3866 170.507 14.2778 170.819 14.1196C171.13 13.9615 171.372 13.737 171.542 13.4479C171.713 13.1588 171.798 12.7762 171.798 12.3C171.798 11.8579 171.713 11.4889 171.542 11.1947C171.372 10.9005 171.142 10.6675 170.853 10.4974C170.564 10.3274 170.223 10.2083 169.832 10.1403C169.44 10.0723 169.023 10.0383 168.581 10.0383Z" fill="#1D1E20"/>
<path d="M175.423 16.0922C175.423 15.3099 175.537 14.6263 175.764 14.043C175.99 13.4597 176.291 12.975 176.666 12.589C177.04 12.203 177.471 11.9139 177.959 11.7217C178.448 11.5296 178.947 11.4326 179.457 11.4326C180.649 11.4326 181.563 11.8033 182.198 12.5465C182.832 13.2896 183.151 14.4205 183.151 15.9391V16.2027C183.151 16.3099 183.146 16.4102 183.134 16.5003H177.074C177.142 17.4186 177.41 18.1159 177.874 18.592C178.339 19.0682 179.066 19.3063 180.053 19.3063C180.61 19.3063 181.078 19.2587 181.457 19.1617C181.837 19.0648 182.124 18.9713 182.317 18.8811L182.538 20.2076C182.346 20.3096 182.007 20.4168 181.525 20.5307C181.044 20.6446 180.495 20.7008 179.883 20.7008C179.112 20.7008 178.444 20.5851 177.883 20.3521C177.321 20.1192 176.858 19.7995 176.496 19.3913C176.133 18.9832 175.862 18.4985 175.687 17.9373C175.51 17.3761 175.423 16.7605 175.423 16.0922ZM181.5 15.2249C181.512 14.5107 181.333 13.924 180.964 13.4648C180.594 13.0057 180.087 12.7761 179.44 12.7761C179.078 12.7761 178.756 12.8475 178.478 12.9886C178.201 13.1298 177.964 13.3152 177.772 13.5413C177.58 13.7675 177.428 14.0294 177.321 14.3236C177.214 14.6178 177.142 14.9188 177.108 15.2249H181.5Z" fill="#1D1E20"/>
<path d="M188.291 11.4326C188.926 11.4326 189.462 11.5142 189.9 11.6792C190.337 11.8442 190.688 12.0754 190.955 12.3764C191.222 12.6774 191.411 13.0346 191.525 13.4478C191.639 13.861 191.695 14.3185 191.695 14.8168V20.3436C191.559 20.3657 191.369 20.3981 191.125 20.4372C190.882 20.4763 190.606 20.5137 190.3 20.5477C189.993 20.5817 189.661 20.6123 189.304 20.6412C188.947 20.6702 188.592 20.6838 188.24 20.6838C187.741 20.6838 187.282 20.6327 186.861 20.5307C186.441 20.4287 186.078 20.2671 185.772 20.046C185.466 19.825 185.227 19.5325 185.057 19.1702C184.887 18.808 184.802 18.371 184.802 17.8608C184.802 17.3506 184.901 16.9544 185.1 16.6024C185.299 16.2504 185.568 15.9681 185.908 15.7521C186.249 15.5361 186.645 15.378 187.1 15.2759C187.554 15.1739 188.031 15.1229 188.53 15.1229C188.688 15.1229 188.853 15.1314 189.023 15.1484C189.193 15.1654 189.355 15.1875 189.508 15.2164C189.661 15.2453 189.794 15.2708 189.908 15.2929C190.022 15.315 190.101 15.332 190.147 15.3439V14.9018C190.147 14.6416 190.118 14.3831 190.061 14.128C190.005 13.8729 189.903 13.6468 189.755 13.4478C189.607 13.2488 189.406 13.0907 189.151 12.9716C188.895 12.8526 188.564 12.7931 188.155 12.7931C187.632 12.7931 187.176 12.8305 186.785 12.9036C186.393 12.9767 186.101 13.0533 185.908 13.1332L185.721 11.8237C185.925 11.7336 186.266 11.6452 186.742 11.5602C187.219 11.4751 187.735 11.4326 188.291 11.4326ZM188.427 19.3573C188.802 19.3573 189.134 19.3488 189.423 19.3318C189.712 19.3148 189.954 19.2842 190.147 19.2383V16.6024C190.032 16.5463 189.849 16.4969 189.593 16.4578C189.338 16.4187 189.028 16.3983 188.666 16.3983C188.427 16.3983 188.175 16.4153 187.908 16.4493C187.641 16.4833 187.398 16.5548 187.176 16.6619C186.955 16.769 186.771 16.917 186.623 17.104C186.475 17.2911 186.402 17.5377 186.402 17.8438C186.402 18.4101 186.584 18.8046 186.947 19.0257C187.309 19.2468 187.803 19.3573 188.427 19.3573Z" fill="#1D1E20"/>
<path d="M198.162 20.7008C197.447 20.7008 196.82 20.5868 196.281 20.3606C195.741 20.1345 195.288 19.8165 194.919 19.4083C194.55 19.0002 194.276 18.5155 194.094 17.9543C193.911 17.3931 193.821 16.7724 193.821 16.0922C193.821 15.412 193.92 14.7879 194.119 14.2216C194.318 13.6553 194.599 13.1655 194.962 12.7506C195.324 12.3373 195.77 12.0142 196.298 11.7812C196.826 11.5483 197.413 11.4326 198.06 11.4326C198.456 11.4326 198.854 11.4666 199.251 11.5347C199.648 11.6027 200.029 11.7098 200.391 11.8578L200.034 13.2012C199.796 13.0873 199.52 12.9971 199.208 12.9291C198.897 12.8611 198.565 12.8271 198.213 12.8271C197.328 12.8271 196.65 13.1043 196.179 13.6604C195.707 14.2165 195.472 15.0259 195.472 16.0922C195.472 16.5684 195.527 17.0054 195.634 17.4016C195.741 17.7979 195.911 18.138 196.145 18.422C196.378 18.706 196.676 18.9237 197.038 19.0767C197.401 19.2298 197.843 19.3063 198.366 19.3063C198.786 19.3063 199.166 19.2672 199.506 19.1872C199.847 19.1073 200.114 19.0223 200.306 18.9322L200.528 20.2586C200.437 20.3147 200.306 20.3692 200.136 20.4202C199.966 20.4712 199.774 20.5171 199.557 20.5562C199.341 20.5953 199.111 20.6293 198.868 20.6582C198.625 20.6872 198.388 20.7008 198.162 20.7008Z" fill="#1D1E20"/>
<path d="M202.231 20.4953V7.57092L203.814 7.29883V11.8224C204.109 11.7084 204.424 11.6217 204.759 11.5588C205.094 11.4959 205.426 11.4652 205.755 11.4652C206.458 11.4652 207.043 11.5639 207.508 11.7628C207.973 11.9618 208.345 12.239 208.623 12.5961C208.9 12.9532 209.096 13.3818 209.21 13.8801C209.324 14.3783 209.38 14.9293 209.38 15.5296V20.4953H207.797V15.8697C207.797 15.3256 207.76 14.8613 207.687 14.4753C207.613 14.0892 207.491 13.778 207.321 13.5399C207.15 13.3019 206.924 13.1284 206.64 13.0213C206.356 12.9141 206.005 12.8597 205.585 12.8597C205.414 12.8597 205.239 12.8716 205.057 12.8937C204.875 12.9158 204.703 12.9413 204.538 12.9703C204.373 12.9992 204.226 13.0298 204.095 13.0638C203.964 13.0978 203.871 13.1267 203.814 13.1488V20.4953H202.231Z" fill="#1D1E20"/>
</g>
<defs>
<clipPath id="clip0_9697_102453">
<rect width="209.38" height="28" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 14 KiB

@@ -0,0 +1,14 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" class="wccom-icon wccom-icon__woo-logo" role="img"
aria-labelledby="logoTitle" viewBox="0 0 95 26" width="95" height="26" preserveAspectRatio="xMidYMid"
style="max-width: 100%; height: auto;">
<title id="logoTitle">WooCommerce</title>
<path
d="M12.0825 25.2704C14.8471 25.2704 17.0657 23.9052 18.7381 20.7651L22.4584 13.8023V19.707C22.4584 23.1884 24.7111 25.2704 28.1925 25.2704C30.923 25.2704 32.9368 24.0758 34.8822 20.7651L43.4492 6.29339C45.3264 3.11918 43.9953 0.72998 39.8654 0.72998C37.6469 0.72998 36.2134 1.44674 34.9164 3.87006L29.0117 14.9628V5.09879C29.0117 2.1635 27.6123 0.72998 25.0183 0.72998C22.9704 0.72998 21.3321 1.6174 20.0692 4.07485L14.5058 14.9628V5.20119C14.5058 2.0611 13.2088 0.72998 10.0687 0.72998H3.65206C1.22873 0.72998 0 1.85632 0 3.93833C0 6.02034 1.29699 7.21494 3.65206 7.21494H6.28017V19.6729C6.28017 23.1884 8.63523 25.2704 12.0825 25.2704Z"
fill="#873EFF"></path>
<path fill-rule="evenodd" clip-rule="evenodd"
d="M55.9772 0.72998C48.9803 0.72998 43.6217 5.95208 43.6217 13.0173C43.6217 20.0825 49.0144 25.2704 55.9772 25.2704C62.94 25.2704 68.2645 20.0483 68.2986 13.0173C68.2986 5.95208 62.94 0.72998 55.9772 0.72998ZM55.9772 17.7274C53.3491 17.7274 51.5401 15.7478 51.5401 13.0173C51.5401 10.2868 53.3491 8.27301 55.9772 8.27301C58.6053 8.27301 60.4143 10.2868 60.4143 13.0173C60.4143 15.7478 58.6395 17.7274 55.9772 17.7274Z"
fill="#873EFF"></path>
<path fill-rule="evenodd" clip-rule="evenodd"
d="M70.0369 13.0173C70.0369 5.95208 75.3955 0.72998 82.3583 0.72998C89.3211 0.72998 94.6797 5.98621 94.6797 13.0173C94.6797 20.0483 89.3211 25.2704 82.3583 25.2704C75.3955 25.2704 70.0369 20.0825 70.0369 13.0173ZM77.9554 13.0173C77.9554 15.7478 79.6961 17.7274 82.3583 17.7274C84.9864 17.7274 86.7954 15.7478 86.7954 13.0173C86.7954 10.2868 84.9864 8.27301 82.3583 8.27301C79.7302 8.27301 77.9554 10.2868 77.9554 13.0173Z"
fill="#873EFF"></path>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 32 KiB

@@ -0,0 +1,101 @@
<script setup lang="ts">
import { translate } from '@/utils/translate';
interface Props {
icon: string;
text: string;
url?: string;
}
const { url = '', text, icon } = defineProps<Props>();
const handleClick = () => {
if (url) {
window.open(url, '_blank');
}
};
</script>
<template>
<HCard
class="action-button"
padding="16px 20px"
border-radius="999px"
role="button"
tabindex="0"
:aria-label="url ? `${text} (${translate('hostinger_reach_ui_opens_in_new_tab')})` : text"
@click="handleClick"
@keydown.enter="handleClick"
@keydown.space.prevent="handleClick"
>
<div class="button-content">
<HIcon :name="icon" class="button-icon" aria-hidden="true" />
<span class="button-text">{{ text }}</span>
</div>
<HIcon name="ic-arrow-up-right-square-16" class="arrow-icon" aria-hidden="true" />
</HCard>
</template>
<style scoped lang="scss">
.action-button {
flex: 1;
cursor: pointer;
background-color: var(--neutral--0);
border: 1px solid var(--neutral--200);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
&:hover {
background-color: var(--neutral--100);
border-color: var(--neutral--200);
}
&:deep(.h-card) {
padding: 16px 20px;
border-radius: 999px;
background-color: var(--neutral--0);
border: 1px solid var(--neutral--200);
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
}
.button-content {
display: flex;
align-items: center;
gap: 8px;
flex: 1;
}
.button-icon,
.arrow-icon {
width: 16px;
height: 16px;
color: var(--neutral--600);
flex-shrink: 0;
}
.button-text {
font-family: 'DM Sans', sans-serif;
font-weight: 700;
font-size: 12px;
line-height: 1.667;
color: var(--neutral--600);
margin: 0;
white-space: nowrap;
flex: 1;
}
@media (max-width: 767px) {
.action-button {
&:deep(.h-card) {
padding: 12px 16px;
}
}
}
</style>
@@ -0,0 +1,43 @@
<script setup lang="ts">
import ActionButton from '@/components/ActionButton.vue';
interface ActionButtonData {
icon: string;
text: string;
url: string;
}
interface Props {
buttons: ActionButtonData[];
}
const props = defineProps<Props>();
</script>
<template>
<div class="action-buttons-section">
<ActionButton
v-for="button in props.buttons"
:key="button.text"
:icon="button.icon"
:text="button.text"
:url="button.url"
/>
</div>
</template>
<style scoped lang="scss">
.action-buttons-section {
display: flex;
justify-content: stretch;
align-items: stretch;
align-self: stretch;
gap: 8px;
}
@media (max-width: 1023px) {
.action-buttons-section {
flex-direction: column;
}
}
</style>
@@ -0,0 +1,196 @@
<script setup lang="ts">
import { translate } from '@/utils/translate';
interface Props {
title: string;
description: string;
buttonText: string;
buttonIcon?: string;
backgroundImage?: string;
isButtonDisabled?: boolean;
isButtonLoading?: boolean;
onButtonClick?: () => void;
}
withDefaults(defineProps<Props>(), {
buttonIcon: 'ic-plus-16',
backgroundImage: '',
onButtonClick: () => {}
});
</script>
<template>
<section class="banner-section" role="banner" aria-labelledby="banner-title">
<HCard padding="0" border-radius="20px">
<div class="banner">
<div class="banner__content">
<div class="content-wrapper">
<div class="title-section">
<HText id="banner-title" as="h3" variant="heading-3">
{{ title }}
</HText>
</div>
<div class="description-section">
<HText as="p" variant="body-2" aria-describedby="banner-title">
{{ description }}
</HText>
</div>
</div>
<HButton
size="small"
color="primary"
:icon-prepend="buttonIcon"
class="banner-button"
:is-disabled="isButtonDisabled"
:is-loading="isButtonLoading"
:aria-label="`${buttonText} - ${title}`"
@click="onButtonClick"
>
{{ buttonText }}
</HButton>
</div>
<div
v-if="backgroundImage"
class="banner__image"
role="img"
:aria-label="`${translate('hostinger_reach_ui_banner_background_image')} ${title}`"
>
<img
class="banner__background-image"
:src="backgroundImage"
:alt="`${translate('hostinger_reach_ui_background_image_for')} ${title}`"
role="presentation"
/>
</div>
</div>
</HCard>
</section>
</template>
<style scoped lang="scss">
.banner-section {
display: block;
width: 100%;
}
.banner {
display: grid;
grid-template-columns: 1fr auto;
gap: 24px;
align-items: center;
min-height: 160px;
position: relative;
border-radius: 20px;
overflow: hidden;
@media (max-width: 992px) {
display: flex;
flex-direction: column;
text-align: left;
gap: 0;
min-height: auto;
background: linear-gradient(
135deg,
var(--neutral--0) 0%,
var(--neutral--50) 30%,
var(--primary--50) 60%,
var(--primary--100) 80%,
var(--primary--200) 100%
);
}
&__content {
z-index: 2;
padding: 24px 28px;
border-radius: 20px 0 0 20px;
display: flex;
flex-direction: column;
gap: 24px;
@media (max-width: 992px) {
padding: 16px 24px 24px 24px;
width: 100%;
order: 2;
border-radius: 20px;
gap: 20px;
}
}
&__image {
position: absolute;
top: 0;
right: 0;
bottom: 0;
width: auto;
z-index: 1;
@media (max-width: 992px) {
display: none;
}
@media (max-width: 480px) {
display: none;
}
}
&__background-image {
height: 100%;
width: auto;
object-fit: cover;
object-position: center;
border-radius: 0 20px 20px 0;
@media (max-width: 992px) {
display: none;
}
}
}
.content-wrapper {
display: flex;
width: 60%;
flex-direction: column;
gap: 8px;
}
.title-section {
display: flex;
align-items: center;
gap: 16px;
}
.description-section {
display: flex;
flex-direction: column;
gap: 4px;
}
.banner-button {
align-self: flex-start;
border-radius: 8px;
&:deep(.h-button-v2) {
padding: 6px 16px;
border-radius: 8px;
gap: 8px;
&:hover {
transform: translateY(-1px);
}
&:active {
transform: translateY(0);
}
}
@media (max-width: 768px) {
align-self: stretch;
width: 100%;
&:deep(.h-button-v2) {
padding: 12px 16px;
width: 100%;
}
}
}
</style>
@@ -0,0 +1,232 @@
<script setup lang="ts">
import { ref } from 'vue';
import { faqData } from '@/data/faq';
import { translate } from '@/utils/translate';
const expandedFAQ = ref<string | null>(null);
const toggleFAQ = (id: string) => {
expandedFAQ.value = expandedFAQ.value === id ? null : id;
};
</script>
<template>
<section class="faq" aria-labelledby="faq-heading">
<div class="faq__container">
<div class="faq__list">
<HCard border-radius="20px" padding="16px 28px">
<template #header>
<HText id="faq-heading" as="h2" variant="heading-2">{{ translate('hostinger_reach_faq_title') }}</HText>
</template>
<div
v-for="faq in faqData"
:key="faq.id"
class="faq__item h-mb-8"
:class="{
'faq__item--expanded': expandedFAQ === faq.id
}"
>
<button
:id="`faq-question-${faq.id}`"
class="faq__question"
:aria-expanded="expandedFAQ === faq.id"
:aria-controls="`faq-answer-${faq.id}`"
@click="toggleFAQ(faq.id)"
>
<span class="faq__question-text">{{ faq.question }}</span>
<HIcon
:name="expandedFAQ === faq.id ? 'ic-chevron-up-24' : 'ic-chevron-down-24'"
size="24"
class="faq__icon"
aria-hidden="true"
/>
</button>
<div
v-show="expandedFAQ === faq.id"
:id="`faq-answer-${faq.id}`"
class="faq__answer"
:aria-labelledby="`faq-question-${faq.id}`"
role="region"
>
<div v-html="faq.answer"></div>
</div>
</div>
</HCard>
</div>
</div>
</section>
</template>
<style scoped lang="scss">
.faq {
@media (max-width: 768px) {
padding: 32px 16px;
}
@media (max-width: 480px) {
padding: 24px 12px;
}
&__container {
max-width: 780px;
margin: 0 auto;
@media (max-width: 1024px) {
max-width: 90%;
}
@media (max-width: 768px) {
max-width: 100%;
}
}
&__list {
display: flex;
flex-direction: column;
gap: 8px;
@media (max-width: 480px) {
gap: 6px;
}
}
&__item {
background: var(--neutral--0);
border-radius: 16px;
border: 1px solid var(--neutral--200);
overflow: hidden;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
@media (max-width: 768px) {
border-radius: 12px;
}
@media (max-width: 480px) {
border-radius: 8px;
}
&--expanded {
border-color: var(--neutral--200);
box-shadow: 0 4px 12px rgba(103, 58, 183, 0.1);
@media (max-width: 768px) {
box-shadow: 0 2px 8px rgba(103, 58, 183, 0.1);
}
@media (max-width: 480px) {
box-shadow: 0 1px 6px rgba(103, 58, 183, 0.1);
}
}
}
&__question {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 24px;
background: none;
border: none;
text-align: left;
cursor: pointer;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
border-bottom: 1px solid var(--neutral--200);
@media (max-width: 768px) {
padding: 16px 20px;
}
@media (max-width: 480px) {
padding: 12px 16px;
}
}
&__question-text {
font-size: 16px;
font-weight: 600;
color: var(--neutral--600);
line-height: 1.4;
flex: 1;
margin-right: 16px;
@media (max-width: 768px) {
font-size: 15px;
margin-right: 12px;
}
@media (max-width: 480px) {
font-size: 14px;
margin-right: 10px;
}
}
&__icon {
color: var(--neutral--400);
transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
flex-shrink: 0;
@media (max-width: 480px) {
width: 20px;
height: 20px;
}
.faq__item--expanded & {
color: var(--neutral--200);
}
}
&__answer {
padding: 24px;
animation: fadeIn 0.3s ease-in-out;
@media (max-width: 768px) {
padding: 0 20px 20px;
}
@media (max-width: 480px) {
padding: 0 16px 16px;
}
p {
font-size: 15px;
line-height: 1.6;
color: var(--neutral--500);
margin: 0;
@media (max-width: 768px) {
font-size: 14px;
}
@media (max-width: 480px) {
font-size: 13px;
}
}
}
}
:deep(.h-card__header) {
border-bottom: none;
padding-top: 24px;
padding-bottom: 0px;
@media (max-width: 768px) {
padding-top: 20px;
}
@media (max-width: 480px) {
padding-top: 16px;
}
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
</style>
@@ -0,0 +1,244 @@
<script setup lang="ts">
import { HIcon, HLabel, HPopover } from '@hostinger/hcomponents';
import { computed } from 'vue';
import Toggle from '@/components/Toggle.vue';
import type { Form, Integration } from '@/types/models';
import { translate } from '@/utils/translate';
interface Props {
form: Form;
integration: Integration;
}
const props = defineProps<Props>();
const emit = defineEmits<{
toggleStatus: [form: Form, status: boolean];
viewForm: [form: Form];
editForm: [form: Form];
}>();
const pluginTitle = computed(
() => props.form.formTitle || props.form.post?.postTitle || translate('hostinger_reach_forms_no_title')
);
const getStatusLabel = () =>
props.form.isActive
? translate('hostinger_reach_plugin_entries_table_status_active')
: translate('hostinger_reach_plugin_entries_table_status_inactive');
const getStatusColor = () => (props.form.isActive ? 'success' : 'gray');
const hasActions = computed(() => !props.integration.isViewFormHidden || !props.integration.isEditFormHidden);
</script>
<template>
<div class="form-item">
<div class="form-item__cell form-item__cell--plugin">
<div class="form-item__form-content">
<Toggle
v-if="props.integration.canToggleForms"
:value="props.form.isActive"
:is-disabled="form.isLoading"
@toggle="(status) => emit('toggleStatus', props.form, status)"
/>
<div class="form-item__form-info">
<span class="form-item__form-title">
{{ pluginTitle }}
</span>
</div>
</div>
</div>
<div class="form-item__cell form-item__cell--entries">
<span class="form-item__mobile-label">
{{ translate('hostinger_reach_plugin_entries_table_entries_header') }}:
</span>
<span class="form-item__entries-text">{{ form.submissions || 0 }}</span>
</div>
<div class="form-item__cell form-item__cell--status">
<span class="form-item__mobile-label">
{{ translate('hostinger_reach_plugin_entries_table_status_header') }}:
</span>
<HLabel variant="outline" :color="getStatusColor()" class="form-item__status-label">
{{ getStatusLabel() }}
</HLabel>
</div>
<div class="form-item__cell form-item__cell--actions">
<HPopover
v-if="hasActions"
placement="bottom-end"
:show-arrow="false"
background-color="neutral--0"
border-radius="12px"
:outside-click-enabled="true"
>
<template #trigger>
<button class="form-item__action-button">
<HIcon name="ic-dots-vertical-16" />
</button>
</template>
<div class="form-item__popover-menu">
<div v-if="!integration.isViewFormHidden" class="form-item__menu-item" @click="emit('viewForm', props.form)">
<HIcon name="ic-arrow-up-right-square-16" />
<span>{{ translate('hostinger_reach_plugin_entries_table_view_form') }}</span>
</div>
<div v-if="!integration.isEditFormHidden" class="form-item__menu-item" @click="emit('editForm', props.form)">
<HIcon name="ic-edit-16" />
<span>{{ translate('hostinger_reach_plugin_entries_table_edit_form') }}</span>
</div>
</div>
</HPopover>
</div>
</div>
</template>
<style scoped lang="scss">
.form-item {
display: flex;
align-items: center;
border-top: 1px solid var(--neutral--200);
&:first-child {
border-top: none;
}
&__cell {
display: flex;
align-items: center;
&--plugin {
width: 50%;
}
&--entries {
width: 21%;
}
&--status {
width: 21%;
}
&--actions {
width: 10%;
display: flex;
justify-content: flex-end;
}
}
&__form-content {
display: flex;
align-items: center;
gap: 12px;
}
&__form-info {
display: flex;
flex-direction: column;
gap: 2px;
}
&__form-title {
font-weight: 500;
font-size: 14px;
color: var(--neutral--600);
}
&__entries-text {
font-weight: 400;
font-size: 14px;
color: var(--neutral--500);
}
&__status-label {
font-size: 12px;
}
&__mobile-label {
font-weight: 500;
font-size: 14px;
color: var(--neutral--600);
margin-right: 8px;
display: none;
}
&__action-button {
background: var(--neutral--0);
border: 1px solid var(--neutral--200);
border-radius: 8px;
padding: 0 8px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s ease;
&:hover {
border-color: var(--neutral--300);
}
}
&__popover-menu {
padding: 4px;
min-width: 180px;
}
&__menu-item {
display: flex;
align-items: center;
gap: 8px;
padding: 12px;
cursor: pointer;
border-radius: 8px;
font-weight: 500;
font-size: 14px;
color: var(--neutral--600);
transition: background-color 0.2s ease;
&:hover {
background-color: var(--neutral--50);
}
span {
flex: 1;
}
}
@media (max-width: 1023px) {
flex-direction: column;
gap: 12px;
padding: 0;
border-radius: 0;
background: var(--neutral--50);
margin-bottom: 12px;
&__cell--plugin,
&__cell--entries,
&__cell--status {
width: 100%;
justify-content: flex-start;
}
&__cell--actions {
width: 100%;
}
&__cell--entries,
&__cell--status {
align-items: flex-start;
}
&__cell--actions {
padding-right: 0;
}
&__cell--plugin {
padding-left: 0;
}
&__mobile-label {
display: inline-block;
}
}
}
</style>
@@ -0,0 +1,367 @@
<script setup lang="ts">
import { computed } from 'vue';
import reachBackgroundImage from '@/assets/images/backgrounds/email-reach-background.svg';
import reachBackgroundImageOverlay from '@/assets/images/backgrounds/email-reach-background-image.png';
import reachLogo from '@/assets/images/icons/reach-logo.svg';
import { useReachUrls } from '@/composables/useReachUrls';
import { translate } from '@/utils/translate';
const { reachBaseDomain } = useReachUrls();
const reachDashboardUrl = computed(() => `https://${reachBaseDomain.value}`);
interface Props {
isConnectedToAnotherSite?: boolean;
isButtonLoading?: boolean;
domain: string;
onGetStarted: () => void;
}
const props = withDefaults(defineProps<Props>(), {
isConnectedToAnotherSite: false,
isButtonLoading: false
});
</script>
<template>
<section class="hero" role="main" aria-labelledby="hero-heading">
<header class="hero__header">
<div class="hero__header-content">
<div class="hero__header-brand">
<img :src="reachLogo" :alt="translate('hostinger_reach_header_logo_alt')" class="hero__header-logo" />
</div>
<HButton
variant="outline"
target="_blank"
color="neutral"
size="small"
icon-append="ic-launch-16"
:to="reachDashboardUrl"
>
{{ translate('hostinger_reach_header_go_to_reach_button') }}
</HButton>
</div>
</header>
<HCard border-radius="20px" padding="0" border-color="neutral--200">
<div class="hero__image">
<img
:src="reachBackgroundImage"
:alt="translate('hostinger_reach_hero_background_alt')"
class="hero__background"
role="img"
/>
<img
:src="reachBackgroundImageOverlay"
:alt="translate('hostinger_reach_hero_overlay_alt')"
class="hero__overlay"
role="img"
/>
</div>
<div class="hero__content">
<HText id="hero-heading" as="h1" variant="heading-1">
{{ translate('hostinger_reach_welcome_view_title') }}
</HText>
<HText id="hero-description" as="p" variant="body-2 h-mb-24">
{{ translate('hostinger_reach_welcome_view_description') }}
</HText>
<HSnackbar
v-if="props.isConnectedToAnotherSite"
class="hero__warning-snackbar"
icon-color="warning--700"
icon="ic-warning-circle-filled-24"
border-color="warning--500"
background-color="warning--100"
role="alert"
aria-live="polite"
>
<div class="hero__banner">
<div class="hero__banner-content">
<HText as="p" variant="body-2-bold" color="warning--700">
{{ translate('hostinger_reach_welcome_view_connection_warning') }}
</HText>
<HText as="p" variant="body-2" color="warning--700">
{{ translate('hostinger_reach_welcome_view_connection_instruction') }}
</HText>
</div>
<HButton
color="warning"
icon-append="ic-launch-16"
size="small"
aria-label="Manage connection settings (opens in new window)"
>
{{ translate('hostinger_reach_welcome_view_manage_button') }}
</HButton>
</div>
</HSnackbar>
<HButton
v-else
color="primary"
size="small"
:is-loading="props.isButtonLoading"
aria-describedby="hero-description"
aria-label="Get started with email marketing"
@click="props.onGetStarted"
>
{{ translate('hostinger_reach_welcome_view_start_button') }}
</HButton>
</div>
<div class="hero__footer" role="contentinfo" aria-label="Site information">
<HIcon class="h-mr-8" name="ic-globe-16" color="neutral--300" aria-hidden="true" />
<HText as="p" variant="body-2-bold" color="neutral--500">
{{ props.domain }}
</HText>
</div>
</HCard>
</section>
</template>
<style scoped lang="scss">
.hero {
display: flex;
align-items: center;
flex-direction: column;
max-width: 780px;
margin: 40px auto 16px auto;
@media (max-width: 1024px) {
max-width: 90%;
margin: 32px auto 16px auto;
}
@media (max-width: 768px) {
flex-direction: column;
text-align: center;
padding: 24px 16px;
gap: 32px;
margin: 20px auto 16px auto;
}
@media (max-width: 480px) {
padding: 16px 8px;
gap: 24px;
margin: 16px auto 12px auto;
}
&__banner {
display: flex;
width: 100%;
align-items: center;
justify-content: space-between;
gap: 16px;
@media (max-width: 768px) {
flex-direction: column;
align-items: flex-start;
gap: 12px;
}
@media (max-width: 480px) {
gap: 8px;
}
}
&__banner-content {
display: flex;
flex-direction: column;
gap: 4px;
@media (max-width: 768px) {
width: 100%;
}
}
&__content {
flex: 1;
padding: 24px 28px 0px 28px;
width: 100%;
@media (max-width: 768px) {
padding: 20px 20px 0px 20px;
}
@media (max-width: 480px) {
padding: 16px 16px 0px 16px;
}
}
&__image {
width: 100%;
display: flex;
justify-content: center;
position: relative;
overflow: hidden;
@media (max-width: 768px) {
margin-bottom: 20px;
}
@media (max-width: 480px) {
margin-bottom: 16px;
}
}
&__background {
width: 100%;
height: auto;
border-top-right-radius: 20px;
border-top-left-radius: 20px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
@media (max-width: 768px) {
border-top-right-radius: 20px;
border-top-left-radius: 20px;
}
@media (max-width: 480px) {
border-top-right-radius: 20px;
border-top-left-radius: 20px;
}
}
&__overlay {
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
height: auto;
border-radius: 16px;
z-index: 1;
max-width: 90%;
max-height: 100%;
object-fit: contain;
@media (max-width: 768px) {
border-radius: 12px;
max-width: 85%;
max-height: 95%;
}
@media (max-width: 480px) {
border-radius: 8px;
max-width: 80%;
max-height: 90%;
}
@media (max-width: 320px) {
max-width: 75%;
max-height: 85%;
}
}
&__footer {
width: 100%;
margin-top: 24px;
display: flex;
align-items: center;
padding: 16px 24px 20px 24px;
border-bottom-left-radius: 20px;
background: var(--neutral--50);
border-bottom-right-radius: 20px;
@media (max-width: 768px) {
padding: 12px 16px 16px 16px;
margin-top: 16px;
}
@media (max-width: 480px) {
padding: 10px 12px 14px 12px;
margin-top: 12px;
}
}
&__header {
width: 100%;
margin-bottom: 20px;
@media (max-width: 768px) {
padding: 0 12px;
margin-bottom: 16px;
}
@media (max-width: 480px) {
padding: 0 8px;
margin-bottom: 12px;
}
}
&__warning-snackbar {
display: flex;
align-items: center;
}
&__header-content {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
@media (max-width: 768px) {
flex-direction: column;
gap: 16px;
align-items: flex-start;
}
@media (max-width: 480px) {
gap: 12px;
}
:deep(.h-button-v2) {
@media (max-width: 768px) {
width: 100%;
}
}
}
&__header-brand {
display: flex;
align-items: center;
gap: 12px;
@media (max-width: 480px) {
gap: 8px;
}
}
&__header-logo {
height: 28px;
width: auto;
@media (max-width: 768px) {
height: 24px;
}
@media (max-width: 480px) {
height: 20px;
}
}
&__header-title {
margin: 0;
color: var(--neutral--700);
}
}
:deep(.hero .h-card) {
background: var(--neutral--0);
display: flex;
align-items: center;
flex-direction: column;
padding: 0;
width: 100%;
}
@media (max-width: 320px) {
.hero {
padding: 12px 4px;
gap: 20px;
&__content {
padding: 12px 12px 0px 12px;
}
}
}
</style>
@@ -0,0 +1,72 @@
<script setup lang="ts">
import { computed } from 'vue';
import reachOverviewBannerBackground from '@/assets/images/backgrounds/overview-banner-background.png';
import Banner from '@/components/Banner.vue';
import PluginEntriesTable from '@/components/PluginEntriesTable.vue';
import { useIntegrationsStore } from '@/stores/integrationsStore';
import type { Form, Integration } from '@/types/models';
import { translate } from '@/utils/translate';
type IntegrationsProps = {
type: string;
onBannerButtonClick?: () => void;
};
const props = defineProps<IntegrationsProps>();
const emit = defineEmits({
goToPlugin: (_id: string) => true,
disconnectPlugin: (_id: string) => true,
toggleFormStatus: (_form: Form, _status: boolean) => true,
viewForm: (_form: Form) => true,
editForm: (_form: Form) => true,
addForm: (_id: string) => true
});
const integrationsStore = useIntegrationsStore();
const shouldShowTable = computed(
() =>
integrationsStore?.activeIntegrations?.filter((integration) => integration.type === props.type)?.length > 1 ||
integrationsStore.hasAnyForms(props.type)
);
const isBannerVisible = computed(() => !integrationsStore.isLoading && !shouldShowTable.value);
const isTableVisible = computed(() => integrationsStore.isLoading || shouldShowTable.value);
</script>
<template>
<div class="integrations">
<Banner
v-if="isBannerVisible"
:title="translate(`hostinger_reach_${props.type}_banner_title`)"
:description="translate(`hostinger_reach_${props.type}_banner_description`)"
:button-text="translate(`hostinger_reach_${props.type}_banner_button_text`)"
:on-button-click="props.onBannerButtonClick"
:is-button-loading="integrationsStore.isLoading"
:background-image="reachOverviewBannerBackground as unknown as string"
/>
<PluginEntriesTable
v-if="isTableVisible"
:integrations="integrationsStore.fromType(props.type) as Integration[]"
:is-loading="integrationsStore.isLoading"
@go-to-plugin="emit('goToPlugin', $event)"
@disconnect-plugin="emit('disconnectPlugin', $event)"
@toggle-form-status="(form, status) => emit('toggleFormStatus', form, status)"
@view-form="emit('viewForm', $event)"
@edit-form="emit('editForm', $event)"
@add-form="emit('addForm', $event)"
/>
</div>
</template>
<style scoped lang="scss">
.integrations {
display: flex;
flex-direction: column;
align-self: stretch;
gap: 20px;
}
</style>
@@ -0,0 +1,96 @@
<script lang="ts" setup>
import { onMounted, onUnmounted } from 'vue';
import { useScrollLock } from '@/composables/useScrollLock';
interface Props {
title?: string;
subtitle?: string;
titleAlignment?: 'centered' | 'left';
disableScroll?: boolean;
}
const props = withDefaults(defineProps<Props>(), {
titleAlignment: 'left',
disableScroll: true
});
const { lockScroll, unlockScroll } = useScrollLock();
onMounted(() => {
if (props.disableScroll) {
lockScroll();
}
});
onUnmounted(() => {
if (props.disableScroll) {
unlockScroll();
}
});
</script>
<template>
<div class="base-modal">
<div class="base-modal__header">
<slot name="back-button"></slot>
<span
class="base-modal__title-container"
:class="{
'base-modal__title-container--centered': titleAlignment === 'centered'
}"
>
<slot name="title-icon"></slot>
<h2 v-if="title" class="base-modal__title">{{ title }}</h2>
</span>
</div>
<p
v-if="subtitle"
class="base-modal__subtitle"
:class="{
'base-modal__subtitle--centered': titleAlignment === 'centered'
}"
>
{{ subtitle }}
</p>
<slot></slot>
</div>
</template>
<style lang="scss" scoped>
.base-modal {
&__header {
position: relative;
margin-bottom: 8px;
margin-top: -4px;
}
&__title-container {
display: flex;
align-items: center;
justify-content: flex-start;
&--centered {
justify-content: center;
}
}
&__title {
font-size: 20px;
color: var(--neutral--700);
margin: 0;
font-weight: 700;
}
&__subtitle {
font-size: 14px;
margin-top: 4px;
margin-bottom: 24px;
color: var(--neutral--500);
&--centered {
text-align: center;
}
}
}
</style>
@@ -0,0 +1,142 @@
<script lang="ts" setup>
import { computed, defineAsyncComponent } from 'vue';
import { useModal } from '@/composables/useModal';
import { useModalStore } from '@/stores/modalStore';
const { closeModal } = useModal();
const modalStore = useModalStore();
const activeModal = computed(() => modalStore.activeModal);
const modalComponent = computed(() => {
if (!activeModal.value) return null;
return defineAsyncComponent(() => import(`@/components/Modals/Types/${activeModal.value?.name}.vue`));
});
</script>
<template>
<Transition name="fade">
<div v-if="activeModal" class="base-modal__wrapper">
<div
class="base-modal__container"
:class="{
'base-modal__container--xxl': activeModal.settings?.isXXL,
'base-modal__container--xl': activeModal.settings?.isXL,
'base-modal__container--lg': activeModal.settings?.isLG
}"
>
<button
v-if="activeModal.settings?.hasCloseButton"
type="button"
class="base-modal__close-button"
@click="closeModal"
>
<HIcon name="ic-close-24" color="gray" />
</button>
<div
class="base-modal__content-container"
:class="{
'base-modal__content-container--no-content-padding': activeModal.settings?.noContentPadding,
'base-modal__content-container--no-border': activeModal.settings?.noBorder
}"
>
<Component :is="modalComponent" v-bind="activeModal?.data || {}" />
</div>
</div>
</div>
</Transition>
</template>
<style lang="scss" scoped>
$modal-z-index: 9999;
.base-modal {
&__wrapper {
--modal-backdrop: rgba(0, 0, 0, 0.3);
overflow: auto;
position: fixed;
z-index: $modal-z-index;
height: 100%;
inset: 0;
background-color: var(--modal-backdrop);
display: flex;
align-items: center;
justify-content: center;
&.is-above-intercom {
z-index: var(--z-index-intercom-2);
}
}
&__close-button {
position: absolute;
top: 20px;
right: 20px;
z-index: 10;
background: transparent;
border: none;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border-radius: 8px;
transition: background-color 0.2s ease;
&:hover {
background-color: var(--neutral--100);
}
&:active {
background-color: var(--neutral--200);
}
&:focus {
outline: 2px solid var(--primary--500);
outline-offset: 2px;
}
}
&__container {
position: relative;
max-height: calc(100vh - 6rem);
width: 100%;
max-width: 500px;
&--auto-width {
max-width: none !important;
width: auto;
}
&--lg {
max-width: 600px;
}
&--xl {
max-width: 800px;
}
&--xxl {
max-width: 964px;
}
}
&__content-container {
border: 1px solid var(--neutral--200);
border-radius: 16px;
background-color: var(--neutral--0);
padding: 24px;
&--no-content-padding {
padding: 0;
}
&--no-border {
border: none;
}
}
}
</style>
@@ -0,0 +1,367 @@
<script lang="ts" setup>
import { HLabel } from '@hostinger/hcomponents';
import { computed, ref } from 'vue';
import BaseModal from '@/components/Modals/Base/BaseModal.vue';
import PluginIntegrationSkeleton from '@/components/skeletons/PluginIntegrationSkeleton.vue';
import PluginsSectionSkeleton from '@/components/skeletons/PluginsSectionSkeleton.vue';
import { useModal } from '@/composables/useModal';
import { getPluginInfo } from '@/data/pluginData';
import { useIntegrationsStore } from '@/stores/integrationsStore';
import { usePagesStore } from '@/stores/pagesStore';
import { ModalName } from '@/types/enums';
import { translate } from '@/utils/translate';
const { openModal } = useModal();
const integrationsStore = useIntegrationsStore();
const pagesStore = usePagesStore();
const showPlugins = ref(false);
const installedIntegrations = computed(() =>
integrationsStore.availableIntegrations.filter((integration) => integration.isActive)
);
const availableIntegrations = computed(() =>
integrationsStore.availableIntegrations.filter((integration) => !integration.isActive)
);
const handleCreateForm = () => {
openModal(
ModalName.SELECT_PAGE_MODAL,
{
title: translate('hostinger_reach_forms_modal_title'),
data: {
backButtonRedirectAction: () => {
openModal(ModalName.ADD_FORM_MODAL, {}, { hasCloseButton: true });
}
},
pages: pagesStore.pages
},
{
hasCloseButton: true
}
);
};
const handleConnect = async (integrationId: string) => {
await integrationsStore.toggleIntegrationStatus(integrationId, true);
};
const handleDisconnect = (id: string) => {
openModal(ModalName.CONFIRM_DISCONNECT_MODAL, {
data: {
integration: id,
backButtonRedirectAction: () => {
openModal(ModalName.ADD_FORM_MODAL, {}, { hasCloseButton: true });
}
}
});
};
const togglePluginsSection = () => {
showPlugins.value = !showPlugins.value;
};
pagesStore.loadData();
</script>
<template>
<BaseModal title-alignment="left" :title="translate('hostinger_reach_add_form_modal_title')">
<div class="add-form-modal">
<HSnackbar variant="info">
{{ translate('hostinger_reach_forms_consent_notice') }}
</HSnackbar>
<div class="add-form-modal__main-card">
<div class="add-form-modal__main-content">
<div class="add-form-modal__main-icon">
<HIcon name="ic-add-24" color="primary--500" />
</div>
<HText variant="body-1-bold" as="span">
{{ translate('hostinger_reach_forms_new_contact_form') }}
</HText>
</div>
<HButton
:is-loading="pagesStore.isPagesLoading"
variant="contain"
color="primary"
size="small"
@click="handleCreateForm"
>
{{ translate('hostinger_reach_forms_create_form_button') }}
</HButton>
</div>
<PluginsSectionSkeleton v-if="integrationsStore.isLoading" />
<template v-else>
<div v-if="installedIntegrations.length" class="add-form-modal__installed-section">
<HText variant="body-3" as="h3" color="neutral--300">
{{ translate('hostinger_reach_forms_installed_plugins') }}
</HText>
<div class="add-form-modal__plugins-list">
<div v-for="integration in installedIntegrations" :key="integration.id" class="add-form-modal__plugin-card">
<PluginIntegrationSkeleton v-if="integrationsStore.loadingIntegrations[integration.id]" />
<div v-else class="add-form-modal__plugin-content">
<div class="add-form-modal__plugin-info">
<div class="add-form-modal__plugin-icon">
<img
:src="getPluginInfo(integration).icon"
:alt="integration.title"
class="add-form-modal__plugin-image"
loading="lazy"
/>
</div>
<div class="add-form-modal__plugin-details">
<HText variant="body-2-bold" as="span">
{{ integration.title }}
</HText>
<HLabel color="success" variant="outline">
{{ translate('hostinger_reach_forms_active') }}
</HLabel>
</div>
</div>
<div class="add-form-modal__plugin-actions">
<HButton
variant="outline"
color="danger"
size="small"
:is-disabled="integrationsStore.isIntegrationLoading(integration.id)"
@click="handleDisconnect(integration.id)"
>
{{ translate('hostinger_reach_forms_disconnect') }}
</HButton>
</div>
</div>
</div>
</div>
</div>
<div v-if="availableIntegrations.length" class="add-form-modal__plugins-section">
<HButton
variant="text"
color="primary"
size="small"
:icon-append="showPlugins ? 'ic-chevron-up-16' : 'ic-chevron-down-16'"
icon-color="primary--500"
class="add-form-modal__plugins-toggle"
:aria-expanded="showPlugins"
@click="togglePluginsSection"
>
{{ translate('hostinger_reach_forms_view_supported_plugins') }}
</HButton>
<div v-if="showPlugins" class="add-form-modal__plugins-list">
<div v-for="integration in availableIntegrations" :key="integration.id" class="add-form-modal__plugin-card">
<PluginIntegrationSkeleton v-if="integrationsStore.isIntegrationLoading(integration.id)" />
<div v-else class="add-form-modal__plugin-content">
<div class="add-form-modal__plugin-info">
<div class="add-form-modal__plugin-icon">
<img
:src="getPluginInfo(integration).icon"
:alt="integration.title"
class="add-form-modal__plugin-image"
loading="lazy"
/>
</div>
<div class="add-form-modal__plugin-details">
<HText variant="body-2-bold" as="span">
{{ integration.title }}
</HText>
</div>
</div>
<div class="add-form-modal__plugin-actions">
<HButton
variant="outline"
color="neutral"
size="small"
:is-disabled="integrationsStore.isIntegrationLoading(integration.id)"
@click="handleConnect(integration.id)"
>
{{
integration.isPluginActive
? translate('hostinger_reach_forms_connect')
: translate('hostinger_reach_forms_install_and_connect')
}}
</HButton>
</div>
</div>
</div>
</div>
</div>
</template>
</div>
</BaseModal>
</template>
<style lang="scss" scoped>
.add-form-modal {
display: flex;
flex-direction: column;
gap: 20px;
margin-top: 24px;
&__main-card {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20px;
background: var(--neutral--0);
border: 1px solid var(--primary--500);
border-radius: 12px;
transition:
border-color 0.2s ease,
box-shadow 0.2s ease;
&:hover {
border-color: var(--primary--600);
box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}
}
&__main-content {
display: flex;
align-items: center;
gap: 12px;
}
&__main-icon {
width: 32px;
height: 32px;
flex-shrink: 0;
background: var(--primary--50);
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
}
&__plugins-section {
display: flex;
flex-direction: column;
gap: 16px;
}
&__plugins-toggle {
align-self: center;
}
&__plugins-list {
display: flex;
flex-direction: column;
gap: 12px;
}
&__plugin-card {
display: flex;
flex-direction: column;
background: var(--neutral--0);
border: 1px solid var(--neutral--200);
border-radius: 12px;
transition: border-color 0.2s ease;
contain: layout style;
&:hover {
border-color: var(--neutral--300);
}
}
&__plugin-content {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px;
width: 100%;
}
&__plugin-info {
display: flex;
align-items: center;
gap: 12px;
}
&__plugin-icon {
width: 40px;
height: 40px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
background: var(--neutral--50);
flex-shrink: 0;
}
&__plugin-image {
width: 32px;
height: 32px;
object-fit: contain;
}
&__plugin-details {
display: flex;
gap: 8px;
align-items: center;
}
&__plugin-actions {
display: flex;
align-items: center;
gap: 12px;
}
&__installed-section {
display: flex;
flex-direction: column;
gap: 8px;
}
@media (max-width: 640px) {
gap: 16px;
&__main-card {
padding: 16px;
flex-direction: column;
align-items: stretch;
gap: 16px;
}
&__main-content {
justify-content: center;
}
&__plugin-content {
padding: 14px;
}
&__plugin-icon {
width: 36px;
height: 36px;
}
&__plugin-image {
width: 28px;
height: 28px;
}
}
@media (max-width: 480px) {
gap: 12px;
&__main-card {
padding: 14px;
}
&__plugins-list {
gap: 8px;
}
&__plugin-content {
padding: 12px;
}
}
}
</style>
@@ -0,0 +1,92 @@
<script lang="ts" setup>
import BaseModal from '@/components/Modals/Base/BaseModal.vue';
import { useModal } from '@/composables';
import { useIntegrationsStore } from '@/stores';
import { translate } from '@/utils/translate';
interface Props {
data?: { integration: string; backButtonRedirectAction: (() => void) | undefined };
}
const { closeModal } = useModal();
const integrationsStore = useIntegrationsStore();
const props = defineProps<Props>();
const dismiss = () => {
const backButtonAction = props.data?.backButtonRedirectAction;
if (backButtonAction) {
backButtonAction();
} else {
closeModal();
}
};
const handleDisconnect = async (integrationId: string) => {
await integrationsStore.toggleIntegrationStatus(integrationId, false);
dismiss();
};
</script>
<template>
<BaseModal title-alignment="left" :title="translate('hostinger_reach_confirm_disconnect_modal_title')">
<template #title-icon>
<HIcon class="confirm-disconnect-modal__icon" name="ic-warning-circle-filled-24" color="danger--600" />
</template>
<div class="confirm-disconnect-modal">
<div class="confirm-disconnect-modal__content">
<HText variant="body-2" as="p" class="confirm-disconnect-modal__text">
{{ translate('hostinger_reach_confirm_disconnect_modal_text') }}
</HText>
</div>
<div class="confirm-disconnect-modal__footer">
<HButton variant="text" color="neutral" size="small" @click="dismiss">
{{ translate('hostinger_reach_confirm_disconnect_modal_cancel') }}
</HButton>
<HButton
color="danger"
size="small"
:is-disabled="integrationsStore.isIntegrationLoading(props.data?.integration)"
@click="handleDisconnect(props.data?.integration)"
>
{{ translate('hostinger_reach_confirm_disconnect_modal_disconnect') }}
</HButton>
</div>
</div>
</BaseModal>
</template>
<style lang="scss" scoped>
.confirm-disconnect-modal {
margin-top: 24px;
&__icon {
margin-right: 12px;
}
&__content {
display: flex;
flex-direction: column;
gap: 20px;
align-items: center;
margin-bottom: 24px;
}
&__footer {
display: flex;
justify-content: flex-end;
gap: 8px;
}
@media (max-width: 640px) {
&__footer {
flex-direction: column-reverse;
gap: 12px;
:deep(.h-button) {
width: 100%;
}
}
}
}
</style>
@@ -0,0 +1,339 @@
<script lang="ts" setup>
import { HButton, HIcon, HSkeletonLoader, HText } from '@hostinger/hcomponents';
import { computed, onMounted, ref } from 'vue';
import BaseModal from '@/components/Modals/Base/BaseModal.vue';
import Pagination from '@/components/Pagination.vue';
import { usePagesStore } from '@/stores/pagesStore';
import type { Page, WordPressPage } from '@/types/models/pagesModels';
import { translate } from '@/utils/translate';
interface Props {
title?: string;
pages?: Page[];
data?: Record<string, unknown>;
}
const props = defineProps<Props>();
const pagesStore = usePagesStore();
const NEW_FORM_BUTTON_LINK = '/wp-admin/post-new.php?post_type=page&hostinger_reach_add_block=1';
const loadingPageId = ref<string | null>(null);
const isNewFormButtonLoading = ref(false);
const currentPages = computed(() => {
const storePages = pagesStore.items;
return storePages && storePages.length > 0 ? storePages : props.pages || [];
});
const getPageDisplayName = (page: Page | WordPressPage): string => {
if ('name' in page && page.name) {
return page.name;
}
if ('title' in page && page.title?.rendered) {
return page.title.rendered;
}
return translate('hostinger_reach_forms_no_title');
};
const isPageAdded = (page: Page | WordPressPage): boolean => ('isAdded' in page ? page.isAdded || false : false);
const isLoading = computed(() => pagesStore.isLoading);
const currentPage = computed(() => pagesStore.currentPage);
const totalItems = computed(() => pagesStore.totalItems);
const itemsPerPage = computed(() => pagesStore.itemsPerPage);
const handlePageChange = async (page: number) => {
await pagesStore.goToPage(page);
};
const handlePageClick = (page: Page | WordPressPage) => {
if (loadingPageId.value) return;
loadingPageId.value = String(page.id);
const pageUrl = page.link;
if (pageUrl) {
window.location.href = pageUrl;
}
};
const handleNewFormClick = () => {
if (isNewFormButtonLoading.value) return;
isNewFormButtonLoading.value = true;
window.location.href = NEW_FORM_BUTTON_LINK;
};
const handleBackClick = () => {
const backButtonAction = props.data?.backButtonRedirectAction as (() => void) | undefined;
if (backButtonAction) {
backButtonAction();
}
};
onMounted(async () => {
await pagesStore.resetToFirstPage();
});
</script>
<template>
<BaseModal title-alignment="centered" :title="title">
<template v-if="data?.backButtonRedirectAction" #back-button>
<button class="select-page-modal__back-button" type="button" @click="handleBackClick">
<HIcon name="ic-chevron-left-16" color="neutral--600" />
</button>
</template>
<div class="select-page-modal">
<div class="select-page-modal__content">
<div class="select-page-modal__pages">
<template v-if="isLoading">
<div
v-for="n in itemsPerPage"
:key="`skeleton-${n}`"
class="select-page-modal__page-item select-page-modal__page-item--loading"
>
<div class="select-page-modal__page-loading">
<HSkeletonLoader width="60%" height="20px" border-radius="sm" />
</div>
</div>
</template>
<template v-else-if="currentPages && currentPages.length > 0">
<div
v-for="page in currentPages"
:key="page.id"
class="select-page-modal__page-item"
:class="{
'select-page-modal__page-item--selected': isPageAdded(page),
'select-page-modal__page-item--loading': loadingPageId === String(page.id)
}"
@click="handlePageClick(page)"
>
<div v-if="loadingPageId === String(page.id)" class="select-page-modal__page-loading">
<HSkeletonLoader width="60%" height="20px" border-radius="sm" />
</div>
<template v-else>
<div class="select-page-modal__page-content">
<HText variant="body-2-bold" as="span" class="select-page-modal__page-name">
{{ getPageDisplayName(page) }}
</HText>
</div>
<div>
<HIcon
:name="isPageAdded(page) ? 'ic-checkmark-circle-filled-24' : 'ic-circle-empty-24'"
:color="isPageAdded(page) ? 'primary--500' : 'neutral--200'"
/>
</div>
</template>
</div>
</template>
<template v-else-if="!isLoading">
<div class="select-page-modal__no-pages">
<HText variant="body-2" as="p" class="select-page-modal__no-pages-text">
{{ translate('hostinger_reach_forms_no_pages_available') }}
</HText>
</div>
</template>
</div>
</div>
<div class="select-page-modal__pagination">
<Pagination
:current-page="currentPage"
:total-items="totalItems"
:items-per-page="itemsPerPage"
:total-visible="5"
:disabled="isLoading"
@page-change="handlePageChange"
@update:current-page="handlePageChange"
/>
</div>
<div class="select-page-modal__footer">
<HButton
variant="outline"
color="neutral"
size="small"
:icon-prepend="isNewFormButtonLoading ? undefined : 'ic-add-16'"
:is-loading="isNewFormButtonLoading"
@click="handleNewFormClick"
>
{{ translate('hostinger_reach_forms_new_page_text') }}
</HButton>
</div>
</div>
</BaseModal>
</template>
<style lang="scss" scoped>
.select-page-modal {
margin-top: 24px;
&__back-button {
position: absolute;
top: 0;
left: 0;
display: flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border: none;
background: transparent;
border-radius: 8px;
cursor: pointer;
transition: background-color 0.2s ease;
&:hover {
background-color: var(--neutral--100);
}
&:active {
background-color: var(--neutral--200);
}
}
&__content {
display: flex;
flex-direction: column;
gap: 20px;
align-items: center;
margin-bottom: 24px;
}
&__pages {
display: flex;
flex-direction: column;
gap: 8px;
width: 100%;
max-width: 100%;
}
&__page-item {
display: flex;
align-items: center;
justify-content: space-between;
height: 60px;
gap: 16px;
padding: 20px;
border: 1px solid var(--neutral--200);
border-radius: 16px;
background: var(--neutral--0);
cursor: pointer;
transition:
border-color 0.2s ease,
opacity 0.2s ease;
&:hover:not(&--loading) {
border-color: var(--primary--500);
}
&--selected {
border-color: var(--primary--500);
}
&--loading {
cursor: not-allowed;
opacity: 0.7;
border-color: var(--neutral--300);
}
}
&__page-loading {
display: flex;
align-items: center;
width: 100%;
gap: 12px;
}
&__page-content {
display: flex;
align-items: center;
gap: 12px;
flex: 1;
}
&__page-name {
font-weight: 700;
}
&__checkmark {
width: 20px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
&__no-pages {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 12px;
padding: 40px 20px;
text-align: center;
}
&__no-pages-icon {
width: 32px;
height: 32px;
color: var(--neutral--400);
}
&__no-pages-text {
color: var(--neutral--500);
margin: 0;
}
&__pagination {
display: flex;
justify-content: center;
align-items: center;
padding: 16px 0;
margin-bottom: 8px;
}
&__footer {
display: flex;
justify-content: flex-end;
gap: 8px;
}
@media (max-width: 640px) {
&__page-item {
padding: 16px;
}
&__footer {
flex-direction: column-reverse;
gap: 12px;
:deep(.h-button) {
width: 100%;
}
}
}
@media (max-width: 480px) {
&__pages {
gap: 6px;
}
&__page-item {
padding: 14px;
}
}
}
</style>
@@ -0,0 +1,166 @@
<script setup lang="ts">
import { HButton, HIcon } from '@hostinger/hcomponents';
import { computed } from 'vue';
interface Props {
currentPage: number;
totalItems: number;
itemsPerPage: number;
totalVisible?: number;
disabled?: boolean;
}
const props = withDefaults(defineProps<Props>(), {
totalVisible: 5,
disabled: false
});
const emit = defineEmits<{
'page-change': [page: number];
'update:current-page': [page: number];
}>();
const totalPages = computed(() => Math.ceil(props.totalItems / props.itemsPerPage));
const visiblePages = computed(() => {
const pages: (number | string)[] = [];
const current = props.currentPage;
const total = totalPages.value;
const maxVisible = props.totalVisible;
if (total <= maxVisible) {
for (let i = 1; i <= total; i++) {
pages.push(i);
}
return pages;
}
pages.push(1);
const sidePages = Math.floor((maxVisible - 3) / 2);
const leftBound = Math.max(2, current - sidePages);
const rightBound = Math.min(total - 1, current + sidePages);
if (leftBound > 2) {
pages.push('...');
}
for (let i = leftBound; i <= rightBound; i++) {
if (i !== 1 && i !== total) {
pages.push(i);
}
}
if (rightBound < total - 1) {
pages.push('...');
}
if (total > 1) {
pages.push(total);
}
return pages;
});
const canGoPrevious = computed(() => props.currentPage > 1 && !props.disabled);
const canGoNext = computed(() => props.currentPage < totalPages.value && !props.disabled);
const goToPage = (page: number) => {
if (props.disabled || page < 1 || page > totalPages.value || page === props.currentPage) {
return;
}
emit('page-change', page);
emit('update:current-page', page);
};
const goToPrevious = () => {
if (canGoPrevious.value) {
goToPage(props.currentPage - 1);
}
};
const goToNext = () => {
if (canGoNext.value) {
goToPage(props.currentPage + 1);
}
};
const handleKeydown = (event: KeyboardEvent, page: number) => {
if (event.key === 'Enter' || event.key === ' ') {
event.preventDefault();
goToPage(page);
}
};
</script>
<template>
<nav
v-if="totalPages > 1"
class="pagination"
role="navigation"
:aria-label="`Pagination, page ${currentPage} of ${totalPages}`"
>
<HButton
variant="text"
color="neutral"
size="small"
:is-disabled="!canGoPrevious"
:aria-label="`Go to previous page, page ${currentPage - 1}`"
:tabindex="canGoPrevious ? 0 : -1"
@click="goToPrevious"
>
<HIcon name="ic-chevron-small-left-16" />
</HButton>
<template v-for="(page, index) in visiblePages" :key="`page-${page}-${index}`">
<span v-if="page === '...'" class="pagination-ellipsis" aria-hidden="true">...</span>
<HButton
v-else
variant="text"
size="small"
:color="page === currentPage ? 'primary' : 'neutral'"
:is-disabled="disabled"
:aria-label="page === currentPage ? `Current page, page ${page}` : `Go to page ${page}`"
:aria-current="page === currentPage ? 'page' : undefined"
:tabindex="disabled ? -1 : 0"
@click="goToPage(page as number)"
@keydown="handleKeydown($event, page as number)"
>
{{ page }}
</HButton>
</template>
<HButton
variant="text"
color="neutral"
size="small"
:is-disabled="!canGoNext"
:aria-label="`Go to next page, page ${currentPage + 1}`"
:tabindex="canGoNext ? 0 : -1"
@click="goToNext"
>
<HIcon name="ic-chevron-small-right-16" />
</HButton>
</nav>
</template>
<style scoped>
.pagination {
display: flex;
align-items: center;
gap: 8px;
}
.pagination-ellipsis {
display: flex;
align-items: center;
justify-content: center;
width: 48px;
height: 48px;
color: var(--neutral--700);
font-size: 14px;
font-weight: 500;
}
</style>
@@ -0,0 +1,415 @@
<script setup lang="ts">
import { computed } from 'vue';
import PluginEntry from '@/components/PluginEntry.vue';
import PluginEntrySkeleton from '@/components/skeletons/PluginEntrySkeleton.vue';
import { PLUGIN_STATUSES, type PluginStatus, WOOCOMMERCE_ID } from '@/data/pluginData';
import type { Form, Integration } from '@/types/models';
import { translate } from '@/utils/translate';
interface PluginEntryData {
integration: Integration;
entries: number;
status: PluginStatus;
forms: Form[];
}
interface Props {
integrations?: Integration[];
isLoading?: boolean;
}
const props = withDefaults(defineProps<Props>(), {
integrations: () => [],
isLoading: false
});
const emit = defineEmits<{
goToPlugin: [id: string];
disconnectPlugin: [id: string];
toggleFormStatus: [form: Form, status: boolean];
viewForm: [form: Form];
editForm: [form: Form];
addForm: [id: string];
}>();
const SKELETON_COUNT = 3;
const pluginEntries = computed((): PluginEntryData[] => {
if (props.isLoading) return [];
return props.integrations
.filter((integration) => integration.isPluginActive)
.map((integration) => {
const forms = integration.forms || [];
const totalSubmissions = forms.reduce((sum, form) => sum + (form.submissions || 0), 0);
return {
integration,
entries: totalSubmissions,
status: integration.isActive ? PLUGIN_STATUSES.ACTIVE : PLUGIN_STATUSES.INACTIVE,
forms
} as PluginEntryData;
})
.filter((pluginEntry) => pluginEntry.status === PLUGIN_STATUSES.ACTIVE);
});
</script>
<template>
<div class="plugin-entries-table">
<div class="plugin-entries-table__container">
<div class="plugin-entries-table__header">
<div class="plugin-entries-table__header-cell plugin-entries-table__header-cell--plugin">
<span class="plugin-entries-table__column-title">
{{ translate('hostinger_reach_plugin_entries_table_plugin_header') }}
</span>
</div>
<div class="plugin-entries-table__header-cell plugin-entries-table__header-cell--entries">
<span class="plugin-entries-table__column-title">
{{ translate('hostinger_reach_plugin_entries_table_entries_header') }}
</span>
</div>
<div class="plugin-entries-table__header-cell plugin-entries-table__header-cell--status">
<span class="plugin-entries-table__column-title">
{{ translate('hostinger_reach_plugin_entries_table_status_header') }}
</span>
</div>
<div class="plugin-entries-table__header-cell plugin-entries-table__header-cell--actions"></div>
</div>
<template v-if="isLoading">
<PluginEntrySkeleton v-for="i in SKELETON_COUNT" :key="`skeleton-${i}`" />
</template>
<template v-else>
<PluginEntry
v-for="(pluginEntry, index) in pluginEntries"
:key="pluginEntry.integration.id"
:initially-expanded="pluginEntry.integration.id === WOOCOMMERCE_ID"
:integration="pluginEntry.integration"
:plugin-status="pluginEntry.status"
:total-entries="pluginEntry.entries"
:forms="pluginEntry.forms"
:class="{
'plugin-entries-table__entry-row--with-spacing':
pluginEntries.length > 1 && index !== pluginEntries.length - 1
}"
@toggle-form-status="(form: Form, status: boolean) => emit('toggleFormStatus', form, status)"
@view-form="emit('viewForm', $event)"
@edit-form="emit('editForm', $event)"
@add-form="emit('addForm', $event)"
@go-to-plugin="emit('goToPlugin', $event)"
@disconnect-plugin="emit('disconnectPlugin', $event)"
/>
</template>
</div>
</div>
</template>
<style scoped lang="scss">
.plugin-entries-table {
width: inherit;
&__container {
background: var(--neutral--0);
border-radius: 20px;
padding: 24px;
border: 1px solid var(--neutral--200);
overflow: hidden;
}
&__header {
display: flex;
}
&__header-cell {
padding: 12px 0px;
&--plugin {
width: 49%;
order: 1;
padding-right: 16px;
}
&--entries {
width: 19%;
order: 2;
}
&--status {
width: 21%;
order: 3;
}
&--actions {
width: 10%;
order: 4;
}
}
&__column-title {
font-weight: 700;
font-size: 14px;
color: var(--neutral--600);
}
&__row {
display: flex;
padding: 16px 0px;
}
&__cell {
display: flex;
align-items: center;
&--plugin {
width: 50%;
order: 1;
}
&--entries {
width: 20%;
order: 2;
}
&--status {
width: 20%;
order: 3;
}
&--actions {
width: 10%;
display: flex;
justify-content: flex-end;
padding-right: 16px;
order: 4;
}
}
&__plugin-content {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
width: 100%;
}
&__expand-button {
background: none;
border: none;
cursor: pointer;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
width: 16px;
height: 16px;
}
&__plugin-info {
display: flex;
align-items: center;
gap: 12px;
}
&__plugin-icon {
width: 28px;
height: 28px;
border-radius: 7px;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
background: var(--neutral--100);
img {
width: 100%;
height: 100%;
object-fit: contain;
}
}
&__plugin-name {
font-weight: 700;
font-size: 14px;
color: var(--neutral--500);
}
&__entries-count {
font-weight: 400;
font-size: 14px;
color: var(--neutral--500);
}
&__status-content {
display: flex;
align-items: center;
}
&__status-label {
font-size: 12px;
}
&__action-button {
background: var(--neutral--0);
border: 1px solid var(--neutral--200);
border-radius: 8px;
padding: 0 8px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s ease;
&:hover {
border-color: var(--neutral--300);
}
}
&__expansion-row {
width: 100%;
}
&__expansion-content {
background-color: var(--neutral--50);
border-radius: 12px;
padding: 16px 0;
display: flex;
flex-direction: column;
gap: 8px;
}
&__plugin-toggle-row {
display: flex;
align-items: center;
.plugin-entries-table__cell--plugin {
width: 50%;
padding-left: 16px;
}
.plugin-entries-table__cell--entries {
width: 20%;
}
.plugin-entries-table__cell--status {
width: 20%;
}
.plugin-entries-table__cell--actions {
width: 10%;
display: flex;
justify-content: flex-end;
padding-right: 16px;
}
}
&__forms-list {
display: flex;
flex-direction: column;
gap: 4px;
}
&__form-item {
display: flex;
align-items: center;
padding: 16px 0px;
border-top: 1px solid var(--neutral--200);
&:first-child {
border-top: none;
}
.plugin-entries-table__cell--plugin {
width: 50%;
padding-left: 32px;
}
.plugin-entries-table__cell--entries {
width: 20%;
}
.plugin-entries-table__cell--status {
width: 20%;
}
.plugin-entries-table__cell--actions {
width: 10%;
display: flex;
justify-content: flex-end;
padding-right: 16px;
}
}
&__form-info {
display: flex;
flex-direction: column;
gap: 2px;
}
&__form-id {
font-weight: 500;
font-size: 12px;
color: var(--neutral--600);
font-family: monospace;
}
&__form-title {
font-weight: 400;
font-size: 11px;
color: var(--neutral--500);
opacity: 0.8;
}
&__toggle-container {
display: flex;
align-items: center;
gap: 16px;
}
&__toggle-label {
font-weight: 400;
font-size: 14px;
color: var(--neutral--500);
}
&__entries-text {
font-weight: 400;
font-size: 14px;
color: var(--neutral--500);
}
&__popover-menu {
padding: 4px;
min-width: 180px;
}
&__menu-item {
display: flex;
align-items: center;
gap: 8px;
padding: 12px;
cursor: pointer;
border-radius: 8px;
font-weight: 500;
font-size: 14px;
color: var(--neutral--600);
transition: background-color 0.2s ease;
&:hover {
background-color: var(--neutral--50);
}
span {
flex: 1;
}
}
@media (max-width: 1023px) {
&__header {
display: none;
}
}
}
</style>
@@ -0,0 +1,349 @@
<script setup lang="ts">
import { HIcon, HLabel, HPopover } from '@hostinger/hcomponents';
import { computed, ref } from 'vue';
import PluginExpansion from '@/components/PluginExpansion.vue';
import { PLUGIN_STATUSES, type PluginStatus } from '@/data/pluginData';
import type { Form, Integration } from '@/types/models';
import { translate } from '@/utils/translate';
interface Props {
integration: Integration;
pluginStatus: PluginStatus;
totalEntries: number;
forms: Form[];
initiallyExpanded: boolean;
}
const props = defineProps<Props>();
const emit = defineEmits<{
toggleFormStatus: [form: Form, status: boolean];
goToPlugin: [id: string];
disconnectPlugin: [id: string];
viewForm: [form: Form];
editForm: [form: Form];
addForm: [id: string];
}>();
const isExpanded = ref(props.initiallyExpanded ?? false);
const toggleExpansion = () => {
isExpanded.value = !isExpanded.value;
};
const getStatusLabel = (status: PluginStatus) =>
status === PLUGIN_STATUSES.ACTIVE
? translate('hostinger_reach_plugin_entries_table_status_active')
: translate('hostinger_reach_plugin_entries_table_status_inactive');
const getStatusColor = (status: PluginStatus) => (status === PLUGIN_STATUSES.ACTIVE ? 'success' : 'gray');
const handleToggleFormStatus = (form: Form, status: boolean) => {
emit('toggleFormStatus', form, status);
};
const handleViewForm = (form: Form) => {
emit('viewForm', form);
};
const handleEditForm = (form: Form) => {
emit('editForm', form);
};
const showPopover = computed(
() => props.integration.canDeactivate || !!props.integration.addFormUrl || props.integration.isGoToPluginVisible
);
const expandButtonAriaLabel = computed(() => {
const translationKey = isExpanded.value
? 'hostinger_reach_plugin_entries_table_collapse_aria'
: 'hostinger_reach_plugin_entries_table_expand_aria';
return translate(translationKey).replace('{pluginName}', props.integration.title);
});
</script>
<template>
<div class="plugin-entry-row">
<div class="plugin-entry-row__main">
<div class="plugin-entry-row__cell plugin-entry-row__cell--plugin">
<div class="plugin-entry-row__plugin-content" @click="toggleExpansion">
<button
class="plugin-entry-row__expand-button"
:aria-expanded="isExpanded"
:aria-controls="`plugin-expansion-${props.integration.id}`"
:aria-label="expandButtonAriaLabel"
@click.stop="toggleExpansion"
>
<HIcon :name="isExpanded ? 'ic-chevron-down-16' : 'ic-chevron-right-16'" dimensions="16px" />
</button>
<div class="plugin-entry-row__plugin-info">
<div class="plugin-entry-row__plugin-icon">
<img :src="props.integration.icon" :alt="props.integration.title + ' icon'" />
</div>
<span class="plugin-entry-row__plugin-name">{{ props.integration.title }}</span>
</div>
</div>
</div>
<div class="plugin-entry-row__cell plugin-entry-row__cell--entries">
<span class="plugin-entry-row__mobile-label">
{{ translate('hostinger_reach_plugin_entries_table_entries_header') }}:
</span>
<span class="plugin-entry-row__entries-count">{{ totalEntries }}</span>
</div>
<div class="plugin-entry-row__cell plugin-entry-row__cell--status">
<span class="plugin-entry-row__mobile-label">
{{ translate('hostinger_reach_plugin_entries_table_status_header') }}:
</span>
<div class="plugin-entry-row__status-content">
<HLabel variant="outline" :color="getStatusColor(pluginStatus)" class="plugin-entry-row__status-label">
{{ getStatusLabel(pluginStatus) }}
</HLabel>
</div>
</div>
<div class="plugin-entry-row__cell plugin-entry-row__cell--actions">
<HPopover
v-if="showPopover"
placement="bottom-end"
:show-arrow="false"
background-color="neutral--0"
border-radius="12px"
:outside-click-enabled="true"
>
<template #trigger>
<button class="plugin-entry-row__action-button">
<HIcon name="ic-dots-vertical-16" />
</button>
</template>
<div class="plugin-entry-row__popover-menu">
<div
v-if="!!props.integration.addFormUrl"
class="plugin-entry-row__menu-item"
@click="emit('addForm', props.integration.id)"
>
<HIcon name="ic-plus-16" />
<span>{{ translate('hostinger_reach_plugin_entries_table_add_form') }}</span>
<HIcon name="ic-arrow-up-right-square-16" />
</div>
<div
v-if="props.integration.isGoToPluginVisible"
class="plugin-entry-row__menu-item"
@click="emit('goToPlugin', props.integration.id)"
>
<HIcon name="ic-blocks-plus-16" />
<span>{{ translate('hostinger_reach_plugin_entries_table_go_to_plugin') }}</span>
<HIcon name="ic-arrow-up-right-square-16" />
</div>
<div
v-if="props.integration.canDeactivate"
class="plugin-entry-row__menu-item"
@click="emit('disconnectPlugin', props.integration.id)"
>
<HIcon name="ic-cross-circle-16" />
<span>{{ translate('hostinger_reach_plugin_entries_table_disconnect_plugin') }}</span>
</div>
</div>
</HPopover>
</div>
</div>
<div v-if="isExpanded" class="plugin-entry-row__expansion">
<PluginExpansion
:integration="props.integration"
:forms="forms"
@toggle-form-status="handleToggleFormStatus"
@view-form="handleViewForm"
@edit-form="handleEditForm"
/>
</div>
</div>
</template>
<style scoped lang="scss">
.plugin-entry-row {
&__main {
display: flex;
padding: 16px 16px 16px 0;
}
&__cell {
display: flex;
align-items: center;
&--plugin {
width: 50%;
order: 1;
}
&--entries {
width: 20%;
order: 2;
}
&--status {
width: 20%;
order: 3;
}
&--actions {
width: 10%;
display: flex;
justify-content: flex-end;
order: 4;
}
}
&__action-button {
background: var(--neutral--0);
border: 1px solid var(--neutral--200);
border-radius: 8px;
padding: 0 8px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s ease;
&:hover {
border-color: var(--neutral--300);
}
}
&__plugin-content {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
width: 100%;
}
&__expand-button {
background: none;
border: none;
cursor: pointer;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
width: 16px;
height: 16px;
}
&__plugin-info {
display: flex;
align-items: center;
gap: 12px;
}
&__plugin-icon {
width: 28px;
height: 28px;
border-radius: 7px;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
background: var(--neutral--100);
img {
width: 100%;
height: 100%;
object-fit: contain;
}
}
&__plugin-name {
font-weight: 700;
font-size: 14px;
color: var(--neutral--500);
}
&__entries-count {
font-weight: 400;
font-size: 14px;
color: var(--neutral--500);
}
&__status-content {
display: flex;
align-items: center;
}
&__status-label {
font-size: 12px;
}
&__mobile-label {
font-weight: 500;
font-size: 14px;
color: var(--neutral--600);
margin-right: 8px;
display: none;
}
&__expansion {
width: 100%;
height: 100%;
}
&__popover-menu {
padding: 4px;
min-width: 180px;
}
&__menu-item {
display: flex;
align-items: center;
gap: 8px;
padding: 12px;
cursor: pointer;
border-radius: 8px;
font-weight: 500;
font-size: 14px;
color: var(--neutral--600);
transition: background-color 0.2s ease;
&:hover {
background-color: var(--neutral--50);
}
span {
flex: 1;
}
}
@media (max-width: 1023px) {
&__main {
flex-direction: column;
gap: 12px;
padding: 16px;
border-radius: 12px;
background: var(--neutral--100);
margin-bottom: 12px;
}
&__cell--plugin,
&__cell--entries,
&__cell--status,
&__cell--actions {
width: 100%;
justify-content: flex-start;
}
&__cell--entries,
&__cell--status {
align-items: flex-start;
}
&__cell--actions {
padding-right: 0;
justify-content: flex-end;
}
&__mobile-label {
display: inline-block;
}
}
}
</style>
@@ -0,0 +1,107 @@
<script setup lang="ts">
import { HIcon } from '@hostinger/hcomponents';
import { computed } from 'vue';
import { useRoute } from 'vue-router';
import FormItem from '@/components/FormItem.vue';
import { DEFAULT_OVERVIEW_TAB, TABS_KEYS } from '@/data/tabs';
import type { Form, Integration } from '@/types/models';
import { toKebabCase } from '@/utils/caseConversion';
import { translate } from '@/utils/translate';
interface Props {
integration: Integration;
forms: Form[];
}
const route = useRoute();
const { integration, forms } = defineProps<Props>();
const emit = defineEmits<{
toggleFormStatus: [form: Form, status: boolean];
viewForm: [form: Form];
editForm: [form: Form];
}>();
const currentTab = computed(() => route.hash.replace('#', '') || DEFAULT_OVERVIEW_TAB);
</script>
<template>
<div :id="`plugin-expansion-${toKebabCase(integration.id)}`" class="plugin-expansion-content">
<div v-if="currentTab === TABS_KEYS.OVERVIEW_TAB_ECOMMERCE" class="plugin-expansion-content__coming-soon-notice">
<HIcon name="ic-info-circle-filled-24" />
<p>{{ translate('hostinger_reach_coming_soon_notice') }}</p>
</div>
<div v-if="forms.length > 0" class="plugin-expansion-content__forms-list">
<FormItem
v-for="(form, index) in forms"
:key="form.formId"
:integration="integration"
:form="form"
:class="{
'plugin-expansion-content__form-item--with-top-spacing': forms.length > 1 && index !== 0,
'plugin-expansion-content__form-item--with-bottom-spacing': forms.length > 1 && index !== forms.length - 1
}"
@toggle-status="(form, status) => emit('toggleFormStatus', form, status)"
@view-form="(form) => emit('viewForm', form)"
@edit-form="(form) => emit('editForm', form)"
/>
</div>
<div v-else class="plugin-expansion-content__no-forms">
<span class="plugin-expansion-content__no-forms-text">
{{ translate('hostinger_reach_plugin_expansion_no_forms') }}
</span>
</div>
</div>
</template>
<style scoped lang="scss">
.plugin-expansion-content {
border-radius: 12px;
padding: 16px;
display: flex;
flex-direction: column;
gap: 4px;
box-sizing: border-box;
&__coming-soon-notice {
background: var(--neutral--100);
padding: 8px 16px;
gap: 10px;
border-radius: 12px;
font-size: 14px;
color: #1d1e20;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-evenly;
margin-bottom: 20px;
}
&__forms-list {
display: flex;
flex-direction: column;
gap: 4px;
}
&__form-item--with-top-spacing {
padding-top: 16px;
}
&__form-item--with-bottom-spacing {
padding-bottom: 16px;
}
&__no-forms {
display: flex;
justify-content: center;
align-items: center;
}
&__no-forms-text {
font-size: 14px;
color: var(--neutral--500);
text-align: center;
}
}
</style>
@@ -0,0 +1,65 @@
<script setup lang="ts">
import { computed } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import type { Tab } from '@/data/tabs';
type TabsProps = {
tabs: Tab[];
defaultTab: string;
};
const props = defineProps<TabsProps>();
const route = useRoute();
const router = useRouter();
const activeKey = computed(() => route.hash?.replace('#', '') || props.defaultTab);
const isActive = (key: string): boolean => activeKey.value === key;
const setTab = (key: string): void => {
router.push({ path: route.path, hash: `#${key}` });
};
</script>
<template>
<div class="integration-tabs" role="tablist">
<button
v-for="tab in props.tabs"
:key="tab.key"
class="integration-tabs__tab"
:class="{ 'is-active': isActive(tab.key) }"
role="tab"
@click="() => setTab(tab.key)"
>
{{ tab.label }}
</button>
</div>
</template>
<style scoped lang="scss">
.integration-tabs {
display: flex;
gap: 16px;
width: 100%;
}
.integration-tabs__tab {
border: 1px solid var(--neutral--200);
background: var(--neutral--0);
color: var(--neutral--500);
border-radius: 24px;
padding: 4px 16px;
font-weight: bold;
font-size: 14px;
line-height: 20px;
cursor: pointer;
}
.integration-tabs__tab.is-active {
background: var(--neutral--500);
color: var(--neutral--0);
font-weight: normal;
}
</style>
@@ -0,0 +1,91 @@
<script setup lang="ts">
interface Props {
value: boolean;
isDisabled?: boolean;
}
const props = defineProps<Props>();
const emit = defineEmits<{
toggle: [boolean];
}>();
const handleClick = (event: Event) => {
if (props.isDisabled) return;
event.preventDefault();
event.stopPropagation();
emit('toggle', !props.value);
};
</script>
<template>
<div class="controlled-toggle__container">
<label
class="controlled-toggle"
:class="{
'controlled-toggle--active': value,
'controlled-toggle--disabled': isDisabled
}"
@click="handleClick"
>
<input type="checkbox" :checked="value" :disabled="isDisabled" style="display: none" />
<span class="controlled-toggle__slider"></span>
</label>
</div>
</template>
<style scoped lang="scss">
.controlled-toggle {
position: relative;
display: inline-block;
width: 44px;
height: 24px;
cursor: pointer;
margin: 0;
&--disabled {
cursor: not-allowed;
opacity: 0.5;
}
&__slider {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: var(--neutral--300);
border-radius: 24px;
transition: all 0.2s ease;
&::before {
content: '';
position: absolute;
height: 20px;
width: 20px;
left: 2px;
top: 2px;
background-color: white;
border-radius: 50%;
transition: all 0.2s ease;
}
}
&--active &__slider {
background-color: var(--primary--500);
&::before {
transform: translateX(20px);
}
}
&:hover:not(&--disabled) &__slider {
background-color: var(--neutral--400);
}
&--active:hover:not(&--disabled) &__slider {
background-color: var(--primary--600);
}
}
</style>
@@ -0,0 +1,246 @@
<script setup lang="ts">
import { HSkeletonLoader } from '@hostinger/hcomponents';
import { computed } from 'vue';
import { translate } from '@/utils/translate';
interface MetricData {
label: string;
value: string | number;
hasIcon?: boolean;
tooltip?: string;
}
interface Props {
title: string;
layout: 'horizontal' | 'vertical';
metrics: MetricData[];
isLoading?: boolean;
}
const props = withDefaults(defineProps<Props>(), {
isLoading: false
});
const isHorizontal = computed(() => props.layout === 'horizontal');
const isVertical = computed(() => props.layout === 'vertical');
const contentClasses = computed(() => ({
'usage-card__content': true,
'usage-card__content--horizontal': isHorizontal.value,
'usage-card__content--vertical': isVertical.value
}));
const getMetricClasses = (isVerticalMetric: boolean) => ({
'usage-card__metric': true,
'usage-card__metric--vertical': isVerticalMetric
});
const SKELETON_CONFIG = {
title: { height: '24px', width: '120px' },
label: { height: '16px', width: isVertical.value ? '80px' : '60px' },
value: { height: '32px', width: isVertical.value ? '50px' : '40px' }
} as const;
</script>
<template>
<article
class="usage-card"
:class="{ 'usage-card--vertical': isVertical }"
role="article"
:aria-label="`${title} ${translate('hostinger_reach_ui_usage_statistics')}`"
>
<HCard class="usage-card__container" padding="20px 32px" border-radius="16px">
<div class="usage-card__inner">
<header class="usage-card__header">
<HSkeletonLoader
v-if="isLoading"
:height="SKELETON_CONFIG.title.height"
:width="SKELETON_CONFIG.title.width"
rounded
/>
<HText v-else id="usage-card-title" as="h3" variant="heading-3" class="usage-card__title">
{{ title }}
</HText>
</header>
<div :class="contentClasses">
<template v-for="(metric, index) in metrics" :key="index">
<div :class="getMetricClasses(isVertical)">
<div class="usage-card__metric-content">
<div class="usage-card__metric-label-container">
<HSkeletonLoader
v-if="isLoading"
:height="SKELETON_CONFIG.label.height"
:width="SKELETON_CONFIG.label.width"
rounded
/>
<HText v-else as="div" variant="body-3-secondary" class="usage-card__metric-label">
{{ metric.label }}
</HText>
<span v-if="metric.hasIcon && !isLoading" v-tooltip="metric.tooltip" class="usage-card__metric-icon">
<HIcon name="ic-info-circle-filled-16" color="neutral--300" aria-hidden="true" />
</span>
</div>
<HSkeletonLoader
v-if="isLoading"
:height="SKELETON_CONFIG.value.height"
:width="SKELETON_CONFIG.value.width"
rounded
/>
<HText v-else as="div" variant="heading-1" class="usage-card__metric-value">
{{ metric.value }}
</HText>
</div>
</div>
<div v-if="isHorizontal && index < metrics.length - 1" class="usage-card__divider" aria-hidden="true"></div>
</template>
</div>
</div>
</HCard>
</article>
</template>
<style scoped lang="scss">
$mobile-breakpoint: 767px;
.usage-card {
flex: 1;
display: flex;
flex-direction: column;
&--vertical {
max-width: none;
}
&__container {
flex: 1;
display: flex;
flex-direction: column;
border: 1px solid var(--neutral--200);
}
&__inner {
display: flex;
flex-direction: column;
align-self: stretch;
}
}
.usage-card__header {
display: flex;
align-items: center;
align-self: stretch;
gap: 4px;
margin-bottom: 8px;
}
.usage-card__title {
font-weight: 700;
font-size: 16px;
line-height: 1.5;
color: var(--neutral--700);
}
.usage-card__content {
display: flex;
align-self: stretch;
&--horizontal {
flex-direction: row;
align-items: center;
gap: 40px;
}
&--vertical {
flex-direction: column;
justify-content: space-between;
height: 200px;
}
}
.usage-card__metric {
display: flex;
align-items: center;
&:not(&--vertical) {
flex-direction: row;
gap: 40px;
}
&--vertical {
flex-direction: column;
align-self: stretch;
gap: 16px;
padding: 8px 0 4px;
}
&-content {
display: flex;
flex-direction: column;
gap: 4px;
.usage-card__metric--vertical & {
align-self: stretch;
}
}
&-label-container {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 4px;
}
&-icon {
display: flex;
align-items: center;
}
&-label {
font-weight: 400;
font-size: 12px;
line-height: 1.67;
color: var(--neutral--300);
}
&-value {
font-weight: 700;
font-size: 24px;
line-height: 1.33;
color: var(--neutral--600);
}
}
.usage-card__divider {
width: 1px;
height: 20px;
background-color: var(--neutral--200);
flex-shrink: 0;
}
@media (max-width: $mobile-breakpoint) {
.usage-card__content--horizontal {
flex-direction: column;
align-items: flex-start;
gap: 16px;
}
.usage-card__metric:not(.usage-card__metric--vertical) {
flex-direction: column;
align-items: flex-start;
gap: 8px;
width: 100%;
.usage-card__metric-content {
width: 100%;
}
}
.usage-card__divider {
display: none;
}
}
</style>
@@ -0,0 +1,56 @@
<script setup lang="ts">
import { computed } from 'vue';
import UsageCard from '@/components/UsageCard.vue';
interface UsageCardData {
title: string;
layout: 'horizontal' | 'vertical';
metrics: Array<{
label: string;
value: string | number;
hasIcon?: boolean;
tooltip?: string;
}>;
}
interface Props {
usageCards: (UsageCardData | undefined)[];
isLoading?: boolean;
}
const props = withDefaults(defineProps<Props>(), {
isLoading: false
});
const validCards = computed(() => props.usageCards.filter(Boolean) as UsageCardData[]);
</script>
<template>
<div class="usage-cards-row">
<UsageCard
v-for="card in validCards"
:key="card.title"
:title="card.title"
:layout="card.layout"
:metrics="card.metrics"
:is-loading="props.isLoading"
/>
</div>
</template>
<style scoped lang="scss">
.usage-cards-row {
display: flex;
flex-direction: column;
align-self: stretch;
gap: 12px;
flex: 1;
}
@media (max-width: 1023px) {
.usage-cards-row {
flex-direction: column;
}
}
</style>
@@ -0,0 +1,50 @@
<script setup lang="ts">
import UsageCard from '@/components/UsageCard.vue';
import UsageCardsRow from '@/components/UsageCardsRow.vue';
interface UsageCardData {
title: string;
layout: 'horizontal' | 'vertical';
metrics: Array<{
label: string;
value: string | number;
hasIcon?: boolean;
tooltip?: string;
}>;
}
interface Props {
usageCards: UsageCardData[];
isLoading?: boolean;
}
const props = withDefaults(defineProps<Props>(), {
isLoading: false
});
</script>
<template>
<div class="usage-cards-section">
<UsageCardsRow :usage-cards="[props.usageCards[0], props.usageCards[1]]" :is-loading="props.isLoading" />
<UsageCard
:title="props.usageCards[2].title"
:layout="props.usageCards[2].layout"
:metrics="props.usageCards[2].metrics"
:is-loading="props.isLoading"
/>
</div>
</template>
<style scoped lang="scss">
.usage-cards-section {
display: flex;
align-self: stretch;
gap: 12px;
}
@media (max-width: 1023px) {
.usage-cards-section {
flex-direction: column;
}
}
</style>
@@ -0,0 +1,102 @@
<script lang="ts" setup>
import { HSkeletonLoader } from '@hostinger/hcomponents';
</script>
<template>
<div class="plugin-entry-skeleton">
<div class="plugin-entry-skeleton__cell plugin-entry-skeleton__cell--plugin">
<div class="plugin-entry-skeleton__plugin-content">
<div class="plugin-entry-skeleton__plugin-info">
<div class="plugin-entry-skeleton__plugin-icon">
<HSkeletonLoader width="28px" height="28px" border-radius="sm" />
</div>
<HSkeletonLoader width="120px" height="16px" border-radius="sm" />
</div>
</div>
</div>
<div class="plugin-entry-skeleton__cell plugin-entry-skeleton__cell--entries">
<HSkeletonLoader width="20px" height="16px" border-radius="sm" />
</div>
<div class="plugin-entry-skeleton__cell plugin-entry-skeleton__cell--status">
<HSkeletonLoader width="60px" height="24px" border-radius="lg" />
</div>
<div class="plugin-entry-skeleton__cell plugin-entry-skeleton__cell--actions">
<HSkeletonLoader width="32px" height="32px" border-radius="sm" />
</div>
</div>
</template>
<style scoped lang="scss">
.plugin-entry-skeleton {
display: flex;
padding: 16px 0px;
&__cell {
display: flex;
align-items: center;
&--plugin {
width: 50%;
order: 1;
}
&--entries {
width: 21%;
order: 2;
}
&--status {
width: 19%;
order: 3;
}
&--actions {
width: 10%;
display: flex;
justify-content: flex-end;
padding-right: 16px;
order: 4;
}
}
&__plugin-content {
display: flex;
align-items: center;
gap: 8px;
width: 100%;
}
&__plugin-info {
display: flex;
align-items: center;
gap: 12px;
}
&__plugin-icon {
width: 28px;
height: 28px;
border-radius: 7px;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
}
@media (max-width: 1023px) {
flex-direction: column;
gap: 12px;
&__cell--plugin,
&__cell--entries,
&__cell--status,
&__cell--actions {
width: 100%;
justify-content: center;
}
&__cell--actions {
padding-right: 0;
}
}
}
</style>
@@ -0,0 +1,53 @@
<script lang="ts" setup>
import { HSkeletonLoader } from '@hostinger/hcomponents';
</script>
<template>
<div class="plugin-integration-skeleton">
<div class="plugin-integration-skeleton__info">
<div class="plugin-integration-skeleton__icon">
<HSkeletonLoader width="40px" height="40px" border-radius="sm" />
</div>
<div class="plugin-integration-skeleton__details">
<HSkeletonLoader width="120px" height="16px" border-radius="sm" />
</div>
</div>
<div class="plugin-integration-skeleton__actions">
<HSkeletonLoader width="60px" height="24px" border-radius="lg" />
<HSkeletonLoader width="80px" height="32px" border-radius="sm" />
</div>
</div>
</template>
<style lang="scss" scoped>
.plugin-integration-skeleton {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px;
width: 100%;
&__info {
display: flex;
align-items: center;
gap: 12px;
}
&__icon {
flex-shrink: 0;
}
&__details {
display: flex;
flex-direction: column;
gap: 4px;
}
&__actions {
display: flex;
align-items: center;
gap: 12px;
flex-shrink: 0;
}
}
</style>
@@ -0,0 +1,83 @@
<script lang="ts" setup>
import { HSkeletonLoader } from '@hostinger/hcomponents';
const SKELETON_COUNT = 3;
</script>
<template>
<div class="plugins-section-skeleton">
<div class="plugins-section-skeleton__toggle">
<HSkeletonLoader width="160px" height="32px" border-radius="sm" />
</div>
<div class="plugins-section-skeleton__list">
<div v-for="i in SKELETON_COUNT" :key="`skeleton-${i}`" class="plugins-section-skeleton__item">
<div class="plugins-section-skeleton__item-info">
<div class="plugins-section-skeleton__item-icon">
<HSkeletonLoader width="40px" height="40px" border-radius="sm" />
</div>
<div class="plugins-section-skeleton__item-details">
<HSkeletonLoader width="120px" height="16px" border-radius="sm" />
<HSkeletonLoader width="80px" height="14px" border-radius="sm" />
</div>
</div>
<div class="plugins-section-skeleton__item-actions">
<HSkeletonLoader width="60px" height="24px" border-radius="lg" />
<HSkeletonLoader width="80px" height="32px" border-radius="sm" />
</div>
</div>
</div>
</div>
</template>
<style lang="scss" scoped>
.plugins-section-skeleton {
display: flex;
flex-direction: column;
gap: 16px;
&__toggle {
display: flex;
justify-content: center;
}
&__list {
display: flex;
flex-direction: column;
gap: 12px;
}
&__item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px;
background: var(--neutral--0);
border: 1px solid var(--neutral--200);
border-radius: 12px;
}
&__item-info {
display: flex;
align-items: center;
gap: 12px;
}
&__item-icon {
flex-shrink: 0;
}
&__item-details {
display: flex;
flex-direction: column;
gap: 4px;
}
&__item-actions {
display: flex;
align-items: center;
gap: 12px;
flex-shrink: 0;
}
}
</style>
@@ -0,0 +1,3 @@
export * from './useModal';
export { useOverviewData } from './useOverviewData';
export { useReachUrls } from './useReachUrls';
@@ -0,0 +1,15 @@
import { useModalStore } from '@/stores/modalStore';
import type { ModalName } from '@/types/enums';
import type { ModalContent, ModalSettings } from '@/types/models';
export const useModal = () => {
const modalStore = useModalStore();
const openModal = (name: ModalName, data?: ModalContent, settings?: ModalSettings) => {
modalStore.openModal(name, data, settings);
};
const closeModal = () => modalStore.closeModal();
return { openModal, closeModal };
};
@@ -0,0 +1,94 @@
import { computed, ref } from 'vue';
import { reachRepo } from '@/data/repositories/reachRepo';
import type { OverviewData } from '@/types/models/reachDataModels';
import { translate } from '@/utils/translate';
export const useOverviewData = () => {
const isLoading = ref(true);
const error = ref<string | null>(null);
const status = ref<number | null>(null);
const overviewData = ref<OverviewData | null>(null);
const usageCards = computed(() => [
{
title: translate('hostinger_reach_overview_emails_title'),
layout: 'horizontal' as const,
metrics: [
{
label: translate('hostinger_reach_overview_emails_sent_label'),
value: overviewData.value?.totalEmailsSentThisMonth || 0
},
{
label: translate('hostinger_reach_overview_emails_remaining_label'),
value: overviewData.value?.remainingEmailsQuota || 0
}
]
},
{
title: translate('hostinger_reach_overview_campaigns_title'),
layout: 'horizontal' as const,
metrics: [
{
label: translate('hostinger_reach_overview_campaigns_sent_label'),
value: overviewData.value?.totalCampaignsSentThisMonth || 0
},
{
label: translate('hostinger_reach_overview_campaigns_ctor_label'),
value: `${overviewData.value?.averageClickToOpenRate || 0}%`,
hasIcon: true,
tooltip: translate('hostinger_reach_ui_tooltip_ctor_info')
}
]
},
{
title: translate('hostinger_reach_overview_subscribers_title'),
layout: 'vertical' as const,
metrics: [
{
label: translate('hostinger_reach_overview_subscribers_new_label'),
value: overviewData.value?.totalSubscribedThisMonth || 0
},
{
label: translate('hostinger_reach_overview_subscribers_unsubscribes_label'),
value: overviewData.value?.totalUnsubscribedThisMonth || 0
},
{
label: translate('hostinger_reach_overview_subscribers_total_label'),
value: overviewData.value?.totalSubscribed || 0
}
]
}
]);
const loadOverviewData = async () => {
isLoading.value = true;
error.value = null;
status.value = null;
const [data, err, responseStatus] = await reachRepo.getOverview();
status.value = responseStatus;
isLoading.value = false;
if (err) {
error.value = err.message || translate('hostinger_reach_error_message');
return;
}
if (data) {
overviewData.value = data;
}
};
return {
isLoading,
error,
status,
overviewData,
usageCards,
loadOverviewData
};
};
@@ -0,0 +1,20 @@
import { computed } from 'vue';
import { useGeneralDataStore } from '@/stores/generalDataStore';
export const useReachUrls = () => {
const generalStore = useGeneralDataStore();
const reachBaseDomain = computed(() => (generalStore.isStaging ? 'reach.hostinger.dev' : 'reach.hostinger.com'));
const hpanelBaseDomain = computed(() => (generalStore.isStaging ? 'hpanel.hostinger.dev' : 'hpanel.hostinger.com'));
return {
reachUpgradeLink: computed(() => `https://${hpanelBaseDomain.value}/reach`),
reachYourPlanLink: computed(() => `https://${reachBaseDomain.value}/settings?tab=your-plan`),
reachCampaignsLink: computed(() => `https://${reachBaseDomain.value}/campaigns`),
reachTemplatesLink: computed(() => `https://${reachBaseDomain.value}/templates`),
reachSettingsLink: computed(() => `https://${reachBaseDomain.value}/settings`),
reachBaseDomain,
hpanelBaseDomain
};
};
@@ -0,0 +1,43 @@
import { ref } from 'vue';
const scrollLockCount = ref(0);
const originalBodyStyles = ref<{
overflow: string;
paddingRight: string;
} | null>(null);
export const useScrollLock = () => {
const lockScroll = () => {
scrollLockCount.value++;
if (scrollLockCount.value === 1) {
originalBodyStyles.value = {
overflow: document.body.style.overflow,
paddingRight: document.body.style.paddingRight
};
const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
document.body.style.overflow = 'hidden';
if (scrollbarWidth > 0) {
document.body.style.paddingRight = `${scrollbarWidth}px`;
}
}
};
const unlockScroll = () => {
scrollLockCount.value = Math.max(0, scrollLockCount.value - 1);
if (scrollLockCount.value === 0 && originalBodyStyles.value) {
document.body.style.overflow = originalBodyStyles.value.overflow;
document.body.style.paddingRight = originalBodyStyles.value.paddingRight;
originalBodyStyles.value = null;
}
};
return {
lockScroll,
unlockScroll,
isLocked: () => scrollLockCount.value > 0
};
};
@@ -0,0 +1,148 @@
import { computed, ref } from 'vue';
import type { PaginatedResponse } from '@/data/repositories/pagesRepo';
export interface ServerPaginationOptions {
itemsPerPage?: number;
initialPage?: number;
autoLoad?: boolean;
}
export interface ServerPaginationState {
currentPage: number;
totalPages: number;
totalItems: number;
itemsPerPage: number;
isLoading: boolean;
hasError: boolean;
error: unknown;
}
export const useServerPagination = <T>(
fetchFunction: (page: number, perPage: number) => Promise<[PaginatedResponse<T[]> | null, unknown]>,
options: ServerPaginationOptions = {}
) => {
const { itemsPerPage = 5, initialPage = 1, autoLoad = true } = options;
const currentPage = ref(initialPage);
const totalPages = ref(0);
const totalItems = ref(0);
const items = ref<T[]>([]);
const isLoading = ref(false);
const hasError = ref(false);
const error = ref<unknown>(null);
const hasPrevious = computed(() => currentPage.value > 1);
const hasNext = computed(() => currentPage.value < totalPages.value);
const isEmpty = computed(() => !isLoading.value && items.value.length === 0);
const startIndex = computed(() => (currentPage.value - 1) * itemsPerPage + 1);
const endIndex = computed(() => Math.min(currentPage.value * itemsPerPage, totalItems.value));
const pageRange = computed(() => ({
from: startIndex.value,
to: endIndex.value,
total: totalItems.value
}));
const loadData = async (page: number = currentPage.value) => {
isLoading.value = true;
hasError.value = false;
error.value = null;
try {
const [result, err] = await fetchFunction(page, itemsPerPage);
if (err) {
hasError.value = true;
error.value = err;
items.value = [];
return false;
}
if (!result) {
return false;
}
items.value = result.data;
currentPage.value = result.pagination.currentPage;
totalPages.value = result.pagination.totalPages;
totalItems.value = result.pagination.totalItems;
return true;
} catch (err) {
hasError.value = true;
error.value = err;
items.value = [];
return false;
} finally {
isLoading.value = false;
}
};
const goToPage = async (page: number) => {
if (page >= 1 && page <= totalPages.value && page !== currentPage.value && !isLoading.value) {
await loadData(page);
}
};
const goToFirstPage = async () => {
await goToPage(1);
};
const goToLastPage = async () => {
await goToPage(totalPages.value);
};
const goToPreviousPage = async () => {
if (hasPrevious.value) {
await goToPage(currentPage.value - 1);
}
};
const goToNextPage = async () => {
if (hasNext.value) {
await goToPage(currentPage.value + 1);
}
};
const setPage = (page: number) => goToPage(page);
const nextPage = () => goToNextPage();
const prevPage = () => goToPreviousPage();
const refresh = async () => {
await loadData(currentPage.value);
};
if (autoLoad) {
loadData(initialPage);
}
return {
currentPage,
totalPages,
totalItems,
itemsPerPage,
items,
isLoading,
hasError,
error,
hasPrevious,
hasNext,
isEmpty,
startIndex,
endIndex,
pageRange,
loadData,
goToPage,
setPage,
nextPage,
prevPage,
goToFirstPage,
goToLastPage,
goToPreviousPage,
goToNextPage,
refresh
};
};
@@ -0,0 +1,49 @@
import { useHToast } from '@hostinger/hcomponents';
let globalToastService: ReturnType<typeof useHToast> | null = null;
export const useToast = () => {
if (!globalToastService) {
globalToastService = useHToast();
}
const showSuccess = (message: string, sticky = false) => {
globalToastService?.add({
message,
severity: 'success',
sticky
});
};
const showError = (message: string, sticky = false) => {
globalToastService?.add({
message,
severity: 'failure',
sticky
});
};
const showInfo = (message: string, sticky = false) => {
globalToastService?.add({
message,
severity: 'info',
sticky
});
};
const showWarning = (message: string, sticky = false) => {
globalToastService?.add({
message,
severity: 'warning',
sticky
});
};
return {
showSuccess,
showError,
showInfo,
showWarning,
toastService: globalToastService
};
};
@@ -0,0 +1,25 @@
import { translate } from '@/utils/translate';
export interface FAQItem {
id: string;
question: string;
answer: string;
}
export const faqData: FAQItem[] = [
{
id: 'what-is-reach',
question: translate('hostinger_reach_faq_what_is_reach_question'),
answer: translate('hostinger_reach_faq_what_is_reach_answer')
},
{
id: 'how-different',
question: translate('hostinger_reach_faq_how_different_question'),
answer: translate('hostinger_reach_faq_how_different_answer')
},
{
id: 'how-much-cost',
question: translate('hostinger_reach_faq_how_much_cost_question'),
answer: translate('hostinger_reach_faq_how_much_cost_answer')
}
];
@@ -0,0 +1,25 @@
import type { Integration } from '@/types/models';
export const HOSTINGER_REACH_ID = 'hostinger-reach';
export const WOOCOMMERCE_ID = 'woocommerce';
export const PLUGIN_STATUSES = {
ACTIVE: 'active',
INACTIVE: 'inactive'
} as const;
export type PluginStatus = (typeof PLUGIN_STATUSES)[keyof typeof PLUGIN_STATUSES];
export interface PluginInfo {
id: string;
icon: string;
isViewFormHidden: boolean;
isEditFormHidden: boolean;
}
export const getPluginInfo = (integration: Integration): PluginInfo => ({
id: integration.id,
icon: integration?.icon || '',
isViewFormHidden: integration?.isViewFormHidden || true,
isEditFormHidden: integration?.isEditFormHidden || false
});

Some files were not shown because too many files have changed in this diff Show More