Skip to content

Instantly share code, notes, and snippets.

@berdof
berdof / InfiniteScroll.js
Created August 8, 2016 20:20 — forked from lelandrichardson/InfiniteScroll.js
Super Light Infinite Scroll Component in React
var React = require('react');
var { Component, PropTypes } = React;
var throttle = require('lodash/function/throttle');
class InfiniteScroll extends React.Component {
static propTypes = {
hasMore: PropTypes.bool.isRequired,
isLoading: PropTypes.bool.isRequired,
onLoadMore: PropTypes.func.isRequired,
threshold: PropTypes.number,
<!doctype html>
<html>
<head>
<!-- Run in full-screen mode. -->
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- Make the status bar black with white text. -->
<meta name="apple-mobile-web-app-status-bar-style" content="black">
# stolen from http://github.com/cschneid/irclogger/blob/master/lib/partials.rb
# and made a lot more robust by me
# this implementation uses erb by default. if you want to use any other template mechanism
# then replace `erb` on line 13 and line 17 with `haml` or whatever
module Sinatra::Partials
def partial(template, *args)
template_array = template.to_s.split('/')
template = template_array[0..-2].join('/') + "/_#{template_array[-1]}"
options = args.last.is_a?(Hash) ? args.pop : {}
options.merge!(:layout => false)
require 'open3'
class JadeHandler
def initialize(app)
@app = app
end
def call(env)
if env["PATH_INFO"] =~ /\/$/
env["PATH_INFO"] += "index.jade"

#CSS & HTML Development Spec#

##Браузеры## Если не оговорено отдельно, то считать эти версии минимально поддерживаемыми. Никакой поддержки IE6, даже бесплатно делать не нужно и запрещается! Под Graceful Degardation подразумевается частичный отказ функционала, скругленные углы, тени, анимация. Главное что бы верстка не разваливалась. Если вы знаете бразуер, которого нет в этом списке его поддержка не нужна и запрещена.

Вся верстка должна быть mobile ready. Это значит, что сайт должен правильно отображаться на мобильных устройствах (список чуть ниже). Элементы не должны ехать, зум должен работать, при перевороте устройств, все должно правильно репозиционироваться. В случае если не используется responsive design.

####Graceful Degardation####

  • IE7-8
# A class-based template for jQuery plugins in Coffeescript
#
# $('.target').myPlugin({ paramA: 'not-foo' });
# $('.target').myPlugin('myMethod', 'Hello, world');
#
# Check out Alan Hogan's original jQuery plugin template:
# https://github.com/alanhogan/Coffeescript-jQuery-Plugin-Template
#
(($, window) ->