<commit_before>######################
# Default
window.DefaultHeader = ReactiveComponent
  displayName: 'DefaultHeader'

  render: ->
    subdomain = fetch '/subdomain'   

    masthead_style = 
      textAlign: 'center'
      backgroundColor: subdomain.branding.primary_color
      height: 45

    if subdomain.branding.masthead
      _.extend masthead_style, 
        height: 300
        backgroundPosition: 'center'
        backgroundSize: 'cover'
        backgroundImage: "url(#{subdomain.branding.masthead})"   
           
    DIV style: masthead_style,
      ProfileMenu()

      if subdomain.branding.masthead_header_text
        DIV style: {color: 'white', margin: 'auto', fontSize: 60, fontWeight: 700, position: 'relative', top: 50}, 
          if subdomain.external_project_url
            A href: "#{subdomain.external_project_url}", target: '_blank',
              subdomain.branding.masthead_header_text
          else
            subdomain.branding.masthead_header_text

window.DefaultFooter = ReactiveComponent
  displayName: 'DefaultFooter'
  render: ->
    subdomain = fetch '/subdomain'
    DIV null,

      A href: "#{subdomain.external_project_url}", target: '_blank', style: {display: 'inline-block', margin: 'auto'},
        if subdomain.branding.logo
          IMG src: "#{subdomain.branding.logo}", style: {width: 300}

      DIV style: {marginTop: 30, fontSize: '70%'},
        TechnologyByConsiderit()
        DIV style: {color: 'rgb(131,131,131)', marginTop: 5},
          'Bug to report? Want to use this technology in your organization? '
          A style: {textDecoration: 'none', fontWeight: 700}, href: "mailto:<EMAIL>", 'Email us'


#####################
# Tigard
window.tigardHeader = ReactiveComponent
  displayName: 'tigardHeader'

  render: ->
    DIV style: {textAlign: 'center'},
      STYLE null, 
        '.banner_link {color: #78d18b; font-weight: 600; text-decoration: underline;}'

      ProfileMenu()
        
      DIV style: {color: '#707070', fontSize: 32, margin: '20px auto 0 auto', fontWeight: 800, textTransform: 'uppercase', position: 'relative', top: -20}, 
        'Help plan '
        A className: 'banner_link', href: 'http://riverterracetigard.com/', 'River Terrace'
        ', Tigard\'s newest neighborhood' 

window.tigardFooter = ReactiveComponent
  displayName: 'tigardFooter'
  render: ->
    DIV style: {marginTop: 20},
      A href: 'http://riverterracetigard.com/', target: '_blank', style: {display: 'inline-block', margin: 'auto'},
        IMG className: 'logo', src: "<%= asset_path 'tigard/logo.jpg' %>", style: {height: 80}         

      DIV style: {margin: '20px 0'},
        FBShare()
        Tweet
          hashtags: 'RiverTerrace'
          referer: 'https%3A%2F%2Ftigard.consider.it%2F'
          text: 'Help plan River Terrace.'
          url: 'https%3A%2F%2Ftigard.consider.it%2F'        

      DIV style: {padding: 9, fontSize: '70%'},
        TechnologyByConsiderit()



#####################
# City of Tigard
window.cityoftigardHeader = ReactiveComponent
  displayName: 'cityoftigardHeader'

  render: -> 
    logo_style = {height: 117, backgroundColor: 'white', borderRight: '2px solid white'}
    DIV style: {backgroundColor: '#253967'},
      ProfileMenu()

      DIV style: {height: 24},
        A href: '/', onClick: clickInternalLink, style: {position: 'absolute', top:0, zIndex: 999999},
          IMG className: 'logo', src: "<%= asset_path 'cityoftigard/logo.png' %>", style: logo_style 
        # SPAN style: {color: 'white', fontSize: 28, display: 'inline-block', margin: '20px 0 0 110px'}, 
        #   'Engage with the '
        #   A href: 'http://www.tigard-or.gov', style: {color: 'white', fontWeight: 600}, 'City of Tigard'
      # DIV style: {backgroundColor: color.proposal_header, width: '100%', height: 50}

