Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Fix asset urls for examples that load images/icons #60

Merged
merged 3 commits into from
Dec 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/examples/card-fancy/card-fancy-example.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
}

.example-header-image {
background-image: url('shiba1.jpg');
background-image: url('assets/img/examples/shiba1.jpg');
background-size: cover;
}
2 changes: 1 addition & 1 deletion src/app/examples/card-fancy/card-fancy-example.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<md-card-title>Shiba Inu</md-card-title>
<md-card-subtitle>Dog Breed</md-card-subtitle>
</md-card-header>
<img md-card-image src="shiba2.jpg">
<img md-card-image src="assets/img/examples/shiba2.jpg">
<md-card-content>
<p>
The Shiba Inu is the smallest of the six original and distinct spitz breeds of dog from Japan.
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion src/app/examples/icon-svg-example/icon-svg-example.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<md-icon svgSrc="ic_3d_rotation_black_24px.svg"></md-icon>
<md-icon svgIcon="thumbs-up"></md-icon>
10 changes: 9 additions & 1 deletion src/app/examples/icon-svg-example/icon-svg-example.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
import {Component} from '@angular/core';
import {DomSanitizer} from '@angular/platform-browser';
import {MdIconRegistry} from '@angular/material';


@Component({
selector: 'icon-svg-example',
templateUrl: './icon-svg-example.html',
})
export class IconSvgExample {}
export class IconSvgExample {
constructor(iconRegistry: MdIconRegistry, sanitizer: DomSanitizer) {
iconRegistry.addSvgIcon(
'thumbs-up',
sanitizer.bypassSecurityTrustResourceUrl('assets/img/examples/thumbup-icon.svg'));
}
}
2 changes: 1 addition & 1 deletion src/app/pages/homepage/homepage.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h2>Fast and Consistent</h2>
</div>
<div class="docs-homepage-promo-desc">
<h2>Versatile</h2>
<p>Themable, for when you need to stay on brand or just have a facourite color.
<p>Themable, for when you need to stay on brand or just have a favorite color.
Accessible and internationalized so that all users are welcome.</p>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/assets/documents/overview/icon.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p><code>md-icon</code> makes it easier to use <em>vector-based</em> icons in your app. This directive supports both
icon fonts and SVG icons, but not bitmap-based formats (png, jpg, etc.).</p>
<div material-docs-example="icon-example"></div>
<div material-docs-example="icon-overview"></div>
<h3 id="registering-icons">Registering icons</h3>
<p><code>MdIconRegistry</code> is an injectable service that allows you to associate icon names with SVG URLs and
define aliases for CSS font classes. Its methods are discussed below and listed in the API summary.</p>
Expand Down
4 changes: 4 additions & 0 deletions src/assets/img/examples/thumbup-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.