<ion-view view-title="Home">
    <ion-nav-title>
        <img src="img/logo.png" height="100%">
    </ion-nav-title> 
    <ion-content class="lively">

        <ion-list type="card">
            <ion-item ng-repeat="item in results" class="no-padding"  href="#/app/view/{{ item._id.$oid }}">
                <div class="item item-image borderless">
                    <img ng-src="{{ item | image_server  }}" ng-if="item.feature_url">
                    <!-- <img ng-src="img/default.png" ng-if="!item.feature_url"> -->
                </div>
				<div class="padding">
                <h2 class='title'>{{item.title ? item.title : "No Title" }}</h2>
                <!-- {{ item._id.$oid }} -->
                 {{ item._id.$oid | object_id_to_date | humanizeRelativeTime }}
                <ion-option-button class="button-positive icon-left ion-share"
                                   ng-click="share(item)">
                    Share
                </ion-option-button>
                <ion-option-button class="button-energized icon-left ion-star">Favorite</ion-option-button>
				</div>
            </ion-item>
        </ion-list>
        
        <ion-infinite-scroll
            ng-if="moreDataCanBeLoaded()"
            icon="ion-loading-c"
            on-infinite="loadMoreData()"
            immediate-check=true
             >
        </ion-infinite-scroll>
        <button ng-if="is_empty" class="button button-full button-energized">
            Loading... :)
        </button>
            <!-- 
            <a href="https://www.google.com/maps?q=38.897096,-77.036545" target="_system">open map</a> -->
    </ion-content>
</ion-view>
