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" >
<head>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- Angular Material style sheet -->
  <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/angular_material/1.1.12/angular-material.min.css">
  <link href="https://fonts.googleapis.com/css?family=Cute+Font" rel="stylesheet">
</head>
<body ng-app="MyApp" ng-controller="SubheaderAppCtrl">
  <!-- Your HTML content here -->
  
  <!--------  Today's theme --------->
  <div layout="row" class="theme" layout-align="center center">Day 67: Hotel Booking, Day 68: Flight Search, Day 69: Trending, Day 70: Event Listing, Day 71: Schedule</div>

  
  <!--------  Working area --------->
  <div class="working-area">
    <md-toolbar>
      <div class="md-toolbar-tools">       
        Next Destination
      </div>
    </md-toolbar>
    
    <md-content style="height: 500px;" md-theme="altTheme">
<!-- ---------    Trending Destinations   ------------- -->
    <section>
      <md-subheader class="md-primary">Trending Destinations</md-subheader>
      <md-list layout-padding="">
        <md-list-item class="md-3-line" ng-repeat="message in messages">
          
          <img ng-src="{{message.destination}}?{{$index}}" class="destination" alt="{{message.best_for}}">
          <div flex="" class="md-list-item-text">
            <h3>{{message.country}}</h3>
            <h4>{{message.city}}</h4>
            <p>{{message.best_for}}</p>
          </div>

          <md-divider></md-divider>
        </md-list-item>
      </md-list>
    </section>
      
<!-- ---------    Event Listing / Schedule ---------   -->
    <section>
      <md-subheader class="md-primary">Things to do</md-subheader>
      <md-list layout-padding="">
        <md-list-item class="md-3-line" ng-repeat="message in messages">
          <img ng-src="{{message.destination}}?{{$index}}" class="destination" alt="{{message.best_for}}">
          <div flex="" class="md-list-item-text">
            <h3>{{message.country}}</h3>
            <p>{{message.notes}}</p>
          </div>
          <md-divider></md-divider>
        </md-list-item>
      </md-list>
    </section>
      
  </md-content>

 
    <div layout="row" layout-align="space-around center">
      <md-button flex="50" ng-click="showHotels($event)" class="submitButton">Hotels</md-button>
      <md-button flex="50" ng-click="showFlights($event)" class="submitButton">Flights</md-button>
    </div>
      
  </div>
  
  <!--------  Footer --------->
  <div id="footer_container">
    <div layout="row" layout-align="center center"><h3>Youtube tutorial <a href="https://youtu.be/3dEko4NVrFA" target="_blank"> here!</a></h3></div><br>
    <div layout="row" layout-align="center center">Created by Eleftheria</div>
    <div layout="row" layout-align="center center" class="footer">

        <!-- Linkedin -->
        <a href="https://www.linkedin.com/in/eleftheriabatsou/" target="_blank"><img src="https://image.flaticon.com/icons/svg/39/39714.svg" class="footer_image" alt="linkedin" title="linkedin"></a> ~
        <!-- Codepen -->
        <a href="https://codepen.io/EleftheriaBatsou" target="_blank"><img src="https://image.flaticon.com/icons/svg/51/51767.svg" class="footer_image" alt="codepen" title="codepen"></a> ~
        <!-- Youtube -->
        <a href="https://www.youtube.com/c/EleftheriaBatsou" target="_blank"><img src="https://image.flaticon.com/icons/svg/733/733646.svg" class="footer_image" alt="youtube" title="youtube"></a> ~
        <!-- Twitter -->
        <a href="https://twitter.com/BatsouElef" target="_blank"><img src="https://image.flaticon.com/icons/svg/8/8800.svg" class="footer_image" alt="twitter" title="twitter"></a> ~
        <!-- Github -->
        <a href="https://github.com/EleftheriaBatsou" target="_blank"><img src="https://image.flaticon.com/icons/svg/25/25231.svg" class="footer_image" alt="github" title="github"></a> ~ 
        <!-- Instagram -->
        <a href="https://www.instagram.com/eleftheriabatsou/" target="_blank"><img src="https://image.flaticon.com/icons/svg/69/69366.svg" class="footer_image" alt="instagram" title="instagram"></a> ~
      <!-- Website -->
        <a href="http://www.eleftheriabatsou.com" target="_blank"><img src="https://image.flaticon.com/icons/svg/484/484101.svg" class="footer_image" alt="website" title="website"></a>
    </div>
   </div>
  
  <script type="text/ng-template" id="dialog.tmpl.html"><md-dialog aria-label="Hotels">
  <form>
    <md-toolbar>
      <div class="md-toolbar-tools">
        <span flex></span>
        <h2>Search for Hotels</h2>
        <md-button class="md-icon-button" ng-click="cancel()">
          <md-icon md-svg-src="img/icons/ic_close_24px.svg" aria-label="Close dialog"></md-icon>
        </md-button>
      </div>
    </md-toolbar>

    <md-dialog-content>
      <div class="md-dialog-content" style="width: auto;">
        <form name="hotelForm">
          <div layout="row">
            <md-input-container class="md-block">
              <label>Country</label>
              <input name="Country" ng-model="project.Country">
            </md-input-container>

            <md-input-container class="md-block">
              <label>City</label>
              <input required="" name="City" ng-model="project.City">
            </md-input-container>
          </div>
    
          <div layout="row">
            <md-input-container class="md-block">
              <label>Check-in</label>
              <input type="date" name="Check-in" ng-model="project.Check-in">
            </md-input-container>

            <md-input-container class="md-block">
              <label>Check-out</label>
              <input type="date" name="Check-out" ng-model="project.Check-out">
            </md-input-container>
          </div>
    
          <div layout="row">
            <md-input-container class="md-block">
              <label>Adults</label>
              <input required="" type="number" name="Adults" ng-model="project.Adults">
            </md-input-container>
    
            <md-input-container class="md-block">
              <label>Kids</label>
              <input required="" type="number" name="Kids" ng-model="project.Kids">
            </md-input-container>
          </div>

          <md-input-container class="md-block">
          <label>Visitor's Email</label>
          <input name="clientEmail" ng-model="project.clientEmail" minlength="4" maxlength="100" type="email">

          <div ng-messages="projectForm.clientEmail.$error" role="alert">
            <div ng-message-exp="['required', 'minlength', 'maxlength']">
              Your email must be between 4 and 100 characters long and look like an e-mail address.
            </div>
          </div>
        </md-input-container>

        <md-input-container class="md-block">
          <md-checkbox name="tos" ng-model="project.tos" required="">
            I accept the terms of service.
          </md-checkbox>
          <div ng-messages="projectForm.tos.$error" multiple="" md-auto-hide="false">
            <div ng-message="required">
              You must accept the terms of service before you can proceed.
            </div>
          </div>
        </md-input-container>

        <md-dialog-actions layout="row">
          <md-button type="submit" class="submitButton">Search Hotels</md-button>
        </md-dialog-actions>
      </form>
    </md-dialog>
