Pen Settings

HTML

CSS

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.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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.

+ add another resource

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <html lang="en" ng-app="trainList">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1 user-scalable=no">
  <meta http-equiv="refresh" content="30"/>
  <title>Departure Board</title>
  <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
  <link href='https://fonts.googleapis.com/css?family=VT323' rel='stylesheet' type='text/css'>
  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.min.js"></script>
  <script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
</head>
<body>

  <div class="container"  ng-controller="TrainList">
  
  <div class="row">
    
    <div class="col-sm-12">
  
      <div role="tabpanel">

      <!-- Nav tabs -->
      <ul class="nav nav-tabs" role="tablist">
        <li role="presentation"><a href="#morning" aria-controls="home" role="tab" data-toggle="tab">OUTWARD</a></li>
        <li role="presentation" class="active"><a href="#evening" aria-controls="profile" role="tab" data-toggle="tab">RETURN</a></li>
      </ul>

      <!-- Tab panes -->
      <div class="tab-content">
        
        <div role="tabpanel" class="tab-pane" id="morning">
          
          <div class="row">
            <div class="col-xs-4">
              <h3>SERVICE</h3>
            </div>
            <div class="col-xs-4">
              <h3>EXPECTED</h3>
            </div>
            <div class="col-xs-4">
              <h3>CARRIAGES</h3>
            </div>
          </div>
   
      <div class="row" ng-repeat="service in mornServices">
							
			        <div class="col-xs-4"><p>	    {{service.std}} </p></div>
        <div class="col-xs-4">
        <p>{{service.etd}}</p>
        <p>{{service.delayReason}}</p>
        <p>{{service.cancelReason}}</p>
        </div>
        <div class="col-xs-4">
          {{service.length}}
        </div>
	      </div>
   
        </div>
        
        <div role="tabpanel" class="tab-pane active" id="evening">
           <div class="row">
                <div class="col-xs-3">
                  <h3>TO KINGS LANGLEY</h3>
                </div>
           </div>
           <div class="row">
            <div class="col-xs-3">
              <h3>SERVICE</h3>
            </div>
            <div class="col-xs-3">
              <h3>EXPECTED</h3>
            </div>
            <div class="col-xs-3">
              <h3>PLATFORM</h3>
            </div>
             <div class="col-xs-3">
              <h3>CARRIAGES</h3>
            </div>
          </div>
      <div class="row" ng-repeat="service in eveServices">
							
        <div class="col-xs-3"><p>	    {{service.std}} </p>
                </p></div>
        <div class="col-xs-3">
        <p>{{service.etd}}</p>
        <p>{{service.delayReason}}</p>
        <p>{{service.cancelReason}}</p>
        </div>
        <div class="col-xs-3">
          {{service.platform}}
        </div>
        <div class="col-xs-3">
          {{service.length}}
        </div>
			       
        </div>
        
        <div class="row">
            <div class="col-xs-3">
              <h3>TO WATFORD</h3>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-3">
              <h3>SERVICE<br />OPERATOR</h3>
            </div>
            <div class="col-xs-3">
              <h3>EXPECTED</h3>
            </div>
            <div class="col-xs-3">
                <h3>PLATFORM</h3>
              </div>
            <div class="col-xs-3">
              <h3>CARRIAGES</h3>
            </div>
          </div>
        <div class="row" ng-repeat="service in watServices">
							
            <div class="col-xs-3"><p>	    {{service.std}}<br />{{service.operatorCode}}</p></div>
            <div class="col-xs-3">
            <p>{{service.etd}}</p>
            <p>{{service.delayReason}}</p>
            <p>{{service.cancelReason}}</p>
            </div>
            <div class="col-xs-3">
              {{service.platform}}
            </div>
            <div class="col-xs-3">
              {{service.length}}
            </div>
                 
            </div>
  
        </div>
      </div>

    </div>
      
  </div>
    
</div>

</div>
    
<p class="text-center">
<a href="http://www.tjmortimer.com" title="TJMortimer.com" target="_blank">See more work on TJMortimer.com</a> or 
<a href="https://codepen.io/TJMortimer/pen/mYMgWa" title="Source on Codepen" target="_blank">View source on Codepen</a>
</p>    
  
  <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
</body>
</html>
              
            
!

CSS

              
                @import "lesshat";

body {
  background-color:#ccc!important;
  p {
    a {
      font-weight:bold;
      color:black;
    }
  }
}
.container {
  background: black;
  color:yellow;
  font-family: 'VT323', 'arial' ;
  font-size:19px;
  -webkit-box-shadow: 8px 6px 10px 0px rgba(50, 50, 50, 0.75);
	-moz-box-shadow:    8px 6px 10px 0px rgba(50, 50, 50, 0.75);
	box-shadow:         8px 6px 10px 0px rgba(50, 50, 50, 0.75);
}
li {
  list-style:none;
}
.nav.nav-tabs {
    padding-top:10px;
    border-bottom:1px solid yellow;
    li {
    background:black;
    border:1px solid yellow;
      a {
        color:white;
      }
    }
}
.nav-tabs>li.active>a, .nav-tabs>li.active>a:hover, .nav-tabs>li.active>a:focus, .nav-tabs>li>a:hover, .nav-tabs>li>a:focus {
  background-color:yellow!important;
  border:1px solid yellow!important;
  border-radius:0!important;
  color:black!important;
}
/*Equalizing margins*/
.destination {
  margin-top:20px;
}
.destination2 {
  margin-top: 10px;
}
/*Let's hide Cheddington cos 13 won't fit and no-one goes there anyway!*/
.eightohonenames:nth-of-type(4), .eightohonetimes:nth-of-type(4) {
  display:none;
}
/*MQs*/
@media (max-width:767px) {
  .nav.nav-tabs li {
    width:50%;
  }
  h3 {
    font-size:20px!important;
  }
}
              
            
!

JS

              
                /*Angular Controller START*/

/*Name app*/
var trainList = angular.module('trainList', []);

/*Name controller and call Angular functions*/
trainList.controller('TrainList', function ($scope, $http) {

  /*Fetch EUS-KGL departures*/
   $http.get('https://huxley.apphb.com/departures/eus/to/kgl/10?accessToken=ddc651f3-f05f-4584-a4e5-1a413275df44').success(function(data) {
    	$scope.eveServices = data.trainServices;
    });

  /*FETCH EUS-WFJ DEPARTURES*/
  $http.get('https://huxley.apphb.com/departures/eus/to/wfj/5?accessToken=ddc651f3-f05f-4584-a4e5-1a413275df44').success(function(data) {
    	$scope.watServices = data.trainServices;
    });
  
  /*Fetch HML departures*/
  $http.get('https://huxley.apphb.com/departures/kgl/to/eus/10?accessToken=ddc651f3-f05f-4584-a4e5-1a413275df44').success(function(data) {
    	$scope.mornServices = data.trainServices;
    });
  
});

/*Angular Controller END*/
              
            
!
999px

Console