####################
# Bitcoin demo
window['bitcoin-demo-header'] = ReactiveComponent
  displayName: 'bitcoin-demo-header'

  render: -> 
    # Background image box
    DIV
      style:
        height: 300
        backgroundImage: "url(<%= asset_path 'bitcoin/bg.jpg' %>)"
        backgroundPosition: 'center'
        backgroundSize: 'cover'

      ProfileMenu()

      # Logo
      IMG
        style: { display: 'block'; margin: 'auto'; height: 150; paddingTop: 45 }
        src: "<%= asset_path 'bitcoin/logo.svg' %>"

      # The word "Demo"
      DIV
        style:
          textAlign: 'center'
          fontWeight: 600
          margin: 'auto'
          fontSize: 24
          color: 'white'
          padding: "10px 0px 0px 60px"
        'demo'

####################
# Bitcoin Election

window['bitcoin-election-header'] = ReactiveComponent
  displayName: 'bitcoin-election-header'

  render: ->
    homepage = @root.page_name == 'homepage'
    window.lefty = true

    # Entire header (the grey area)
    DIV
      style:
        backgroundColor: '#676766'
        height: if not homepage then 63
      onMouseEnter: => @local.hover=true;  save(@local)
      onMouseLeave: => @local.hover=false; save(@local)

      STYLE null,
        '''.profile_anchor.login {font-size: 26px; padding-top: 16px;}
           p {margin-bottom: 1em}'''

      # The top bar with the logo
      DIV
        style:
          cursor: if not homepage then 'pointer'
          paddingTop: if homepage then 18 else 17
        onClick: if not homepage then => window.app_router.navigate("/", {trigger: true})

        # Back arrow
        if not homepage
          DIV
            style:
              position: 'absolute'
              left: 20
              top: 0
              color: '#eee'
              fontSize: 43
              fontWeight: 400
              paddingLeft: 25 # Make the clickable target bigger
              width: 180      # Make the clickable target bigger
            '<'

        # Logo
        A
          href: if homepage then 'https://bitcoinfoundation.org'
          IMG
            style:
              height: if homepage then 40 else 26
              marginLeft: if homepage then 82 else 106
            src: "<%= asset_path 'bitcoin/logo.svg' %>"

        if not homepage
          SPAN
            style:
              color: 'cyan'
              fontSize: 26
              fontWeight: 500
              marginLeft: 40
            'Distributed Deliberation'

        # Text
        if homepage
          election_day = new Date('02/13/2015')
          today = new Date()
          _second = 1000
          _minute = _second * 60
          _hour = _minute * 60
          _day = _hour * 24
          days_remaining = Math.ceil((election_day - today) / _day)

          DIV
            style:
              paddingLeft: 200
              color: 'white'
              fontSize: 22
              fontWeight: 300
              paddingTop: 23
              paddingBottom: 45
              maxWidth: 900

            DIV
              style:
                color: 'cyan'
                fontSize: 63
                fontWeight: 500
                marginBottom: 20
              'Distributed Deliberation'

            'We are choosing two new board members. '
            A
              href: 'https://blog.bitcoinfoundation.org/elections-update/'
              style: textDecoration: 'underline'
              "Voting opens in #{days_remaining} days!"

            P
              style: marginTop: 20
              'This deliberation website is open to the public.'
              ' But to vote, you must '
              A
                href: 'https://bitcoinfoundation.org/join/#individual-membership'
                style: textDecoration: 'underline'
                'become a member'
              ' of the Bitcoin Foundation.'

      ProfileMenu()

window.cluster_options =
  # Each cluster can have its own options
  Candidates:   # Options for the "Candidates" cluster
    editor_icons: true
    homie_histo_filter: (user) -> 'bitcoin foundation member' in user.groups
    homie_histo_title: "Members' Opinions"

  Debate:       # Options for the "Debate" cluster
    homie_histo_title: "Candidates' Opinions"


$( ->
  # These need to be run AFTER franklin.coffee has loaded
  window['bitcoin-election-homepage'] = ElectionHomepage
  window['bitcoin-election-proposal-subheader'] = ProposalSubheading

  # For testing only:
  #window['livingvotersguide-homepage'] = ElectionHomepage
  #window['bitcoin-demo-homepage'] = ElectionHomepage
  #window['bitcoin-homepage'] = ElectionHomepage
  #window['us-homepage'] = ElectionHomepage
)





#####################
# Living Voters Guide

window.ThanksAndShareStrip = ReactiveComponent
  displayName: 'ThanksAndShareStrip'