</script>
  
  <script type="text/ng-template" id="dialog2.tmpl.html"><md-dialog aria-label="Flights">
  <form>
    <md-toolbar>
      <div class="md-toolbar-tools">
        <span flex></span>
        <h2>Search for Flights</h2>
        <md-button class="md-icon-button" ng-click="cancel()">
          <md-icon md-svg-src="img/icons/ic_close_24px.svg" aria-label="Close dialog"></md-icon>
        </md-button>
      </div>
    </md-toolbar>

    <md-dialog-content>
      <div class="md-dialog-content" style="width: auto;">
        <form name="FlightsForm">
          <div layout="row">
            <md-input-container class="md-block">
              <label>From (airport)</label>
              <input required="" name="From" ng-model="project.From">
            </md-input-container>

            <md-input-container class="md-block">
              <label>To (city or airport)</label>
              <input required="" name="To" ng-model="project.To">
            </md-input-container>
          </div>
    
          <div layout="row">
            <md-input-container class="md-block">
              <label>Departure</label>
              <input type="date" name="Check-in" ng-model="project.Check-in">
            </md-input-container>

            <md-input-container class="md-block">
              <label>Arrival</label>
              <input type="date" name="Check-out" ng-model="project.Check-out">
            </md-input-container>
          </div>
    
          <div layout="row">
            <md-input-container class="md-block">
              <label>Adults</label>
              <input required="" type="number" name="Adults" ng-model="project.Adults">
            </md-input-container>
    
            <md-input-container class="md-block">
              <label>Kids</label>
              <input required="" type="number" name="Kids" ng-model="project.Kids">
            </md-input-container>
          </div>

          <md-input-container class="md-block">
          <label>Visitor's Email</label>
          <input name="clientEmail" ng-model="project.clientEmail" minlength="4" maxlength="100" type="email">

          <div ng-messages="projectForm.clientEmail.$error" role="alert">
            <div ng-message-exp="['required', 'minlength', 'maxlength']">
              Your email must be between 4 and 100 characters long and look like an e-mail address.
            </div>
          </div>
        </md-input-container>

        <md-input-container class="md-block">
          <md-checkbox name="tos" ng-model="project.tos" required="">
            I accept the terms of service.
          </md-checkbox>
          <div ng-messages="projectForm.tos.$error" multiple="" md-auto-hide="false">
            <div ng-message="required">
              You must accept the terms of service before you can proceed.
            </div>
          </div>
        </md-input-container>

        <md-dialog-actions layout="row">
          <md-button type="submit" class="submitButton">Search Flights</md-button>
        </md-dialog-actions>
      </form>
    </md-dialog>
