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 parseTable() { | |
let rows = $$('.font-table tbody tr') | |
let step = row => row.querySelector('td:nth-of-type(1) strong') | |
let min = row => row.querySelector('td:nth-of-type(2)') | |
let max = row => row.querySelector('td:nth-of-type(3)') | |
let textContent = cell => cell.textContent | |
let toFloat = text => parseFloat(text, 10) | |
let round = number => Math.round(number) |
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
/** | |
* ============================================================================ | |
* Constants for later reference | |
* ============================================================================ | |
*/ | |
const WCAG_MINIMUM_RATIOS = [ | |
['AA Large', 3], | |
['AA', 4.5], | |
['AAA', 7], |
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
/** | |
* ============================================================================ | |
* Constants for later reference | |
* ============================================================================ | |
*/ | |
const WCAG_MINIMUM_RATIOS = [ | |
['AA Large', 3], | |
['AA', 4.5], | |
['AAA', 7], |
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
- site_title = site_info && site_info['site_info.site_title'] && site_info['site_info.site_title'].as_text || 'The Collegian Magazine' | |
- articles.sort_by! do |doc| | |
- [ (doc['article.date'] && doc['article.date'].value || doc.first_published_date), | |
- (doc['article.weight'] && doc['article.weight'].value || 10), | |
- (doc['article.title'] && doc['article.title'].as_text || doc.uid) ] | |
- articles.reverse! | |
- feat_article = articles.find { |article| !!article['article.featured_image'] } | |
- if feat_article | |
- content_for :meta_image do | |
- feat_article['article.featured_image'].views['small'].url |
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
Loadable.prototype.load = function(url, onload, onerror) { | |
const _this = this; | |
asyncLoadPage(url).then( function(nextPage) { | |
let newList = nextPage.querySelector('[data-channel="' + _this.channel + '"]'); | |
let dest = newList.querySelector('a, button, [tabindex]'); | |
let newLoader = nextPage.querySelector('[data-target="' + _this.el.id + '"]'); | |
let newNext = newLoader && newLoader.getAttribute('data-next'); | |
var count = 0; | |
_this.el.classList.add('is-locked'); |
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
Loadable.prototype.load = function(url, onload, onerror) { | |
const _this = this; | |
asyncLoadPage(url).then( function(nextPage) { | |
let newList = nextPage.querySelector('[data-channel="' + _this.channel + '"]'); | |
let dest = newList.querySelector('a, button, [tabindex]'); | |
let newLoader = nextPage.querySelector('[data-target="' + _this.el.id + '"]'); | |
let newNext = newLoader && newLoader.getAttribute('data-next'); | |
var count = 0; | |
_this.el.classList.add('is-locked'); |
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
const ToggleFactory = (el) => ({ | |
notify (state) { | |
if (state === 'closed') { | |
el.classList.remove('is-open'); | |
el.classList.add('is-closed'); | |
} else { | |
el.classList.remove('is-closed'); | |
el.classList.add('is-open'); | |
} | |
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.