This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var issue = new Pressly.Issue('#issue', { | |
sectionNavSelector: "nav.links", | |
jumpToPageAfterLoad: 1, | |
jumpToPageDelay: 2000, | |
preloadFonts: [ | |
"FranklinGothic-MediumCond", | |
"FranklinGothic-DemiCompIta", | |
"FranklinGothic-DemiComp" | |
] | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- include shared libs here... --> | |
<script src='./javascripts/lib/jquery-1.6.2.min.js' type='text/javascript'></script> | |
<script src='./javascripts/lib/underscore-min.js' type='text/javascript'></script> | |
<!-- include source files here... --> | |
<script src='./javascripts/pressly.js/pressly.core.js' type='text/javascript'></script> | |
<script src='./javascripts/pressly.js/pressly.mipmap.js' type='text/javascript'></script> | |
<script src='./javascripts/pressly.js/pressly.gesture.js' type='text/javascript'></script> | |
<script src='./javascripts/pressly.js/pressly.swipe.js' type='text/javascript'></script> | |
<script src='./javascripts/pressly.js/pressly.page.js' type='text/javascript'></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getHeight(elementStyle) { | |
return parseInt(elementStyle.height) + parseInt(elementStyle["margin-top"]) + parseInt(elementStyle["margin-bottom"]); | |
} | |
function trimText(element, elementHeight, maxHeight) { | |
var tmpText = element.innerHTML; | |
var words = tmpText.split(" "); | |
var min = 0; | |
var max = words.length; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>CSS responsive images</title> | |
<style> | |
/* Doesn't stop original source image being | |
downloaded too */ | |
@media (min-device-width:600px) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<title>Stay Standalone</title> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | |
<script src="stay_standalone.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<ul> | |
<li><a href="http://google.com/">Remote Link (Google)</a></li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler' | |
Bundler.require | |
# Require your gem/lib | |
# require 'mygem' | |
require 'irb' | |
task :console do | |
# Connect and load the db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'bundler' | |
require 'rake' | |
require 'rspec/core/rake_task' | |
Bundler.setup | |
RSpec::Core::RakeTask.new(:spec) do |t| | |
# t.rspec_opts = ["-c", "-f progress", "-r ./spec/spec_helper.rb"] | |
t.pattern = 'spec/**/*_spec.rb' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class HashWithDotNotation < Hash | |
def initialize(constructor = {}) | |
if constructor.is_a?(Hash) | |
super() | |
self.replace(constructor) | |
else | |
super(constructor) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* RESET STYLES FROM BLUEPRINT */ | |
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;} | |
body {line-height:1.5;} | |
table {border-collapse:separate;border-spacing:0;} | |
caption, th, td {text-align:left;font-weight:normal;} | |
table, td, th {vertical-align:middle;} | |
blockquote:before, blockquote:after, q:before, q:after {content:"";} | |
blockquote, q {quotes:"" "";} | |
a img {border:none;} |