corobor-theme
This project contains the theme for corobor angular applications.
Install
copy corobor-theme-secret in your project root
// Install fontawesome dependencies
npm install @fortawesome/angular-fontawesome --save
npm install @fortawesome/fontawesome-svg-core --save
npm install @fortawesome/free-brands-svg-icons --save
npm install @fortawesome/free-regular-svg-icons --save
npm install @fortawesome/free-solid-svg-icons --save
// Install corobor theme and icons
npm install @coroborsystems/angular-theme --save
In styles.scss
@import '~@coroborsystems/angular-theme/corobor-theme.scss';
In angular.json
index.html
from angular template by index.html
from theme
Replace In section : projects.PROJECT_NAME.architect.build.option
"index": "./node_modules/@coroborsystems/angular-theme/index.html",
Use
Corobor systems Icons can be used with official implementation of angular-fontawesome as a fontawesome icons. documentation
All features supported with fontawesome icons are supported with Corobor Systems icons.
In template
<fa-icon [icon]="faMonoIcon"></fa-icon>
...
<fa-duoton-icon [icon]="faDuoIcon"></fa-duoton-icon>
In the template, prefer to used business name. prefixed by fa
for convention.
By example, prefer faRemveStation
instead faTimes
in the template
Of course in controller you have to expose faTimes
as faRemveStation
;
In controller
import {csTideGauge} from '@coroborsystems/angular-theme/duo';
import {csAcorn} from '@coroborsystems/angular-theme/mono';
...
faMonoIcon = csAcorn;
faDuoIcon = csTideGauge;
Additional feature
Color theme
You can used theme color instead color code. Like this.
<fa-icon [icon]="faMonoIcon" color="primary/accent/warn"></fa-icon>
...
<fa-duoton-icon [icon]="faDuoIcon" primaryColor="primary/accent/warn" secondaryColor="primary/accent/warn"></fa-duoton-icon>
Remember, don't use dirrectly colors in your components. Use theming behavior theming your components
Shake Animation
<fa-icon [icon]="faMonoIcon" shake="true"></fa-icon>
...
<fa-duoton-icon [icon]="faDuoIcon" shake="true"></fa-duoton-icon>
Custom styles
--fa-animation-delay: 0;
--fa-animation-direction: normal;
--fa-animation-duration: 1s;
--fa-animation-iteration-count: infinite;
--fa-animation-timing: linear;
Beat Animation
<fa-icon [icon]="faMonoIcon" beat="true"></fa-icon>
...
<fa-duoton-icon [icon]="faDuoIcon" beat="true"></fa-duoton-icon>
Custom styles
--fa-animation-delay: 0;
--fa-animation-direction: normal;
--fa-animation-duration: 1s;
--fa-animation-iteration-count: infinite;
--fa-animation-timing: ease-in-out;
Fade Animation
<fa-icon [icon]="faMonoIcon" fade="true"></fa-icon>
...
<fa-duoton-icon [icon]="faDuoIcon" fade="true"></fa-duoton-icon>
Custom styles
--fa-animation-delay: 0ms;
--fa-animation-direction: normal;
--fa-animation-duration: 1s;
--fa-animation-iteration-count: infinite;
--fa-animation-timing: cubic-bezier(.4,0,.6,1);
Beat-fade Animation
<fa-icon [icon]="faMonoIcon" beat-fade="true"></fa-icon>
...
<fa-duoton-icon [icon]="faDuoIcon" beat-fade="true"></fa-duoton-icon>
Custom styles
--fa-animation-iteration-count: infinite;
--fa-animation-timing: cubic-bezier(.4,0,.6,1);
--fa-animation-delay: 0ms;
--fa-animation-direction: normal;
--fa-animation-duration: 1s;