From 9638e73e1a9a22fc7f1ea4feafd114d5d514e584 Mon Sep 17 00:00:00 2001 From: Andrea Sonny Date: Sun, 29 Jan 2017 12:39:47 +0000 Subject: [PATCH] fix(@Component): fixing bronex templateurl and styleurls Using templateUrl and styleUrls breaks the module rendering while using the npm package inside an external project. closes #2 --- CHANGELOG.md | 31 ----------- README.md | 3 +- src/cookie-law.component.css | 76 --------------------------- src/cookie-law.component.html | 16 ------ src/cookie-law.component.ts | 98 ++++++++++++++++++++++++++++++++++- 5 files changed, 98 insertions(+), 126 deletions(-) delete mode 100644 CHANGELOG.md delete mode 100644 src/cookie-law.component.css delete mode 100644 src/cookie-law.component.html diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 0961763..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,31 +0,0 @@ -# Changelog - -## 0.1.6 - 2017.01.22 - -* Demo Angular2 app -* `husky` to replace deprecated `ghooks` -* Documentation updated - -## 0.1.3 - 2017.01.22 - -* Commitizen support -* npm publish automated with TravicCI and semantic-release - -## 0.1.2 - 2017.01.21 - -* Coveralls support for unit test code coverage -* Upgrade to Webpack-2.2.0 -* Mocha reporter for unit tests -* Template and CSS in external files - -## 0.1.1 - 2017.01.01 - -* Fixing peerDependencies - -## 0.1.0 - 2017.01.01 - -* Linting and code refactoring - -## 0.0.1 - 2016.12.31 - -* First release diff --git a/README.md b/README.md index 14aa599..5ba98f6 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![Build status](https://ci.appveyor.com/api/projects/status/gy65rk7l0nln23nj?svg=true)](https://ci.appveyor.com/project/andreasonny83/angular2-cookie-law) [![Coverage Status](https://coveralls.io/repos/github/andreasonny83/angular2-cookie-law/badge.svg)](https://coveralls.io/github/andreasonny83/angular2-cookie-law) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) +[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) # angular2-cookie-law @@ -201,7 +202,7 @@ with commitizen node package integrated in this repository. ## Changelog -Changelog available [here](https://github.com/andreasonny83/angular2-cookie-law/blob/master/CHANGELOG.md) +Changelog available [here](https://github.com/andreasonny83/angular2-cookie-law/releases) ## License diff --git a/src/cookie-law.component.css b/src/cookie-law.component.css deleted file mode 100644 index 7b7df77..0000000 --- a/src/cookie-law.component.css +++ /dev/null @@ -1,76 +0,0 @@ -a { - color: #bbb; - -webkit-transition: color .2s; - transition: color .2s; -} -a:hover { - color: #fff; -} -a:hover svg { - fill: #fff; -} -.cookie-law-wrapper { - background: #333; - color: #bbb; - display: block; - font-family: Helvetica Neue,Helvetica,Arial,sans-serif; - font-size: 15px; - font-weight: 200; - line-height: 20px; - position: fixed; - bottom: 0; - left: 0; - width: 100%; - z-index: 999999999; - font-smooth: always; - -webkit-font-smoothing: antialiased; -} -.dismiss { - display: block; - box-sizing: border-box; - padding: 10px; - position: absolute; - top: 0; - right: 10px; - text-decoration: none; - line-height: 20px; -} -.dismiss svg { - display: block; - fill: #bbb; - width: 20px; - height: 20px; - -webkit-transition: fill .2s; - transition: fill .2s; -} -.copy { - box-sizing: border-box; - padding: 10px 60px 10px 10px; -} -.copy strong { - color: #fff; - font-weight: 400; -} -.copy a { - text-decoration: underline; -} -.copy a:active, .copy a:hover { - outline: 0; -} - -@media (min-width: 600px) { - /* For bigger devices: */ - .copy { - padding: 20px 60px 20px 20px; - font-size: 18px; - line-height: 24px; - } - .dismiss { - top: 10px; - right: 15px; - } - .dismiss svg { - width: 24px; - height: 24px; - } -} diff --git a/src/cookie-law.component.html b/src/cookie-law.component.html deleted file mode 100644 index 37c6f5d..0000000 --- a/src/cookie-law.component.html +++ /dev/null @@ -1,16 +0,0 @@ - diff --git a/src/cookie-law.component.ts b/src/cookie-law.component.ts index 5338620..89a7d7e 100644 --- a/src/cookie-law.component.ts +++ b/src/cookie-law.component.ts @@ -31,8 +31,102 @@ import { closeIcon } from './icons'; transition('* => *', animate('1000ms ease-in-out')) ]) ], - templateUrl: './cookie-law.component.html', - styleUrls: ['./cookie-law.component.css'] + template: ` + +`, + styles: [` + a { + color: #bbb; + -webkit-transition: color .2s; + transition: color .2s; + } + a:hover { + color: #fff; + } + a:hover svg { + fill: #fff; + } + .cookie-law-wrapper { + background: #333; + color: #bbb; + display: block; + font-family: Helvetica Neue,Helvetica,Arial,sans-serif; + font-size: 15px; + font-weight: 200; + line-height: 20px; + position: fixed; + bottom: 0; + left: 0; + width: 100%; + z-index: 999999999; + font-smooth: always; + -webkit-font-smoothing: antialiased; + } + .dismiss { + display: block; + box-sizing: border-box; + padding: 10px; + position: absolute; + top: 0; + right: 10px; + text-decoration: none; + line-height: 20px; + } + .dismiss svg { + display: block; + fill: #bbb; + width: 20px; + height: 20px; + -webkit-transition: fill .2s; + transition: fill .2s; + } + .copy { + box-sizing: border-box; + padding: 10px 60px 10px 10px; + } + .copy strong { + color: #fff; + font-weight: 400; + } + .copy a { + text-decoration: underline; + } + .copy a:active, .copy a:hover { + outline: 0; + } + + @media (min-width: 600px) { + /* For bigger devices: */ + .copy { + padding: 20px 60px 20px 20px; + font-size: 18px; + line-height: 24px; + } + .dismiss { + top: 10px; + right: 15px; + } + .dismiss svg { + width: 24px; + height: 24px; + } + } + `] }) export class CookieLawComponent implements OnInit { @Input() learnMore: string = null;