This page is a collection of small examples of code that you might find useful while developing your appcropolis builder projects.
Basic Page
<!DOCTYPE html>
<html lang="en">
<head>
{{header}}{{/header}}
</head>
<body>
<!-- .appc-page -->
<div class="appc-page">
{{blocks}}
</div><!-- /.appc-page -->
{{footer}}{{/footer}}
</body>
</html>
Geolocation
{{geolocation assign_to="location"}}
<h2>Find realtors in {{$location.city}}</h2>
<!-- example output: Find realtors in Saint Louis -->
Isotope Javascript
/* js */
(function() {
try {
// init Isotope
var $grid = $('#isotope-example .grid').isotope({
itemSelector: '.element-item',
layoutMode: 'fitRows'
});
// bind filter button click
$('#isotope-example #filters button').on('click', function() {
// set active class
$(this).siblings().removeClass('active');
$(this).addClass('active');
// send filter option
var filterValue = $(this).attr('data-filter');
$grid.isotope({
filter: filterValue
});
});
} catch (e) {
if ('console' in window) {
console.log(e);
}
}
})();
Modal Popup
<a href="#" data-toggle="modal" data-target="#very-simple-modal">Open Simple Modal</a>
{{modal id="very-simple-modal"}}{{/modal}}