<commit_msg>removed bitcoin foundation member filter until we get emails from bureaucracy<commit_after>######################
# Default
window.DefaultHeader = ReactiveComponent
  displayName: 'DefaultHeader'

  render: ->
    subdomain = fetch '/subdomain'   

    masthead_style = 
      textAlign: 'center'
      backgroundColor: subdomain.branding.primary_color
      height: 45

    if subdomain.branding.masthead
      _.extend masthead_style, 
        height: 300
        backgroundPosition: 'center'
        backgroundSize: 'cover'
        backgroundImage: "url(#{subdomain.branding.masthead})"   
           
    DIV style: masthead_style,
      ProfileMenu()

      if subdomain.branding.masthead_header_text
        DIV style: {color: 'white', margin: 'auto', fontSize: 60, fontWeight: 700, position: 'relative', top: 50}, 
          if subdomain.external_project_url
            A href: "#{subdomain.external_project_url}", target: '_blank',
              subdomain.branding.masthead_header_text
          else
            subdomain.branding.masthead_header_text

window.DefaultFooter = ReactiveComponent
  displayName: 'DefaultFooter'
  render: ->
    subdomain = fetch '/subdomain'
    DIV null,

      A href: "#{subdomain.external_project_url}", target: '_blank', style: {display: 'inline-block', margin: 'auto'},
        if subdomain.branding.logo
          IMG src: "#{subdomain.branding.logo}", style: {width: 300}

      DIV style: {marginTop: 30, fontSize: '70%'},
        TechnologyByConsiderit()
        DIV style: {color: 'rgb(131,131,131)', marginTop: 5},
          'Bug to report? Want to use this technology in your organization? '
          A style: {textDecoration: 'none', fontWeight: 700}, href: "mailto:<EMAIL>", 'Email us'


#####################
# Tigard
window.tigardHeader = ReactiveComponent
  displayName: 'tigardHeader'

  render: ->
    DIV style: {textAlign: 'center'},
      STYLE null, 
        '.banner_link {color: #78d18b; font-weight: 600; text-decoration: underline;}'

      ProfileMenu()
        
      DIV style: {color: '#707070', fontSize: 32, margin: '20px auto 0 auto', fontWeight: 800, textTransform: 'uppercase', position: 'relative', top: -20}, 
        'Help plan '
        A className: 'banner_link', href: 'http://riverterracetigard.com/', 'River Terrace'
        ', Tigard\'s newest neighborhood' 

window.tigardFooter = ReactiveComponent
  displayName: 'tigardFooter'
  render: ->
    DIV style: {marginTop: 20},
      A href: 'http://riverterracetigard.com/', target: '_blank', style: {display: 'inline-block', margin: 'auto'},
        IMG className: 'logo', src: "<%= asset_path 'tigard/logo.jpg' %>", style: {height: 80}         

      DIV style: {margin: '20px 0'},
        FBShare()
        Tweet
          hashtags: 'RiverTerrace'
          referer: 'https%3A%2F%2Ftigard.consider.it%2F'
          text: 'Help plan River Terrace.'
          url: 'https%3A%2F%2Ftigard.consider.it%2F'        

      DIV style: {padding: 9, fontSize: '70%'},
        TechnologyByConsiderit()



#####################
# City of Tigard
window.cityoftigardHeader = ReactiveComponent
  displayName: 'cityoftigardHeader'

  render: -> 
    logo_style = {height: 117, backgroundColor: 'white', borderRight: '2px solid white'}
    DIV style: {backgroundColor: '#253967'},
      ProfileMenu()

      DIV style: {height: 24},
        A href: '/', onClick: clickInternalLink, style: {position: 'absolute', top:0, zIndex: 999999},
          IMG className: 'logo', src: "<%= asset_path 'cityoftigard/logo.png' %>", style: logo_style 
        # SPAN style: {color: 'white', fontSize: 28, display: 'inline-block', margin: '20px 0 0 110px'}, 
        #   'Engage with the '
        #   A href: 'http://www.tigard-or.gov', style: {color: 'white', fontWeight: 600}, 'City of Tigard'
      # DIV style: {backgroundColor: color.proposal_header, width: '100%', height: 50}

####################
# Bitcoin demo
window['bitcoin-demo-header'] = ReactiveComponent
  displayName: 'bitcoin-demo-header'

  render: -> 
    # Background image box
    DIV
      style:
        height: 300
        backgroundImage: "url(<%= asset_path 'bitcoin/bg.jpg' %>)"
        backgroundPosition: 'center'
        backgroundSize: 'cover'

      ProfileMenu()

      # Logo
      IMG
        style: { display: 'block'; margin: 'auto'; height: 150; paddingTop: 45 }
        src: "<%= asset_path 'bitcoin/logo.svg' %>"

      # The word "Demo"
      DIV
        style:
          textAlign: 'center'
          fontWeight: 600
          margin: 'auto'
          fontSize: 24
          color: 'white'
          padding: "10px 0px 0px 60px"
        'demo'

