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

Commit cdcf31d

Browse files
fix(codepen): improve use of external css
1 parent 7fac738 commit cdcf31d

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

docs/app/js/codepen.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,13 @@
4848
// additional fields not used by this service. http://blog.codepen.io/documentation/api/prefill
4949
function CodepenDataAdapter() {
5050

51-
var CORE_JS = 'http://localhost:8080/angular-material.js';
52-
var CORE_CSS = 'http://localhost:8080/angular-material.css';
51+
var CORE_JS = 'https://material.angularjs.org/HEAD/angular-material.js'; //'https://localhost:8080/angular-material.js';
52+
var CORE_CSS = 'https://material.angularjs.org/HEAD/angular-material.css'; //'https://localhost:8080/angular-material.css';
53+
var DOC_CSS = 'https://material.angularjs.org/HEAD/docs.css'; // CSS overrides for custom docs
54+
55+
var LINK_FONTS_ROBOTO = '<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic">';
56+
5357
var ASSET_CACHE_JS = 'https://s3-us-west-2.amazonaws.com/s.cdpn.io/t-114/assets-cache.js';
54-
var DOC_CSS = 'https://material.angularjs.org/HEAD/docs.css';
5558

5659
return {
5760
translate: translate
@@ -65,11 +68,13 @@
6568
return {
6669
title: demo.title,
6770
html: processHtml(demo),
68-
head: '<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic">',
69-
css: mergeFiles([files.css,DOC_CSS]).join(' '),
71+
head: LINK_FONTS_ROBOTO,
72+
7073
js: processJs(files.js),
74+
css: mergeFiles( files.css ).join(' '),
75+
7176
js_external: externalScripts.concat([CORE_JS, ASSET_CACHE_JS]).join(';'),
72-
css_external: CORE_CSS
77+
css_external: [CORE_CSS, DOC_CSS].join(';')
7378
};
7479
}
7580

0 commit comments

Comments
 (0)