-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into charm-details-page
- Loading branch information
Showing
17 changed files
with
336 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
PORT=8029 | ||
FLASK_DEBUG=true | ||
DEVEL=True | ||
EXPERTS_RETURN=https://jaas.ai |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from urllib.request import urlretrieve | ||
|
||
search_url = 'https://api.jujucharms.com/v5/search?include=charm-metadata&include=bundle-metadata&include=owner&include=bundle-unit-count&include=promulgated&include=supported-series&text=apache2' | ||
urlretrieve(search_url, 'tests/store/json/search.json') | ||
|
||
charm_url = 'https://api.jujucharms.com/v5/apache2-26/meta/any?include=bundle-machine-count&include=bundle-metadata&include=bundle-unit-count&include=charm-actions&include=charm-config&include=charm-metadata&include=common-info&include=extra-info&include=owner&include=published&include=resources&include=supported-series&include=terms&include=manifest&include=stats' | ||
urlretrieve(charm_url, 'tests/store/json/charm.json') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
@param { String } modalId | ||
The DOM id of the element you'd like to turn into a modal. | ||
*/ | ||
if (!window.app.model) { | ||
window.app.modal = function(modalId) { | ||
const modal = document.querySelector(`#${modalId}`); | ||
const modalTrigger = document.querySelector(`[data-js=${modalId}Trigger]`); | ||
|
||
modalTrigger.onclick = function() { | ||
modal.classList.remove('p-modal--hidden'); | ||
}; | ||
|
||
const closeModal = document.querySelector(`#${modalId} [data-js=modalClose]`); | ||
closeModal.onclick = function() { | ||
modal.classList.add('p-modal--hidden'); | ||
}; | ||
|
||
modal.onclick = function(e) { | ||
modal.classList.add('p-modal--hidden'); | ||
}; | ||
|
||
document.querySelector(`.p-modal__dialog`).onclick = function(e) { | ||
e.stopPropagation(); | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
.p-modal { | ||
opacity: 1; | ||
visibility: visible; | ||
transition: visibility 0s, opacity 0.25s linear; | ||
position: fixed; | ||
top: 0; | ||
right: 0; | ||
bottom: 0; | ||
left: 0; | ||
z-index: 99999; | ||
|
||
ul, | ||
button { | ||
margin-bottom: 0; | ||
} | ||
|
||
&__header { | ||
max-height: 16px; | ||
} | ||
|
||
&__close { | ||
margin-left: auto; | ||
} | ||
|
||
&__dialog { | ||
max-width: 420px; | ||
overflow-y: scroll; | ||
} | ||
} | ||
|
||
.p-modal--hidden { | ||
opacity: 0; | ||
visibility: hidden; | ||
} | ||
|
||
.modal__divider { | ||
margin: 1rem 0; | ||
} | ||
|
||
.modal__contact-list { | ||
list-style: none; | ||
margin-left: 0; | ||
padding-left: 0; | ||
|
||
li { | ||
display: flex; | ||
margin-bottom: 0.25rem; | ||
|
||
a { | ||
padding-left: 0.5rem; | ||
} | ||
} | ||
|
||
img { | ||
display: block; | ||
padding-top: 0.25rem; | ||
} | ||
} | ||
|
||
.modal__button { | ||
display: flex; | ||
|
||
button { | ||
margin-left: auto; | ||
} | ||
} | ||
|
||
.icon-placeholder { | ||
display: inline-block; | ||
width: 16px; | ||
} | ||
|
||
.modal__tel-link { | ||
display: inline-block; | ||
margin-right: 0.5rem; | ||
} | ||
|
||
.modal__terms { | ||
font-size: 0.875rem; | ||
line-height: 1.25rem; | ||
} | ||
|
||
.submit-wrapper { | ||
display: flex; | ||
margin-top: 1rem; | ||
|
||
&__button { | ||
margin-left: auto; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,46 +23,9 @@ <h2 class="u-align--center u-vertically-center"> | |
<hr> | ||
<p>Please let us know if you have a question, or would like further information about Spicule.</p> | ||
<footer class="p-card__footer"> | ||
<a href="#_" data-js="show-btn" class="p-button--positive" | ||
onclick="dataLayer.push({ | ||
'event' : 'GAEvent', | ||
'eventCategory' : 'Experts', | ||
'eventAction' : 'Reveal contact details', | ||
'eventLabel' : 'Spicule' | ||
});"> | ||
Show contact details… | ||
</a> | ||
<div class="u-hide" data-js="contact-info"> | ||
<p> | ||
<a href="https://spicule.co.uk" class="link p-card__pre-footer"> | ||
<span> | ||
<img class="p-card__footer-icon" src="https://assets.ubuntu.com/v1/4f94bbf4-icon-web.svg" alt="Email icon"> | ||
</span> | ||
https://spicule.co.uk | ||
</a> | ||
</p> | ||
<p> | ||
<a href="mailto:[email protected]" class="link p-card__pre-footer"> | ||
<span> | ||
<img class="p-card__footer-icon" src="https://assets.ubuntu.com/v1/5e815088-icon-email.svg" alt="Email icon"> | ||
</span> | ||
[email protected] | ||
</a> | ||
</p> | ||
<p> | ||
<span class="link p-card__pre-footer"> | ||
<span> | ||
<img class="p-card__footer-icon" src="https://assets.ubuntu.com/v1/a52bd3b1-Icon-telephone.svg" alt="Telephone icon"> | ||
</span> | ||
<span> | ||
UK <a href="tel:+441603327762">+44 (0)1603 327762</a> | ||
</span> | ||
<span style="display:inline-block;margin-left:1.5rem"> | ||
US <a href="tel:+18448141689">+1 8448141689</a> | ||
</span> | ||
</span> | ||
</p> | ||
</div> | ||
<button data-js="leadGenerationModalTrigger" class="p-button--positive"> | ||
Get in touch | ||
</button> | ||
</footer> | ||
</div> | ||
</div> | ||
|
@@ -187,5 +150,6 @@ <h4> | |
</div> | ||
</div> | ||
</div> | ||
{% include "shared/_spicule_lead-gen-form.html" %} | ||
|
||
{% endblock content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{% extends "_layout.html" %} | ||
|
||
{% block title %}Juju expert - Your message has been successfully sent.{% endblock %} | ||
|
||
{% block content %} | ||
<div class="p-strip"> | ||
<div class="row"> | ||
<div class="col-8"> | ||
<h1>Thank you.</h1> | ||
<p>Your message has been successfully sent - we'll get back to you as soon as possible.</p> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col-8"> | ||
<p><a href="/">Return to the homepage.</a></p> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
{% endblock content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
<div data-js="contact-form" class="contact-form"> | ||
<div class="p-modal p-modal--hidden" id="leadGenerationModal"> | ||
<div class="p-modal__dialog" role="dialog" aria-labelledby="modal-title" aria-describedby="modal-description"> | ||
<header class="p-modal__header"> | ||
<button class="p-modal__close" aria-label="Close active modal" data-js="modalClose">Close</button> | ||
</header> | ||
<ul class="modal__contact-list"> | ||
<li class="modal__website"> | ||
<span> | ||
<img src="https://assets.ubuntu.com/v1/4f94bbf4-icon-web.svg" alt="Email icon"> | ||
</span> | ||
<a href="https://spicule.co.uk">https://spicule.co.uk</a> | ||
</li> | ||
<li class="modal__email"> | ||
<span> | ||
<img src="https://assets.ubuntu.com/v1/5e815088-icon-email.svg" alt="Email icon"> | ||
</span> | ||
<a href="mailto:[email protected]">[email protected]</a> | ||
</li> | ||
<li class="modal__tel"> | ||
<span> | ||
<img src="https://assets.ubuntu.com/v1/a52bd3b1-Icon-telephone.svg" alt="Email icon"> | ||
</span> | ||
<a class="modal__tel-link" rel="tel" href="tel:+441603327762">+44 (0) 1603 327762</a>(UK)</li> | ||
<li class="modal__tel"> | ||
<span class="icon-placeholder"> | ||
</span> | ||
<a class="modal__tel-link" rel="tel" href="tel:+18448141689">+1 (0) 8448 141689</a>(USA)</li> | ||
</ul> | ||
<hr class="modal__divider" /> | ||
<!-- MARKETO FORM --> | ||
<form action="https://pages.ubuntu.com/index.php/leadCapture/save" method="post" id="mktoForm_3355"> | ||
<ul class="p-list"> | ||
<li class="mktFormReq mktField"> | ||
<label for="FirstName" class="mktoLabel ">First Name:</label> | ||
<input required id="FirstName" name="FirstName" maxlength="255" type="text" | ||
class="mktoField mktoRequired mktoInvalid"> | ||
</li> | ||
<li class="mktFormReq mktField"> | ||
<label for="LastName" class="mktoLabel ">Last Name:</label> | ||
<input required id="LastName" name="LastName" maxlength="255" type="text" class="mktoField mktoRequired"> | ||
</li> | ||
<li class="mktFormReq mktField"> | ||
<label for="Email" class="mktoLabel ">Email address:</label> | ||
<input required id="Email" name="Email" maxlength="255" type="email" | ||
class="mktoField mktoEmailField mktoRequired"> | ||
</li> | ||
<li class="mktFormReq mktField" id="comments"> | ||
<label for="Comments_from_lead__c" class="mktoLabel "> | ||
{% if context and context.bundle.display_name %} | ||
How can we help with <strong>{{ context.bundle.display_name }}</strong>? | ||
{% else %} | ||
How can we help? | ||
{% endif %} | ||
</label> | ||
<textarea required id="Comments_from_lead__c" name="Comments_from_lead__c" rows="2" | ||
class="mktoField mktoRequired" maxlength="2000"></textarea> | ||
</li> | ||
<li class="mktField"> | ||
<label for="canonicalUpdatesOptIn" class="mktoLabel modal__terms"> | ||
In submitting this form, I confirm that I have read and agree to Canonical’s | ||
<a href="https://www.ubuntu.com/legal/data-privacy/contact?_ga=2.67215766.606903877.1552321043-1465573742.1527584293" | ||
target="_blank" | ||
data-saferedirecturl="https://www.google.com/url?q=https://www.ubuntu.com/legal/data-privacy/contact?_ga%3D2.67215766.606903877.1552321043-1465573742.1527584293&source=gmail&ust=1552667884381000&usg=AFQjCNG2NAncXIXBe9BeS4eWl3SKhAfjtg">Privacy | ||
Notice</a>, <a | ||
href="https://www.ubuntu.com/legal/data-privacy?_ga=2.67215766.606903877.1552321043-1465573742.1527584293" | ||
target="_blank" | ||
data-saferedirecturl="https://www.google.com/url?q=https://www.ubuntu.com/legal/data-privacy?_ga%3D2.67215766.606903877.1552321043-1465573742.1527584293&source=gmail&ust=1552667884381000&usg=AFQjCNFaakwcbzQ7aHxUkC1U3u7tSFkrPg">Privacy | ||
Policy</a>, <a href="https://spicule.co.uk/privacy-policy/" target="_blank" | ||
data-saferedirecturl="https://www.google.com/url?q=https://spicule.co.uk/privacy-policy/&source=gmail&ust=1552667884381000&usg=AFQjCNFw4NBu7Wc9ttZallMvNUNOhrU7gw">Spicule's | ||
Privacy Policy</a> and acknowledge that I may be contacted by Spicule and/or Canonical about my form and relevant information. | ||
</label> | ||
</li> | ||
<li class="mktField"> | ||
<input type="hidden" name="Consent_to_Processing__c" class="mktoField mktoFormCol" value="Yes"> | ||
</li> | ||
<li class="mktField submit-wrapper" style="display:flex;margin-top:1rem;"> | ||
<button type="submit" class="mktoButton submit-wrapper__button">Send message</button></span><input type="hidden" name="formid" | ||
class="mktoField " value="3359"><input type="hidden" name="lpId" class="mktoField " value=""><input | ||
type="hidden" name="subId" class="mktoField " value=""><input type="hidden" name="munchkinId" | ||
class="mktoField " value=""><input type="hidden" name="lpurl" class="mktoField " value=""><input | ||
type="hidden" name="cr" class="mktoField " value=""><input type="hidden" name="kw" class="mktoField " | ||
value=""><input type="hidden" name="q" class="mktoField " value=""> | ||
</li> | ||
</ul> | ||
<input type="hidden" name="returnURL" value="{{ expertThanksPage }}/experts/thanks" /> | ||
<input type="hidden" name="retURL" value="{{ expertThanksPage }}/experts/thanks" /> | ||
</form> | ||
<!-- /MARKETO FORM --> | ||
</div> | ||
</div> | ||
</div> | ||
<script src="/static/js/app/modal.js"></script> | ||
<script> | ||
window.app.modal('leadGenerationModal'); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.