</script>  

</body>
</html>

              
            
!

CSS

              
                body {  
  background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAATklEQVQoU2O0O3X+PwMDA8MhM0NGEI0LMBKtEJsJD27YgW1R0DgEtwWrdUQrxGYLY8V5iDUdhghrKFOITfenmXFgW/jSF+H3DNEKsdkCAO99IAvXcD3VAAAAAElFTkSuQmCC') repeat;
}

.theme {
  padding: 32px 0;
  font-family: 'Pacifico', cursive; 
}

.working-area {
  width: 330px;
  height: 620px;
  margin: 0 auto;
  background-color: white;
  border: yellow 8px solid;
}

.destination {
  width: 100px;
  height: 110px; 
  padding: 6px 2px;
}

.submitButton{
  background-color: #dc1767 !important;
  color: white !important;
}



#footer_container {
  font-family: 'Pacifico', cursive; 
}
.footer .footer_image {
  height: 24px;
  width:24px;
  text-align: center;
  padding: 4px;
 }

.footer .footer_image:hover,
#footer_container a:hover {
  background-color: lightblue;
}
#footer_container a:link,
#footer_container a:active{
  color: #dc1767;
}

              
            
!

JS

              
                angular.module('MyApp', ['ngMaterial', 'ngMessages', 'material.svgAssetsCache'])
.config(function($mdThemingProvider) {
  $mdThemingProvider.theme('altTheme')
    .primaryPalette('purple');
})
.controller('SubheaderAppCtrl', function($scope, $mdDialog) {
    var imagePath = 'img/list/60.jpeg';
    $scope.messages = [
      {
        destination : 'https://images.unsplash.com/photo-1561229032-820f593637ca?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=60',
        country: 'Greece',
        city: 'Athens',
        best_for: 'Best for: Historical monuments',
        notes: "Schedule: All year long, but preferably during spring that the weather is nice and you can walk in the beatufull historical streets."
      },
      {
        destination : 'https://images.unsplash.com/photo-1554366347-897a5113f6ab?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=60',
        country: 'Greece',
        city: 'Mikonos',
        best_for: 'Best for: Parties',
        notes: "Schedule: From May to October. Life can be quite expensive but I am sure if you like parties you ll enjoy it."
      },
      {
        destination : 'https://images.unsplash.com/photo-1562528856-be97bfa26c09?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=60',
        country: 'Italy',
        city: 'Rome',
        best_for: 'Best for: Arts',
        notes: "Schedule: Rome, Milan, will always be there for you"
      },
      {
        destination : 'https://images.unsplash.com/photo-1562725380-a8de31347ec6?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=60',
        country: 'French',
        city: 'Paris',
        best_for: 'Best for: Couture Fashion',
        notes: "Schedule: Paris Fashion Week in September"
      },
      {
        destination : 'https://images.unsplash.com/photo-1559924046-26005a0aceb5?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=60',
        country: 'Germany',
        city: 'Berlin',
        best_for: 'Best for: Street arts',
        notes: "Schedule: Everytime there is a big event/announcement, you ll find it in Berlin"
      },
      {
        destination : 'https://images.unsplash.com/photo-1563532579684-ea56925cbefc?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=60',
        country: 'The Netherlands',
        city: 'Amsterdam',
        best_for: 'Best for: Parties :) ',
        notes: "Schedule: Mostly in Spring, but Amsterdam is always fun to visit"
      },
      {
        destination : 'https://images.unsplash.com/photo-1562376552-0d160a2f238d?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=60',
        country: 'Greece',
        city: 'Thessaloniki',
        best_for: 'Best for: Relaxation',
        notes: "Schedule: All time long"
      }
    ];
 
  
    // Hotels
    $scope.showHotels = function(ev) {
    $mdDialog.show({
      controller: DialogController,
      templateUrl: 'dialog.tmpl.html',
      parent: angular.element(document.body),
      targetEvent: ev,
      clickOutsideToClose:true
    })
  };
  
    // Flights
    $scope.showFlights = function(ev) {
    $mdDialog.show({
      controller: DialogController,
      templateUrl: 'dialog2.tmpl.html',
      parent: angular.element(document.body),
      targetEvent: ev,
      clickOutsideToClose:true
    })
  };

  function DialogController($scope, $mdDialog) {
    $scope.cancel = function() {
      $mdDialog.cancel();
    };
  }
  
    // Flights
});
              
            
!
999px

Console