Skip to content

Commit

Permalink
Load css from external location
Browse files Browse the repository at this point in the history
  • Loading branch information
vilgro committed Sep 7, 2018
1 parent b7417f3 commit 0fe6b93
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 40 deletions.
5 changes: 0 additions & 5 deletions Block/System/Config/Preview.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ public function getXPathValue()
return $this->_helper->getTrustboxConfigValue('trustbox_xpath');
}

public function getIframeCssUrl()
{
return $this->getViewFileUrl('Trustpilot_Reviews::css/trustpilot-iframe.css');
}

public function getPreviewUrl()
{
return $this->_previewUrl;
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "trustpilot/module-reviews",
"description": "The Trustpilot Review extension makes it simple and easy for merchants to collect reviews from their customers to power their marketing efforts, increase sales conversion, build their online reputation and draw business insights.",
"type": "magento2-module",
"version": "1.0.214",
"version": "1.0.216",
"license": [
"OSL-3.0"
],
Expand Down
2 changes: 1 addition & 1 deletion etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<ConnectUrl>https://ecommerce-invitations.b2b.trustpilot.com/#/magento</ConnectUrl>
<SnippetUrl>https://businessapp.b2b.trustpilot.com/#/integrations/trustbox/library</SnippetUrl>
<PreviewUrl>//ecommplugins-scripts.trustpilot.com/</PreviewUrl>
<ReleaseNumber>1.0.214</ReleaseNumber>
<ReleaseNumber>1.0.216</ReleaseNumber>
<key></key>
</general>
</trustpilotGeneral>
Expand Down
2 changes: 1 addition & 1 deletion view/adminhtml/templates/system/config/preview.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
data-trustpilot_trustbox_category="<?php echo $this->getPageUrl('trustpilot_trustbox_category'); ?>"
data-trustpilot_trustbox_product="<?php echo $this->getPageUrl('trustpilot_trustbox_product'); ?>"
id="trustbox_preview_frame"
onload="TrustpilotPreview.init('<?php echo $this->getIframeCssUrl(); ?>');"
onload="TrustpilotPreview.init('<?php echo $this->getPreviewUrl(); ?>css/trustpilot-iframe.css');"
frameborder="0"
width="100%"
height="800">
Expand Down
25 changes: 0 additions & 25 deletions view/adminhtml/web/css/trustpilot-iframe.css

This file was deleted.

10 changes: 3 additions & 7 deletions view/frontend/layout/default.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<referenceContainer name="header.container">
<block class="Trustpilot\Reviews\Block\Head" name="trustpilot.header.head" as="trustpilot.header.head" template="Trustpilot_Reviews::header/head.phtml"/>
</referenceContainer>
<head>
<css src="Trustpilot_Reviews::css/trustpilot.css"/>
<css src="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" src_type="url" />
</head>
<body>
<referenceContainer name="header.container">
<block class="Trustpilot\Reviews\Block\Head" name="trustpilot.header.head" as="trustpilot.header.head"
template="Trustpilot_Reviews::header/head.phtml"/>
</referenceContainer>
</body>
</page>
2 changes: 2 additions & 0 deletions view/frontend/web/css/trustpilot.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import url('https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');

.shake-and-hide-element {
-moz-animation: hide-element 0s ease-in 5s forwards, shake-element 1s;
/* Firefox */
Expand Down

0 comments on commit 0fe6b93

Please sign in to comment.