import $ from 'jquery';
import _ from 'underscore';
import util from './app/Util';
import sheet from './app/Sheet';
const SPREADSHEET_ID = '1ZbpkjdrrAH95xHWKxjp-bb6nvoKZIZLhXrDwBREa_PA';
function renderResource(f) {
return _.map(util.trim(f.contentsection).replace(/[\u201C\u201D]/g, '"').split('\n'), line => `${line}
`).join('');
}
// setup resources
sheet.load(SPREADSHEET_ID, 4, rows => {
var resources = _.map(rows, row => {
return sheet.parseRow(row);
}),
introHeader = resources[0].introheader,
sideColumn = _.map(resources[0].sidecolumn.split('\n'), l => `
${renderResource(f)}
back to top`).join('')); });