A Pen by ThomasDelteil on CodePen.
Created
April 24, 2018 23:42
-
-
Save ThomasDelteil/2f38f4bcece6d835d74dcaa20e78055c to your computer and use it in GitHub Desktop.
Basic Usage
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
<div ng-controller="AppCtrl" ng-cloak="" class="carddemoBasicUsage" ng-app="MyApp"> | |
<md-content class="md-padding" layout-xs="column" layout="row"> | |
<div flex-xs="" flex-gt-xs="50" layout="column"> | |
<md-card md-theme="{{ showDarkTheme ? 'dark-grey' : 'default' }}" md-theme-watch=""> | |
<md-card-title> | |
<md-card-title-text> | |
<span class="md-headline">Card with image</span> | |
<span class="md-subhead">Large</span> | |
</md-card-title-text> | |
<md-card-title-media> | |
<div class="md-media-lg card-media"></div> | |
</md-card-title-media> | |
</md-card-title> | |
<md-card-actions layout="row" layout-align="end center"> | |
<md-button>Action 1</md-button> | |
<md-button>Action 2</md-button> | |
</md-card-actions> | |
</md-card> | |
<md-card md-theme="{{ showDarkTheme ? 'dark-orange' : 'default' }}" md-theme-watch=""> | |
<md-card-title> | |
<md-card-title-text> | |
<span class="md-headline">Card with image</span> | |
<span class="md-subhead">Extra Large</span> | |
</md-card-title-text> | |
</md-card-title> | |
<md-card-content layout="row" layout-align="space-between"> | |
<div class="md-media-xl card-media"></div> | |
<md-card-actions layout="column"> | |
<md-button class="md-icon-button" aria-label="Favorite"> | |
<md-icon md-svg-icon="img/icons/favorite.svg"></md-icon> | |
</md-button> | |
<md-button class="md-icon-button" aria-label="Settings"> | |
<md-icon md-svg-icon="img/icons/menu.svg"></md-icon> | |
</md-button> | |
<md-button class="md-icon-button" aria-label="Share"> | |
<md-icon md-svg-icon="img/icons/share-arrow.svg"></md-icon> | |
</md-button> | |
</md-card-actions> | |
</md-card-content> | |
</md-card> | |
</div> | |
<div flex-xs="" flex-gt-xs="50" layout="column"> | |
<md-card md-theme="{{ showDarkTheme ? 'dark-purple' : 'default' }}" md-theme-watch=""> | |
<md-card-title> | |
<md-card-title-text> | |
<span class="md-headline">Card with image</span> | |
<span class="md-subhead">Small</span> | |
</md-card-title-text> | |
<md-card-title-media> | |
<div class="md-media-sm card-media"></div> | |
</md-card-title-media> | |
</md-card-title> | |
<md-card-actions layout="row" layout-align="end center"> | |
<md-button>Action 1</md-button> | |
<md-button>Action 2</md-button> | |
</md-card-actions> | |
</md-card> | |
<md-card md-theme="{{ showDarkTheme ? 'dark-blue' : 'default' }}" md-theme-watch=""> | |
<md-card-title> | |
<md-card-title-text> | |
<span class="md-headline">Card with image</span> | |
<span class="md-subhead">Medium</span> | |
</md-card-title-text> | |
<md-card-title-media> | |
<div class="md-media-md card-media"></div> | |
</md-card-title-media> | |
</md-card-title> | |
<md-card-actions layout="row" layout-align="end center"> | |
<md-button>Action 1</md-button> | |
<md-button>Action 2</md-button> | |
</md-card-actions> | |
</md-card> | |
<div layout="" layout-padding="" layout-align="center end" style="height:200px"> | |
<md-checkbox ng-model="showDarkTheme">Use 'Dark' Themed Cards</md-checkbox> | |
</div> | |
</div> | |
</md-content> | |
</div> | |
<!-- | |
Copyright 2016 Google Inc. All Rights Reserved. | |
Use of this source code is governed by an MIT-style license that can be foundin the LICENSE file at http://material.angularjs.org/HEAD/license. | |
--> |
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
angular.module('MyApp', ['ngMaterial', 'ngMessages', 'material.svgAssetsCache']) | |
.controller('AppCtrl', function($scope) { | |
$scope.imagePath = 'img/washedout.png'; | |
}) | |
.config(function($mdThemingProvider) { | |
$mdThemingProvider.theme('dark-grey').backgroundPalette('grey').dark(); | |
$mdThemingProvider.theme('dark-orange').backgroundPalette('orange').dark(); | |
$mdThemingProvider.theme('dark-purple').backgroundPalette('deep-purple').dark(); | |
$mdThemingProvider.theme('dark-blue').backgroundPalette('blue').dark(); | |
}); | |
/** | |
Copyright 2016 Google Inc. All Rights Reserved. | |
Use of this source code is governed by an MIT-style license that can be foundin the LICENSE file at http://material.angularjs.org/HEAD/license. | |
**/ |
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
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.7/angular.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.7/angular-animate.min.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.7/angular-route.min.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.7/angular-aria.min.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.7/angular-messages.min.js"></script> | |
<script src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/t-114/svg-assets-cache.js"></script> | |
<script src="https://cdn.gitcdn.link/cdn/angular/bower-material/v1.1.8/angular-material.js"></script> |
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
.carddemoBasicUsage .card-media { | |
background-color: #999999; } | |
/* | |
Copyright 2016 Google Inc. All Rights Reserved. | |
Use of this source code is governed by an MIT-style license that can be foundin the LICENSE file at http://material.angularjs.org/HEAD/license. | |
*/ |
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
<link href="https://cdn.gitcdn.link/cdn/angular/bower-material/v1.1.8/angular-material.css" rel="stylesheet" /> | |
<link href="https://material.angularjs.org/1.1.8/docs.css" rel="stylesheet" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment