Skip to content

Instantly share code, notes, and snippets.

View jeremyboggs's full-sized avatar

Jeremy Boggs jeremyboggs

View GitHub Profile
<!DOCTYPE HTML>
<html>
<head>
<title>CSS Practice</title>
<style type="text/css">
</style>
</head>
<body>
<h1>CSS Practice</h1>
@jeremyboggs
jeremyboggs / filter_elements.php
Last active December 14, 2015 21:59
Hides elements unless an Omeka user is logged in.
<?php
/**
* Unset elements if there is not current authenticated user.
*/
function filter_elements($elementsBySet) {
/* An array of elements in sets to be hidden from non-authenticated users. */
$hiddenElements = array(
'Dublin Core' => array(
<meta name="viewport" content="width=device-width">
<?php
$string = '$(document).ready(function() {projekktor(".projekktor").setFile(' . $playlist . ');});';
queue_js_string($string);
?>
<?php if ($collection = get_collection_by_id(@$_GET['collection'])) {
echo $collection->name;
echo $collection->description;
} ?>
@jeremyboggs
jeremyboggs / back-to-top.js
Created January 21, 2013 14:48
Simple back-to-top button with jQuery.
/**
* Show or hide the button depending on the scroll position.
*/
function animateButton() {
var button = $('#back-to-top');
var scrollPosition = $(window).scrollTop();
if (scrollPosition > 400) {
button.fadeIn();
} else {
button.fadeOut();
@jeremyboggs
jeremyboggs / simple-search.scss
Created November 26, 2012 21:29
SCSS/Compass styles for a simple search form.
#search-form {
position:relative;
@include trailer(1);
input {
margin:0;
&[type=text] {
color: #555;
width:100%;
border: 0;
@jeremyboggs
jeremyboggs / remove_item_edit_form_element.php
Created November 6, 2012 16:44
Remove a form element in Omeka
<?php
add_filter(array('ElementForm', 'Item', 'Dublin Core', 'Title'), 'remove_form_item_title');
function remove_form_item_title($components, $args) {
$components['html'] = ''; // Set the html component to an empty string.
return $components;
}
@jeremyboggs
jeremyboggs / custom.php
Created November 6, 2012 14:22
Custom show_item_metadata function for Omeka that loops through an internal array of labels and their associated fields.
<?php
/**
* Show Item Metadata function that loops through an internal array of labels
* and their associated fields.
*
* @param Item|null $item
* @return string The HTML for the item metadata.
*/
function berlin_show_item_metadata($item = null)
@jeremyboggs
jeremyboggs / omeka-theme-checklist.md
Created November 2, 2012 17:17
Checklist for developing an Omeka theme

Omeka Theme Checklist

Checklist for developing an Omeka theme. Things to check, ensure they look and work OK.

  • Homepage
    • Display featured item
    • Display featured collection
    • Display recent items
  • Readability (A simple page with a variety of markup—headings, paragraphs, lists, blockquotes, links, etc.)
  • Items