Skip to content

Commit

Permalink
fix(custom-html): add padding
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarbeau committed Oct 23, 2018
1 parent 5a99643 commit f3bced5
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 31 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@

<div style=" padding: 20px; " [innerHTML]="html"></div>

<div class="custom-html" [innerHTML]="html"></div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.custom-html {
padding: 20px;
}
6 changes: 1 addition & 5 deletions projects/common/src/lib/custom-html/custom-html.component.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import { Component, Input } from '@angular/core';


@Component({
selector: 'igo-custom-html',
templateUrl: './custom-html.component.html',
styles: ['./custom-html.component.html']
styleUrls: ['./custom-html.component.scss']
})
export class CustomHtmlComponent {


@Input()
get html(): string {
return this._html;
Expand All @@ -19,5 +16,4 @@ export class CustomHtmlComponent {
private _html = '';

constructor() {}

}
6 changes: 0 additions & 6 deletions projects/common/src/lib/custom-html/custom-html.module.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { NgModule, ModuleWithProviders } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import {
MatIconModule,
MatTooltipModule,
MatFormFieldModule,
MatInputModule,
MatButtonModule
} from '@angular/material';
Expand All @@ -13,15 +11,11 @@ import { IgoLanguageModule } from '@igo2/core';

import { CustomHtmlComponent } from './custom-html.component';


@NgModule({
imports: [
CommonModule,
FormsModule,
ReactiveFormsModule,
MatIconModule,
MatTooltipModule,
MatFormFieldModule,
MatInputModule,
MatButtonModule,
IgoLanguageModule
Expand Down
4 changes: 2 additions & 2 deletions projects/common/src/public_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export * from './lib/clickout/clickout.module';
export * from './lib/clone/clone.module';
export * from './lib/collapsible/collapsible.module';
export * from './lib/confirm-dialog/confirm-dialog.module';
export * from './lib/custom-html/custom-html.module';
export * from './lib/drag-drop/drag-drop.module';
export * from './lib/flexible/flexible.module';
export * from './lib/image/image.module';
Expand All @@ -18,13 +19,13 @@ export * from './lib/sidenav/sidenav.module';
export * from './lib/spinner/spinner.module';
export * from './lib/stop-propagation/stop-propagation.module';
export * from './lib/table/table.module';
export * from './lib/custom-html/custom-html.module';

export * from './lib/backdrop';
export * from './lib/clickout';
export * from './lib/clone';
export * from './lib/collapsible';
export * from './lib/confirm-dialog';
export * from './lib/custom-html';
export * from './lib/drag-drop';
export * from './lib/flexible';
export * from './lib/image';
Expand All @@ -36,4 +37,3 @@ export * from './lib/sidenav';
export * from './lib/spinner';
export * from './lib/stop-propagation';
export * from './lib/table';
export * from './lib/custom-html';
27 changes: 14 additions & 13 deletions projects/tools/src/lib/about-tool/about-tool.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,23 @@ import { AboutToolOptions } from './about-tool.interface';
export class AboutToolComponent {
public options: AboutToolOptions = {};
private defaultAboutText = `
<h1>About IGO</h1>
<p>IGO (for Open GIS Infrastructure) is a Free Open Source Software
for Geospatial (FOSS4G) developed by organisations in the government
of Quebec in Canada. The objective is to make it open, common,
modular, based on open governance model supported by multiple
organisations. IGO is a Web GIS software with a client & server
component to manage and publish massive amount of Geospatial data.
</p>
</hr>
<a href='mailto:[email protected]' target='_top'>info[@]igouverte.org</a>
</br>
<a href='http://www.igouverte.org' target='_blank'>www.igouverte.org</A>`;
<h1>About IGO</h1>
<p>IGO (for Open GIS Infrastructure) is a Free Open Source Software
for Geospatial (FOSS4G) developed by organisations in the government
of Quebec in Canada. The objective is to make it open, common,
modular, based on open governance model supported by multiple
organisations. IGO is a Web GIS software with a client & server
component to manage and publish massive amount of Geospatial data.
</p>
</hr>
<a href='mailto:[email protected]' target='_top'>info[@]igouverte.org</a>
</br>
<a href='http://www.igouverte.org' target='_blank'>www.igouverte.org</A>`;

get html(): string {
return this.options.html === undefined
? this.defaultAboutText : this.options.html;
? this.defaultAboutText
: this.options.html;
}

constructor() {}
Expand Down
4 changes: 2 additions & 2 deletions projects/tools/src/public_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*/

export * from './lib/tools.module';
export * from './lib/about-tool/about-tool.module';
export * from './lib/context-manager-tool/context-manager-tool.module';
export * from './lib/context-editor-tool/context-editor-tool.module';
export * from './lib/catalog-tool/catalog-tool.module';
Expand All @@ -17,8 +18,8 @@ export * from './lib/search-results-tool/search-results-tool.module';
export * from './lib/share-map-tool/share-map-tool.module';
export * from './lib/time-analysis-tool/time-analysis-tool.module';
export * from './lib/ogc-filter-tool/ogc-filter-tool.module';
export * from './lib/about-tool/about-tool.module';

export * from './lib/about-tool';
export * from './lib/context-manager-tool';
export * from './lib/context-editor-tool';
export * from './lib/catalog-tool';
Expand All @@ -33,4 +34,3 @@ export * from './lib/search-results-tool';
export * from './lib/share-map-tool';
export * from './lib/time-analysis-tool';
export * from './lib/ogc-filter-tool';
export * from './lib/about-tool';

0 comments on commit f3bced5

Please sign in to comment.