Created
August 11, 2015 13:56
-
-
Save Chizh/63395d258eccc71d01b6 to your computer and use it in GitHub Desktop.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Retail Rocket виджеты</title> | |
<link rel="stylesheet" href="//local.retailrocket.ru/content/css/retailrocket.widget.css"> | |
<script> | |
var rrPartnerId = "550f12f91e99471c1446d760"; | |
var rrApi = {}; | |
var rrApiOnReady = rrApiOnReady || []; | |
rrApi.addToBasket = rrApi.order = rrApi.categoryView = rrApi.view = rrApi.recomMouseDown = rrApi.recomAddToCart = function () { }; | |
(function (d) { | |
var ref = d.getElementsByTagName('script')[0]; | |
var apiJs, apiJsId = 'rrApi-jssdk'; | |
if (d.getElementById(apiJsId)) return; | |
apiJs = d.createElement('script'); | |
apiJs.id = apiJsId; | |
apiJs.async = true; | |
apiJs.src = "//cdn.retailrocket.ru/content/javascript/api.js"; | |
ref.parentNode.insertBefore(apiJs, ref); | |
}(document)); | |
</script> | |
</head> | |
<body style="background-color: whitesmoke;"> | |
<div class="retailrocket-widget" | |
data-algorithm="popular" | |
data-algorithm-argument="0" | |
data-algorithm-ver="1" | |
data-number-of-items="5" | |
data-image-width="100" | |
data-image-height="100" | |
data-textoverflowhidden="true" | |
data-retailrocket-morebutton="false" | |
data-retailrocket-buybutton="true" | |
data-item-add-to-basket-action="" | |
data-header-text="ПОХОЖИЕ ПРЕДЛОЖЕНИЯ"> | |
</div> | |
<style> | |
.rrHeader { | |
margin: 0 0 0px; | |
padding: 20px 30px 20px; | |
position: relative; | |
font-size: 16px; | |
color: #404040; | |
text-transform: uppercase; | |
letter-spacing: 2px; | |
border-top: 2px dashed #afafaf; | |
} | |
.rrContainer { | |
width: auto !important; | |
overflow: hidden; | |
margin-left: 10px; | |
padding: 0 10px 20px 10px; | |
box-sizing: border-box; | |
} | |
.rrItem { | |
float: left; | |
width: 20%; | |
/*text-align: center;*/ | |
} | |
.rrItem a { | |
border: none; | |
} | |
.rrImg { | |
max-width: 90%; | |
min-height: 100px; | |
max-height: 120px; | |
} | |
.rrText { | |
margin: 5px 0 5px 10px; | |
/*margin: 5px 0 5px 0; | |
padding-left: 20px; | |
padding-right: 20px;*/ | |
} | |
.rrPrice { | |
font-size: 18px; | |
font-weight: bold; | |
color: #ff8c00; | |
} | |
.rrMargin10 { | |
margin-left: 10px; | |
} | |
</style> | |
<script type="text/template" id="widget-template"> | |
<div class="rrHeader"> | |
<%=headerText%> | |
</div> | |
<div class="rrContainer"> | |
<% for (var i = 0; i < numberOfItems; ++i) with(items[i]) { %> | |
<div class="rrItem"> | |
<a class="rrMargin10" href="<%=Url%>" onmousedown="rrApi.recomMouseDown(<%=ItemId%>)"> | |
<img class="rrImg" src="<%=PictureUrl%>" alt="<%= Name %>" /> | |
</a> | |
<div class="rrText"> | |
<div class="note_item_link"> | |
<a href="<%=Url%>" onmousedown="rrApi.recomMouseDown(<%=ItemId%>)"><%= Name %></a> | |
</div> | |
<div class="note_item_addr"><%=TypePrefix%></div> | |
<div class="note_item_metro"> | |
<span class="metro_icon metro_line_sokolnicheskaya"></span><%=Model%> | |
</div> | |
</div> | |
<div class="rrPrice rrMargin10"> | |
<% Price = Price.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " ");%> | |
<div class="note_item_price"><%= Price %> <span class="rur">р<span>уб.</span></span></div> | |
</div> | |
</div> | |
<% } %> | |
</div> | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment