Skip to content

Commit

Permalink
Merge pull request #32 from OblivionCloudControl/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
jakubnakielskixebia authored Nov 23, 2023
2 parents eb157e0 + 3b89c0f commit 0d9f8ca
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/xebia_email_signature/static/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
body {
font-family: "Proxima", Helvetica, sans-serif;
color: var(--xebia-neutral-dark-grey, #5A5A5A);
background: url('/static/main-bg.svg') var(--xebia-tranquil-velvet, #6C1D5F) fixed;
background: url('/static/main-bg.svg') no-repeat fixed 0 0/cover var(--xebia-tranquil-velvet, #6C1D5F);
}

.main {
Expand Down
13 changes: 10 additions & 3 deletions src/xebia_email_signature/templates/new_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,10 @@ <h1 class="site-title">Email Signature Generator</h1>
type="text"
id="phone"
name="phone"
placeholder="+00 000 000 000"
onchange="validatePhoneNumber();"
placeholder="+00000000000"
oninput="handleChangePhoneNumber(this)"
minlength="11"
maxlength="16"
/>
<div id="phone-error" class="error"></div>
</div>
Expand Down Expand Up @@ -124,7 +126,7 @@ <h1 class="site-title">Email Signature Generator</h1>
type="text"
id="sm-0-link"
name="sm[0][link]"
placeholder="https://www.linkedin.com/company/xebia"
placeholder="https://www.linkedin.com/company/profile"
/>
<div id="sm-link-error" class="error"></div>
</div>
Expand Down Expand Up @@ -602,6 +604,11 @@ <h2 class="preview-header">Preview:</h2>
});
}

function handleChangePhoneNumber(phoneEl) {
let phoneVal = phoneEl.value;
phoneEl.value = phoneVal.replace(/[^\d\+]/g, '');
}

(() => {
allCloneInit();
allSelectInit();
Expand Down
24 changes: 12 additions & 12 deletions src/xebia_email_signature/templates/new_signature.html.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<title></title>
</head>

<body style="font-size: 11pt; font-family: Arial, sans-serif; ">
<body style="font-size: 11px; font-family: Arial, sans-serif; ">
<table summary="contact details">
<tr style="line-height: 1">
<td style="padding-right: 10px">
Expand Down Expand Up @@ -121,31 +121,31 @@
src="{{ url_for('static', _external=True, _scheme=data['scheme'], filename='email-logo-yt.png') }}"
alt="YouTube" name="YouTube" /></a>
</p>
<span style="
{% for call in data['call_to_action'] %}
<p style="
font-family: Arial;
font-size: 8pt;
font-size: 8px;
font-style: normal;
font-weight: 400;
line-height: 100%; /* 7px */
line-height: 100%;
color: #5a5a5a;
margin: 0;
margin: 0 0 2px;
">
{% for call in data['call_to_action'] %}
{% if call and call['icon'] and call['desc'] and call['link'] %}
{% if call['icon'] == 'blog' %}
<img width="10" height="9"
<img width="10" height="9" style="vertical-align: middle;"
src="{{ url_for('static', _external=True, _scheme=data['scheme'], filename='email-cta-icon-blog.png') }}" />
{% endif %}
{% if call['icon'] == 'meeting' %}
<img width="10" height="9"
<img width="10" height="9" style="vertical-align: middle;"
src="{{ url_for('static', _external=True, _scheme=data['scheme'], filename='email-cta-icon-meeting.png') }}" />
{% endif %}
{% if call['icon'] == 'event' %}
<img width="10" height="9"
<img width="10" height="9" style="vertical-align: middle;"
src="{{ url_for('static', _external=True, _scheme=data['scheme'], filename='email-cta-icon-event.png') }}" />
{% endif %}
{% if call['icon'] == 'award' %}
<img width="10" height="9"
<img width="10" height="9" style="vertical-align: middle;"
src="{{ url_for('static', _external=True, _scheme=data['scheme'], filename='email-cta-icon-award.png') }}" />
{% endif %}
<a href="{{call['link']}}" style="color: #5a5a5a;">
Expand All @@ -155,8 +155,8 @@
</a>
<br />
{% endif %}
{% endfor %}
</span>
</p>
{% endfor %}
</td>
</tr>
</table>
Expand Down

0 comments on commit 0d9f8ca

Please sign in to comment.