Skip to content

Instantly share code, notes, and snippets.

View objectivehtml's full-sized avatar

Justin Kimbrell objectivehtml

View GitHub Profile
@grumpysi
grumpysi / Install Imagemagick PHP 7.0
Last active January 28, 2020 13:58
Install Imagemagick on Laravel Homestead box Ubuntu 14 + PHP 7.0
sudo apt-get update && sudo apt-get install -y imagemagick php-imagick && sudo service php7.0-fpm restart && sudo service apache2 restart
@objectivehtml
objectivehtml / index.html
Created November 11, 2013 22:13
Channel Search - Search by Categories
<h3>Categories</h3>
{exp:channel_search:form id="Category Search" method="post"}
<ul>
{categories}
<li><label><input type="checkbox" name="category[]" value="{category_url_title}" {checked} /> {category_name}</label></li>
{/categories}
</ul>
@objectivehtml
objectivehtml / ajax-color.html
Created November 11, 2013 21:22
Channel Search - Search by Color
{exp:channel_search:results id="Color Search" orderby="color_proximity" sort="asc"}
{if no_results}
<p>There are no matching photos found.</p>
{/if}
{if has_searched}
{color_photo}
{/if}
@objectivehtml
objectivehtml / index.html
Last active December 27, 2015 22:49
Channel Search - Search by Proximity
<h3>Map</h3>
{exp:gmap:init id="map" center="United States" zoom="3" style="width:400px;height:300px" class="gmap"}
<hr>
<h3>Form</h3>
{exp:channel_search:form id="Geolocation"}
<div class="row">
@objectivehtml
objectivehtml / ajax-current-location.html
Created November 10, 2013 18:10
Channel Search - Search by Current Location
{exp:channel_search:results id="Geolocation" orderby="distance" sort="asc" limit="5"}
{if is_first_row}
{if prev_page || next_page}
<div class="pagination right">
{if prev_page_url}
<a href="{prev_page_url}"><i class="icon-circle-arrow-left"></i> Prev Page</a>
{/if}
@objectivehtml
objectivehtml / index.html
Last active December 27, 2015 20:59
Channel Search - Creating Custom URL's
<h3>Types of Locations</h3>
<ul>
<li><a href="/channel-search/examples/creating-custom-urls">All Locations</a></li>
<li><a href="/channel-search/examples/creating-custom-urls/restaurants">Restaurants</a></li>
<li><a href="/channel-search/examples/creating-custom-urls/lodging">Logding</a></li>
<li><a href="/channel-search/examples/creating-custom-urls/landmark">Landmarks</a></li>
<li><a href="/channel-search/examples/creating-custom-urls/park">Parks</a></li>
</ul>
@objectivehtml
objectivehtml / index.html
Last active December 27, 2015 20:59
Channel Search - Basic Usage Example (Multiple Fields)
<h3>Form</h3>
{exp:channel_search:form id="Basic Usage Multi"}
<div class="row">
<div class="nine columns">
<div class="row">
<div class="nine columns">
<label for="q">Keywords</label>
<input type="text" name="q" id="q" value="{form:q}" />
</div>
@objectivehtml
objectivehtml / index.html
Last active December 27, 2015 20:49
Channel Search - Basic Usage (Single Field)
<h3>Form</h3>
{exp:channel_search:form id="Basic Usage"}
<div class="row">
<div class="nine columns">
<div class="row collapse">
<div class="nine columns">
<input type="text" name="q" id="q" value="{form:q}" placeholder="Keywords" />
</div>
<div class="three columns">
{exp:stash:set no_results_prefix="nested_" parse_tags="yes"}
{stash:page_title}Contacts{/stash:page_title}
{stash:form}
<div id="basic">
{exp:channel_search:form id="Member Basic" class="search clearfix"}
<div class="basic clearfix">
@drewwells
drewwells / gist:4219907
Created December 5, 2012 22:02
Webkit+Moz detect device pixel ratio
var ratio = window.devicePixelRatio ||
(function(i){
var wmq = window.matchMedia;
while( !window.devicePixelRatio && i > 0 &&
!wmq("(min--moz-device-pixel-ratio:" + i/10 + ")").matches ){
i=i-1;
}
return i/10;
})(30);