Skip to content
This repository has been archived by the owner on Jul 12, 2020. It is now read-only.

Commit

Permalink
Merge pull request #148 from goodlogik/shopify
Browse files Browse the repository at this point in the history
Integrated Shopify
  • Loading branch information
Leonid Medovyy authored Feb 13, 2020
2 parents 87e6ab9 + 4b2aeae commit 8706179
Show file tree
Hide file tree
Showing 5 changed files with 155 additions and 23 deletions.
19 changes: 11 additions & 8 deletions app/views/layouts/application.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,15 @@ html lang="en"

= link_to "Home", root_path, class: "item #{is_active?(root_path)}"
= link_to "Brands", brands_path, class: "item #{is_active?(brands_path)}"
= link_to 'Coin', coin_path, class: "item #{is_active?(coin_path)}"
= link_to "Platform", platform_path, class: "item #{is_active?(platform_path)}"
= link_to 'Careers', careers_path, class: "item #{is_active?(careers_path)}"
= link_to 'About', about_path, class: "item #{is_active?(about_path)}"

= item
.ui.button.fluid.red data-cb-type="portal" href="javascript:void(0)"
= icon 'lock'
| Account
= link_to coin_path, class: "ui button fluid purple #{is_active?(coin_path)}"
= icon 'dollar sign'
| Currency


.pusher
= segment 'vertical hero segment clearing '
Expand All @@ -126,13 +128,14 @@ html lang="en"
= icon 'large sidebar'
= menu class: 'right', only: :desktop
= link_to 'BRANDS', brands_path, class: "item #{is_active?(brands_path)}"
= link_to 'COIN', coin_path, class: "item #{is_active?(coin_path)}"
= link_to 'PLATFORM', platform_path, class: "item #{is_active?(platform_path)}"
= link_to 'CAREERS', careers_path, class: "item #{is_active?(careers_path)}"
= link_to 'ABOUT', about_path, class: "item #{is_active?(about_path)}"

= item
a.ui.button.purple href="javascript:void(0)" data-cb-type="portal"
= icon 'lock'
| ACCOUNT
= link_to coin_path, class: "ui button purple #{is_active?(coin_path)}"
= icon 'dollar sign'
| CURRENCY

= yield :hero
=yield
Expand Down
15 changes: 7 additions & 8 deletions app/views/pages/coin.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
= grid
= column computer: 14, tablet: 16, mobile: 14, class: 'centered content'
= h1 class: 'inverted'
| The fuel of independent media
| The independent media blockchain

= fragment 'coin details'
= container 'full'
= grid
= row
= column computer: 16, tablet: 16, mobile: 16, class: 'middle aligned'
= h1 'horizontal divider'
= "Powering New Economy"
= "The New Media Economy"
br
br
= row
Expand All @@ -43,12 +43,12 @@

= row
= column computer: 8, tablet: 16, mobile: 16, class: 'middle aligned'
= h2 text: 'Beyond Crypto'
= h2 text: 'Easy Payments'
= text 'lead'
| You don't need a PHD in cryptography to use our digital currency.
| The end-users wont need a PHD in cryptography to use our digital currency.

= text 'lead'
| Our integrated marketplace makes it easy to buy, spend and transfer coin.
| The integrated processing system will make it simple for users to pay for media and seamlessly buy coin using regular credit cards.

= text 'lead'
| No complex lingo, no wallets, no keys to manage and no hackers to worry about.
Expand All @@ -62,6 +62,5 @@
= "Get Notified"
= text
| Subscribe to our newsletter and get notified once the currency is for sale.
= link_to "Subscribe to Newsletter", pricing_path, class: 'ui button purple big'
br
br
/= link_to "Subscribe to Newsletter", pricing_path, class: 'ui button purple big'
= render 'partials/shopify'
2 changes: 1 addition & 1 deletion app/views/pages/platform.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
= container
= grid
= column computer: 12, tablet: 16, mobile: 14, class: 'centered content'
= h1 class: 'inverted', text: "An engine for digital storytelling"
= h1 class: 'inverted', text: "Engine for digital storytelling"

= fragment 'publishing'
= container
Expand Down
130 changes: 130 additions & 0 deletions app/views/partials/_shopify.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
<center>
<div id='product-component-1581553597000'></div>
</center>
<script type="text/javascript">
/*<![CDATA[*/
(function () {
var scriptURL = 'https://sdks.shopifycdn.com/buy-button/latest/buy-button-storefront.min.js';
if (window.ShopifyBuy) {
if (window.ShopifyBuy.UI) {
ShopifyBuyInit();
} else {
loadScript();
}
} else {
loadScript();
}
function loadScript() {
var script = document.createElement('script');
script.async = true;
script.src = scriptURL;
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(script);
script.onload = ShopifyBuyInit;
}
function ShopifyBuyInit() {
var client = ShopifyBuy.buildClient({
domain: 'goodlogik.myshopify.com',
storefrontAccessToken: '706d16a5ba6c863a8bff5b8b4a2a30c8',
});
ShopifyBuy.UI.onReady(client).then(function (ui) {
ui.createComponent('product', {
id: '4556161613961',
node: document.getElementById('product-component-1581553597000'),
moneyFormat: '%24%7B%7Bamount%7D%7D',
options: {
"product": {
"styles": {
"product": {
"@media (min-width: 601px)": {
"max-width": "calc(25% - 20px)",
"margin-left": "20px",
"margin-bottom": "0px"
}
},
"button": {
"font-family": "Lato, sans-serif",
"border-radius": "0px",
"background-color": "#B413EC",
"color": "#ffffff"
}
},
"contents": {
"img": false,
"title": false,
"price": false
},
"text": {
"button": "BUY GRAVITONS"
},
"googleFonts": [
"Lato"
]
},
"productSet": {
"styles": {
"products": {
"@media (min-width: 601px)": {
"margin-left": "-20px"
}
}
}
},
"modalProduct": {
"contents": {
"img": false,
"imgWithCarousel": true,
"button": false,
"buttonWithQuantity": true
},
"styles": {
"product": {
"@media (min-width: 601px)": {
"max-width": "100%",
"margin-left": "0px",
"margin-bottom": "0px"
}
},
"button": {
"font-family": "Lato, sans-serif",
"border-radius": "0px"
}
},
"googleFonts": [
"Lato"
],
"text": {
"button": "Add to cart"
}
},
"cart": {
"styles": {
"button": {
"font-family": "Lato, sans-serif",
"border-radius": "0px"
}
},
"text": {
"total": "Subtotal",
"button": "Checkout"
},
"googleFonts": [
"Lato"
]
},
"toggle": {
"styles": {
"toggle": {
"font-family": "Lato, sans-serif"
}
},
"googleFonts": [
"Lato"
]
}
},
});
});
}
})();
/*]]>*/
</script>
12 changes: 6 additions & 6 deletions frontend/packs/js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ exec_javascript = ->
render: (h) ->
h(AboutCover)

# feature_cover_div = document.getElementById("platform-cover")
# if feature_cover_div != null
# feature_cover = new Vue
# el: document.getElementById('platform-cover'),
# render: (h) ->
# h(PlatformCover)
platform_cover_id = document.getElementById("platform-cover")
if platform_cover_id != null
feature_cover = new Vue
el: document.getElementById('platform-cover'),
render: (h) ->
h(PlatformCover)

# Launching Analytics
analytics.page()
Expand Down

0 comments on commit 8706179

Please sign in to comment.