<commit_before>
Router.configure
  layoutTemplate: 'layout'
  loadingTemplate: 'loading'
  notFoundTemplate: 'notFound'
  templateNameConverter: 'upperCamelCase'
  routeControllerNameConverter: 'upperCamelCase'
  # trackPageView: true

seo = (title, description) ->
  t = []
  if title
    t.push(title)
  t.push('Reversim Summit 2015')
  t = t.join(' | ')
  url = document.location.href
  ogImage = 'http://dpk7qq034rxx8.cloudfront.net/img/ogImage.jpg'
  if not description
    description = title
  SEO.set
    title: t
    meta:
      description: description
    og:
      title: t,
      description: description
      url: url
      image: ogImage
    fb:
      app_id: '163492177191737'
    twitter:
      url: url
if Meteor.isClient
  ua = parseUseragent(window.navigator.userAgent)
  if /ios|android/.test(ua.os.family)
    Router.configure
      layoutTemplate: 'layoutMobile'

# Router.onAfterAction(filters.resetScroll,
#   {except:['wishes', 'proposals', 'speakers', 'vote']});

Router.map ->
  @route 'home',
    path: '/'
    fastRender: true
    data: -> page: 'home'
    onBeforeAction: ->
      ua = parseUseragent(window.navigator.userAgent)
      if /ios|android/.test(ua.os.family)
        Router.go('homeMobile');
      else
        @next()
    onAfterAction: ->
      seo('')

  @route 'homeMobile',
    path: '/m'
    fastRender: true
    data: -> page: 'home'
    onAfterAction: ->
      seo('')

  @route 'about',
    path: '/about'
    fastRender: true
    waitOn: -> Meteor.subscribe('moderators')
    data: -> page: 'about'
    onAfterAction: ->
      seo('About')

  # @route 'infographics', path: '/infographics' # TODO later

  @route 'register',
    path: '/register'
    fastRender: true
    data: -> page: 'register'
    onAfterAction: -> seo('Register')

  @route 'propose',
    path: '/propose'
    waitOn: -> Meteor.subscribe('users', {_id: Meteor.userId()})
    template: 'propose'
    fastRender: true
    data: -> page: 'propose'
    onAfterAction: -> seo('Propose')
<commit_msg>nagating mobile when in desktop<commit_after>
Router.configure
  layoutTemplate: 'layout'
  loadingTemplate: 'loading'
  notFoundTemplate: 'notFound'
  templateNameConverter: 'upperCamelCase'
  routeControllerNameConverter: 'upperCamelCase'
  # trackPageView: true

seo = (title, description) ->
  t = []
  if title
    t.push(title)
  t.push('Reversim Summit 2015')
  t = t.join(' | ')
  url = document.location.href
  ogImage = 'http://dpk7qq034rxx8.cloudfront.net/img/ogImage.jpg'
  if not description
    description = title
  SEO.set
    title: t
    meta:
      description: description
    og:
      title: t,
      description: description
      url: url
      image: ogImage
    fb:
      app_id: '163492177191737'
    twitter:
      url: url
if Meteor.isClient
  ua = parseUseragent(window.navigator.userAgent)
  if /ios|android/.test(ua.os.family)
    Router.configure
      layoutTemplate: 'layoutMobile'

# Router.onAfterAction(filters.resetScroll,
#   {except:['wishes', 'proposals', 'speakers', 'vote']});

Router.map ->
  @route 'home',
    path: '/'
    fastRender: true
    data: -> page: 'home'
    onBeforeAction: ->
      ua = parseUseragent(window.navigator.userAgent)
      if /ios|android/.test(ua.os.family)
        Router.go('homeMobile');
      else
        @next()
    onAfterAction: ->
      seo('')

  @route 'homeMobile',
    path: '/m'
    fastRender: true
    data: -> page: 'home'
    onBeforeAction: ->
      ua = parseUseragent(window.navigator.userAgent)
      if !/ios|android/.test(ua.os.family)
        Router.go('home');
      else
        @next()
    onAfterAction: ->
      seo('')

  @route 'about',
    path: '/about'
    fastRender: true
    waitOn: -> Meteor.subscribe('moderators')
    data: -> page: 'about'
    onAfterAction: ->
      seo('About')

  # @route 'infographics', path: '/infographics' # TODO later

  @route 'register',
    path: '/register'
    fastRender: true
    data: -> page: 'register'
    onAfterAction: -> seo('Register')

  @route 'propose',
    path: '/propose'
    waitOn: -> Meteor.subscribe('users', {_id: Meteor.userId()})
    template: 'propose'
    fastRender: true
    data: -> page: 'propose'
    onAfterAction: -> seo('Propose')

{'fraction_non_alphanumeric': 0.1441398865784499, 'fraction_numerical': 0.011342155009451797, 'mean_word_length': 2.848181818181818, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 34, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '303132', 'n_tokens_mistral': 1485, 'n_tokens_neox': 1422, 'n_words': 306}