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
<% data.stories.each_slice(4) do |chunk| %> | |
<div class="m-box"> | |
<% chunk.each do |d| %> | |
<div class="m-boxes__quarter" style="background-image: url('<%= d.image %>');"> | |
<h6><a href="<%= d.url %>" target="new"><%= d.headline %></a></h6> | |
</div> | |
<% end %> | |
</div> | |
<% 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
<div style="width: 970px; margin: 0 auto; clear: both;"> | |
<!-- ad markup goes here --> | |
</div> |
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
<a href="javascript:(function($) {var ad = $('<p>').css({ backgroundColor: 'red', height: '0' }); $('#article-body, .entry-body').first().find('p, h1, h2, h3, h4, h5, h6, blockquote').eq(2).before(ad); ad.animate({ height: '250px' }, 'fast'); })(jQuery)">Test mid-body ad</a> | |
<p>^---- Drag this to your bookmarks toolbar.</p> | |
<p>Click it on any chorus article page to insert a red box where the ad would appear.</p> | |
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
{ | |
"startLength": 0, | |
"endLength": 394, | |
"ops": [ | |
{ | |
"value": "Quill Rich Text Editor", | |
"attributes": { | |
"size": "18px" | |
} | |
}, |
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
$schema: 'http://json-schema.org/draft-04/schema#' | |
type: object | |
properties: | |
ops: | |
type: array | |
items: | |
oneOf: | |
- type: object | |
properties: | |
insert: |
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
{ | |
type: 'embed', | |
tag: 'IFRAME', | |
add: function(node, data) { | |
node.classList.add('pullquote'); | |
node.setAttribute('data-pullquote', data.value); | |
node.setAttribute('src', '/iframe/pullquote.html'); | |
return node; | |
}, | |
remove: function(node) { |
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
{ | |
type: 'embed', | |
tag: 'IFRAME', | |
add: function(node, value) { | |
node.classList.add('image'); | |
node.setAttribute('data-src', value.src); | |
node.setAttribute('data-caption', value.caption); | |
node.setAttribute('src', '/iframe/image.html'); | |
return node; | |
}, |
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
def fix(records, params, matcher) | |
params = params.deep_dup | |
records.each do |record| | |
if p.any? { |attrs| attrs['id'].present? && attrs['id'].to_i == record.id } | |
next | |
elsif (new_attrs = p.detect { |attrs| attrs['id'].blank? && attrs[matcher].present? && attrs[matcher].to_i == record[matcher] }) | |
new_attrs['id'] = record.id | |
else | |
p << { '_destroy' => true, 'id' => record.id } |
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 countCSSRules() { | |
var results = '', | |
log = ''; | |
if (!document.styleSheets) { | |
return; | |
} | |
for (var i = 0; i < document.styleSheets.length; i++) { | |
countSheet(document.styleSheets[i]); | |
} | |
function countSheet(sheet) { |
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 compileTemplates = function() { | |
_.each(App.Views, function(View) { | |
if (View.prototype.templateId) { | |
// The templateId references the id of a DOM element containing | |
// the content of the template | |
var html = jQuery('#' + View.prototype.templateId).html() || ''; | |
View.prototype.template = _.template(html); | |
} | |
}); | |
} |
OlderNewer