forked from siddii/angular-feeds
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request siddii#1 from siddii/my-feeds
My feeds
- Loading branch information
Showing
24 changed files
with
205 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<!doctype html> | ||
<!--[if lt IE 7]> | ||
<html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | ||
<!--[if IE 7]> | ||
<html class="no-js lt-ie9 lt-ie8"> <![endif]--> | ||
<!--[if IE 8]> | ||
<html class="no-js lt-ie9"> <![endif]--> | ||
<!--[if gt IE 8]><!--> | ||
<html class="no-js"> <!--<![endif]--> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<title>Angular Feeds - AngularJS module for Atom, RSS & media feeds...</title> | ||
<meta name="description" content=""> | ||
<meta name="viewport" content="width=device-width"> | ||
<link rel="icon" type="image/ico" href="favicon.ico"/> | ||
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css"/> | ||
<link rel="stylesheet" href="bower_components/Font-Awesome/css/font-awesome.min.css"/> | ||
<link rel="stylesheet" href="angular-feeds/angular-feeds.min.css"> | ||
<link rel="stylesheet" href="styles/my-feeds.css"> | ||
<!-- Google Feeds API script --> | ||
<script type="text/javascript" | ||
src="https://www.google.com/jsapi?autoload=%7B%22modules%22%3A%5B%7B%22name%22%3A%22feeds%22%2C%22version%22%3A%221.0%22%2C%22nocss%22%3Atrue%7D%5D%7D"></script> | ||
</head> | ||
<body ng-app="angular-my-feeds" ng-controller="MyFeedsController"> | ||
|
||
<div class="container"> | ||
<div class="page-header"> | ||
<a ng-show="!isOrigin()" class="btn btn-default btn-sm pull-right" target="_new" href="my-feeds.html"><i class="fa fa-external-link"></i> Open in new window</a> | ||
<h3><i ng-show="isOrigin()" class="fa fa-rss"></i> My Feeds</h3> | ||
</div> | ||
|
||
<div id="my-feeds" class="row"> | ||
<div ng-controller="FeedWidgetController" ng-repeat="feed in feeds" class="col-sm-4"> | ||
<div class="panel panel-default"> | ||
<div class="panel-heading"> | ||
<div ng-include src="'templates/feed-widget-control.html'"></div> | ||
<h3 class="panel-title">{{feed.title}}</h3> | ||
</div> | ||
<div ng-if="!collapsed" class="panel-body feed-body"> | ||
<div class="feed-block" feed-widget> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
|
||
<!--[if lt IE 9]> | ||
<script src="bower_components/es5-shim/es5-shim.js"></script> | ||
<script src="bower_components/json3/lib/json3.min.js"></script> | ||
<![endif]--> | ||
|
||
<script src="bower_components/jquery/jquery.min.js"></script> | ||
<script src="bower_components/angular/angular.min.js"></script> | ||
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script> | ||
<script src="bower_components/angular-sanitize/angular-sanitize.min.js"></script> | ||
<script src="angular-feeds/angular-feeds.min.js"></script> | ||
<script src="scripts/my-feeds.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[ | ||
{ | ||
"title": "Hacker News", | ||
"url": "https://news.ycombinator.com/rss", | ||
"count": 10 | ||
}, | ||
{ | ||
"title": "DZone", | ||
"url": "http://feeds.dzone.com/dzone/frontpage?format=xml", | ||
"count": 10 | ||
}, | ||
{ | ||
"title": "Reddit Programming", | ||
"url": "http://www.reddit.com/r/programming/.rss", | ||
"count": 10 | ||
} | ||
] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
angular.module('angular-feeds-tester', [ | ||
'feeds' | ||
]).controller('FeedTesterController', ['$scope', '$compile', function ($scope, $compile) { | ||
$scope.count = 10; | ||
$scope.summary = false; | ||
$scope.showFeed = function (){ | ||
var $panelBody = $('.panel-body'); | ||
$panelBody.html(''); | ||
var feedHTML = "<feed url='" + $scope.url + "' count='" + $scope.count + "' summary='" + $scope.summary + "'/>"; | ||
$panelBody.append($compile(feedHTML)($scope)); | ||
}; | ||
|
||
var url = window.location.href.substring(window.location.href.lastIndexOf('/') + 1); | ||
$scope.isOrigin = function (){ | ||
return window.parent.location.href.indexOf(url) === -1; | ||
}; | ||
}]); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
angular.module('angular-my-feeds', [ | ||
'feeds' | ||
]) | ||
.controller('MyFeedsController', ['$scope', '$compile', '$http', '$rootScope', function ($scope, $compile, $http, $rootScope) { | ||
$scope.isOrigin = function () { | ||
var url = window.location.href.substring(window.location.href.lastIndexOf('/') + 1); | ||
return window.parent.location.href.indexOf(url) !== -1; | ||
}; | ||
|
||
$http.get('my-feeds.json').success(function (feeds) { | ||
$scope.feeds = feeds; | ||
}); | ||
}]) | ||
.directive('feedWidget', ['$compile', function ($compile) { | ||
return { | ||
restrict: 'A', | ||
controller: ['$scope', '$element', '$attrs', '$timeout', function ($scope, $element) { | ||
var feed = $scope.feed; | ||
var feedHTML = "<feed url='" + feed.url + "' count='" + feed.count + "' post-render='feedPostRender'/>"; | ||
$element.append($compile(feedHTML)($scope)); | ||
}] | ||
}; | ||
}]) | ||
.controller('FeedWidgetController', ['$scope', function ($scope) { | ||
$scope.toggleFeed = function () { | ||
$scope.collapsed = !$scope.collapsed; | ||
}; | ||
}]); | ||
|
||
function feedPostRender(element) { | ||
$(element).find('a').attr('target', '_blank'); | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
body { | ||
padding-top: 0; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
body { | ||
padding-top: 0; | ||
} | ||
|
||
.feed-body { | ||
height: 400px; | ||
overflow: auto; | ||
} | ||
|
||
.media { | ||
margin-top: 0; | ||
} | ||
|
||
hr { | ||
margin-bottom: 10px; | ||
margin-top: 10px; | ||
} | ||
|
||
.fa-chevron-circle-down { | ||
cursor: pointer; | ||
} | ||
|
||
.fa-chevron-circle-up { | ||
cursor: pointer; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div class="pull-right feed-control"> | ||
<i ng-click="toggleFeed();" class="fa {{!collapsed ? 'fa-chevron-circle-down' : 'fa-chevron-circle-up'}}"></i> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<div class="panel panel-default"> | ||
<div class="panel-heading"> | ||
<div ng-include src="'templates/feed-control.html'"></div> | ||
<h3 class="panel-title">{{title}}</h3> | ||
</div> | ||
<div class="panel-body"> | ||
<div class="feed-block"> | ||
{{feed_html}} | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div> | ||
<iframe width="100%" height="800px" scrolling="auto" frameborder="0" src="my-feeds.html"></iframe> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta http-equiv="refresh" content="0; url=./app/" /> | ||
</head> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters