2021-02-26 11:48:34 +01:00
|
|
|
import {Component} from "@angular/core";
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'icons-preview',
|
|
|
|
template: `
|
|
|
|
<div class="uk-section uk-container uk-container-large" style="font-size: 14px;">
|
|
|
|
<h4 class="uk-text-bold">Icons</h4>
|
|
|
|
<div class="uk-grid uk-grid-small uk-child-width-1-6" uk-grid>
|
|
|
|
<div class="uk-text-center">
|
|
|
|
<icon name="book"></icon>
|
|
|
|
<div class="uk-text-bold uk-margin-small-top">book</div>
|
|
|
|
</div>
|
|
|
|
<div class="uk-text-center">
|
|
|
|
<icon name="database"></icon>
|
|
|
|
<div class="uk-text-bold uk-margin-small-top">database</div>
|
|
|
|
</div>
|
|
|
|
<div class="uk-text-center">
|
|
|
|
<icon name="cog"></icon>
|
|
|
|
<div class="uk-text-bold uk-margin-small-top">cog</div>
|
|
|
|
</div>
|
|
|
|
<div class="uk-text-center">
|
|
|
|
<icon name="earth"></icon>
|
|
|
|
<div class="uk-text-bold uk-margin-small-top">earth</div>
|
|
|
|
</div>
|
|
|
|
<div class="uk-text-center">
|
2022-04-09 15:18:30 +02:00
|
|
|
<icon name="incognito"></icon>
|
|
|
|
<div class="uk-text-bold uk-margin-small-top">incognito</div>
|
2021-03-24 14:11:27 +01:00
|
|
|
</div>
|
2021-11-29 10:18:42 +01:00
|
|
|
<div class="uk-text-center">
|
2022-04-09 15:18:30 +02:00
|
|
|
<icon name="restricted"></icon>
|
|
|
|
<div class="uk-text-bold uk-margin-small-top">restricted</div>
|
2021-11-29 10:18:42 +01:00
|
|
|
</div>
|
|
|
|
<div class="uk-text-center">
|
2022-04-09 15:18:30 +02:00
|
|
|
<icon name="graph"></icon>
|
|
|
|
<div class="uk-text-bold uk-margin-small-top">graph</div>
|
2021-11-29 10:18:42 +01:00
|
|
|
</div>
|
|
|
|
<div class="uk-text-center">
|
2022-07-04 20:38:27 +02:00
|
|
|
<icon name="orcid_add"></icon>
|
|
|
|
<div class="uk-text-bold uk-margin-small-top">orcid_add</div>
|
|
|
|
</div>
|
|
|
|
<div class="uk-text-center">
|
|
|
|
<icon name="orcid_bin"></icon>
|
|
|
|
<div class="uk-text-bold uk-margin-small-top">orcid_bin</div>
|
|
|
|
</div>
|
|
|
|
<div class="uk-text-center">
|
|
|
|
<icon name="link"></icon>
|
|
|
|
<div class="uk-text-bold uk-margin-small-top">link</div>
|
|
|
|
</div>
|
|
|
|
<div class="uk-text-center">
|
|
|
|
<icon name="quotes"></icon>
|
|
|
|
<div class="uk-text-bold uk-margin-small-top">quotes</div>
|
|
|
|
</div>
|
|
|
|
<div class="uk-text-center">
|
|
|
|
<icon name="mining"></icon>
|
|
|
|
<div class="uk-text-bold uk-margin-small-top">mining</div>
|
2021-11-29 10:18:42 +01:00
|
|
|
</div>
|
2022-12-02 12:01:26 +01:00
|
|
|
<div class="uk-text-center">
|
|
|
|
<icon name="by"></icon>
|
|
|
|
<div class="uk-text-bold uk-margin-small-top">by</div>
|
|
|
|
</div>
|
|
|
|
<div class="uk-text-center">
|
|
|
|
<icon name="cc"></icon>
|
|
|
|
<div class="uk-text-bold uk-margin-small-top">cc</div>
|
|
|
|
</div>
|
|
|
|
<div class="uk-text-center">
|
|
|
|
<icon name="twitter"></icon>
|
|
|
|
<div class="uk-text-bold uk-margin-small-top">twitter</div>
|
|
|
|
</div>
|
|
|
|
<div class="uk-text-center">
|
|
|
|
<icon name="facebook"></icon>
|
|
|
|
<div class="uk-text-bold uk-margin-small-top">facebook</div>
|
|
|
|
</div>
|
|
|
|
<div class="uk-text-center">
|
|
|
|
<icon name="linkedin"></icon>
|
|
|
|
<div class="uk-text-bold uk-margin-small-top">linkedin</div>
|
|
|
|
</div>
|
|
|
|
<div class="uk-text-center">
|
|
|
|
<icon name="slideshare"></icon>
|
|
|
|
<div class="uk-text-bold uk-margin-small-top">slideshare</div>
|
|
|
|
</div>
|
|
|
|
<div class="uk-text-center">
|
|
|
|
<icon name="youtube"></icon>
|
|
|
|
<div class="uk-text-bold uk-margin-small-top">youtube</div>
|
|
|
|
</div>
|
|
|
|
<div class="uk-text-center">
|
|
|
|
<icon name="newsletter"></icon>
|
|
|
|
<div class="uk-text-bold uk-margin-small-top">newsletter</div>
|
|
|
|
</div>
|
2021-02-26 11:48:34 +01:00
|
|
|
</div>
|
|
|
|
<div class="uk-margin-medium-top">
|
|
|
|
<h4 class="uk-text-bold">Usage</h4>
|
|
|
|
<ul class="uk-list">
|
|
|
|
<li>1. Import IconsModule</li>
|
|
|
|
<li>2. Add this to your module with these icons you will need<br>
|
|
|
|
<div class="uk-margin-top">
|
|
|
|
<pre><code>constructor(private iconsService: IconsService) {{ "{" }}
|
|
|
|
this.iconsService.registerIcons([edit]);
|
|
|
|
{{ "}" }}</code></pre>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li>3. Use an icon with icon tag. Add parameter ratio to scale this icon. Default size 20x20 (ratio: 1)<br>
|
|
|
|
<div class="uk-margin-top">
|
|
|
|
<pre><code>{{'<'}}icon name="edit"{{'><'}}/icon{{'>'}}</code></pre>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li>4. Add a color class in parent of icon to give your icon a color.<br>
|
|
|
|
<div class="uk-margin-top">
|
|
|
|
<pre><code>{{'<'}}div class="uk-text-secondary"{{'>'}}
|
|
|
|
{{'<'}}icon name="edit"{{'><'}}/icon{{'>'}}
|
|
|
|
{{'<'}}/div{{'>'}}</code></pre>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="uk-margin-medium-top">
|
|
|
|
<h4 class="uk-text-bold">Add a new icon</h4>
|
|
|
|
<ul class="uk-list">
|
|
|
|
<li>1. Go to <a href="https://material.io/resources/icons/?style=baseline">Material Icons</a></li>
|
|
|
|
<li>2. Find your icon and download it as svg.</li>
|
|
|
|
<li>3. Open svg file with an editor and change width and height to 20</li>
|
|
|
|
<li>4. Create an entry on icons file with your new icon.</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
`
|
|
|
|
})
|
|
|
|
export class IconsPreviewComponent {
|
|
|
|
|
|
|
|
}
|