<style>
.popout-ad {
max-height: 400px;
min-height: 200px;
position: fixed;
right: -510px;
display: flex;
flex-direction: row;
z-index: 15;
background: white;
bottom: 15%;
padding-right: 20px;
/*height: 120px;*/
box-shadow: -4px 9px 20px 0px #00000078;
transition: 1s ease-in-out;
cursor: pointer;
width: 565px;
max-height: 400px;
overflow: hidden;
}
.popout-ad:hover {
right: 0;
}
#rc-wrapper {
top: 0;
bottom: 0;
left: 0;
right: 0;
overflow: auto;
position: absolute;
display: flex;
}
#rc-center {
/*width: 300px;
height: 300px;*/
/*background-color: yellow;*/
/*margin: auto;*/
}
@media (max-width: 767px) {
.popout-ad {
display: none;
}
}
</style>
{% if popout %}
<div class="popout-ad" id="poa-container">
<p class="standard-bg-dark" style="writing-mode:vertical-rl; transform: rotate(180deg); text-align:center; margin:0; padding:15px; color:white">
{% if popout.getDisplayTitle() %}
{{ popout.getDisplayTitle() }}
{% else %}
{% if customer %}
{{ customer.getTitle() }}
{% endif %}
{% endif %}
</p>
<div class="row" style="width:100%">
<div class="col-sm-4">
<div style="height:100%; display: flex; flex-direction: column; justify-content: center; align-items: center;">
{% if popout.getMedia() %}
{{ popout.getMediaImageTag("", "width: 100%; margin: 15px 5px; height: fit-content;")|raw }}
{% elseif customer and customer.getMedia() %}
{% if popout.getExternalUrl() %}
<a href="{{popout.getExternalUrl()}}" data-mitem-id="{{popout.getId()}}">
{% endif %}
{{ customer.getMedia().getImageTag("", "width: 100%; margin: 15px 5px; height: fit-content", popout.getId())|raw }}
{% if popout.getExternalUrl() %}
</a>
{% endif %}
{% endif %}
</div>
</div>
<div class="col-sm-8">
<div id="rc-wrapper">
<div id="rc-center">
{% if popout.getPopOutPoll() and popout.getPopOutPoll().isReallyActive() %}
{#<div id="popout-poll" class="home-poll home-poll-rcs" style="margin-bottom:15px;">#}
<div id="home-poll" class="home-poll home-poll-rcs" style="margin-bottom:15px;">
{{ "[poll site='RoofCoffeeShop' id='#{popout.getPopOutPoll().getId()}' directory='yes']" | wordpress | raw }}
</div>
<div id="pollReplacementAd" style="display:none;">
<p>{{popout.getDescription() | wordpress | raw}}</p>
</div>
{% else %}
<p>{{popout.getDescription() | wordpress | raw}}</p>
{#{% if customer.getDirectoryContent() %}
<a href="{{customer.getDirectoryContent().getURL()}}">Learn More</a>
{% endif %}#}
{% endif %}
</div>
</div>
</div>
</div>
</div>
{% else %}
{#
<div class="popout-ad" id="poa-container">
<p style="writing-mode:vertical-rl; transform: rotate(180deg); padding-bottom:10px; text-align:center;">RoofersCoffeeShop®</p>
<div class="row">
<div class="col-md-5">
<img src="https://www.rooferscoffeeshop.com/assets/img/Roofers-Coffee-Shop-Logo-R.png" alt="" style="margin-top:60px" />
</div>
<div class="col-md-7">
<div id="part1" style="margin-top:25px;">
<p>How likely are you to recommend us to a friend or colleague?</p>
<p><input id="pi_input" type="range" class="slider" min="0" max="10" step="1" style="width:100%;"/></p>
<div class="row">
<div class="col-md-6" style="font-size:16px;padding-left:40px;">
Rating: <output id="value"></output>
</div>
<div class="col-md-6">
<input type="buttom" class="button" value="Submit" id="popSubmit" style="width:100px;">
</div>
</div>
</div>
<div id="part2" style="display:none">
<div style="margin-top:50px;">
<h3>Thank you for your feedback!</h3>
<p>Visit the <a href="/our-directory">RCS Directory</a> to see more from our partners!</p>
</div>
</div>
</div>
</div>
</div>
<style>
.slider {
-webkit-appearance: none;
width: 100%;
height: 10px;
background: #d3d3d3;
outline: none;
opacity: 0.7;
-webkit-transition: .2s;
transition: opacity .2s;
}
.slider:hover {
opacity: 1;
}
.slider::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 20px;
height: 20px;
background: #a41822;
cursor: pointer;
}
</style>
<script>
(function ($) {
$(function () {
//Temp default pop-out
const value = document.querySelector("#value")
const input = document.querySelector("#pi_input")
value.textContent = input.value
input.addEventListener("input", (event) => {
value.textContent = event.target.value
})
$('#popSubmit').click(function() {
$('#part1').hide();
$('#part2').show();
});
});
}(jQuery));
</script>
#}
{% endif %}
<script>
(function ($) {
$(function () {
//Adjust height of pop-out ad
$('#poa-container').height($('#rc-center').height()) ;
});
}(jQuery));
</script>