####################
# Bitcoin Election

window['bitcoin-election-header'] = ReactiveComponent
  displayName: 'bitcoin-election-header'

  render: ->
    homepage = @root.page_name == 'homepage'
    window.lefty = true

    # Entire header (the grey area)
    DIV
      style:
        backgroundColor: '#676766'
        height: if not homepage then 63
      onMouseEnter: => @local.hover=true;  save(@local)
      onMouseLeave: => @local.hover=false; save(@local)

      STYLE null,
        '''.profile_anchor.login {font-size: 26px; padding-top: 16px;}
           p {margin-bottom: 1em}'''

      # The top bar with the logo
      DIV
        style:
          cursor: if not homepage then 'pointer'
          paddingTop: if homepage then 18 else 17
        onClick: if not homepage then => window.app_router.navigate("/", {trigger: true})

        # Back arrow
        if not homepage
          DIV
            style:
              position: 'absolute'
              left: 20
              top: 0
              color: '#eee'
              fontSize: 43
              fontWeight: 400
              paddingLeft: 25 # Make the clickable target bigger
              width: 180      # Make the clickable target bigger
            '<'

        # Logo
        A
          href: if homepage then 'https://bitcoinfoundation.org'
          IMG
            style:
              height: if homepage then 40 else 26
              marginLeft: if homepage then 82 else 106
            src: "<%= asset_path 'bitcoin/logo.svg' %>"

        if not homepage
          SPAN
            style:
              color: 'cyan'
              fontSize: 26
              fontWeight: 500
              marginLeft: 40
            'Distributed Deliberation'

        # Text
        if homepage
          election_day = new Date('02/13/2015')
          today = new Date()
          _second = 1000
          _minute = _second * 60
          _hour = _minute * 60
          _day = _hour * 24
          days_remaining = Math.ceil((election_day - today) / _day)

          DIV
            style:
              paddingLeft: 200
              color: 'white'
              fontSize: 22
              fontWeight: 300
              paddingTop: 23
              paddingBottom: 45
              maxWidth: 900

            DIV
              style:
                color: 'cyan'
                fontSize: 63
                fontWeight: 500
                marginBottom: 20
              'Distributed Deliberation'

            'We are choosing two new board members. '
            A
              href: 'https://blog.bitcoinfoundation.org/elections-update/'
              style: textDecoration: 'underline'
              "Voting opens in #{days_remaining} days!"

            P
              style: marginTop: 20
              'This deliberation website is open to the public.'
              ' But to vote, you must '
              A
                href: 'https://bitcoinfoundation.org/join/#individual-membership'
                style: textDecoration: 'underline'
                'become a member'
              ' of the Bitcoin Foundation.'

      ProfileMenu()

window.cluster_options =
  # Each cluster can have its own options
  Candidates:   # Options for the "Candidates" cluster
    editor_icons: true
    #homie_histo_filter: (user) -> 'bitcoin foundation member' in user.groups
    homie_histo_title: "Members' Opinions"

  Debate:       # Options for the "Debate" cluster
    homie_histo_title: "Candidates' Opinions"


$( ->
  # These need to be run AFTER franklin.coffee has loaded
  window['bitcoin-election-homepage'] = ElectionHomepage
  window['bitcoin-election-proposal-subheader'] = ProposalSubheading

  # For testing only:
  #window['livingvotersguide-homepage'] = ElectionHomepage
  #window['bitcoin-demo-homepage'] = ElectionHomepage
  #window['bitcoin-homepage'] = ElectionHomepage
  #window['us-homepage'] = ElectionHomepage
)





#####################
# Living Voters Guide

window.ThanksAndShareStrip = ReactiveComponent
  displayName: 'ThanksAndShareStrip'

{'fraction_non_alphanumeric': 0.1213679163537635, 'fraction_numerical': 0.02495523077811796, 'mean_word_length': 2.2148560817084495, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 39, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, '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': '1065246', 'n_tokens_mistral': 5531, 'n_tokens_neox': 4926, 'n_words': 1360}