diff --git a/static/directives/twitter-view.html b/static/directives/twitter-view.html new file mode 100644 index 000000000..748a68ab5 --- /dev/null +++ b/static/directives/twitter-view.html @@ -0,0 +1,14 @@ +
+

+ +

+
+ + + + {{ authorName }} (@{{authorUser}}) + {{ messageDate }} + + +
+
diff --git a/static/img/default-twitter.png b/static/img/default-twitter.png new file mode 100644 index 000000000..34c391883 Binary files /dev/null and b/static/img/default-twitter.png differ diff --git a/static/js/app.js b/static/js/app.js index d46b536f3..ada8cc4b1 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -4352,6 +4352,27 @@ quayApp.directive('buildProgress', function () { }); +quayApp.directive('twitterView', function () { + var directiveDefinitionObject = { + priority: 0, + templateUrl: '/static/directives/twitter-view.html', + replace: false, + transclude: true, + restrict: 'C', + scope: { + 'avatarUrl': '@avatarUrl', + 'authorName': '@authorName', + 'authorUser': '@authorUser', + 'messageUrl': '@messageUrl', + 'messageDate': '@messageDate' + }, + controller: function($scope, $element) { + } + }; + return directiveDefinitionObject; +}); + + quayApp.directive('notificationView', function () { var directiveDefinitionObject = { priority: 0, @@ -4747,6 +4768,18 @@ quayApp.directive('tagSpecificImagesView', function () { }); +quayApp.directive('fallbackSrc', function () { + return { + restrict: 'A', + link: function postLink(scope, element, attributes) { + element.bind('error', function() { + angular.element(this).attr("src", attributes.fallbackSrc); + }); + } + }; +}); + + // Note: ngBlur is not yet in Angular stable, so we add it manaully here. quayApp.directive('ngBlur', function() { return function( scope, elem, attrs ) { diff --git a/static/partials/landing-normal.html b/static/partials/landing-normal.html index daa14b079..d2c62027b 100644 --- a/static/partials/landing-normal.html +++ b/static/partials/landing-normal.html @@ -170,78 +170,48 @@