Skip to content

Instantly share code, notes, and snippets.

@unruthless
unruthless / global_nav_behaviors.js
Created August 2, 2010 15:35
jQuery snippet to handle global navigation behavior
/*
* Global Navigation Behaviors
*
* @author Ruthie BenDor
* @updated 2-Aug-2010
*
* See in use on http://www.glad.org/styles/test
* How can I make this better?
*
*/
@unruthless
unruthless / .htaccess
Created July 15, 2010 22:12
.htaccess file in use on an EE website with HTML5 markup and versioned static assets.
# === ENABLE mod_rewrite =========================================
RewriteEngine on
# === SECURITY TWEAKS ============================================
# --- Stop malicious visitors from viewing -------
# --- your .htaccess rules in the browser. -------
<Files .htaccess>
@unruthless
unruthless / CSS for <sup> and <sub>
Created May 26, 2010 01:31
CSS for <sub> and <sup>
sub, sup {
/* Specified in % so that the sup/sup is the
right size relative to the surrounding text */
font-size: 75%;
/* Zero out the line-height so that it doesn't
interfere with the positioning that follows */
line-height: 0;
/* Where the magic happens: makes all browsers position
@unruthless
unruthless / detail
Created May 22, 2010 15:54 — forked from anonymous/detail
EE template: blog/detail
{!-- Segment_2 isn't blank, so show a blog post's details --}
{if segment_2 != ""}
{exp:channel:entries channel="blog" url_title="{segment_2}"}
{!-- If no results,
then segment_2 isn't a URL title for any existing blog post (typo? broken link?),
so redirect to the landing page --}
{if no_results}
@unruthless
unruthless / index
Created May 22, 2010 15:51 — forked from anonymous/index
EE template: blog/index
{exp:channel:entries channel="blog" limit="10"}
<div class="post">
<h2 class="postTitle"><a href="{url_title_path='blog/detail'}">{title}</a></h2>
<p>Posted {entry_date format='%m/%d'} by {screen_name} </p>
{summary}
@unruthless
unruthless / index
Created May 22, 2010 14:20
EE template: combined index and detail page
...
{!-- Segment_2 isn't blank, so show a blog post's detail page --}
{if segment_2 != ""}
<h1>Single Post</h1>
{exp:channel:entries channel="blog" url_title="{segment_2}"}
{!-- If segment_2 isn't a URL title for any existing blog post, redirect to the landing page --}