Skip to content

Instantly share code, notes, and snippets.

View jeremyboggs's full-sized avatar

Jeremy Boggs jeremyboggs

View GitHub Profile
<div class="item">
<h2 class="item-title"><a href="http://example.com/items/show/1" rel="permalink">Item Title</a></h2>
<a href="http://example.com/items/show/1" class="image" rel="permalink"><img src="image.jpg"></a>
<p class="item-description">Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Fermentum vehicula
consectetur&hellip;. <a href="http://example.com/items/show/1">See more</a>.</p>
</div>
@jeremyboggs
jeremyboggs / display_recent_neatline_exhibits.php
Created August 7, 2013 21:11
Display five recent Neatline exhibits on your Omeka home page. (For Omeka 2.0.). Add this code to your theme's custom.php file.
<?php
function display_recent_neatline_exhibits() {
$html = '';
// Get our recent exhibits, limited to five.
$neatlineExhibits = get_records('NeatlineExhibit', array('recent' => true), 5);
// Set them for the loop.
set_loop_records('NeatlineExhibit', $neatlineExhibits);
@jeremyboggs
jeremyboggs / slab-hcard.html
Created August 1, 2013 17:01
Scholars’ Lab hCard markup
<address class="vcard">
<span class="org fn">
<a class="url organization-name" href="http://scholarslab.org">Scholars’ Lab</a>
<a class="organization-unit extended-address" href="http://lib.virginia.edu">University of Virginia Library</a>
</span>
<span class="street-address">P.O. Box 400129</span>,
<span class="locality">Charlottesville</span>, <abbr title="Virginia" class="region">VA</abbr> <span class="postal-code">22904-4129</span>
<span class="tel">434.243.8800 <abbr class="type" title="work">(T)</abbr></span>
<span class="tel">434.924.1431 <abbr class="type" title="fax">(F)</abbr></span>
<ul class="elsewhere">
@jeremyboggs
jeremyboggs / praxis-network.css
Created July 31, 2013 20:47
praxis-network.org deminified CSS.
@charset "UTF-8";
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
/**
* Returns a color based on a base color and color rule.
*
* $base-color: The color you want to start with.
* $color-rule: complementary, analogous, split-complementary, triad, right-triangle
* $color-direction: positive (clockwise around color wheel) or negative (counterclockwise)
*/
@function color-wheel($base-color, $color-rule, $color-direction: 'positive') {
$degrees: 0;
// Colors
$default-color : rgb(75,75,75);
$default-color-light : rgba($default-color, 0.75);
$default-color-lighter : rgba($default-color, 0.5);
$default-color-lightest : rgba($default-color, 0.1);
$link-color : darken(rgb(100,200,200), 10%);
$link-visited-color : darken($link-color, 10%);
$link-hover-color : adjust-hue($link-color, 0);
$link-focus-color : $link-hover-color;
@jeremyboggs
jeremyboggs / sort_items_by_title.php
Created June 4, 2013 14:20
Sort Omeka Items alphabetically by title by default.
<?php
function custom_item_browse_sql($select, $params) {
$sortField = 'Dublin Core,Title'; // 'Element Set Name, Element Name'
$sortDir = 'ASC'; //ASC or DESC
if (!isset($params['sort_field'])) {
$select->reset('order');
get_db()->getTable('Item')->applySorting($select, $sortField, $sortDir);
<!DOCTYPE HTML>
<html>
<head>
<title>Dropdowns</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script>
$(document).ready(function() {
$('header nav li').hover(
@jeremyboggs
jeremyboggs / convert_search_filters.php
Created April 23, 2013 13:48
Converts Omeka's advanced search output into acceptable input for findBy().
<?php
/**
* Converts the advanced search output into acceptable input for findBy().
*
* @see Omeka_Db_Table::findBy()
* @param array $query HTTP query string array
* @return array Array of findBy() parameters
*/
function neatlinetime_convert_search_filters($query) {
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
#map { height: 500px; }
</style>
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAzygx7txI_uXKJX1JD_czX7iH8BGRubI0&sensor=false">
</script>