mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
social sharing buttons
This commit is contained in:
@@ -237,6 +237,19 @@
|
||||
border-top: 1px solid #ebebeb;
|
||||
}
|
||||
|
||||
#feed-accordion .entry-buttons .checkbox.inline {
|
||||
padding-top: 0px;
|
||||
}
|
||||
|
||||
#feed-accordion .share-buttons a {
|
||||
color: #333333;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
#feed-accordion .share-buttons a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#feed-accordion .entry-buttons label {
|
||||
margin-bottom: 0px;
|
||||
font-size: 12px;
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
var module = angular.module('commafeed.directives', []);
|
||||
|
||||
module.directive('popup', function() {
|
||||
return {
|
||||
link : function(scope, elm, attrs) {
|
||||
elm.bind('click', function(event) {
|
||||
window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');
|
||||
event.preventDefault();
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
module.directive('favicon', function() {
|
||||
return {
|
||||
restrict : 'E',
|
||||
|
||||
@@ -7,9 +7,13 @@ module.filter('entryDate', function() {
|
||||
var formatted;
|
||||
if (d.date() === now.date() && Math.abs(d.diff(now)) < 86400000) {
|
||||
formatted = d.fromNow();
|
||||
} else {
|
||||
formatted = d.format('YYYY-MM-DD HH:mm');
|
||||
}
|
||||
return formatted;
|
||||
} else {
|
||||
formatted = d.format('YYYY-MM-DD HH:mm');
|
||||
}
|
||||
return formatted;
|
||||
};
|
||||
});
|
||||
|
||||
module.filter('escape', function() {
|
||||
return encodeURIComponent;
|
||||
});
|
||||
@@ -34,10 +34,25 @@
|
||||
<source src="{{entry.enclosureUrl}}" type="{{entry.enclosureType}}" />
|
||||
</audio>
|
||||
<div class="entry-buttons form-horizontal">
|
||||
<label class="checkbox">
|
||||
<label class="checkbox inline">
|
||||
<input type="checkbox" ng-checked="!entry.read" ng-click="mark(entry, !entry.read)"></input>
|
||||
Keep unread
|
||||
</label>
|
||||
|
||||
<span class="share-buttons" ui-if="settingsService.settings.socialButtons">
|
||||
<a href="mailto:?subject={{entry.title}}&body={{entry.url}}" 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}}&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>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -26,6 +26,13 @@
|
||||
Show feeds and categories with no unread entries
|
||||
</label>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" name="socialButtons"
|
||||
ng-model="settings.socialButtons" />
|
||||
Show social sharing buttons
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="custom-css">
|
||||
|
||||
Reference in New Issue
Block a user