cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

              <div ng-app="camperNewsApp">
  <h1> Camper News </h1>

  <div ng-controller="mainCtrl">
    <div class="story-block" ng-repeat="story in stories">
      <div class="article">
        <p class="title"> {{story.headline}} </p>
        <p class="date"> Posted On: {{story.timePosted | date:''}} </p>
        <a ng-href="{{story.link}}"> <img ng-src="{{story.image}}"></a>
        <p class="story-description"> {{story.storyLink}} </br> <i class="fa fa-star"></i> {{story.rank}} </p>
      <div class="author">
        <a ng-href="https://www.freecodecamp.com/{{story.author.username}}" title="{{story.author.username}}">
          <img ng-src="{{story.author.picture}}"> </a>
              html {
  box-sizing: border-box; }

*, *::after, *::before {
  box-sizing: inherit; }

body {
  background: #39538D;
  max-width: 68em;
  margin-left: auto;
  margin-right: auto; }
  body::after {
    clear: both;
    content: "";
    display: table; }

h1 {
  text-align: center;
  font-family: "Lucida Grande", "Tahoma", "Verdana", "Arial", sans-serif; }

.title {
  font-size: 20px;
  font-weight: bold;
  word-wrap: break-word;
  text-align: center; }

.story-block {
  float: left;
  display: block;
  margin-right: 2.35765%;
  width: 31.76157%;
  background: #503C91;
  margin: 10px 5px;
  font-family: "Georgia", "Cambria", "Times New Roman", "Times", serif;
  height: 475px;
  font-size: 15px; }
  .story-block:last-child {
    margin-right: 0; }

.date {
  text-align: center; }

.story-description {
  font-style: italic;
  font-size: 20px;
  background: #2B7E7E;
  height: 100px;
  margin: -2.5px;
  width: 295px; }

.article img {
  width: 295px;
  height: 195px;
  margin: auto 25px 0px 25px;
  z-index: -1; }

.author img {
  height: 80px;
  margin: -50px 10px 0px 0px;
  float: right;
  z-index: 1; }

.fa.fa-star {
  color: #B59926; }

/*# sourceMappingURL=main.css.map */

              angular.module('camperNewsApp', [])

.controller('mainCtrl', ['$scope', '$http', function($scope, $http){
		$scope.stories = data;
		for(i = 0; i < $scope.stories.length; i++){
			if($scope.stories[i].image == ""){
				$scope.stories[i].image  ="https://avatars2.githubusercontent.com/u/9892522?v=3&s=400";


Loading ..................