<div ng-class="{expanded: settingsService.settings.viewMode == 'expanded'}">
	<div class="entrylist-header" ui-if="name">
		<h3>
			<span ng-switch on="selectedId">
				<span ng-switch-when="all">${tree.all}</span>
				<span ng-switch-when="starred">${tree.starred}</span>
				<span ng-switch-default>{{name}}</span>
			</span>
			&nbsp;
			<span ng-show="name && selectedType == 'category'"> &#187;</span>
		</h3>
	</div>
	
	<div infinite-scroll="loadMoreEntries()" infinite-scroll-disabled="busy || !settingsService.settings.readingMode" infinite-scroll-distance="1" id="feed-accordion"
		ng-class="{'expanded' : settingsService.settings.viewMode == 'expanded' }">
		<div ng-show="message && errorCount > 10">${view.error_while_loading_feed} : {{message}}</div>
		<div ng-repeat="entry in entries" class="entry" scroll-to="navigationMode != 'scroll' && current == entry" 
			scroll-to-force="navigationMode == 'keyboard'" scroll-to-offset="-50" on-scroll-middle="onScroll(entry)" 
			ng-class="{unread: entry.read == false, current: current==entry, open: isOpen, closed: !isOpen}">
			<a href="{{entry.url}}" target="_blank" class="entry-heading" ng-click="noop($event)" ng-mouseup="entryClicked(entry, $event)">
				<span class="feed-name visible-desktop">
					<span class="star" ng-mouseup="star(entry, !entry.starred, $event)">
						<i ng-class="{'icon-star icon-star-yellow': entry.starred, 'icon-star-empty': !entry.starred}"
							class="pointer"></i>
					</span>
					<favicon url="entry.iconUrl" />
					{{entry.feedName}}
				</span>
				<span class="entry-date visible-desktop">{{entry.date | entryDate}}</span>
				<span class="entry-name" ng-class="{shrink: true, rtl: entry.rtl}" ng-bind-html-unsafe="entry.title"></span>
				
			</a>
			<div class="entry-body" ui-if="settingsService.settings.viewMode == 'expanded' || (isOpen && current == entry)" ng-mouseup="bodyClicked(entry, $event)"
				ng-class="{rtl: entry.rtl}">
				<div class="entry-header">
					<h4 class="entry-title">
						<a href="{{entry.url}}" target="_blank" ng-bind-html-unsafe="entry.title"></a>
						<span class="entry-author" ui-if="entry.author">
							<span class="entry-author-prefix">${view.entry_author}</span>
							<span class="entry-author-name">{{entry.author}}</span>
						</span>
					</h4>
				</div>

				<div class="entry-body-content">
					<div ng-bind-html-unsafe="entry.content"></div>
					<video controls ui-if="entry.enclosureType && entry.enclosureType.indexOf('video') == 0">
						<source src="{{entry.enclosureUrl}}" type="{{entry.enclosureType}}" />
					</video>
					<audio controls ui-if="entry.enclosureType && entry.enclosureType.indexOf('audio') == 0">
						<source src="{{entry.enclosureUrl}}" type="{{entry.enclosureType}}" />
					</audio>
					<div ui-if="entry.enclosureType && entry.enclosureType.indexOf('image') == 0">
						<img ng-src="{{entry.enclosureUrl}}" />
					</div>
					<a href="{{entry.enclosureUrl}}" target="_blank" ui-if="entry.enclosureType" download>
						${global.download}
					</a>
				</div>
				<div class="entry-buttons form-horizontal">
				
					<span class="star" ng-mouseup="star(entry, !entry.starred, $event)">
						<i ng-class="{'icon-star icon-star-yellow': entry.starred, 'icon-star-empty': !entry.starred}"
							class="pointer"></i>
					</span>
					<label class="checkbox inline">
						<input type="checkbox" ng-checked="!entry.read" ng-click="mark(entry, !entry.read)"></input>
						${view.keep_unread}
					</label>
					
					<span class="share-buttons" ui-if="settingsService.settings.socialButtons">
						<a href="mailto:?subject={{entry.title|escape}}&body={{entry.url|escape}}" popup>
							<i class="icon-envelope"></i>
						</a>
						<a href="http://www.facebook.com/sharer.php?u=={{entry.url|escape}}" popup>
							<i class="icon-facebook"></i>
						</a>
						<a href="http://twitter.com/share?text={{entry.title|escape}}&url={{entry.url|escape}}" popup>
							<i class="icon-twitter"></i>
						</a>
						<a href="https://plus.google.com/share?url={{entry.url|escape}}" popup>
							<i class="icon-google-plus"></i>
						</a>
						<a href="https://getpocket.com/save?url={{entry.url|escape}}&title={{entry.title|escape}}" popup>
							<i class="icon-pocket"></i>
						</a>
						<a href="https://www.instapaper.com/hello2?url={{entry.url|escape}}&title={{entry.title|escape}}" popup>
							<i class="icon-instapaper"></i>
						</a>
						<a href="https://bufferapp.com/add?url={{entry.url|escape}}&text={{entry.title|escape}}" popup>
							<i class="icon-buffer"></i>
						</a>
					</span>
				</div>
			</div>
		</div>
		<div class="no-entries" ng-show="name && entries.length == 0 && !busy">"{{name}}" ${view.no_unread_items}</div>
		<div modal="shortcutsModal" close="shortcutsModal=false" options="shortcutsOpts">
			<div class="modal-header">
				<button type="button" class="close" ng-click="shortcutsModal=false">&times;</button>
				<h4>${about.keyboard_shortcuts}</h4>
			</div>
			<div ng-include="'templates/_shortcuts.html'"></div>
		</div>
	</div>
	<div style="height: 1000px" ui-if="settingsService.settings.viewMode == 'expanded'"></div>
</div>