doctype html
html
  head
    meta(charset="UTF-8")
    title GeoViewer !{version} || HDMA, SDSU
    meta(content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no", name="viewport")
    link(rel="shortcut icon" type="image/x-icon" href="images/favicon.ico")
    include css
  body.fixed
    nav.navbar.navbar-static-top.navbar-inverse(role="navigation")
      // header logo: style can be found in header.less
      header.header.pull-left
        a.logo(href="http://humandynamics.sdsu.edu", target="_blank")
          // Add the class icon to your logo image or logo icon to add the margining
          .pull-left.image
            img(src="images/HDMA_Logo_Small_For_Dark_Background_ICON.png", alt="HDMA Center@SDSU", style='border:0px;')
        .pull-left.info
          h4(title='GeoViewer') GeoViewer 
            span.area @ !{area}
            span &nbsp; !{version}

      ul.nav.navbar-nav.navbar-right
        li
          a(href='#', data-value='privacy') Privacy
        li
          a(href='#', data-value='tour', data-toggle='chardinjs' data-intro='test' data-position='left') Tutorial
        li
          a(href='#', data-value='about') About
        li
          a#btn-login(href='#', data-value='login')
              i.fa.fa-user.white(title='Login') 
              label#username			  
              span Log in
    .mainContent
      .section-search
        .searchMenu
            p.title Search & Filter 
              .row.form-group
                .col-xs-6.col-md-6
                  .input-group.input-group-sm
                    span.input-group-addon(data-container="body",data-toggle="popover", data-placement="bottom", data-trigger='hover', data-html='true', data-tour="search", data-tourstep="2") Keyword
                    input#search-keyword.form-control(type="text", placeholder="Input keywords")
                .col-xs-6.col-md-6
                  .input-group.input-group-sm.search-location
                    span.input-group-addon.search-geolocation(data-tour="search", data-tourstep="3") Location
                    input.form-control.search-placename(type='text' placeholder="place name" title='Please input a place name, adddress, or zip code')
                    input.form-control.search-radius(type='text' placeholder="mile" title='radius (unit: mile, max: 100 miles)')
                    span.input-group-btn(title='select a area by drawing a polygon on the map')
                      button.btn.btn-default.search-drawPolygon(data-value='polygon')
                    span.input-group-btn(title='select a area by drawing a rectangle on the map')
                      button.btn.btn-default.search-drawRectangle(data-value='rectangle')
                    span.input-group-btn(title='remove any areas')
                      button.btn.btn-default.search-drawRemove(data-value='remove')
                    //input#search-geolocation.search-geolocation.click.form-control(type="text", placeholder="Click to draw a polygon on the map", title="It helps you to focus the tweets within your interested area (polygon). Please click once and draw a polygon on the map to filter out other tweets.")
              .row.form-group
                .col-xs-6.col-md-6
                  .input-group.input-group-sm
                    span.input-group-addon(data-tour="search", data-tourstep="4") From
                    input#search-startDate.form-control.datepicker(type="text", placeholder="From Date")
                .col-xs-6.col-md-6
                  .input-group.input-group-sm
                    span.input-group-addon(data-tour="search", data-tourstep="5") &nbsp;&nbsp;To&nbsp;&nbsp;
                    input#search-endDate.form-control.datepicker(type="text", placeholder="To Date")
              .row.form-group
                .col-xs-6.col-md-6
                  .input-group.input-group-sm
                    span.input-group-addon(data-tour="search", data-tourstep="6") View Mode
                    .btn-group.btn-group-sm.search-viewMode(data-toggle="buttons")
                      label.btn.btn-default
                        input(type='radio', name="search-viewMode", value='image') 
                        | Image
                      label.btn.btn-default
                        input(type='radio', name="search-viewMode", value='text' )
                        | Text
                      label.btn.btn-default.active
                        input(type='radio', name="search-viewMode", checked="checked", value=null)
                        | Both						
                .col-xs-6.col-md-6.toolbar
                  .search-msg.control-label
                  .btn-group.btn-group-sm.pull-right(role='group')
                    button#btn-download.btn.btn-success(type="button", style='display:none') Download
                    button#btn-restore.btn.btn-default(type="button") Clear
                    button#btn-search.btn.btn-primary(type="button") Search
              .row.form-group
                .col-xs-12.col-md-12
                  .geomasking * HDMA center conceals tweet locations by randomly selecting a coordinate in a 100m radius of the original location to protect Twitter users' privacy

        ul.searchToolbar.nav.navbar-nav
          li.tbx-count
            a(href="#")
              | Total Tweets:
              span.badge 0
          li
            .btn-group
              button.btn.btn-default(type='button') 
                i.fa.fa-gears
                | Analysis
              button.btn.btn-default.dropdown-toggle(data-toggle='dropdown' type='button')
                span.caret
                span.sr-only Toggle Dropdown
              ul.dropdown-menu(role='menu')
                li
                  a(href="#" value='topMedia' type='analysis') Top Media
                li
                  a(href="#" value='topRetweet' type='analysis') Top Retweet
                li
                  a(href="#" value='topURL' type='analysis') Top URL
          li
            .btn-group
              button.btn.btn-default(type='button')
                i.fa.fa-sort-amount-desc
                | Newest First
              button.btn.btn-default.dropdown-toggle(data-toggle='dropdown' type='button')
                span.caret
                span.sr-only Toggle Dropdown
              ul.dropdown-menu(role='menu')
                li
                  a(href='#' type='sort' value='append')
                    i.fa.fa-sort-amount-asc
                    | Oldest First
                li
                  a.active(href='#' type='sort' value='prepend')
                    i.fa.fa-sort-amount-desc
                    | Newest First
          li
            .btn-group
              button.btn.btn-default(type='button')
                i.fa.fa-play
                | Realtime
              button.btn.btn-default.dropdown-toggle(data-toggle='dropdown' type='button')
                span.caret
                span.sr-only Toggle Dropdown
              ul.dropdown-menu(role='menu')
                li
                  a.active(href='#' type='play-pause' value='play')
                    i.fa.fa-play
                    | Realtime
                li
                  a(href='#' type='play-pause' value='pause' title='Click to load the latest tweets')
                    i.fa.fa-pause
                    | Pause 
                    span.badge.onHoldTweets 0
                li.divider
                li
                  a(href='#' value='1-min' type='refresh')
                    i.fa.fa-pause 
                    | Refresh Every 1min
                li
                  a(href='#' value='2-min' type='refresh')
                    i.fa.fa-pause 
                    | Refresh Every 2min
                li
                  a(href='#' value='3-min' type='refresh')
                    i.fa.fa-pause 
                    | Refresh Every 3min
                li.divider
                li
                  a(href='#' value='25-tweet' type='refresh')
                    i.fa.fa-pause 
                    | Refresh Every 25 tweets
                li
                  a(href='#' value='50-tweet' type='refresh')
                    i.fa.fa-pause 
                    | Refresh Every 50 tweets
                li
                  a(href='#' value='100-tweet' type='refresh')
                    i.fa.fa-pause 
                    | Refresh Every 100 tweets   
        .searchResult
          ul.masonry
            li.masonry-gridSize
      .section-map
        #map


    // basemap widget
    #basemapWidget.leaflet-control-layers.leaflet-control-layers-expanded(style="display:none;")
      ul.nav.nav-tabs.nav-justified
        li.active
          a(href="#tab-basemap" role='tab' data-toggle='tab') Basemap
        li
          a(href='#tab-layer' role='tab' data-toggle='tab') Layer
      .tab-content
        #tab-basemap.tab-pane.active
          ul.basemap
            li(title="ESRI Light Gray Map")
              img(src="images/basemap/gray.jpg")
              p Light Gray Map
            li(title="ESRI Imagery Map")
              img(src="images/basemap/satellite.jpg")
              p Satellite
            li(title="ESRI Street Map")
              img(src="images/basemap/street.jpg")
              p Street
            li(title="ESRI National Geographic Map")
              img(src="images/basemap/natgeo.jpg")
              p National Geographic
            li(title="NASA NightView Map")
              img(src="images/basemap/NASANightViewMap.png")
              p NightView Map
            //li(title="ESRI Topographic Map")
              //img(src="images/basemap/topo.jpg")
              //p Topographic
            li(title="OpenStreet Map")
              img(src="images/basemap/osm.jpg")
              p Open Street Map
          span(for="basemap_slider") Transparency
          input#basemap_slider.bootstrap-slider(type="text", name="basemap_slider", data-slider-min="0", data-slider-max="1", value="0.7")

        #tab-layer.tab-pane
          ul.layer
      
    //*******************************************************************************************************
    // popup
    //*******************************************************************************************************
    //popup privacy
    #popup_privacy.modal.fade.form-box(tabindex="-1", role="dialog", aria-labelledby="myModalLabel", aria-hidden="true")
      .modal-dialog.modal-lg
        .modal-content
          .modal-header
            button.close(type="button", data-dismiss="modal")
              span(aria-hidden="true") &#215;
              span.sr-only Close
            .header Privacy Policy
          .modal-body
            p If you have any concerns about the privacy issues in the GeoViewer 
            p(style='margin:30px 0px 30px 0px; font-weight:bold;  ') Please contact us
              a(href='mailto:hdmasdsu@gmail.com' style='display:block') hdmasdsu@gmail.com
            p After verify your information,
            p we will remove specific social media contents based on your requests.

    //popup login
    #popup_login.modal.fade.form-box
      .modal-dialog.modal-lg
        .modal-content
          .modal-header
            .header Sign In
          .modal-body
            form(action="", method="post" id='formLogin')
              .form-group
                input.form-control#formUsername(type="text", name="userid", placeholder="User ID")
              .form-group
                input.form-control#formPassword(type="password", name="password", placeholder="Password")
              .form-group(style='position:relative; ')
                input#rememberMe(type="checkbox", name="remember_me")
                | &nbsp; Remember me
                #loginMsg
              button.btn.btn-primary.btn-block(type="submit") Sign me in
                img#loginLoading(src='images/loading.gif')
              p
              //a(href="#") I forgot my password
              P
              //a.text-center(href="register.html") Register a new membership


    //popup login
    #popup_layerInfo.modal.fade.form-box
      .modal-dialog.modal-lg
        .modal-content
          .modal-header
            .header Layer Info
          .modal-body

 
    //popup about
    #popup_tour.modal.fade.form-box
      .modal-dialog.modal-lg
        .modal-content
          .modal-header
            .header Tutorial
          .modal-body
            iframe(src="https://www.youtube.com/embed/hFKYWdfD8-8?enablejsapi=1&autohide=1&showinfo=0&controls=2" frameborder="0" allowfullscreen)
            //.row
              //.col-xs-12.col-md-12
            .btn-group(role='group')
              button.btn.btn-default.thumbnail(data-tour="search")
                span.glyphicon.glyphicon-search
                | Search & Filter
                span.description step-by-step
              button.btn.btn-default.thumbnail(data-tour="searchResult")
                span.glyphicon.glyphicon-folder-open
                | Search Result
                span.description step-by-step
              button.btn.btn-default.thumbnail(data-tour="map")
                span.glyphicon.glyphicon-map-marker
                | Map
                span.description step-by-step


    // popup contact
    #popup_contact.modal.fade
      .modal-dialog.modal-lg
        .modal-content
          .modal-header
            h3 Contact
            span(style='white-space:pre;') 
          .modal-body


    //mapPopup markerGroup 
    #mapPopup_markerGroup.mapPopupWidget
      .mapPopupWidget_arrow
      .mapPopupWidget_content(style="height:125px; ")
        label Change marker icon:
        ul
          li
            img.dot(src="images/marker/1374590715_bullet-blue.png", markerwidth="11", markerheight="11")
          li
            img.dot(src="images/marker/1374590758_bullet-yellow.png", markerwidth="11", markerheight="11")
          li
            img.dot(src="images/marker/1374590742_bullet-green.png", markerwidth="11", markerheight="11")
          li
            img.dot(src="images/marker/1376599876_bullet_orange.png", markerwidth="11", markerheight="11")
          li
            img.dot.search-default(src="images/marker/1374590792_bullet-black.png", markerwidth="11", markerheight="11")
          li
            img.small.icon-active(src="images/marker/blue/5.png", markerwidth="10", markerheight="13.5")
          li
            img.small(src="images/marker/yellow/5.png", markerwidth="10", markerheight="13.5")
          li
            img.small(src="images/marker/green/5.png", markerwidth="10", markerheight="13.5")
          li
            img.small(src="images/marker/orange/5.png", markerwidth="10", markerheight="13.5")
          li
            img.small(src="images/marker/black/5.png", markerwidth="10", markerheight="13.5")
          li
            img.mid(src="images/marker/blue/5.png", markerwidth="16", markerheight="21.6")
          li
            img.mid(src="images/marker/yellow/5.png", markerwidth="16", markerheight="21.6")
          li
            img.mid(src="images/marker/green/5.png", markerwidth="16", markerheight="21.6")
          li
            img.mid(src="images/marker/orange/5.png", markerwidth="16", markerheight="21.6")
          li
            img.mid(src="images/marker/black/5.png", markerwidth="16", markerheight="21.6")


    // heatmap radius window
    #mapPopup_heatmap.mapPopupWidget
      .mapPopupWidget_arrow
      .mapPopupWidget_content.ui-corner-all
        form
          label(for="heatmap_slider") Change Heatmap Radius
          input#heatmap_slider.bootstrap-slider(type="text", name="heatmap_slider", data-slider-min="0", data-slider-max="100", value="50")



    // popup intro 
    #popup_intro.modal.fade.form-box
      .modal-dialog.modal-lg
        .modal-content
          .modal-header
            a(href='http://humandynamics.sdsu.edu' target='_blank')
              img.logo(src='images/HDMA_Logo_Small_HORIZONTAL_MAIN.png')
            h3 GeoViewer @ !{area}
            span(style='white-space:pre;')
              | A real-time Twitter feed App capturing the local ground truth in !{area}
              | with powerful geovisualization / mapping functions
          .modal-body
            .loadingmsg
              img.loading(src='images/loading.gif')
              | Loading the Latest 300 Tweets....
            .alertmsg
          .modal-footer  
            .btn-group.btn-group-justified(role='group')
              a.btn.btn-default(role='button' href='#' value='tutorial') Tutorial
              a.btn.btn-primary(role='button' href='#' value='start') Let's Start!
  
    // popup intro 
    #popup_about.modal.fade.form-box
      .modal-dialog.modal-lg
        .modal-content
          .modal-header
            a(href='http://humandynamics.sdsu.edu' target='_blank')
              img.logo(src='images/HDMA_Logo_Small_HORIZONTAL_MAIN.png')
            h3 GeoViewer @ !{area}
            span(style='white-space:pre;')
              | A real-time Twitter feed App capturing the local ground truth in !{area}
              | with powerful geovisualization / mapping functions
          .modal-body
            span(style='white-space:pre;')
              | Dr. Ming-Hsiang Tsou, Director
              | Dr. Chin-Te (Calvin) Jung, Chief Data Scientist
              | 
              | Phone: 619-594-0205
              | Fax: 619-594-4938
              | 
              | HDMA Center
              | Geography Department, San Diego State University
              | 5500 Campanile Drive
              | San Diego, CA 92182-4493
          .modal-footer  
            .btn-group.btn-group-justified(role='group')
              a.thumbnail.btn.btn-default(href="https://mail.google.com/mail/?view=cm&fs=1&to=hdmasdsu@gmail.com&body=Tell us how you think about GeoViewer!" title='gmail' target='_blank') 
                i.fa.fa-envelope
              a.thumbnail.btn.btn-default(href="https://twitter.com/hdma_sdsu" title='twitter' target='_blank')
                i.fa.fa-twitter
              a.thumbnail.btn.btn-default(href="https://www.youtube.com/channel/UCKiEJPhr3vRgNgFi5aD49VA" title='youtube' target='_blank')
                i.fa.fa-youtube-play
              a.thumbnail.btn.btn-default(href="https://www.facebook.com/pages/Center-for-Human-Dynamics-in-the-Mobile-Age/560674040702520" title='facebook' target='_blank')
                i.fa.fa-facebook
              a.thumbnail.btn.btn-default(href="https://github.com/HDMA-SDSU" title='github' target='_blank')
                i.fa.fa-github

    include script